diff --git a/lib/main.dart b/lib/main.dart index eed2b09..da4a884 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -265,13 +265,20 @@ class _MainPageState extends State with WidgetsBindingObserver { return result; } - List buildUIViews() { - List result = []; + List buildUIViews() { + List result = []; if ((_entitiesData != null) && (_uiStructure != null)) { _uiStructure.forEach((viewId, structure) { - result.add(ListView( - children: buildSingleView(structure), - )); + result.add( + RefreshIndicator( + color: Colors.amber, + child: ListView( + physics: const AlwaysScrollableScrollPhysics(), + children: buildSingleView(structure), + ), + onRefresh: () => _refreshData(), + ) + ); }); } return result; @@ -470,11 +477,6 @@ class _MainPageState extends State with WidgetsBindingObserver { body: TabBarView( children: buildUIViews() ), - floatingActionButton: new FloatingActionButton( - onPressed: _refreshData, - tooltip: 'Increment', - child: new Icon(Icons.refresh), - ), ) ); }