Skip to content

Commit

Permalink
Updated and migrated to Flutter 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
MrBananaPants committed Mar 6, 2021
1 parent 3fa3e1e commit 319e35c
Show file tree
Hide file tree
Showing 5 changed files with 522 additions and 689 deletions.
2 changes: 1 addition & 1 deletion lib/AboutPage.dart
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ class MyAppState extends State<AboutPage> {
Padding(
padding: const EdgeInsets.fromLTRB(0, 0, 0, 0),
child: Text(
"Flutter: 1.22.6",
"Flutter: 2.0.1",
style: TextStyle(
color: Theme.of(context).textTheme.bodyText1.color,
),
Expand Down
139 changes: 60 additions & 79 deletions lib/SettingsPage.dart
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,7 @@ class SettingsPageState extends State<SettingsPage> {
title: Text(
'Arduino LED',
style: TextStyle(
color:
Theme.of(context).textTheme.bodyText1.color,
color: Theme.of(context).textTheme.bodyText1.color,
),
),
),
Expand All @@ -101,92 +100,74 @@ class SettingsPageState extends State<SettingsPage> {
cases: [
Case(
buttonThema == true,
builder: () => ButtonBar(
buttonHeight: 40,
buttonMinWidth:
SizeConfig.blockSizeHorizontal * 38,
alignment: MainAxisAlignment.spaceBetween,
children: [
OutlineButton(
shape: RoundedRectangleBorder(
borderRadius:
BorderRadius.circular(7),
),
child: Text(
'AAN',
style: TextStyle(
color: Theme.of(context)
.textTheme
.bodyText2
.color,
builder: () => Padding(
padding: const EdgeInsets.all(8.0),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
OutlinedButton(
style: OutlinedButton.styleFrom(minimumSize: Size(SizeConfig.blockSizeHorizontal * 38, 40)),
child: Text(
'AAN',
style: TextStyle(
color: Theme.of(context).textTheme.bodyText2.color,
),
),
onPressed: () {
setState(() {
changeThemeToAAN();
});
},
),
onPressed: () {
setState(() {
changeThemeToAAN();
});
},
),
RaisedButton(
shape: RoundedRectangleBorder(
borderRadius:
BorderRadius.circular(7),
ElevatedButton(
style: ElevatedButton.styleFrom(minimumSize: Size(SizeConfig.blockSizeHorizontal * 38, 40)),
child: const Text('UIT'),
onPressed: () {
setState(() {
changeThemeToUIT();
});
},
),
color: Color(0xFF3D5AFE),
child: const Text('UIT'),
onPressed: () {
setState(() {
changeThemeToUIT();
});
},
),
],
],
),
),
),
Case(
buttonThema == false,
builder: () => ButtonBar(
buttonHeight: 40,
buttonMinWidth:
SizeConfig.blockSizeHorizontal * 38,
alignment: MainAxisAlignment.spaceBetween,
children: [
RaisedButton(
shape: RoundedRectangleBorder(
borderRadius:
BorderRadius.circular(7)),
color: Color(0xFF3D5AFE),
child: const Text('AAN'),
onPressed: () {
setState(
() {
changeThemeToAAN();
},
);
},
),
OutlineButton(
shape: RoundedRectangleBorder(
borderRadius:
BorderRadius.circular(7)),
child: Text(
'UIT',
style: TextStyle(
color: Theme.of(context)
.textTheme
.bodyText2
.color,
builder: () => Padding(
padding: const EdgeInsets.all(8.0),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
ElevatedButton(
style: ElevatedButton.styleFrom(minimumSize: Size(SizeConfig.blockSizeHorizontal * 38, 40)),
child: const Text('AAN'),
onPressed: () {
setState(
() {
changeThemeToAAN();
},
);
},
),
OutlinedButton(
style: OutlinedButton.styleFrom(minimumSize: Size(SizeConfig.blockSizeHorizontal * 38, 40)),
child: Text(
'UIT',
style: TextStyle(
color: Theme.of(context).textTheme.bodyText2.color,
),
),
onPressed: () {
setState(
() {
changeThemeToUIT();
},
);
},
),
onPressed: () {
setState(
() {
changeThemeToUIT();
},
);
},
),
],
],
),
),
),
],
Expand Down
Loading

0 comments on commit 319e35c

Please sign in to comment.