Skip to content

Commit

Permalink
fix: Dart suggested fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
M4dhav committed May 31, 2024
1 parent 342ff1d commit a9a4e1b
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 37 deletions.
3 changes: 0 additions & 3 deletions lib/presentation/atoms/check_box_atom.dart
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,6 @@ class _CheckBoxAtomState extends State<CheckBoxAtom> {

@override
Widget build(BuildContext context) {
final ThemeData themeData = Theme.of(context);
final ColorScheme colorScheme = themeData.colorScheme;

return CardAtom(
child: Row(
children: [
Expand Down
3 changes: 0 additions & 3 deletions lib/presentation/molecules/energy_selection_molecule.dart
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,6 @@ class _EnergySelectionMoleculeState extends State<EnergySelectionMolecule> {

@override
Widget build(BuildContext context) {
final ThemeData themeData = Theme.of(context);
final ColorScheme colorScheme = themeData.colorScheme;

return MarginedExpandedAtom(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
Expand Down
2 changes: 1 addition & 1 deletion lib/presentation/organisms/intro/tips_organism.dart
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class TipsOrganism extends StatelessWidget {
initialValue: tip.selected,
onIconPressed: () => Navigator.of(context).push(
MaterialPageRoute(
builder: (context) => TipInformationPage(tip),
builder: (context) => TipInformationPage(tip: tip),
),
),
),
Expand Down
63 changes: 33 additions & 30 deletions lib/presentation/pages/tip_information_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -87,43 +87,46 @@ class TipInformationPage extends StatelessWidget {
final Uri? link = r.link;

return ExpansionPanelRadio(
value: r.title,
canTapOnHeader: true,
headerBuilder:
(BuildContext context, bool isExpanded) {
return TextAtom(r.title);
},
body: InkWell(
onTap: () {
if (link == null) {
return;
}
launchUrl(link);
},
child: Row(
children: [
Expanded(
child:
TextAtom(r.resourceExplanation),
),
IconButton(
onPressed: () {
value: r.title,
canTapOnHeader: true,
headerBuilder: (BuildContext context,
bool isExpanded,) {
return TextAtom(r.title);
},
body: InkWell(
onTap: () {
if (link == null) {
return;
}
launchUrl(link);
},
icon: const Icon(Icons.link),
child: Row(
children: [
Expanded(
child: TextAtom(
r.resourceExplanation,),
),
IconButton(
onPressed: () {
if (link == null) {
return;
}
launchUrl(link);
},
icon: const Icon(Icons.link),
),
],
),
),
],
),
),
);
},
).toList(),
),
);
},
).toList(),
),
],
),
],
),
),
],
),
),
Expand All @@ -133,4 +136,4 @@ class TipInformationPage extends StatelessWidget {
),
);
}
}
}

0 comments on commit a9a4e1b

Please sign in to comment.