diff --git a/README.md b/README.md index 3ce298f..e6e6a73 100644 --- a/README.md +++ b/README.md @@ -11,8 +11,8 @@ Input your team number and event, and start scouting! When you're done export yo # Some extra notes -* This is a side project by me and is my first Flutter project. Please leave suggestions and tips about what I could do better! -* I am providing APK's, but it may not be the most up-to-date version. +* This is a side project by a me and is my first Flutter project. Please leave suggestions and tips about what I could do better! +* I am providing APK's, but it may not be the most up to date version. * To run on iOS you will still need to compile it and install with Xcode # How to contribute @@ -26,4 +26,4 @@ Input your team number and event, and start scouting! When you're done export yo 1. Run the command `flutter run` in your terminal while inside project folder. 2. Open the app in a browser, on your phone, or as a computer app. -* If you plan to test on an iPhone, you must have an Apple Developer account and a macOS device with Xcode. \ No newline at end of file +* If you plan to test on an iPhone, you must have a Apple Developer account and a MacOS device with Xcode. \ No newline at end of file diff --git a/lib/login.dart b/lib/login.dart index 7794b7d..ead7a5b 100644 --- a/lib/login.dart +++ b/lib/login.dart @@ -146,7 +146,7 @@ class _LoginPageState extends State { return AlertDialog( title: const Text('Info'), content: const Text( - "This app makes use of The Blue Alliance APIv3 through Laser Proxy. No API keys are stored on device. Laser Scouter was created by FRC 2077 Laser Robotics. \n\nVersion: Rebuilt v26.2.22" + "This app makes use of The Blue Alliance APIv3 through Laser Proxy. No API keys are stored on device. Laser Scouter was created by FRC 2077 Laser Robotics. \n\nVersion: Rebuilt v26.2.14" ), ); } diff --git a/lib/notespage.dart b/lib/notespage.dart index 1582628..0aa56f6 100644 --- a/lib/notespage.dart +++ b/lib/notespage.dart @@ -28,7 +28,7 @@ class _NotesPageState extends State { final _generalObservationsController = TextEditingController(); final _autonRundownController = TextEditingController(); final _intakePositionController = TextEditingController(); - final _scoreMechanismController = TextEditingController(); + final _scoreMechanisimController = TextEditingController(); double _fuelPerCycle = 0; bool _canDriveUnderTrench = false; bool _canDriveOverBump = false; @@ -49,7 +49,7 @@ class _NotesPageState extends State { _botPositionController.dispose(); _generalObservationsController.dispose(); _intakePositionController.dispose(); - _scoreMechanismController.dispose(); + _scoreMechanisimController.dispose(); super.dispose(); } @@ -58,7 +58,7 @@ class _NotesPageState extends State { } Future _loadNotes() async { - prefs = await SharedPreferences.getInstance(); + SharedPreferences prefs = await SharedPreferences.getInstance(); _botPositionController.text = prefs.getString(_generateKey('botPosition')) ?? ''; _botPositionController.addListener(() => _saveString('botPosition', _botPositionController.text)); @@ -72,8 +72,8 @@ class _NotesPageState extends State { _intakePositionController.text = prefs.getString(_generateKey('intakePosition')) ?? ''; _intakePositionController.addListener(() => _saveString('intakePosition', _intakePositionController.text)); - _scoreMechanismController.text = prefs.getString(_generateKey('scoreMechanism')) ?? ''; - _scoreMechanismController.addListener(() => _saveString('scoreMechanism', _scoreMechanismController.text)); + _scoreMechanisimController.text = prefs.getString(_generateKey('scoreMechanism')) ?? ''; + _scoreMechanisimController.addListener(() => _saveString('scoreMechanism', _scoreMechanisimController.text)); _fuelPerCycle = prefs.getDouble(_generateKey('fuelPerCycle')) ?? 0.0; _canDriveUnderTrench = prefs.getBool(_generateKey('canDriveUnderTrench')) ?? false; @@ -107,12 +107,12 @@ class _NotesPageState extends State { @override Widget build(BuildContext context) { return Scaffold( - appBar: AppBar( - title: Text('Notes'), - ), - body: _isLoading - ? const Center(child: CircularProgressIndicator()) - : SafeArea( + appBar: AppBar( + title: Text('Notes'), + ), + body: _isLoading + ? const Center(child: CircularProgressIndicator()) + : SafeArea( child: Column( children: [ Padding( @@ -144,7 +144,7 @@ class _NotesPageState extends State { ), ], ), - ) + ) ); } @@ -192,15 +192,6 @@ class _NotesPageState extends State { ), ), const SizedBox(height: 16), - TextField( - controller: _intakePositionController, - decoration: const InputDecoration( - labelText: 'Intake Position', - hintText: 'e.g., Ground', - border: OutlineInputBorder(), - ), - ), - const SizedBox(height: 16), SwitchListTile( title: Text('Can Drive Over Bump', style: Theme.of(context).textTheme.titleSmall), value: _canDriveOverBump, @@ -334,4 +325,4 @@ class _NotesPageState extends State { ], ); } -} \ No newline at end of file +} diff --git a/lib/teampicker.dart b/lib/teampicker.dart index 36aca8e..25832ad 100644 --- a/lib/teampicker.dart +++ b/lib/teampicker.dart @@ -32,17 +32,14 @@ class _TeamPickerState extends State { Future _exportData() async { List header = []; header.add('Team Number'); - header.add('Bot Position'); - header.add('Gen. Observations'); - header.add('Auton Rundown'); - header.add('Intake Position'); - header.add('Can Drive Over Bump'); - header.add('Can Go Under Trench'); - header.add('Can Give Fuel to HP'); + header.add('Drivetrain Type'); + header.add('Has Vision'); header.add('Climb Level'); + header.add('Trenchable'); header.add('Fuel Capacity'); - header.add('Fuel per Cycle'); - header.add("Cycle Time"); + header.add('Bot Position'); + header.add('Auton Rundown'); + header.add('General Observations'); List> data = []; for (int i = 0; i < teamCodes.length; i++) { @@ -50,57 +47,41 @@ class _TeamPickerState extends State { return '${teamCodes[i]}_${widget.eventCode}_$field'; } SharedPreferences prefs = await SharedPreferences.getInstance(); + String? autonRundown = prefs.getString(generateKey('autonRundown')); String? botPosition = prefs.getString(generateKey('botPosition')); String? generalObservations = prefs.getString(generateKey('generalObservations')); - String? autonRundown = prefs.getString(generateKey('autonRundown')); - String? intakePosition = prefs.getString(generateKey('intakePosition')); - String? canDriveOverBump = prefs.getBool(generateKey('canDriveOverBump')).toString(); - String? canDriveUnderTrench = prefs.getBool(generateKey('canDriveUnderTrench')).toString(); - String? canGiveToHumanPlayer = prefs.getBool(generateKey('canGiveToHumanPlayer')).toString(); + String? driveTrainType = prefs.getString(generateKey('driveTrainType')); + String? hasVision = prefs.getBool(generateKey('hasVision')).toString(); String? climbLevel = prefs.getDouble(generateKey('climbLevel')).toString(); + String? trenchable = prefs.getBool(generateKey('trenchable')).toString(); String? fuelCapacity = prefs.getDouble(generateKey('fuelCapacity')).toString(); - String? fuelPerCycle = prefs.getDouble(generateKey('fuelPerCycle')).toString(); - String? cycleTime = prefs.getDouble(generateKey('cycleTime')).toString(); - if (canDriveOverBump == 'null') { - canDriveOverBump = ''; - } - if (canDriveUnderTrench == 'null') { - canDriveUnderTrench = ''; - } - if (canGiveToHumanPlayer == 'null') { - canGiveToHumanPlayer = ''; + if (hasVision == 'null') { + hasVision = ''; } if (climbLevel == 'null') { climbLevel = ''; } + if (trenchable == 'null') { + trenchable = ''; + } if (fuelCapacity == 'null') { fuelCapacity = ''; } - if (fuelPerCycle == 'null') { - fuelPerCycle = ''; - } - if (cycleTime == 'null') { - cycleTime = ''; - } - List teamData = []; teamData.add(teamCodes[i]); - teamData.add(botPosition ?? ''); - teamData.add(generalObservations ?? ''); - teamData.add(autonRundown ?? ''); - teamData.add(intakePosition ?? ''); - teamData.add(canDriveOverBump); - teamData.add(canDriveUnderTrench); - teamData.add(canGiveToHumanPlayer); + teamData.add(driveTrainType ?? ''); + teamData.add(hasVision); teamData.add(climbLevel); + teamData.add(trenchable); teamData.add(fuelCapacity); - teamData.add(fuelPerCycle); - teamData.add(cycleTime); + teamData.add(botPosition ?? ''); + teamData.add(autonRundown ?? ''); + teamData.add(generalObservations ?? ''); data.add(teamData); } - csv_export.myCSV(header, data, setHeadersInFirstRow: true, fileName: 'laserscouter_${widget.eventCode}.csv'); + csv_export.myCSV(header, data, setHeadersInFirstRow: true, emptyRowsConfig: {1: 1}, fileName: 'laserscouter_${widget.eventCode}.csv'); } Future _fetchTeams() async { diff --git a/pubspec.yaml b/pubspec.yaml index 58b08bf..a7935b9 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html # In Windows, build-name is used as the major, minor, and patch parts # of the product and file versions while build-number is used as the build suffix. -version: 26.2.22 +version: 26.2.14+2 environment: sdk: ^3.10.7