Created
September 30, 2020 18:06
-
-
Save kirshiyin89/9994346c29dd49f82adb8e208cbb8791 to your computer and use it in GitHub Desktop.
the datatablewidget state class holding the data table
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
class _DataTableWidgetState extends State<DataTableWidget> { | |
_DataTableWidgetState(this.listOfColumns); | |
final Future<List<ConfigData>> listOfColumns; | |
@override | |
Widget build(BuildContext context) { | |
return FutureBuilder<List<ConfigData>>( | |
future: this.listOfColumns, | |
builder: (context, snapshot) { | |
switch (snapshot.connectionState) { | |
case ConnectionState.none: | |
case ConnectionState.waiting: | |
return CircularProgressIndicator(); | |
default: | |
return generateTable(context, snapshot.data); | |
} | |
}); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment