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)
return const Center(child: CircularProgressIndicator());
if (plans == null) return Container();
return PlanList(plans: plans);
}),

View File

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

View File

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

View File

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