mirror of
https://github.com/wger-project/flutter.git
synced 2026-02-18 23:42:00 +01:00
Set the height of container with progress indicators
This makes the result less jumpy
This commit is contained in:
@@ -60,7 +60,10 @@ class _DashboardNutritionWidgetState extends State<DashboardNutritionWidget> {
|
||||
FutureBuilder(
|
||||
future: _refreshPlanEntries(context),
|
||||
builder: (context, snapshot) => snapshot.connectionState == ConnectionState.waiting
|
||||
? Center(child: CircularProgressIndicator())
|
||||
? Container(
|
||||
height: 180,
|
||||
child: Center(child: CircularProgressIndicator()),
|
||||
)
|
||||
: plan != null
|
||||
? Column(
|
||||
children: [
|
||||
@@ -125,7 +128,10 @@ class _DashboardWeightWidgetState extends State<DashboardWeightWidget> {
|
||||
FutureBuilder(
|
||||
future: _refreshWeightEntries(context),
|
||||
builder: (context, snapshot) => snapshot.connectionState == ConnectionState.waiting
|
||||
? Center(child: CircularProgressIndicator())
|
||||
? Container(
|
||||
height: 180,
|
||||
child: Center(child: CircularProgressIndicator()),
|
||||
)
|
||||
: Column(
|
||||
children: [
|
||||
Icon(Icons.bar_chart),
|
||||
|
||||
@@ -44,7 +44,10 @@ class ExerciseLog extends StatelessWidget {
|
||||
FutureBuilder(
|
||||
future: _getChartEntries(context),
|
||||
builder: (context, snapshot) => snapshot.connectionState == ConnectionState.waiting
|
||||
? Center(child: CircularProgressIndicator())
|
||||
? Container(
|
||||
height: 120,
|
||||
child: Center(child: CircularProgressIndicator()),
|
||||
)
|
||||
: Column(
|
||||
children: [
|
||||
Container(
|
||||
|
||||
Reference in New Issue
Block a user