better error message and loading view
This commit is contained in:
@ -56,7 +56,16 @@ class _PreviewGridState extends State<PreviewGrid> {
|
||||
builder:
|
||||
(BuildContext context, AsyncSnapshot<List<VideoT>> snapshot) {
|
||||
if (snapshot.hasError) {
|
||||
return Text("Error");
|
||||
return Column(
|
||||
children: [
|
||||
Text("Error"),
|
||||
TextButton(
|
||||
onPressed: () {
|
||||
loadData();
|
||||
},
|
||||
child: Text("Reload page"))
|
||||
],
|
||||
);
|
||||
} else if (snapshot.hasData) {
|
||||
return _mainGrid(snapshot.data!, width);
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user