Skip to content

Commit ed3317f

Browse files
committed
remove unnecessary computation
1 parent 51af2bd commit ed3317f

File tree

11 files changed

+14
-14
lines changed

11 files changed

+14
-14
lines changed

lib/builders/PlatformRoute.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ class _PlatformRouteState extends State<PlatformRoute> {
3737

3838
@override
3939
Widget build(BuildContext context) {
40-
4140
return PopScope(
4241
canPop: false,
4342
child: Scaffold(

lib/components/navigation/components/SidebarItem.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ class _SidebarItemState extends State<SidebarItem> {
2626
style:
2727
const TextStyle(fontFamily: 'Futura', fontWeight: FontWeight.bold),
2828
),
29-
onTap: () =>
30-
Navigator.pushAndRemoveUntil(context, MaterialPageRoute(builder: (context) {
29+
onTap: () => Navigator.pushAndRemoveUntil(context,
30+
MaterialPageRoute(builder: (context) {
3131
return widget.route;
3232
}), (r) => false),
3333
);

lib/routes/auto/fields/AutonomousCheckboxRows/AutonomousRow4.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ class _AutonomousRow4State extends State<AutonomousRow4> {
8585
checkColor: Colors.white,
8686
labelColor: Colors.white,
8787
margin: const EdgeInsets.only(right: 0.0)),
88-
Align(
88+
Align(
8989
alignment: Alignment.centerLeft,
9090
child: SizedBox(
9191
width: 170.0,

lib/routes/auto/fields/AutonomousCheckboxRows/AutonomousRow5.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ class _AutonomousRow5State extends State<AutonomousRow5> {
8585
checkColor: Colors.white,
8686
labelColor: Colors.white,
8787
margin: const EdgeInsets.only(right: 0.0)),
88-
Align(
88+
Align(
8989
alignment: Alignment.centerLeft,
9090
child: SizedBox(
9191
width: 170.0,

lib/routes/auto/fields/AutonomousCheckboxRows/AutonomousRow6.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ class _AutonomousRow6State extends State<AutonomousRow6> {
8585
checkColor: Colors.white,
8686
labelColor: Colors.white,
8787
margin: const EdgeInsets.only(right: 0.0)),
88-
Align(
88+
Align(
8989
alignment: Alignment.centerLeft,
9090
child: SizedBox(
9191
width: 170.0,

lib/routes/prematch/PrematchRoute.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ class _PrematchRouteState extends State<PrematchRoute> {
3131
});
3232
}
3333
});
34-
3534
}
3635

3736
@override

lib/routes/prematch/fields/PrematchFields.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,6 @@ class _PrematchFieldsState extends State<PrematchFields> {
124124
PrematchValues.teamNumber.text = teamNumber.toString();
125125
});
126126
});
127-
Schedulehelper.getSimbotMatches(); // does nothing with the value because this code computes the list too
128127
}
129128
}
130129
},

lib/routes/qrcode/QRCodeRoute.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,8 @@ class _QRCodeRouteState extends State<QRCodeRoute> {
119119
AppDataHelper.resetStates();
120120
});
121121
Navigator.of(context, rootNavigator: true).pop('dialog');
122-
Navigator.pushAndRemoveUntil(context, MaterialPageRoute(builder: (context) {
122+
Navigator.pushAndRemoveUntil(context,
123+
MaterialPageRoute(builder: (context) {
123124
return const PrematchRoute(title: "Prematch Data");
124125
}), (r) => false);
125126
},

lib/utils/data/constants/OptionConstants.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
// ignore_for_file: file_names
22

33
class OptionConstants {
4-
static final yesNoOptions = ["","Yes", "No"];
4+
static final yesNoOptions = ["", "Yes", "No"];
55

6-
static final startPositions = ["","Top", "Center", "Bottom"];
6+
static final startPositions = ["", "Top", "Center", "Bottom"];
77

8-
static final endgameOptions = ["","No", "Shallow", "Deep", "Park"];
8+
static final endgameOptions = ["", "No", "Shallow", "Deep", "Park"];
99

1010
static List<String> availableDriverstations = [
1111
"Red 1",

lib/utils/helpers/ScheduleHelper.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@ class Schedulehelper {
6767
}
6868

6969
static Future<List<String>> getSimbotMatches() async {
70-
if(simbotMatches.isNotEmpty) { // memoization
70+
if (simbotMatches.isNotEmpty) {
71+
// memoization
7172
return simbotMatches;
7273
}
7374

0 commit comments

Comments
 (0)