Remove circular progress indicators

Our app is so fast these will look like bugs to flicker
in front of the user.
This commit is contained in:
Brandon Presley 2023-11-30 10:37:50 +13:00
parent b6a73c398e
commit 19f9dd9b3b
4 changed files with 11 additions and 10 deletions

View File

@ -76,8 +76,7 @@ class _PlansPageState extends State<_PlansPage> {
)), )),
); );
if (plans == null) if (plans == null) return Container();
return const Center(child: CircularProgressIndicator());
return PlanList(plans: plans); return PlanList(plans: plans);
}), }),

View File

@ -69,10 +69,6 @@ class _SetList extends State<SetList> {
pagingController: pagingController, pagingController: pagingController,
gymSet: gymSet, gymSet: gymSet,
), ),
firstPageProgressIndicatorBuilder: (_) =>
const Center(child: CircularProgressIndicator()),
newPageProgressIndicatorBuilder: (_) =>
const Center(child: CircularProgressIndicator()),
), ),
), ),
floatingActionButton: FloatingActionButton( floatingActionButton: FloatingActionButton(

View File

@ -53,8 +53,7 @@ class _SettingsPageState extends State<_SettingsPage> {
final settings = snapshot.data; final settings = snapshot.data;
print('build: $settings'); print('build: $settings');
if (settings == null) if (settings == null) return Container();
return const Center(child: CircularProgressIndicator());
final filteredItems = [ final filteredItems = [
{'title': 'Alarm', 'value': settings.alarm}, {'title': 'Alarm', 'value': settings.alarm},

View File

@ -112,8 +112,7 @@ class _StartPlanState extends State<StartPlan> {
}, },
icon: const Icon(Icons.edit))); icon: const Icon(Icons.edit)));
if (totals.isEmpty || counts.isEmpty) if (totals.isEmpty || counts.isEmpty) return Container();
return const CircularProgressIndicator();
return SafeArea( return SafeArea(
child: Scaffold( child: Scaffold(
@ -156,11 +155,19 @@ class _StartPlanState extends State<StartPlan> {
decoration: const InputDecoration(labelText: 'Reps'), decoration: const InputDecoration(labelText: 'Reps'),
controller: repsController, controller: repsController,
focusNode: repsNode, focusNode: repsNode,
onTap: () {
repsController.selection = TextSelection(
baseOffset: 0, extentOffset: repsController.text.length);
},
), ),
TextFormField( TextFormField(
decoration: const InputDecoration(labelText: 'Weight'), decoration: const InputDecoration(labelText: 'Weight'),
controller: weightController, controller: weightController,
focusNode: weightNode, focusNode: weightNode,
onTap: () {
weightController.selection = TextSelection(
baseOffset: 0, extentOffset: weightController.text.length);
},
), ),
], ],
), ),