1
0
mirror of https://gitlab.com/comunic/comunicmobile synced 2024-11-25 22:39:22 +00:00

Improved loading bar

This commit is contained in:
Pierre HUBERT 2019-05-02 08:14:54 +02:00
parent 21a60f423b
commit a80ccb0a9f

View File

@ -96,13 +96,13 @@ class _FriendsListScreenState extends SafeState<FriendsListScreen> {
if (_error == _ErrorsLevel.MAJOR) return _buildError();
if (_friendsList == null) return buildCenteredProgressBar();
return Column(
return Stack(
children: <Widget>[
Column(
children: <Widget>[
// Check for errors
Container(child: _error != _ErrorsLevel.NONE ? _buildError() : null),
// Check if loading
Container(child: _loading ? CircularProgressIndicator() : null),
Container(
child: _error != _ErrorsLevel.NONE ? _buildError() : null),
// List of friends
Expanded(
@ -123,6 +123,18 @@ class _FriendsListScreenState extends SafeState<FriendsListScreen> {
)),
),
],
),
// Check if loading
Positioned(
child: Container(
child:
_loading ? Center(child: CircularProgressIndicator()) : null),
top: 16.0,
left: 0.0,
right: 0.0,
),
],
);
}