|
|
|
@ -27,7 +27,41 @@ class ViewStationPageMaterial extends ViewStationPageShared {
|
|
|
|
|
body: snapshot.state == RefreshFutureBuilderState.waiting |
|
|
|
|
? const Loading(text: ViewStationPageShared.loadingText,) |
|
|
|
|
: snapshot.state == RefreshFutureBuilderState.error |
|
|
|
|
? Container() |
|
|
|
|
? Padding( |
|
|
|
|
padding: const EdgeInsets.all(8.0), |
|
|
|
|
child: Center( |
|
|
|
|
child: Column( |
|
|
|
|
mainAxisSize: MainAxisSize.min, |
|
|
|
|
children: [ |
|
|
|
|
const Icon( |
|
|
|
|
Icons.error_outline, |
|
|
|
|
size: 32, |
|
|
|
|
color: Colors.red, |
|
|
|
|
), |
|
|
|
|
const Text( |
|
|
|
|
ViewStationPageShared.errorText, |
|
|
|
|
style: TextStyle( |
|
|
|
|
inherit: true, |
|
|
|
|
fontSize: 32, |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
Text( |
|
|
|
|
snapshot.error.toString(), |
|
|
|
|
style: Theme.of(context).textTheme.bodySmall, |
|
|
|
|
), |
|
|
|
|
Padding( |
|
|
|
|
padding: const EdgeInsets.all(8.0), |
|
|
|
|
child: ElevatedButton( |
|
|
|
|
onPressed: () { |
|
|
|
|
refresh(); |
|
|
|
|
}, |
|
|
|
|
child: const Text(ViewStationPageShared.retryText), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
) |
|
|
|
|
: CustomScrollView( |
|
|
|
|
slivers: [ |
|
|
|
|
SliverToBoxAdapter(child: SafeArea(left: false, bottom: false, right: false,child: Container(),),), |
|
|
|
|