Skip to content

Commit

Permalink
Remove file name entry and fix buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
noah-nm committed Jan 15, 2025
1 parent b518de3 commit ba6d46b
Show file tree
Hide file tree
Showing 8 changed files with 235 additions and 142 deletions.
2 changes: 0 additions & 2 deletions lib/routes/auto/AutonomousDataRoute.dart
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ class _DataRouteState extends State<AutonomousDataRoute> {
style: ElevatedButton.styleFrom(
minimumSize: const Size(150.0, 37.0),
backgroundColor: AppStyle.textInputColor,
padding: const EdgeInsets.all(15),
),
onPressed: () {
Navigator.push(context,
Expand All @@ -113,7 +112,6 @@ class _DataRouteState extends State<AutonomousDataRoute> {
style: ElevatedButton.styleFrom(
minimumSize: const Size(150.0, 37.0),
backgroundColor: AppStyle.textInputColor,
padding: const EdgeInsets.all(15),
),
onPressed: () {
Navigator.push(context,
Expand Down
97 changes: 61 additions & 36 deletions lib/routes/comments/fields/CommentsFields.dart
Original file line number Diff line number Diff line change
Expand Up @@ -33,45 +33,47 @@ class _CommentsFields extends State<CommentsFields> {
Align(
alignment: Alignment.bottomRight,
child: Container(
padding: const EdgeInsets.all(3.0),
child: ElevatedButton(
style: ElevatedButton.styleFrom(
minimumSize: const Size(150.0, 37.0),
padding: const EdgeInsets.all(15),
backgroundColor: AppStyle.textInputColor,
),
onPressed: () {
Navigator.push(context,
MaterialPageRoute(builder: (context) {
return const TeleopRoute(title: "Teleop");
}));
},
child: const Text("< Teleop",
style:
TextStyle(fontSize: 16.0, color: Colors.white)),
),
)),
padding: EdgeInsets.only(right: 10),
height: 30.0,
child: ElevatedButton(
style: ElevatedButton.styleFrom(
backgroundColor: AppStyle
.textInputColorLight, // Set the background color here
),
onPressed: () {
Navigator.push(context,
MaterialPageRoute(builder: (context) {
return const TeleopRoute(title: "Teleop/Endgame");
}));
},
child: const Text("< Teleop/Endgame",
style: TextStyle(
fontSize: 12.0,
fontFamily: "Helvetica",
color: Colors.white)),
))),
Align(
alignment: Alignment.bottomRight,
child: Container(
padding: const EdgeInsets.all(3.0),
child: ElevatedButton(
style: ElevatedButton.styleFrom(
minimumSize: const Size(150.0, 37.0),
padding: const EdgeInsets.all(15),
backgroundColor: AppStyle.textInputColor,
),
onPressed: () {
Navigator.push(context,
MaterialPageRoute(builder: (context) {
return const QRCodeRoute(title: "QR Code");
}));
},
child: const Text("Current QR Code >",
style:
TextStyle(fontSize: 16.0, color: Colors.white)),
),
)),
padding: EdgeInsets.only(right: 60),
height: 30.0,
child: ElevatedButton(
style: ElevatedButton.styleFrom(
backgroundColor: AppStyle
.textInputColorLight, // Set the background color here
),
onPressed: () {
Navigator.push(context,
MaterialPageRoute(builder: (context) {
return const QRCodeRoute(title: "QR Code");
}));
},
child: const Text("Current QR Code >",
style: TextStyle(
fontSize: 12.0,
fontFamily: "Helvetica",
color: Colors.white)),
))),
]),
],
),
Expand Down Expand Up @@ -126,6 +128,29 @@ class _CommentsFields extends State<CommentsFields> {
height: 90.0,
maxLines: 10,
),
Align(
alignment: Alignment.bottomRight,
child: Container(
padding: const EdgeInsets.only(
top: 4.0, right: 40, left: 80.0, bottom: 20.0),
height: 80.0,
child: ElevatedButton(
style: ElevatedButton.styleFrom(
backgroundColor: AppStyle
.textInputColorLight, // Set the background color here
),
onPressed: () {
Navigator.push(context,
MaterialPageRoute(builder: (context) {
return const QRCodeRoute(title: "QR Code");
}));
},
child: const Text("Current QR Code >",
style: TextStyle(
fontSize: 24.0,
fontFamily: "Helvetica",
color: Colors.white)),
))),
],
);
}
Expand Down
25 changes: 25 additions & 0 deletions lib/routes/prematch/fields/PrematchFields.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
import 'package:flutter/material.dart';
import 'package:scouting_platform/builders/bases/NumberInputField.dart';
import 'package:scouting_platform/builders/bases/TextInputField.dart';
import 'package:scouting_platform/routes/auto/AutonomousDataRoute.dart';
import 'package:scouting_platform/styles/AppStyle.dart';
import 'package:scouting_platform/utils/helpers/AppDataHelper.dart';
import 'package:scouting_platform/utils/helpers/ScheduleHelper.dart';
import 'package:scouting_platform/utils/data/values/PrematchValues.dart';
Expand Down Expand Up @@ -138,6 +140,29 @@ class _PrematchFieldsState extends State<PrematchFields> {
controller: PrematchValues.teamNumber,
hintText: "Team Number",
),
Align(
alignment: Alignment.bottomRight,
child: Container(
padding:
const EdgeInsets.only(top: 4.0, right: 13, left: 100.0),
height: 47.0,
child: ElevatedButton(
style: ElevatedButton.styleFrom(
backgroundColor: AppStyle
.textInputColor, // Set the background color here
),
onPressed: () {
Navigator.push(context,
MaterialPageRoute(builder: (context) {
return const AutonomousDataRoute(title: "Auto");
}));
},
child: const Text("Auto >",
style: TextStyle(
fontSize: 16.0,
fontFamily: "Helvetica",
color: Colors.white)),
)))
],
);
}
Expand Down
25 changes: 4 additions & 21 deletions lib/routes/prematch/labels/PrematchLabels.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
// ignore_for_file: file_names
import 'package:scouting_platform/styles/AppStyle.dart';
import 'package:scouting_platform/routes/auto/AutonomousDataRoute.dart';
import 'package:flutter/material.dart';

class PrematchLabels extends StatefulWidget {
Expand All @@ -22,7 +20,8 @@ class _PrematchLabelsState extends State<PrematchLabels> {
alignment: Alignment.centerLeft,
child: Container(
width: 170.0,
padding: const EdgeInsets.only(left: 20.0, top: 20.0, right: 5.0),
padding:
const EdgeInsets.only(left: 20.0, top: 20.0, right: 30.0),
child: const Text(
"Initials",
textAlign: TextAlign.left,
Expand Down Expand Up @@ -63,24 +62,8 @@ class _PrematchLabelsState extends State<PrematchLabels> {
fontSize: 15.0),
),
)),
const SizedBox(width: 598.0),
Container(
padding: const EdgeInsets.all(5.0),
child: ElevatedButton(
style: ElevatedButton.styleFrom(
minimumSize: const Size(150.0, 37.0),
padding: const EdgeInsets.all(15),
backgroundColor: AppStyle.textInputColor,
),
onPressed: () {
Navigator.push(context, MaterialPageRoute(builder: (context) {
return const AutonomousDataRoute(title: "Auto");
}));
},
child: const Text("Auto >",
style: TextStyle(fontSize: 16.0, color: Colors.white)),
),
)

const Divider(),
],
);
}
Expand Down
31 changes: 3 additions & 28 deletions lib/routes/qrcode/QRCodeRoute.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import 'package:scouting_platform/utils/data/values/PrematchValues.dart';
import 'package:scouting_platform/utils/helpers/AppDataHelper.dart';
import 'package:scouting_platform/utils/helpers/ScheduleHelper.dart';
import 'package:scouting_platform/styles/AppStyle.dart';
import 'package:scouting_platform/routes/comments/CommentsRoute.dart';

class QRCodeRoute extends StatefulWidget {
const QRCodeRoute({super.key, required this.title});
Expand Down Expand Up @@ -41,36 +40,11 @@ class _QRCodeRouteState extends State<QRCodeRoute> {
),
),
Positioned(
top: 5.0,
left: 5.0,
top: 16.0,
right: 16.0,
child: ElevatedButton(
style: ElevatedButton.styleFrom(
minimumSize: const Size(150.0, 37.0),
padding: EdgeInsets.all(15.0),
backgroundColor: AppStyle.textInputColor,
),
onPressed: () {
Navigator.push(context, MaterialPageRoute(builder: (context) {
return const CommentsRoute(title: "Comments");
}));
},
child: const Text(
"< Comments",
style: TextStyle(
fontSize: 16.0,
fontFamily: "Helvetica",
color: Colors.white,
),
),
),
),
Positioned(
top: 5.0,
right: 5.0,
child: ElevatedButton(
style: ElevatedButton.styleFrom(
minimumSize: const Size(150.0, 37.0),
padding: EdgeInsets.all(15.0),
backgroundColor: AppStyle.textInputColor,
),
onPressed: () {
Expand Down Expand Up @@ -143,3 +117,4 @@ class _QRCodeRouteState extends State<QRCodeRoute> {
);
}
}

24 changes: 23 additions & 1 deletion lib/routes/settings/SettingsRoute.dart
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,28 @@ class _SettingsRoute extends State<SettingsRoute> {
margin: const EdgeInsets.only(left: 40, top: 10)),
],
),
Column(
children: [
const TitleStyle(
text: "File Name",
padding: EdgeInsets.only(left: 30, top: 10)),
TextInputField(
onChanged: (value) {
setState(() {
SettingValues.fileName.text = value;
});
},
textAlign: TextAlign.left,
hintText: "File Name",
controller: SettingValues.fileName,
margin: const EdgeInsets.only(left: 45, top: 10),
),
],
)
],
),
Row(
children: [
Column(
children: [
const TitleStyle(
Expand All @@ -139,7 +161,7 @@ class _SettingsRoute extends State<SettingsRoute> {
],
)
],
),
)
],
)));
}
Expand Down
Loading

0 comments on commit ba6d46b

Please sign in to comment.