Browse Source

button refresh data when plot action history empty

master
daivph 5 years ago
parent
commit
81ba3a7df6
2 changed files with 17 additions and 2 deletions
  1. +1
    -1
      ios/Flutter/.last_build_id
  2. +16
    -1
      lib/presentation/screens/plot_detail/sc_plot_history.dart

+ 1
- 1
ios/Flutter/.last_build_id View File

@@ -1 +1 @@
d91c957b2422e26116533c8dae89710a
329a3fa2a6f3d6a55aa2982e8bca2c5e

+ 16
- 1
lib/presentation/screens/plot_detail/sc_plot_history.dart View File

@@ -96,7 +96,22 @@ class _InfinityViewState extends State<InfinityView> {
}
if (state is PlotDetailSuccess) {
if (state.items.isEmpty) {
return Center(child: Text("Không có dữ liệu lịch sử canh tác"));
return Center(
child: Column(
mainAxisSize: MainAxisSize.max,
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text("Không có dữ liệu lịch sử canh tác"),
OutlineButton(
onPressed: () {
plotDetailBloc.add(OnRefresh(
cropId: widget.cropId, cropCode: widget.cropCode));
},
child: Text('Tải lại'),
)
],
));
}
List<Activities> currentItems = List<Activities>.from(state.items);
return SafeArea(

Loading…
Cancel
Save