Skip to content

Commit

Permalink
feat(#480): improve styling
Browse files Browse the repository at this point in the history
  • Loading branch information
tamslo committed Jun 19, 2023
1 parent 468043a commit 01547ca
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions app/lib/drugselection/pages/drugselection.dart
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,10 @@ class DrugSelectionPage extends HookWidget {
child: Padding(

Check warning on line 22 in app/lib/drugselection/pages/drugselection.dart

View check run for this annotation

Codecov / codecov/patch

app/lib/drugselection/pages/drugselection.dart#L16-L22

Added lines #L16 - L22 were not covered by tests
padding: const EdgeInsets.all(16),
child: ListView(
shrinkWrap: true,
children: state.when(
stable: () => [
_buildHeader(context),
..._buildDrugList(context),
],
updating: () => [
_buildHeader(context),
..._buildDrugList(context, enabled: false),
],
),
children: [
_buildHeader(context),
..._buildDrugList(context, state),

Check warning on line 27 in app/lib/drugselection/pages/drugselection.dart

View check run for this annotation

Codecov / codecov/patch

app/lib/drugselection/pages/drugselection.dart#L24-L27

Added lines #L24 - L27 were not covered by tests
],
),
),
),
Expand Down Expand Up @@ -64,8 +57,17 @@ class DrugSelectionPage extends HookWidget {
);
}

List<Widget> _buildDrugList(BuildContext context, {bool enabled = true}) {
List<Widget> _buildDrugList(

Check warning on line 60 in app/lib/drugselection/pages/drugselection.dart

View check run for this annotation

Codecov / codecov/patch

app/lib/drugselection/pages/drugselection.dart#L60

Added line #L60 was not covered by tests
BuildContext context,
DrugSelectionPageState state
) {
var enabled = true;
state.when(
stable: () => enabled = true,
updating: () => enabled = false

Check warning on line 67 in app/lib/drugselection/pages/drugselection.dart

View check run for this annotation

Codecov / codecov/patch

app/lib/drugselection/pages/drugselection.dart#L65-L67

Added lines #L65 - L67 were not covered by tests
);
return [

Check warning on line 69 in app/lib/drugselection/pages/drugselection.dart

View check run for this annotation

Codecov / codecov/patch

app/lib/drugselection/pages/drugselection.dart#L69

Added line #L69 was not covered by tests
// ...[...CachedDrugs.instance.drugs!, ...CachedDrugs.instance.drugs!, ...CachedDrugs.instance.drugs!].map(
...CachedDrugs.instance.drugs!.map(
(drug) => CheckboxListTile(

Check warning on line 72 in app/lib/drugselection/pages/drugselection.dart

View check run for this annotation

Codecov / codecov/patch

app/lib/drugselection/pages/drugselection.dart#L71-L72

Added lines #L71 - L72 were not covered by tests
enabled: enabled,
Expand Down

0 comments on commit 01547ca

Please sign in to comment.