Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2025 Restructure (DNM) #54

Draft
wants to merge 16 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ A guide that documents the process of configuring advances parts of the scouting
- `prematch` - Contains fields for initials, match number, and team number, and automatically selects the team based on the match number and driver station configured in the settings.
*All inputs on this page feed into the `lib/utils/data/values/PrematchValues.dart` values.*
- `qrcode` - Contains routes for scanning QR codes and managing related data for creating or saving them.
- `settings` - Provides the settings route where users configure event ID, QR code centerfold, team number editability, and other important settings for app functionality.
- `settings` - Provides the settings route where users configure event ID, team number editability, and other important settings for app functionality.
*All inputs on this page feed into the `lib/utils/data/values/SettingValues.dart` values.*
- `styles` - Contains widgets for easily generating headers and titles, as well as a set of colors used throughout the app to maintain uniformity in the scouting platform.
- `utils` - Includes utilities like constants, value files, and helpers to support app functionality.
Expand Down
Binary file not shown.
Binary file removed assets/images/centerfolds/bruh_centerfold.png
Binary file not shown.
Binary file removed assets/images/centerfolds/cheese.png
Binary file not shown.
Binary file removed assets/images/centerfolds/huh_centerfold.png
Binary file not shown.
Binary file removed assets/images/centerfolds/hungwy_centerfold.png
Binary file not shown.
Binary file removed assets/images/centerfolds/jimmy_centerfold.png
Binary file not shown.
Binary file removed assets/images/centerfolds/jqr_code_centerfold.png
Binary file not shown.
Binary file not shown.
Binary file removed assets/images/centerfolds/peppa_pig_centerfold.png
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
83 changes: 83 additions & 0 deletions lib/builders/bases/CustomCheckbox.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
// ignore_for_file: file_names
import 'package:flutter/material.dart';

class CustomCheckbox extends StatefulWidget {
final TextEditingController controller;
final String label;
final EdgeInsets margin;
final Color backgroundColor;
final Color checkColor;
final Color labelColor;

const CustomCheckbox({
super.key,
required this.controller,
this.label = "",
this.margin = const EdgeInsets.all(2.0),
this.backgroundColor = Colors.grey,
this.checkColor = Colors.white,
this.labelColor = Colors.white,
});

@override
State<CustomCheckbox> createState() => _CustomCheckboxState();
}

class _CustomCheckboxState extends State<CustomCheckbox> {
late bool isChecked;

@override
void initState() {
super.initState();
isChecked = widget.controller.text == "1";
widget.controller.addListener(_updateStateFromController);
}

@override
void dispose() {
widget.controller.removeListener(_updateStateFromController);
super.dispose();
}

void _updateStateFromController() {
setState(() {
isChecked = widget.controller.text == "1";
});
}

@override
Widget build(BuildContext context) {
return Container(
height: 30,
width: 50,
padding: const EdgeInsets.all(0),
margin: widget.margin,
color: widget.backgroundColor,
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Checkbox(
value: isChecked,
onChanged: (bool? value) {
setState(() {
isChecked = value ?? false;
widget.controller.text = isChecked ? "1" : "0";
});
},
checkColor: widget.checkColor,
activeColor: Colors.blue,
),
if (widget.label.isNotEmpty)
Text(
widget.label,
style: TextStyle(
color: widget.labelColor,
fontSize: 16.0,
),
),
],
),
);
}
}
8 changes: 4 additions & 4 deletions lib/builders/bases/StopwatchButton.dart
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,10 @@ class _StopwatchButtonState extends State<StopwatchButton> {
return "Stop Timer";
}

String milliseconds = (milli % 1000).toString().padLeft(1, "0");
String seconds = ((milli ~/ 1000) % 60).toString().padLeft(2, "0");
String minutes = ((milli ~/ 1000) ~/ 60).toString().padLeft(1, "0");
// String milliseconds = (milli % 1000).toString().padLeft(1, "0");
// String seconds = ((milli ~/ 1000) % 60).toString().padLeft(2, "0");
// String minutes = ((milli ~/ 1000) ~/ 60).toString().padLeft(1, "0");

return "$minutes:$seconds:$milliseconds";
return milli.toString();
}
}
18 changes: 9 additions & 9 deletions lib/components/navigation/NavigationSidebar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:scouting_platform/components/navigation/components/SidebarItem.dart';
import 'package:scouting_platform/routes/auto/AutonomousDataRoute.dart';
import 'package:scouting_platform/routes/comments/CommentsRoute.dart';
import 'package:scouting_platform/routes/data/DataRoute.dart';
import 'package:scouting_platform/routes/qrcode/DriverStationScanStatusRoute.dart';
import 'package:scouting_platform/routes/qrcode/QRCodeRoute.dart';
import 'package:scouting_platform/routes/settings/SettingsRoute.dart';
import 'package:scouting_platform/routes/prematch/PrematchRoute.dart';
import 'package:scouting_platform/routes/teleop/TeleopRoute.dart';

class NavigationSidebar extends StatelessWidget {
const NavigationSidebar({super.key});
Expand All @@ -33,9 +33,13 @@ class NavigationSidebar extends StatelessWidget {
itemName: "Prematch Data",
route: PrematchRoute(title: 'Prematch Data')),
const SidebarItem(
icon: Icon(Icons.draw),
itemName: "Data Input",
route: DataRoute(title: 'Data Input')),
icon: Icon(Icons.auto_awesome),
itemName: "Auto Data",
route: AutonomousDataRoute(title: 'Auto Input')),
const SidebarItem(
icon: Icon(Icons.gamepad),
itemName: "Teleop Data",
route: TeleopRoute(title: 'Teleop Input')),
const SidebarItem(
icon: Icon(Icons.chat_bubble),
itemName: "Comments",
Expand All @@ -45,10 +49,6 @@ class NavigationSidebar extends StatelessWidget {
itemName: "QR Code",
route: QRCodeRoute(title: "QR Code")),
const Divider(),
const SidebarItem(
icon: Icon(Icons.camera_alt_outlined),
itemName: "Scanning",
route: DriverStationScanStatusRoute(title: "Scanning")),
const SidebarItem(
icon: Icon(Icons.settings),
itemName: "Settings",
Expand Down
167 changes: 167 additions & 0 deletions lib/routes/auto/AutonomousDataRoute.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,167 @@
// ignore_for_file: file_names
import 'package:flutter/material.dart';
import 'package:scouting_platform/builders/PlatformRoute.dart';
import 'package:scouting_platform/routes/auto/fields/AutonomousCheckboxRows/AutonomousRow1.dart';
import 'package:scouting_platform/routes/auto/fields/AutonomousCheckboxRows/AutonomousRow2.dart';
import 'package:scouting_platform/routes/auto/fields/AutonomousCheckboxRows/AutonomousRow3.dart';
import 'package:scouting_platform/routes/auto/fields/AutonomousCheckboxRows/AutonomousRow4.dart';
import 'package:scouting_platform/routes/auto/fields/AutonomousCheckboxRows/AutonomousRow5.dart';
import 'package:scouting_platform/routes/auto/fields/AutonomousCheckboxRows/AutonomousRow6.dart';
import 'package:scouting_platform/routes/auto/fields/AutonomousRightRows/AutonomousRightRow1.dart';
import 'package:scouting_platform/routes/auto/fields/AutonomousRightRows/AutonomousRightRow2.dart';
import 'package:scouting_platform/routes/auto/fields/AutonomousRightRows/AutonomousRightRow3.dart';
import 'package:scouting_platform/routes/auto/fields/AutonomousRows.dart/AutonomousBottomReef.dart';
import 'package:scouting_platform/routes/auto/fields/AutonomousRows.dart/AutonomousMiddleReef.dart';
import 'package:scouting_platform/routes/auto/fields/AutonomousRows.dart/AutonomousTopReef.dart';
import 'package:scouting_platform/routes/auto/labels/AutonomousRightLabels/AutonomousRightLabel1.dart';
import 'package:scouting_platform/routes/auto/labels/AutonomousRightLabels/AutonomousRightLabel2.dart';
import 'package:scouting_platform/routes/auto/labels/AutonomousRightLabels/AutonomousRightLabel3.dart';
import 'package:scouting_platform/routes/prematch/PrematchRoute.dart';
import 'package:scouting_platform/routes/teleop/TeleopRoute.dart';
import 'package:scouting_platform/styles/AppStyle.dart';
import 'package:scouting_platform/utils/data/values/PrematchValues.dart';
import 'package:scouting_platform/utils/data/values/SettingValues.dart';
import 'package:scouting_platform/utils/helpers/UIHelper.dart';

class AutonomousDataRoute extends StatefulWidget {
const AutonomousDataRoute({super.key, required this.title});
final String title;

@override
State<AutonomousDataRoute> createState() => _DataRouteState();
}

class _DataRouteState extends State<AutonomousDataRoute> {
@override
void initState() {
super.initState();
UIHelper.setBrightness(0.3);
}

@override
Widget build(BuildContext context) {
return PlatformRoute(
title: widget.title,
body: SingleChildScrollView(
physics: const AlwaysScrollableScrollPhysics(),
child: Padding(
padding: const EdgeInsets.all(5.0),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
// Left Column
Expanded(
flex: 1,
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
// all components of reef diagram
// top check boxes
const AutonomousRow1(),
const AutonomousRow2(),
const AutonomousRow3(),

// thirds of the reef diagram with counters for trough
const AutonomousTopReef(),
const AutonomousMiddleReef(),
const AutonomousBottomReef(),

// bottom check boxes
const AutonomousRow4(),
const AutonomousRow5(),
const AutonomousRow6(),
],
),
),
// Right Column
Expanded(
flex: 1,
child: Column(
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.end,
children: [
// reset button
ElevatedButton(
style: ElevatedButton.styleFrom(
minimumSize: const Size(150.0, 37.0),
backgroundColor: AppStyle.textInputColor,
padding: const EdgeInsets.all(15),
),
onPressed: () {
Navigator.push(context,
MaterialPageRoute(builder: (context) {
return const PrematchRoute(title: "Prematch");
}));
},
child: const Text(
"< Prematch",
style: TextStyle(
fontSize: 16.0,
fontFamily: "Helvetica",
color: Colors.white,
),
)),
SizedBox(width: 8.0),

const SizedBox(width: 8.0),

// next page button
ElevatedButton(
style: ElevatedButton.styleFrom(
minimumSize: const Size(150.0, 37.0),
backgroundColor: AppStyle.textInputColor,
padding: const EdgeInsets.all(15),
),
onPressed: () {
Navigator.push(context,
MaterialPageRoute(builder: (context) {
return const TeleopRoute(title: "Comments");
}));
},
child: const Text(
"Teleop >",
style: TextStyle(
fontSize: 16.0,
fontFamily: "Helvetica",
color: Colors.white,
),
),
),
],
),
// various right side data entry and labels
const AutonomousRightLabel1(),
const AutonomousRightRow1(),
const AutonomousRightLabel2(),
const AutonomousRightRow2(),
const AutonomousRightLabel3(),
const AutonomousRightRow3(),
// robot information
Align(
alignment: Alignment.bottomRight,
child: Container(
width: 400.0,
padding: const EdgeInsets.only(top: 0.0, right: 0.0),
margin: EdgeInsets.only(left: 90.0, top: 55.0),
child: Text(
"Driver Station: ${SettingValues.selectedDriverStation.text}, Match #${PrematchValues.matchNumber.text}, Team #${PrematchValues.teamNumber.text}",
textAlign: TextAlign.left,
style: TextStyle(
color: Colors.white,
fontWeight: FontWeight.bold,
fontSize: 15.0),
),
)),
],
),
),
],
),
),
),
);
}
}
Loading
Loading