Created with <3 with dartpad.dev.
Created
August 18, 2022 00:51
-
-
Save utamori/96d5e0bbed8341059b871f7b9dcf7a69 to your computer and use it in GitHub Desktop.
resonating-crest-7130
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'; | |
void main() => runApp(const MyApp()); | |
class MyApp extends StatelessWidget { | |
const MyApp({Key? key}) : super(key: key); | |
static const String _title = 'Flutter Code Sample'; | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( | |
title: _title, | |
home: Scaffold( | |
appBar: AppBar(title: const Text(_title)), | |
body: const MyStatelessWidget(), | |
), | |
); | |
} | |
} | |
class MyStatelessWidget extends StatelessWidget { | |
const MyStatelessWidget({Key? key}) : super(key: key); | |
@override | |
Widget build(BuildContext context) { | |
return DataTable( | |
headingRowHeight: 0, | |
columns: <DataColumn>[ | |
DataColumn(label: Container()), | |
DataColumn(label: Container()), | |
DataColumn(label: Container()), | |
], | |
rows: const <DataRow>[ | |
DataRow( | |
cells: <DataCell>[ | |
DataCell(Text('Sarah')), | |
DataCell(Text('19')), | |
DataCell(Text('Student')), | |
], | |
), | |
DataRow( | |
cells: <DataCell>[ | |
DataCell(Text('Janine')), | |
DataCell(Text('43')), | |
DataCell(Text('Professor')), | |
], | |
), | |
DataRow( | |
cells: <DataCell>[ | |
DataCell(Text('William')), | |
DataCell(Text('27')), | |
DataCell(Text('Associate Professor')), | |
], | |
), | |
], | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment