Last active
March 16, 2019 17:02
-
-
Save figengungor/63dddc1fd5c3c0210e572eb39ec80995 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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