Skip to content

Instantly share code, notes, and snippets.

@figengungor
Last active March 16, 2019 17:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save figengungor/63dddc1fd5c3c0210e572eb39ec80995 to your computer and use it in GitHub Desktop.
Save figengungor/63dddc1fd5c3c0210e572eb39ec80995 to your computer and use it in GitHub Desktop.
import 'package:flutter/material.dart';
import 'package:table/demo.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Table Playground',
theme: ThemeData(
primarySwatch: Colors.blue,
),
routes: {
'/': (context) => HomePage(),
},
);
}
}
class HomePage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: Text('Table Playground')),
body: Padding(
padding: const EdgeInsets.all(8.0),
child: Table(
border: TableBorder.all(color: Colors.orange),
defaultVerticalAlignment: TableCellVerticalAlignment.middle,
children: [
TableRow(
children: [
Text('Product' * 10),
Table(
border: TableBorder(
verticalInside: BorderSide(color: Colors.orange),
horizontalInside: BorderSide(color: Colors.orange)),
children: <TableRow>[
TableRow(
children: [
Text(
'Max',
textAlign: TextAlign.center,
),
Text(
'Min',
textAlign: TextAlign.center,
),
],
),
TableRow(
children: [
Text(
'100',
textAlign: TextAlign.center,
),
Text(
'20',
textAlign: TextAlign.center,
),
],
)
],
),
],
),
],
),
),
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment