From ccb7091d5eda4cb148e5775ea810e24aa0864080 Mon Sep 17 00:00:00 2001 From: noah-nm Date: Thu, 9 Jan 2025 19:21:41 -0500 Subject: [PATCH 01/15] Diagram test --- .../reefscape/karthik-reef-diagram-bottom.png | Bin 0 -> 3373 bytes .../reefscape/karthik-reef-diagram-middle.png | Bin 0 -> 1131 bytes .../reefscape/karthik-reef-diagram-top.png | Bin 0 -> 3326 bytes lib/builders/bases/CustomCheckbox.dart | 52 +++++ .../navigation/NavigationSidebar.dart | 5 + lib/routes/data/AutonomousDataRoute.dart | 192 ++++++++++++++++++ .../AutonomousBottomReef.dart | 67 ++++++ .../AutonomousMiddleReef.dart | 67 ++++++ .../AutonomousTopReef.dart | 69 +++++++ lib/utils/data/values/AutonomousValues.dart | 8 + lib/utils/helpers/QRCodeHelper.dart | 14 +- pubspec.yaml | 11 +- 12 files changed, 476 insertions(+), 9 deletions(-) create mode 100644 assets/images/reefscape/karthik-reef-diagram-bottom.png create mode 100644 assets/images/reefscape/karthik-reef-diagram-middle.png create mode 100644 assets/images/reefscape/karthik-reef-diagram-top.png create mode 100644 lib/builders/bases/CustomCheckbox.dart create mode 100644 lib/routes/data/AutonomousDataRoute.dart create mode 100644 lib/routes/data/fields/AutonomousRows.dart/AutonomousBottomReef.dart create mode 100644 lib/routes/data/fields/AutonomousRows.dart/AutonomousMiddleReef.dart create mode 100644 lib/routes/data/fields/AutonomousRows.dart/AutonomousTopReef.dart diff --git a/assets/images/reefscape/karthik-reef-diagram-bottom.png b/assets/images/reefscape/karthik-reef-diagram-bottom.png new file mode 100644 index 0000000000000000000000000000000000000000..3170f1a79a0d850607d39a60f538766b4f4eac24 GIT binary patch literal 3373 zcmd5%`Fy{><$d4VE~gx2rFTmM z03dt(nB7?b5Jv%kn3U9J5RtU!*Mbjq^s%!i0U-PU0L0t?fO!y#83BM`0{|HF0RUJE z0PMO{_(^-oQL!I($*OLF{CE(A#Qce;;9{)bL(%|1 zX7h178+d5fL{AY#)l_kdi;JToq0A7WY;d*Yjq1oDaR~_2Kx%$mTXM_3=$6bQ_~wCk zGMz0slQj&6L*!f1TNTfX zPg`}yi!4g3x)^+ug)?H;$_abf-f`GkuzJPoQVOp_jr|)xr=p4E8N=)?IX%%dkUF(* zA;AB6Fvdc-6r?BaULVKj+zsrvU|52BOv&i(5_o4bTgMn{XwU7lVnCg ztd=&zeotxbBInBc5RQD=ujh@*pD1nLnuiw@&+BQAH%vxj4}#gN&wfd#g&N0%xu00R)%bJ%93YA9 zuO2kk9#>{itrcfjKWdMwAfVOmSHj4ys9haS67`ppNh*|J3i5|r=nIi@6rQbR$JHfO z>ux8^o_=?Qk-A7?Y$NRLGbuAhK}(qSxCEbeb-_&Ki!G+7Iag8@m&5+0@#P)4$o}AM z3gND(gJup}3LsW?E~tYjdolgao3|g+VP>z8dN}vmGE_B6Fb+qU7GSEGy`_my#~O|A zXuuIjlg&Pk+oT-Mpu|*P)mSD7lHdsW+{5na=P1)~gnIN%dBkTfEUr0kH?-x z*>+gR?Ch9gWzi*w&Rc_(tBhPw*HM`^##fFHKca8%*czuzwP)F5GQ*;M)s>{>Tiz2L zv~}L4Hqr-x04AaT!I7ctJUg7u_$bGHS2!%BrKVfi38NWKE5<9|n^-j78i@NRg)+jX zPNdr=Tej;qr@wNeq&#Tw3<483m_ zQN^>uXtFy-F0{#B7Ww_)Oe0k%TYaM{)@s*pskn2Lnt+)vyH}+?4x|Nq*-Op|Fu{u& z{rt%jJyMILBzuVB&v-Fs{GVInc_x3fh=$6g;ww zmO+OTz_IE=kuV*f;1ZSxPWi+5S=8;}#xg$KCQ3&)eR%f=ofV*|Y%*4+B%f|$(U;6pG(46^Y^*7V|2{aB3g$E~wjBR@lwrE!dLb&QUJCooHiT8ksuJ@m2Rw1k$V~cnx2CX6G_jsNAj~nz8b5=&tvy^m zubnEj5SfWo{ZImKD7QebIo)f$eAw1}Sk^em@-wHr9sXwGif7kHwGTVN2wq?>t~QR% zeR=lpwvui$T_zeYT+cMewGUEx>jQEH1}E|l~7vR zn?g%$Jn;vXnN`r^{%jH50XLQ4~m$%PF6MEN)wzBl+_n>8CN8 zUHfpkQ#{P(Ba@g@N1{;VYd&m#$TLc%$kAmOz6K#ko~#e5JwV6A)v;dz$+$(Mz};lN0c)I z-0Yva({chVleY_uvQ|zCaj8+_qwd8H8rs=$#k+VPz2y1Tij_hJ=iD$CftXW{{LJ@V zbw;KZ|C&VA!p%QV=SJa$E zcd~B_URk4Z`*&fNP8YS6B%Hwo^wz6AQ39`(`+;(TEVJd3gre55@8lh*3oFDV^i_W+ z&n#o`V!I)c#$b0`R}ii6@C|WxPs}b|zeJX8$W|3-tPSdx6J&n(8_#yj@{PWHT@&V{)24|Pe-=q~?%@35T7g zlkv(!g(y!WZ}QG{6nk=-hgXKS>lUOMGd$Mmjh=>1csL9j-@#*9WfKW8 z(RcM5R;S$ayUSQB;4ca!-5PWEs}o;bcfcD&rJ#HtXUByQzBu?Z006GvtX}*5jBR)? zV1SlpkiC1*Pv?U$Ff)Lx literal 0 HcmV?d00001 diff --git a/assets/images/reefscape/karthik-reef-diagram-middle.png b/assets/images/reefscape/karthik-reef-diagram-middle.png new file mode 100644 index 0000000000000000000000000000000000000000..fcf3cb36f7ef8e0814b4c2d3c3014d9643f6bb8f GIT binary patch literal 1131 zcmeAS@N?(olHy`uVBq!ia0y~yV2%W`cW|%($=yHRF##!sWRD45bDP46hOx7_4S6Fo+k-*%fF5lweBoc6VX;-`;;_Kaj^>;_2(k{*sYXoLeC3 z?yoMO5MzFkUkKy*Mdh=ARyldPIEGZ*dV9mr?@oY-!$tN_UJ)MKj-A=J;)LBMo~Y#v zEP4)}0-sBbpYJ(Tlx(~6!`1I+{^eEqwg0{UY)h44L+ii!`HvR{ZeP8fvB6$BlEKA8 zj6rY`t3yi)qktmSxH0{|ZzdNj0L{y3-~Cs9J`=r8-LzWCCKpO zz+s!SXL3Fle^q0MIZ^4iI{XKhJsV?3h3_@rl5?x$6&R*JnnG=tQPGp5M!`}~f$h6= z|8sXg{{kkYBj1YdhU+si%)fnvtAPy^pA&Q#lvKDMRLyy=X8itd)jm*)JD##O@74YD zm0!789t6$V!~j(UP9aV-<^JFepZ9oCNUci>Fl(unxJHzuB$lLFB^RXvDF!10BU4=i zLtO*Q5F=wN14}Ct18oBXD+7bf@=4E8H00)|WTsW()*zv!6%Ev&0k@$fGdH!kBr&%D dO^>0Wm7y8Ll5Jt@-vRY7c)I$ztaD0e0sxUCIk5l$ literal 0 HcmV?d00001 diff --git a/assets/images/reefscape/karthik-reef-diagram-top.png b/assets/images/reefscape/karthik-reef-diagram-top.png new file mode 100644 index 0000000000000000000000000000000000000000..d2cc22a22d78f9f32cde73275403e28195415e2e GIT binary patch literal 3326 zcmeHJYgkiP7QLVdf{0kK2#6@fjy!4tf+PYF6@v&!LqLNfLJTRTkwNogK}uqfL_`ANQ6-TOf-MHf@X*R5f`LjQgg0{oIMDgN`9DAAM{>Wt&t7Y`hT2Yeo1_OVn?5rJstF)1&=9j&nN~M_05E!)AkhPWs?RaN z!SO#vG|y)0c4?t<_6W34Hm|L9()Xp})F7-I<(Ocw;4T~Z;wVn-MTSuQ$IWDoBOh6T z1?U}scc~3P_5FXrIv-wdd36Q>h&*s^j}CQbja~tN-im7tsji6GXfqhn2+@?#EkL$S zN2i=wIMQZ}5N!R4(odr|6&@4opYR#a8V#B2f3vxMezD8!@$RzSV4x3|ZWl7ah)ausby<(5e7##IS>?3+p>cBEX{*=bjMQ~!ek zra@j1XZjKE)gtk|{9Vs_?q6p1oAJV;F%AO8AN0R0RPQ&d2^;?{v#&yzPh{Z|O)Na1 zSwgElGA&tg;#7SYw4;8#9Qy6hzB4ai!O`~yo|t`518O1aZ2ox!LO|Wq$Ic*3k0jx~JC_hG+MJb745K z^lnYLvrlv(xKq29$|l!TjxE(C&YO&bnviW{wKoMPR~;98`nCdOh?9dJjT^1Fo7zJ= z=0_}0adew6^dw$;M1|f_P22>O5yZLGHk~uPJkWnsj)5=U@kEZ;iiIz4V2Vgtj-eCA z>QOE`R#RzSJY?zY7JlsVj#P0P4I48@q^k^({l;!KNreK6ST&9_#=#o+aY^zAwoa!M z7>(1IxQcDFCx@{QetXGFraBYz-{~^69WUN9YG0oE;27H<^XK#IOP0^!qR{G!L0wE9 zbS3O_#P9Eq&QC-vYpO^Vm+)_6JbSPT=pA<)`78`?;=8NsVQ<7B^v+2zcEAhfdD9cz z-ZCtlCbX)!APyJ}nz5>DO~!IF!8kxHKEWkUCH4klxw&BMDK6oDe>S-`j0_F(2Jw6F zCZ6`}#<{;6@+Y;>0oSF(_^%L$uGF1wbuB@HFDjyO{HLu_-GiwKUU{GZiaj2`ixC|# zlLr$_CaM52j&Tn}C|viDN&7t%#xhJO-K6iBAv12b@B^b}DbzXd!Mv-;t^|3X?K#;d zEu+dF%u0H%cqxAbW3g1KQGRaxD~^&f25#G1>O{7mzA`W(ygkk<;U3#FR+J>s-JN?D zzoELHGUfqRS6+x z)Y4_=6u&*S30Cyq9ESbO+>RY|mPysqL{ahZ4oYEx&?XYTCFt7w?er7?=yz5FVlQ}Pz z8H_n^7)EU%JN~erSqJ04*?5DIcyJFiOkA~*b$YBtuY%CbAD#3N9yTng6+Wv^RJ~$gGC3Ow=L7VvV`#O{f$KppEVnyJFd&WdFn-X z@ASjmfB)rErj5Jx&&(*tZ5QJm=NY9;-`wz!UHlYRvf;Bboq$VcEDMC%7b8sqhUD-( zA^aIbJ2hmO>W1rW%><&F)f%Pfjv&(-^#f1@9f=#gWT@_b8qG8b;_HvgEvS>#Vf*jY# z*f{X;U|p7QmZlePUa;X?9=hW(A=mvXeCUU6+h9xp?1)Q^a}|cmmRoM4FAQFF%u43lk2R1cz*7Y3HFnStpfxpq)s5nHaiAq|$YBp4tM<{4A2 z6)PWm2Vq=GuU0#~raWSso>S)pCXr|?HuGru%meO?gZ?<_JB^NtH<$%9S@EiP@hy;R zD*@sYE+0pP9NGS>ZU?4^)c92^^i10R4L#LmGM0=0#}(02B42n22q zvj+bm5N(7)_7?yl@=|zM(tih}gnFL?0e|~ createState() => _DataRouteState(); +} + +class _DataRouteState extends State { + @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(16.0), + child: Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + // Left Column + Expanded( + flex: 1, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + const TitleStyle( + text: "Auto Data", + padding: EdgeInsets.only(top: 10.0), + ), + const SizedBox(height: 20.0), + const AutonomousTopReef(), + const AutonomousMiddleReef(), + const AutonomousBottomReef(), + ], + ), + ), + // Right Column + Expanded( + flex: 1, + child: Column( + crossAxisAlignment: CrossAxisAlignment.end, + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.end, + children: [ + ElevatedButton( + style: ElevatedButton.styleFrom( + minimumSize: const Size(150.0, 47.0), + backgroundColor: AppStyle.textInputColor, + ), + onPressed: () { + showConformationDialog(context); + }, + child: const Text( + "Reset", + style: TextStyle( + fontSize: 16.0, + fontFamily: "Helvetica", + color: Colors.white, + ), + ), + ), + const SizedBox(width: 16.0), + ElevatedButton( + style: ElevatedButton.styleFrom( + minimumSize: const Size(150.0, 47.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, + ), + ), + ), + ], + ), + ], + ), + ), + ], + ), + ), + ), + ); + } + + void showConformationDialog(BuildContext context) { + Widget cancelButton = TextButton( + child: const Text("No"), + onPressed: () { + Navigator.of(context, rootNavigator: true).pop('dialog'); + }, + ); + Widget continueButton = TextButton( + child: const Text("Yes"), + onPressed: () { + if (PrematchValues.matchNumber.text != "") { + PrematchValues.matchNumber.text = + (int.parse(PrematchValues.matchNumber.text) + 1).toString(); + } else { + PrematchValues.matchNumber.text = (2).toString(); + } + + if (SettingValues.isTeamNumberReadOnly) { + Schedulehelper.getTeamNumberFromSchedule( + int.parse(PrematchValues.matchNumber.text), + ).then((teamNumber) => + PrematchValues.teamNumber.text = teamNumber.toString()); + } + + setState(() { + AutonomousValues.autoSpeakerScored.text = "0"; + AutonomousValues.autoSpeakerMissed.text = "0"; + AutonomousValues.autoAmpMissed.text = "0"; + AutonomousValues.autoAmpScored.text = "0"; + TeleoperatedValues.speaker.text = "0"; + TeleoperatedValues.speakerMissed.text = "0"; + TeleoperatedValues.amp.text = "0"; + TeleoperatedValues.ampMissed.text = "0"; + AutonomousValues.autoMobility.text = "No"; + EndgameValues.endgame.text = "No"; + EndgameValues.climbTime.text = "0"; + EndgameValues.stopwatchState.text = "0"; + TeleoperatedValues.passes.text = "0"; + EndgameValues.trap.text = "0"; + EndgameValues.stopwatch.stop(); + EndgameValues.stopwatch.reset(); + CommentValues.autoComments.text = ""; + CommentValues.autoOrder.text = ""; + CommentValues.teleopComments.text = ""; + CommentValues.endgameComments.text = ""; + }); + Navigator.of(context, rootNavigator: true).pop('dialog'); + Navigator.push(context, MaterialPageRoute(builder: (context) { + return const PrematchRoute(title: "Prematch Data"); + })); + }, + ); + + AlertDialog alert = AlertDialog( + title: const Text("Confirmation: Reset ALL Fields"), + content: const Text( + "Would you like to reset all of the fields currently inputted?"), + actions: [ + cancelButton, + continueButton, + ], + ); + + showDialog( + context: context, + builder: (BuildContext context) { + return alert; + }, + ); + } +} diff --git a/lib/routes/data/fields/AutonomousRows.dart/AutonomousBottomReef.dart b/lib/routes/data/fields/AutonomousRows.dart/AutonomousBottomReef.dart new file mode 100644 index 0000000..815198b --- /dev/null +++ b/lib/routes/data/fields/AutonomousRows.dart/AutonomousBottomReef.dart @@ -0,0 +1,67 @@ +import 'package:flutter/material.dart'; +import 'package:scouting_platform/builders/bases/CounterNumberField.dart'; +import 'package:scouting_platform/builders/bases/PlatformDropdownMenu.dart'; +import 'package:scouting_platform/utils/data/constants/OptionConstants.dart'; +import 'package:scouting_platform/utils/data/values/AutonomousValues.dart'; + +class AutonomousBottomReef extends StatefulWidget { + const AutonomousBottomReef({ + super.key, + }); + + @override + State createState() => _AutonomousRow1State(); +} + +class _AutonomousRow1State extends State { + /// Increments an integer in a controller's value by one + void incrementNumber(TextEditingController controller) { + if (!mounted) return; + + int currentValue = int.parse(controller.text); + setState(() { + currentValue++; + controller.text = currentValue.toString(); + }); + } + + /// Decrements an integer in a controller's value by one unless it's 0 + void decrementNumber(TextEditingController controller) { + if (!mounted) return; + + int currentValue = int.parse(controller.text); + setState(() { + currentValue--; + controller.text = (currentValue > 0 ? currentValue : 0).toString(); + }); + } + + @override + Widget build(BuildContext context) { + return Container( + decoration: BoxDecoration( + image: DecorationImage( + image: AssetImage( + 'assets/images/reefscape/karthik-reef-diagram-bottom.png'), // Replace with your image path + fit: BoxFit.cover, + ), + ), + height: 175, // Set a height for the container + child: Row( + mainAxisAlignment: MainAxisAlignment.center, // Center the row contents + children: [ + CounterNumberField( + margin: EdgeInsets.only(right: 100.0, bottom: 70.0), + controller: AutonomousValues.l1SW, + onTapDecrement: () => decrementNumber(AutonomousValues.l1SW), + onTapIncrement: () => incrementNumber(AutonomousValues.l1SW)), + CounterNumberField( + margin: EdgeInsets.only(right: 0.0, bottom: 70.0), + controller: AutonomousValues.l1SE, + onTapDecrement: () => decrementNumber(AutonomousValues.l1SE), + onTapIncrement: () => incrementNumber(AutonomousValues.l1SE)), + ], + ), + ); + } +} diff --git a/lib/routes/data/fields/AutonomousRows.dart/AutonomousMiddleReef.dart b/lib/routes/data/fields/AutonomousRows.dart/AutonomousMiddleReef.dart new file mode 100644 index 0000000..d520c3e --- /dev/null +++ b/lib/routes/data/fields/AutonomousRows.dart/AutonomousMiddleReef.dart @@ -0,0 +1,67 @@ +import 'package:flutter/material.dart'; +import 'package:scouting_platform/builders/bases/CounterNumberField.dart'; +import 'package:scouting_platform/builders/bases/PlatformDropdownMenu.dart'; +import 'package:scouting_platform/utils/data/constants/OptionConstants.dart'; +import 'package:scouting_platform/utils/data/values/AutonomousValues.dart'; + +class AutonomousMiddleReef extends StatefulWidget { + const AutonomousMiddleReef({ + super.key, + }); + + @override + State createState() => _AutonomousRow1State(); +} + +class _AutonomousRow1State extends State { + /// Increments an integer in a controller's value by one + void incrementNumber(TextEditingController controller) { + if (!mounted) return; + + int currentValue = int.parse(controller.text); + setState(() { + currentValue++; + controller.text = currentValue.toString(); + }); + } + + /// Decrements an integer in a controller's value by one unless it's 0 + void decrementNumber(TextEditingController controller) { + if (!mounted) return; + + int currentValue = int.parse(controller.text); + setState(() { + currentValue--; + controller.text = (currentValue > 0 ? currentValue : 0).toString(); + }); + } + + @override + Widget build(BuildContext context) { + return Container( + decoration: BoxDecoration( + image: DecorationImage( + image: AssetImage( + 'assets/images/reefscape/karthik-reef-diagram-middle.png'), // Replace with your image path + fit: BoxFit.cover, + ), + ), + height: 100, // Set a height for the container + child: Row( + mainAxisAlignment: MainAxisAlignment.center, // Center the row contents + children: [ + CounterNumberField( + margin: EdgeInsets.only(right: 250.0, top: 0.0), + controller: AutonomousValues.l1W, + onTapDecrement: () => decrementNumber(AutonomousValues.l1W), + onTapIncrement: () => incrementNumber(AutonomousValues.l1W)), + CounterNumberField( + margin: EdgeInsets.only(right: 0.0, top: 0.0), + controller: AutonomousValues.l1E, + onTapDecrement: () => decrementNumber(AutonomousValues.l1E), + onTapIncrement: () => incrementNumber(AutonomousValues.l1E)), + ], + ), + ); + } +} diff --git a/lib/routes/data/fields/AutonomousRows.dart/AutonomousTopReef.dart b/lib/routes/data/fields/AutonomousRows.dart/AutonomousTopReef.dart new file mode 100644 index 0000000..b36e778 --- /dev/null +++ b/lib/routes/data/fields/AutonomousRows.dart/AutonomousTopReef.dart @@ -0,0 +1,69 @@ +import 'package:flutter/material.dart'; +import 'package:scouting_platform/builders/bases/CounterNumberField.dart'; +import 'package:scouting_platform/builders/bases/PlatformDropdownMenu.dart'; +import 'package:scouting_platform/utils/data/constants/OptionConstants.dart'; +import 'package:scouting_platform/utils/data/values/AutonomousValues.dart'; + +class AutonomousTopReef extends StatefulWidget { + const AutonomousTopReef({ + super.key, + }); + + @override + State createState() => _AutonomousRow1State(); +} + +class _AutonomousRow1State extends State { + /// Increments an integer in a controller's value by one + void incrementNumber(TextEditingController controller) { + if (!mounted) return; + + int currentValue = int.parse(controller.text); + setState(() { + currentValue++; + controller.text = currentValue.toString(); + }); + } + + /// Decrements an integer in a controller's value by one unless it's 0 + void decrementNumber(TextEditingController controller) { + if (!mounted) return; + + int currentValue = int.parse(controller.text); + setState(() { + currentValue--; + controller.text = (currentValue > 0 ? currentValue : 0).toString(); + }); + } + + @override + Widget build(BuildContext context) { + return Container( + decoration: BoxDecoration( + image: DecorationImage( + image: AssetImage( + 'assets/images/reefscape/karthik-reef-diagram-top.png'), // Replace with your image path + fit: BoxFit.cover, + ), + ), + height: 150, // Set a height for the container + child: Row( + mainAxisAlignment: MainAxisAlignment.center, // Center the row contents + children: [ + // North West (Top Left) trough counter + CounterNumberField( + margin: EdgeInsets.only(right: 100.0, top: 70.0, left: 100.0), + controller: AutonomousValues.l1NW, + onTapDecrement: () => decrementNumber(AutonomousValues.l1NW), + onTapIncrement: () => incrementNumber(AutonomousValues.l1NW)), + // North East (Top Right) trough counter + CounterNumberField( + margin: EdgeInsets.only(right: 100.0, top: 70.0), + controller: AutonomousValues.l1NE, + onTapDecrement: () => decrementNumber(AutonomousValues.l1NE), + onTapIncrement: () => incrementNumber(AutonomousValues.l1NE)), + ], + ), + ); + } +} diff --git a/lib/utils/data/values/AutonomousValues.dart b/lib/utils/data/values/AutonomousValues.dart index 1e50f9f..56e8aed 100644 --- a/lib/utils/data/values/AutonomousValues.dart +++ b/lib/utils/data/values/AutonomousValues.dart @@ -2,6 +2,14 @@ import 'package:flutter/material.dart'; class AutonomousValues { + // L1 trough sides + static TextEditingController l1NW = TextEditingController(text: "0"); + static TextEditingController l1NE = TextEditingController(text: "0"); + static TextEditingController l1W = TextEditingController(text: "0"); + static TextEditingController l1E = TextEditingController(text: "0"); + static TextEditingController l1SW = TextEditingController(text: "0"); + static TextEditingController l1SE = TextEditingController(text: "0"); + static TextEditingController autoMobility = TextEditingController(text: "No"); static TextEditingController autoSpeakerScored = TextEditingController(text: "0"); diff --git a/lib/utils/helpers/QRCodeHelper.dart b/lib/utils/helpers/QRCodeHelper.dart index df0867d..3affcab 100644 --- a/lib/utils/helpers/QRCodeHelper.dart +++ b/lib/utils/helpers/QRCodeHelper.dart @@ -44,11 +44,15 @@ class QrcodeHelper { /// Computes all autonomous values and returns them as a single string separated by a caret static String computeAutonomousValues() { return computeValues([ - parseInt(AutonomousValues.autoSpeakerScored.text), // index: 4 - parseInt(AutonomousValues.autoSpeakerMissed.text), // index: 5 - parseInt(AutonomousValues.autoAmpScored.text), // index: 6 - parseInt(AutonomousValues.autoAmpMissed.text), // index: 7 - parseString(AutonomousValues.autoMobility.text) // index: 8 + // L1 Coral Values + parseInt(AutonomousValues.l1NW.text), + parseInt(AutonomousValues.l1NE.text), + parseInt(AutonomousValues.l1W.text), + parseInt(AutonomousValues.l1E.text), + parseInt(AutonomousValues.l1SW.text), + parseInt(AutonomousValues.l1SE.text), + + // L2 Coral Values ]); } diff --git a/pubspec.yaml b/pubspec.yaml index 7009a16..70bb182 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -3,7 +3,7 @@ description: A scouting platform app designed to track FRC robot performance. # The following line prevents the package from being accidentally published to # pub.dev using `flutter pub publish`. This is preferred for private packages. -publish_to: 'none' # Remove this line if you wish to publish to pub.dev +publish_to: "none" # Remove this line if you wish to publish to pub.dev # The following defines the version and build number for your application. # A version number is three numbers separated by dots, like 1.2.43 @@ -30,7 +30,6 @@ dependencies: flutter: sdk: flutter - # The following adds the Cupertino Icons font to your application. # Use with the CupertinoIcons class for iOS style icons. cupertino_icons: ^1.0.2 @@ -64,11 +63,15 @@ flutter_launcher_icons: # The following section is specific to Flutter. flutter: assets: - # App icons, banners, and logos + # App icons, banners, and logos - assets/images/app_icon.png - assets/images/nav_banner.png - assets/images/simbotics_logo.png - # QR code centerfolds + # Reefscape diagram + - assets/images/reefscape/karthik-reef-diagram-top.png + - assets/images/reefscape/karthik-reef-diagram-middle.png + - assets/images/reefscape/karthik-reef-diagram-bottom.png + # QR code centerfolds - assets/images/centerfolds/jqr_code_centerfold.png - assets/images/centerfolds/jimmy_centerfold.png - assets/images/centerfolds/peppa_pig_centerfold.png From 3c2cc3fbb709f3f1dbd080e8ef96642d0fcce51e Mon Sep 17 00:00:00 2001 From: noah-nm Date: Sat, 11 Jan 2025 10:17:45 -0500 Subject: [PATCH 02/15] Full diagram test --- .../karthik-reef-diagram-bottom-shorter.png | Bin 0 -> 3001 bytes .../reefscape/karthik-reef-diagram-bottom.png | Bin 3373 -> 0 bytes .../karthik-reef-diagram-top-shorter.png | Bin 0 -> 3006 bytes .../reefscape/karthik-reef-diagram-top.png | Bin 3326 -> 0 bytes lib/builders/bases/CustomCheckbox.dart | 61 +++++++++--- lib/routes/data/AutonomousDataRoute.dart | 22 +++-- .../AutonomousRightRow1.dart | 61 ++++++++++++ .../AutonomousBottomReef.dart | 10 +- .../AutonomousTopReef.dart | 8 +- .../AutonomousRow1.dart | 91 ++++++++++++++++++ .../AutonomousRow2.dart | 91 ++++++++++++++++++ .../AutonomousRow3.dart | 91 ++++++++++++++++++ .../AutonomousRow4.dart | 91 ++++++++++++++++++ .../AutonomousRow5.dart | 91 ++++++++++++++++++ .../AutonomousRow6.dart | 91 ++++++++++++++++++ lib/utils/data/constants/OptionConstants.dart | 2 + lib/utils/data/values/AutonomousValues.dart | 62 ++++++++++-- lib/utils/helpers/QRCodeHelper.dart | 52 ++++++++-- pubspec.yaml | 4 +- 19 files changed, 781 insertions(+), 47 deletions(-) create mode 100644 assets/images/reefscape/karthik-reef-diagram-bottom-shorter.png delete mode 100644 assets/images/reefscape/karthik-reef-diagram-bottom.png create mode 100644 assets/images/reefscape/karthik-reef-diagram-top-shorter.png delete mode 100644 assets/images/reefscape/karthik-reef-diagram-top.png create mode 100644 lib/routes/data/fields/AutonomousRightRows/AutonomousRightRow1.dart create mode 100644 lib/routes/data/fields/AutonomouscCheckboxRows/AutonomousRow1.dart create mode 100644 lib/routes/data/fields/AutonomouscCheckboxRows/AutonomousRow2.dart create mode 100644 lib/routes/data/fields/AutonomouscCheckboxRows/AutonomousRow3.dart create mode 100644 lib/routes/data/fields/AutonomouscCheckboxRows/AutonomousRow4.dart create mode 100644 lib/routes/data/fields/AutonomouscCheckboxRows/AutonomousRow5.dart create mode 100644 lib/routes/data/fields/AutonomouscCheckboxRows/AutonomousRow6.dart diff --git a/assets/images/reefscape/karthik-reef-diagram-bottom-shorter.png b/assets/images/reefscape/karthik-reef-diagram-bottom-shorter.png new file mode 100644 index 0000000000000000000000000000000000000000..92b140e538d9ee151f8c4880989ca1c93486bbcf GIT binary patch literal 3001 zcmcgudpy&7AOGzL9pyMVu35UsIk{ycWyC0s8p@p!3ELb?F0&I;;?$#fh)!oLZPKY+ zXF78Ujn$DUm+f?lS#zn#ghgkW*zo+^p5u8vujk+ApZ)fEe?ITe=l%J7zn|ahm*H{D zMO9_13IG7AM~^sp0e}J;{NK271NbY29sd%1>YPEGzUP3o2!`bS@y~vi`?sg+b-lw=cn90 z=g!w3=xt;crd(*qgP0BxWaAvf)K1y8nAqDizowM9uI&sAuqm+_`_V;uF{_U6pNH3V zAi6NnrgLQ9CMH+@9OS)>mlw3ExK1mYRMd*phLaaJ26q6)_2Poo9CoJiu7CRVTo>l- z1hJ@ILP}60Gf)_(`2{^%6nys`$mo}n(um>|KejW*PB5RdwY2lkhqaZ)6}3&s(zJ4D z>_H)&SvZk&`b(dPX3`HG?NMFjiWFM#?OV}7=t_Z}687E1JhRedJi}jsa{1n;ARj+` zm$EfXL0N0k6K!rivVlptaMc5iyx$JtFgpm;_Qppc7O?c{Pr_1q1qbsb7Br5~6L zRh}aNapq)VYPe^Sw&a5cBM&x6>?{%EF_ zoA6CRLBWErQ@0^@=s05(V<%K(umKk@v?IMSl=!1B#~Ym{*E|$Jt{#UPn^67r{KAY1 zj$%|#DM0)}TaY)~w?2iNy~N154j5G|S*g3%@W$nKRH!+$JXXt2n@k>gk&za<$6=pq zhi)0&31{4quJ8o$AT8!Y)*Yrgt&(1HD?E7geV^4P0?w379>s7O7>7Cu-?WqV+{f?N z?S#6sU!mttRKw1G?~TsbE1F1G&w5EHi~NvP%v2BN2?iC?wvb|;-n6{~W}kdF5hFZI zz48&W?B4cFP`i25?2L9xpRPN`(59doultAV1p2oI%Yt@PLJ(N$k*+~r$_O{o*yOnw z@h}fEqf`6%%rd$ECKw&t_w-}fvPoOYmB{-X{3QXm57c>jiEM?yv6so7x2VA#sreT9 z@hc{K$?W;-Kxfx-7Xx7G$6RdU;);2NTJ3)WHgNFa=9Oq4FxUN@25$U{yO%23+WvxlYKwt;RDpt6iBXiz*rnP3swpj$Gjj5WI6)s+xnm33!t|nH-r;t*8tWIQ9pp z>T*840uKQl&q(llG!}KMmTOVWzsFSXA``@AKh60C*mPMH``-nDd_upfZd4HFBB>eP zv=vO!Lp9M)_U5A|h4gUJHgLS1h$`k720MPfn|H97Uj%XrB`Ua0ol#xYF9dA~=Z#G~ zv#ES);M3~Ayh=F~h8xDP{JMmsXFVKnzNLXnVW2=DPl9S2&U(-y^Nx1ogZIa`Giln_ zVvBSZRb^d__e5uukFfqiZ)g$|wE~H5{M$_RZf;Ul*%hI!F(zX1($yXa zhzbo0ltNlNss_cig;o&yxRWi$;iM2yDhe^#SUzHSvfm{8Jp#N|74KL>0!1D*x~^`3 zQkVl$u-sxse?Yk$*9Eux2JE(<8vV8S_w*_J_|^C5Qjj5HN#OFYr{T2Y7{gaP zaTQaVvzg7<%W#@2XdB{i+f3s8X7hqM3Ho4$DyloN8%<)xRKaPEpx+#)hw>G?w!^aF zcHm{L!E>*Q@gGIRK1MhR3dW15m9I>ue9u+T+CJ%knm-_H^={m#ZcCo9FCGFl$DiqX zX}#SwL#F!z+@oCxWHrQUlU|)jXT@ZXP>}g@o@MdU+Qcv1@J&%V+0eA=JUL>D*^SGv zTcxsFeYSS}S%eI?0fp=q&Gg>S3{%*j4&Mgu)Xx$)L-CU#&zh3}Zp9I9+pO{EV}Ja< z)mWi*GNMKBdgH2h1~xr_>dpywa{+gG_?)@k2^WFKwhqcwaF?IWLirnqE%jEJ68l2R zFZ}sT>lw|t`se%;sAcq$!9bjqh&#v179D{vYtrZX_k;%x1#$#gJ5QGrsajO_oBw~I6u5e%Af}F*Ai{i z!^(rdHF>@+Osato?$9A>iJ~VQGnbEPCN?HhaNW0EId&4oEq@E%xxbZCRitaqPu5G$4O>2NyC)^RGjtP{JSG#bB|tFTS384Qv=a14GmGEL39NO^4S63t8~wItuypZ##yUmEGDQpw zRF*w|(v|dgvEh4((m+lSd&{Di+!VoZT1}lxd)t85%})tmyl|p=xL#>(=9`VAjd|Cm zFW40tw#}_w0LfizJ{#+KpsjrkA>2#k)n@(1H;oz&Ag>U_}UOUZ@nGI>k9a$j2p-{m9<({Uh>}N zx(g-s*f{rWDDJz~NNx3ncfP&s2;`gJhx-oGG>|ouf}E*z8wA%a^ZDN0a=g^?@z2=3 zrh8n$&%q~)kkBiq@=pxnOTZ6R!vyDmgoslK7@P2T4EO*nU=~(pFt`~U<^zMrzX`98^<4o8d;VP^;fH7pA>mYX?0<8t5GzHBGwM=6 P4sg`@m=ohr=uiIwzILml literal 0 HcmV?d00001 diff --git a/assets/images/reefscape/karthik-reef-diagram-bottom.png b/assets/images/reefscape/karthik-reef-diagram-bottom.png deleted file mode 100644 index 3170f1a79a0d850607d39a60f538766b4f4eac24..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3373 zcmd5%`Fy{><$d4VE~gx2rFTmM z03dt(nB7?b5Jv%kn3U9J5RtU!*Mbjq^s%!i0U-PU0L0t?fO!y#83BM`0{|HF0RUJE z0PMO{_(^-oQL!I($*OLF{CE(A#Qce;;9{)bL(%|1 zX7h178+d5fL{AY#)l_kdi;JToq0A7WY;d*Yjq1oDaR~_2Kx%$mTXM_3=$6bQ_~wCk zGMz0slQj&6L*!f1TNTfX zPg`}yi!4g3x)^+ug)?H;$_abf-f`GkuzJPoQVOp_jr|)xr=p4E8N=)?IX%%dkUF(* zA;AB6Fvdc-6r?BaULVKj+zsrvU|52BOv&i(5_o4bTgMn{XwU7lVnCg ztd=&zeotxbBInBc5RQD=ujh@*pD1nLnuiw@&+BQAH%vxj4}#gN&wfd#g&N0%xu00R)%bJ%93YA9 zuO2kk9#>{itrcfjKWdMwAfVOmSHj4ys9haS67`ppNh*|J3i5|r=nIi@6rQbR$JHfO z>ux8^o_=?Qk-A7?Y$NRLGbuAhK}(qSxCEbeb-_&Ki!G+7Iag8@m&5+0@#P)4$o}AM z3gND(gJup}3LsW?E~tYjdolgao3|g+VP>z8dN}vmGE_B6Fb+qU7GSEGy`_my#~O|A zXuuIjlg&Pk+oT-Mpu|*P)mSD7lHdsW+{5na=P1)~gnIN%dBkTfEUr0kH?-x z*>+gR?Ch9gWzi*w&Rc_(tBhPw*HM`^##fFHKca8%*czuzwP)F5GQ*;M)s>{>Tiz2L zv~}L4Hqr-x04AaT!I7ctJUg7u_$bGHS2!%BrKVfi38NWKE5<9|n^-j78i@NRg)+jX zPNdr=Tej;qr@wNeq&#Tw3<483m_ zQN^>uXtFy-F0{#B7Ww_)Oe0k%TYaM{)@s*pskn2Lnt+)vyH}+?4x|Nq*-Op|Fu{u& z{rt%jJyMILBzuVB&v-Fs{GVInc_x3fh=$6g;ww zmO+OTz_IE=kuV*f;1ZSxPWi+5S=8;}#xg$KCQ3&)eR%f=ofV*|Y%*4+B%f|$(U;6pG(46^Y^*7V|2{aB3g$E~wjBR@lwrE!dLb&QUJCooHiT8ksuJ@m2Rw1k$V~cnx2CX6G_jsNAj~nz8b5=&tvy^m zubnEj5SfWo{ZImKD7QebIo)f$eAw1}Sk^em@-wHr9sXwGif7kHwGTVN2wq?>t~QR% zeR=lpwvui$T_zeYT+cMewGUEx>jQEH1}E|l~7vR zn?g%$Jn;vXnN`r^{%jH50XLQ4~m$%PF6MEN)wzBl+_n>8CN8 zUHfpkQ#{P(Ba@g@N1{;VYd&m#$TLc%$kAmOz6K#ko~#e5JwV6A)v;dz$+$(Mz};lN0c)I z-0Yva({chVleY_uvQ|zCaj8+_qwd8H8rs=$#k+VPz2y1Tij_hJ=iD$CftXW{{LJ@V zbw;KZ|C&VA!p%QV=SJa$E zcd~B_URk4Z`*&fNP8YS6B%Hwo^wz6AQ39`(`+;(TEVJd3gre55@8lh*3oFDV^i_W+ z&n#o`V!I)c#$b0`R}ii6@C|WxPs}b|zeJX8$W|3-tPSdx6J&n(8_#yj@{PWHT@&V{)24|Pe-=q~?%@35T7g zlkv(!g(y!WZ}QG{6nk=-hgXKS>lUOMGd$Mmjh=>1csL9j-@#*9WfKW8 z(RcM5R;S$ayUSQB;4ca!-5PWEs}o;bcfcD&rJ#HtXUByQzBu?Z006GvtX}*5jBR)? zV1SlpkiC1*Pv?U$Ff)Lx diff --git a/assets/images/reefscape/karthik-reef-diagram-top-shorter.png b/assets/images/reefscape/karthik-reef-diagram-top-shorter.png new file mode 100644 index 0000000000000000000000000000000000000000..e4354f02173bfbbccdf4e15d2d756f2eea52b316 GIT binary patch literal 3006 zcmc&$dstF;A3s`Yd8yTFrPI{btOc%6Lq#n!wTon$;)Nz&B0OuPreG#o+HCqprq#lc z7hD(9gu#@&;jJ>Iz+jsxI8$e&6f(_WN~X9Y+M9cy=l%PAp7Wf;=llD7Ki|vm`{SGo z{)hG%8+>X20D$p<{ayh8umlVJez<%obYJapzXW<%fGNn7{t5sR z5dffw1OOL00IWY*$UE!?E$ALa@ACp?vvS*;A*4?};OnjbTE{@gam%-P;CjfU6PIuZ zqa(hVln(#~v;$rqnA5-i`TW844OMIOe#x{UR$tD@u-1Qk&Z6&=49`d%l(W8lG zI9&6Fugcyjt2f3bL0Z~MVyD{*5 zFG1&*^8(!;SJ0O2{uj(}ulmlEPNX-?@Ma^b&vJHWpJiOR)zU7N=GWZ#mljbPlQg%! zos_mDes1Tgan?JMayJ#V>j_qgf)zS~mK&l_^!How#ovbs>D&1^x9Oe) z+GW!Dx`0$t!%j_I1zR&S!|QR(v- z_0VW*6Zz>2CFidrZAPexEv*(X=J~=+m{Ro=@*=l6pJ>*JVtXt|l%dDk=d9C2v%a?F z3krLDsgq$`=l8jiUZji7u^!+V(o`&6HYky^bw?l8P~p8De44O!p1h-yO9)=5&zGX zFzT&Yr;Bx(nni)5yr{_$9{8pg(NE&tKjclOz5{(LKmzw=?UoM-ZfpHrQP#A$kVm(j z`Fgm)#lZ(CR1z+ujAHq*vH>5eL%8Ft^(<4|WBQ?8wN9-H?k&k6x#QMcoL(RH$=Io*{c_#A4==iQ$j@Ke% zm5IC=GSa!ui;RONDLAe(oJVc^*lBs7GWqEX)?;J8MMRZJeFQ`t5)XgeJ-0*gMNn+q zZ26*uMrNB%PZx~kw_-!YBMp}%2No)lY9#%5PfxZh=5TyR0% z>4Rg==q(U>y8oa?dM57p0BiStf@a7}JG4{Y+!pfSi>4!d#2r!@YfXY?4Y>Ul$~+r9 zD4!d^X}7@Ro6#Bj+sN9ZR?LkGdZ2g0WI?Gk%&^R6c6cGPSpv=7FrrSfAZ(Szz4p!- z-B7H}NxBmZl(pO1j8wd*i*8o>C=0p9Wh+le8C5E}=r)A&xp+{?Ql>Vq;L@2)Qd_ffxLdB($2w!xT>@=>nC(o0-HZkI)e>M+(O zSlIon$^lK2g~lBe`w(cMTS0R#=_ldDgW`h_vH|&T+^SXYe-_XgMFQBb?jZ9UM$K?Y z(yU!?283NfaD8fb4p`90CtJaoUXsG3LTarf99_W1^UP^MH}RtSSoO))UFMHB@X7li zMonSTu3$NDLtk+$o(G2*exmoRt7gQvobg?Fo)cu)CrT;uM)V258#~*`X;98e6vwT~ zKjvx4FG@UREo5j%ahlGx7>L}84NZ1yv1zetni){bXVvRz z^&UwJQFqnuB(k{W7dkM^`26M>uKm z$kXIZeDtf&NDXu?T|P%2xl#p>8ku_w6bieMhP9u`loD;QS|lj3wH8QAit8MpBN>kt zv9Y`F#hWYVYaycQqjhB2rV;Z{I0wycCfT(YK_~EnR@&a1v9>@Psdz}4zYKE$3!Bd~ zcP?-_uK)5vUJ)J8%PLyu3L7UxBt=7=Wv^Tzv5m|o)>{sVe#Hczv)X2?4;gGhp(+4- z*J#&fg-l5jD>C}zptOi zHp6uFo>&g}p{z}P3B9cq@HcBzEzYpv&zWERk$5Vq%^$l(%G8UMvs@Vh-i44=wYep+ zpVQvLtkn0BD@|^ev9>2<8+h3jhm}@_M+Pl@#3hn02`HJ3V59{on+(MIou;K*hRC!Hv z)fg_+cSbnruiM_us@RHNFIF6)+=ROZn!apwh``d{8-as}(McK>ncEnJbieW|R);E)5!m*jLjxqL>2QczxMEzQ=Q4gx?r#xWe8UaPBFkSOUg-T*?S#I_2 zUWub#9LH8-o4&TFK5xu_rnWRD6wAf}@cNk}ZJuv$F{-fyXxEhkc|@~SovV_6ccgVr z_HP89%d65#r~GHqOJfdW(|FN3Cx-blF%nMfM2|FEHix+D?!MBW8^N@S$_|1XrVp0c z0{Q+}V8@M0;OjmA{6I_Jj9CZx{=W$teey_T^>1ZYrO?-^4cR-Cd@PDgaKR@Kpa)=& zut$E0u=~;ufkD{0ARV9!jzG8|5L-Eb$v+%o;*K4UPX6Bxp?}quK@MO1Cj$9+41q+B fiaGh;K090-Q1d}@KYzxDe1HSqhrHN(BES6`+J2hM literal 0 HcmV?d00001 diff --git a/assets/images/reefscape/karthik-reef-diagram-top.png b/assets/images/reefscape/karthik-reef-diagram-top.png deleted file mode 100644 index d2cc22a22d78f9f32cde73275403e28195415e2e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3326 zcmeHJYgkiP7QLVdf{0kK2#6@fjy!4tf+PYF6@v&!LqLNfLJTRTkwNogK}uqfL_`ANQ6-TOf-MHf@X*R5f`LjQgg0{oIMDgN`9DAAM{>Wt&t7Y`hT2Yeo1_OVn?5rJstF)1&=9j&nN~M_05E!)AkhPWs?RaN z!SO#vG|y)0c4?t<_6W34Hm|L9()Xp})F7-I<(Ocw;4T~Z;wVn-MTSuQ$IWDoBOh6T z1?U}scc~3P_5FXrIv-wdd36Q>h&*s^j}CQbja~tN-im7tsji6GXfqhn2+@?#EkL$S zN2i=wIMQZ}5N!R4(odr|6&@4opYR#a8V#B2f3vxMezD8!@$RzSV4x3|ZWl7ah)ausby<(5e7##IS>?3+p>cBEX{*=bjMQ~!ek zra@j1XZjKE)gtk|{9Vs_?q6p1oAJV;F%AO8AN0R0RPQ&d2^;?{v#&yzPh{Z|O)Na1 zSwgElGA&tg;#7SYw4;8#9Qy6hzB4ai!O`~yo|t`518O1aZ2ox!LO|Wq$Ic*3k0jx~JC_hG+MJb745K z^lnYLvrlv(xKq29$|l!TjxE(C&YO&bnviW{wKoMPR~;98`nCdOh?9dJjT^1Fo7zJ= z=0_}0adew6^dw$;M1|f_P22>O5yZLGHk~uPJkWnsj)5=U@kEZ;iiIz4V2Vgtj-eCA z>QOE`R#RzSJY?zY7JlsVj#P0P4I48@q^k^({l;!KNreK6ST&9_#=#o+aY^zAwoa!M z7>(1IxQcDFCx@{QetXGFraBYz-{~^69WUN9YG0oE;27H<^XK#IOP0^!qR{G!L0wE9 zbS3O_#P9Eq&QC-vYpO^Vm+)_6JbSPT=pA<)`78`?;=8NsVQ<7B^v+2zcEAhfdD9cz z-ZCtlCbX)!APyJ}nz5>DO~!IF!8kxHKEWkUCH4klxw&BMDK6oDe>S-`j0_F(2Jw6F zCZ6`}#<{;6@+Y;>0oSF(_^%L$uGF1wbuB@HFDjyO{HLu_-GiwKUU{GZiaj2`ixC|# zlLr$_CaM52j&Tn}C|viDN&7t%#xhJO-K6iBAv12b@B^b}DbzXd!Mv-;t^|3X?K#;d zEu+dF%u0H%cqxAbW3g1KQGRaxD~^&f25#G1>O{7mzA`W(ygkk<;U3#FR+J>s-JN?D zzoELHGUfqRS6+x z)Y4_=6u&*S30Cyq9ESbO+>RY|mPysqL{ahZ4oYEx&?XYTCFt7w?er7?=yz5FVlQ}Pz z8H_n^7)EU%JN~erSqJ04*?5DIcyJFiOkA~*b$YBtuY%CbAD#3N9yTng6+Wv^RJ~$gGC3Ow=L7VvV`#O{f$KppEVnyJFd&WdFn-X z@ASjmfB)rErj5Jx&&(*tZ5QJm=NY9;-`wz!UHlYRvf;Bboq$VcEDMC%7b8sqhUD-( zA^aIbJ2hmO>W1rW%><&F)f%Pfjv&(-^#f1@9f=#gWT@_b8qG8b;_HvgEvS>#Vf*jY# z*f{X;U|p7QmZlePUa;X?9=hW(A=mvXeCUU6+h9xp?1)Q^a}|cmmRoM4FAQFF%u43lk2R1cz*7Y3HFnStpfxpq)s5nHaiAq|$YBp4tM<{4A2 z6)PWm2Vq=GuU0#~raWSso>S)pCXr|?HuGru%meO?gZ?<_JB^NtH<$%9S@EiP@hy;R zD*@sYE+0pP9NGS>ZU?4^)c92^^i10R4L#LmGM0=0#}(02B42n22q zvj+bm5N(7)_7?yl@=|zM(tih}gnFL?0e|~ createState() => _CustomCheckboxState(); +} + +class _CustomCheckboxState extends State { + 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: 47, - padding: const EdgeInsets.all(3), - margin: margin, - color: backgroundColor, + height: 40, + padding: const EdgeInsets.all(5), + margin: widget.margin, + color: widget.backgroundColor, child: Row( mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.center, children: [ Checkbox( value: isChecked, - onChanged: onChanged, - checkColor: checkColor, - activeColor: backgroundColor, + onChanged: (bool? value) { + setState(() { + isChecked = value ?? false; + widget.controller.text = isChecked ? "1" : "0"; + }); + }, + checkColor: widget.checkColor, + activeColor: Colors.blue, ), - if (label.isNotEmpty) + if (widget.label.isNotEmpty) Text( - label, + widget.label, style: TextStyle( - color: labelColor, + color: widget.labelColor, fontSize: 16.0, ), ), diff --git a/lib/routes/data/AutonomousDataRoute.dart b/lib/routes/data/AutonomousDataRoute.dart index 2ae990d..bcc9a7a 100644 --- a/lib/routes/data/AutonomousDataRoute.dart +++ b/lib/routes/data/AutonomousDataRoute.dart @@ -4,8 +4,14 @@ import 'package:scouting_platform/builders/PlatformRoute.dart'; import 'package:scouting_platform/routes/comments/CommentsRoute.dart'; import 'package:scouting_platform/routes/data/fields/AutonomousRows.dart/AutonomousBottomReef.dart'; import 'package:scouting_platform/routes/data/fields/AutonomousRows.dart/AutonomousMiddleReef.dart'; +import 'package:scouting_platform/routes/data/fields/AutonomouscCheckboxRows/AutonomousRow1.dart'; +import 'package:scouting_platform/routes/data/fields/AutonomouscCheckboxRows/AutonomousRow2.dart'; +import 'package:scouting_platform/routes/data/fields/AutonomouscCheckboxRows/AutonomousRow3.dart'; +import 'package:scouting_platform/routes/data/fields/AutonomouscCheckboxRows/AutonomousRow4.dart'; +import 'package:scouting_platform/routes/data/fields/AutonomouscCheckboxRows/AutonomousRow5.dart'; +import 'package:scouting_platform/routes/data/fields/AutonomouscCheckboxRows/AutonomousRow6.dart'; +import 'package:scouting_platform/routes/data/fields/AutonomousRows.dart/Auto'; import 'package:scouting_platform/routes/prematch/PrematchRoute.dart'; -import 'package:scouting_platform/styles/components/TitleStyle.dart'; import 'package:scouting_platform/styles/AppStyle.dart'; import 'package:scouting_platform/utils/helpers/ScheduleHelper.dart'; import 'package:scouting_platform/utils/data/values/AutonomousValues.dart'; @@ -39,7 +45,7 @@ class _DataRouteState extends State { body: SingleChildScrollView( physics: const AlwaysScrollableScrollPhysics(), child: Padding( - padding: const EdgeInsets.all(16.0), + padding: const EdgeInsets.all(5.0), child: Row( crossAxisAlignment: CrossAxisAlignment.start, children: [ @@ -47,16 +53,18 @@ class _DataRouteState extends State { Expanded( flex: 1, child: Column( + mainAxisSize: MainAxisSize.min, crossAxisAlignment: CrossAxisAlignment.start, children: [ - const TitleStyle( - text: "Auto Data", - padding: EdgeInsets.only(top: 10.0), - ), - const SizedBox(height: 20.0), + const AutonomousRow1(), + const AutonomousRow2(), + const AutonomousRow3(), const AutonomousTopReef(), const AutonomousMiddleReef(), const AutonomousBottomReef(), + const AutonomousRow4(), + const AutonomousRow5(), + const AutonomousRow6(), ], ), ), diff --git a/lib/routes/data/fields/AutonomousRightRows/AutonomousRightRow1.dart b/lib/routes/data/fields/AutonomousRightRows/AutonomousRightRow1.dart new file mode 100644 index 0000000..fb81546 --- /dev/null +++ b/lib/routes/data/fields/AutonomousRightRows/AutonomousRightRow1.dart @@ -0,0 +1,61 @@ +import 'package:flutter/material.dart'; +import 'package:scouting_platform/builders/bases/CounterNumberField.dart'; +import 'package:scouting_platform/builders/bases/PlatformDropdownMenu.dart'; +import 'package:scouting_platform/utils/data/constants/OptionConstants.dart'; +import 'package:scouting_platform/utils/data/values/AutonomousValues.dart'; + +class AutonomousRightRow1 extends StatefulWidget { + const AutonomousRightRow1({ + super.key, + }); + + @override + State createState() => _AutonomousRightRow1State(); +} + +class _AutonomousRightRow1State extends State { + /// Increments an integer in a controller's value by one + void incrementNumber(TextEditingController controller) { + if (!mounted) return; + + int currentValue = int.parse(controller.text); + setState(() { + currentValue++; + controller.text = currentValue.toString(); + }); + } + + /// Decrements an integer in a controller's value by one unless it's 0 + void decrementNumber(TextEditingController controller) { + if (!mounted) return; + + int currentValue = int.parse(controller.text); + setState(() { + currentValue--; + controller.text = (currentValue > 0 ? currentValue : 0).toString(); + }); + } + + @override + Widget build(BuildContext context) { + return Container( + decoration: BoxDecoration(), + height: 50, // Set a height for the container + child: Row( + mainAxisAlignment: MainAxisAlignment.center, // Center the row contents + children: [ + // Auto starting position + PlatformDropdownMenu( + dropdownMenuSelectedItem: AutonomousValues.autoStartPosition.text, + onChanged: (value) { + setState(() { + AutonomousValues.autoMobility.text = value; + }); + }, + dropdownItems: OptionConstants.startPositions, + margin: const EdgeInsets.only(left: 20)), + ], + ), + ); + } +} diff --git a/lib/routes/data/fields/AutonomousRows.dart/AutonomousBottomReef.dart b/lib/routes/data/fields/AutonomousRows.dart/AutonomousBottomReef.dart index 815198b..dbbf725 100644 --- a/lib/routes/data/fields/AutonomousRows.dart/AutonomousBottomReef.dart +++ b/lib/routes/data/fields/AutonomousRows.dart/AutonomousBottomReef.dart @@ -14,7 +14,7 @@ class AutonomousBottomReef extends StatefulWidget { } class _AutonomousRow1State extends State { - /// Increments an integer in a controller's value by one + // Increments an integer in a controller's value by one void incrementNumber(TextEditingController controller) { if (!mounted) return; @@ -42,21 +42,21 @@ class _AutonomousRow1State extends State { decoration: BoxDecoration( image: DecorationImage( image: AssetImage( - 'assets/images/reefscape/karthik-reef-diagram-bottom.png'), // Replace with your image path + 'assets/images/reefscape/karthik-reef-diagram-bottom-shorter.png'), // Replace with your image path fit: BoxFit.cover, ), ), - height: 175, // Set a height for the container + height: 130, // Set a height for the container child: Row( mainAxisAlignment: MainAxisAlignment.center, // Center the row contents children: [ CounterNumberField( - margin: EdgeInsets.only(right: 100.0, bottom: 70.0), + margin: EdgeInsets.only(right: 50.0, bottom: 40.0), controller: AutonomousValues.l1SW, onTapDecrement: () => decrementNumber(AutonomousValues.l1SW), onTapIncrement: () => incrementNumber(AutonomousValues.l1SW)), CounterNumberField( - margin: EdgeInsets.only(right: 0.0, bottom: 70.0), + margin: EdgeInsets.only(right: 0.0, bottom: 40.0), controller: AutonomousValues.l1SE, onTapDecrement: () => decrementNumber(AutonomousValues.l1SE), onTapIncrement: () => incrementNumber(AutonomousValues.l1SE)), diff --git a/lib/routes/data/fields/AutonomousRows.dart/AutonomousTopReef.dart b/lib/routes/data/fields/AutonomousRows.dart/AutonomousTopReef.dart index b36e778..168af69 100644 --- a/lib/routes/data/fields/AutonomousRows.dart/AutonomousTopReef.dart +++ b/lib/routes/data/fields/AutonomousRows.dart/AutonomousTopReef.dart @@ -42,23 +42,23 @@ class _AutonomousRow1State extends State { decoration: BoxDecoration( image: DecorationImage( image: AssetImage( - 'assets/images/reefscape/karthik-reef-diagram-top.png'), // Replace with your image path + 'assets/images/reefscape/karthik-reef-diagram-top-shorter.png'), // Replace with your image path fit: BoxFit.cover, ), ), - height: 150, // Set a height for the container + height: 130, // Set a height for the container child: Row( mainAxisAlignment: MainAxisAlignment.center, // Center the row contents children: [ // North West (Top Left) trough counter CounterNumberField( - margin: EdgeInsets.only(right: 100.0, top: 70.0, left: 100.0), + margin: EdgeInsets.only(right: 50.0, top: 50.0, left: 100.0), controller: AutonomousValues.l1NW, onTapDecrement: () => decrementNumber(AutonomousValues.l1NW), onTapIncrement: () => incrementNumber(AutonomousValues.l1NW)), // North East (Top Right) trough counter CounterNumberField( - margin: EdgeInsets.only(right: 100.0, top: 70.0), + margin: EdgeInsets.only(right: 100.0, top: 50.0), controller: AutonomousValues.l1NE, onTapDecrement: () => decrementNumber(AutonomousValues.l1NE), onTapIncrement: () => incrementNumber(AutonomousValues.l1NE)), diff --git a/lib/routes/data/fields/AutonomouscCheckboxRows/AutonomousRow1.dart b/lib/routes/data/fields/AutonomouscCheckboxRows/AutonomousRow1.dart new file mode 100644 index 0000000..c193590 --- /dev/null +++ b/lib/routes/data/fields/AutonomouscCheckboxRows/AutonomousRow1.dart @@ -0,0 +1,91 @@ +import 'package:flutter/material.dart'; +import 'package:scouting_platform/utils/data/values/AutonomousValues.dart'; +import 'package:scouting_platform/builders/bases/CustomCheckbox.dart'; + +class AutonomousRow1 extends StatefulWidget { + const AutonomousRow1({ + super.key, + }); + + @override + State createState() => _AutonomousRow1State(); +} + +class _AutonomousRow1State extends State { + /// Increments an integer in a controller's value by one + void incrementNumber(TextEditingController controller) { + if (!mounted) return; + + int currentValue = int.parse(controller.text); + setState(() { + currentValue++; + controller.text = currentValue.toString(); + }); + } + + /// Decrements an integer in a controller's value by one unless it's 0 + void decrementNumber(TextEditingController controller) { + if (!mounted) return; + + int currentValue = int.parse(controller.text); + setState(() { + currentValue--; + controller.text = (currentValue > 0 ? currentValue : 0).toString(); + }); + } + + @override + Widget build(BuildContext context) { + return Container( + decoration: BoxDecoration(), + height: 50, // Set a height for the container + child: Row( + mainAxisAlignment: MainAxisAlignment.start, // Center the row contents + children: [ + // A + CustomCheckbox( + controller: AutonomousValues.l4A, + backgroundColor: Colors.grey.shade800, + checkColor: Colors.white, + labelColor: Colors.white, + margin: const EdgeInsets.only(right: 75.0)), + // L + CustomCheckbox( + controller: AutonomousValues.l4L, + backgroundColor: Colors.grey.shade800, + checkColor: Colors.white, + labelColor: Colors.white, + margin: const EdgeInsets.only(right: 75.0)), + // K + CustomCheckbox( + controller: AutonomousValues.l4K, + backgroundColor: Colors.grey.shade800, + checkColor: Colors.white, + labelColor: Colors.white, + margin: const EdgeInsets.only(right: 80.0)), + // J + CustomCheckbox( + controller: AutonomousValues.l4J, + backgroundColor: Colors.grey.shade800, + checkColor: Colors.white, + labelColor: Colors.white, + margin: const EdgeInsets.only(right: 75.0)), + // I + CustomCheckbox( + controller: AutonomousValues.l4I, + backgroundColor: Colors.grey.shade800, + checkColor: Colors.white, + labelColor: Colors.white, + margin: const EdgeInsets.only(right: 78.0)), + // H + CustomCheckbox( + controller: AutonomousValues.l4H, + backgroundColor: Colors.grey.shade800, + checkColor: Colors.white, + labelColor: Colors.white, + margin: const EdgeInsets.all(00.0)), + ], + ), + ); + } +} diff --git a/lib/routes/data/fields/AutonomouscCheckboxRows/AutonomousRow2.dart b/lib/routes/data/fields/AutonomouscCheckboxRows/AutonomousRow2.dart new file mode 100644 index 0000000..32f7d3c --- /dev/null +++ b/lib/routes/data/fields/AutonomouscCheckboxRows/AutonomousRow2.dart @@ -0,0 +1,91 @@ +import 'package:flutter/material.dart'; +import 'package:scouting_platform/utils/data/values/AutonomousValues.dart'; +import 'package:scouting_platform/builders/bases/CustomCheckbox.dart'; + +class AutonomousRow2 extends StatefulWidget { + const AutonomousRow2({ + super.key, + }); + + @override + State createState() => _AutonomousRow2State(); +} + +class _AutonomousRow2State extends State { + /// Increments an integer in a controller's value by one + void incrementNumber(TextEditingController controller) { + if (!mounted) return; + + int currentValue = int.parse(controller.text); + setState(() { + currentValue++; + controller.text = currentValue.toString(); + }); + } + + /// Decrements an integer in a controller's value by one unless it's 0 + void decrementNumber(TextEditingController controller) { + if (!mounted) return; + + int currentValue = int.parse(controller.text); + setState(() { + currentValue--; + controller.text = (currentValue > 0 ? currentValue : 0).toString(); + }); + } + + @override + Widget build(BuildContext context) { + return Container( + decoration: BoxDecoration(), + height: 50, // Set a height for the container + child: Row( + mainAxisAlignment: MainAxisAlignment.start, // Center the row contents + children: [ + // A + CustomCheckbox( + controller: AutonomousValues.l3A, + backgroundColor: Colors.grey.shade800, + checkColor: Colors.white, + labelColor: Colors.white, + margin: const EdgeInsets.only(right: 75.0)), + // L + CustomCheckbox( + controller: AutonomousValues.l3L, + backgroundColor: Colors.grey.shade800, + checkColor: Colors.white, + labelColor: Colors.white, + margin: const EdgeInsets.only(right: 75.0)), + // K + CustomCheckbox( + controller: AutonomousValues.l3K, + backgroundColor: Colors.grey.shade800, + checkColor: Colors.white, + labelColor: Colors.white, + margin: const EdgeInsets.only(right: 80.0)), + // J + CustomCheckbox( + controller: AutonomousValues.l3J, + backgroundColor: Colors.grey.shade800, + checkColor: Colors.white, + labelColor: Colors.white, + margin: const EdgeInsets.only(right: 75.0)), + // I + CustomCheckbox( + controller: AutonomousValues.l3I, + backgroundColor: Colors.grey.shade800, + checkColor: Colors.white, + labelColor: Colors.white, + margin: const EdgeInsets.only(right: 78.0)), + // H + CustomCheckbox( + controller: AutonomousValues.l3H, + backgroundColor: Colors.grey.shade800, + checkColor: Colors.white, + labelColor: Colors.white, + margin: const EdgeInsets.all(0.0)), + ], + ), + ); + } +} diff --git a/lib/routes/data/fields/AutonomouscCheckboxRows/AutonomousRow3.dart b/lib/routes/data/fields/AutonomouscCheckboxRows/AutonomousRow3.dart new file mode 100644 index 0000000..e6b43a8 --- /dev/null +++ b/lib/routes/data/fields/AutonomouscCheckboxRows/AutonomousRow3.dart @@ -0,0 +1,91 @@ +import 'package:flutter/material.dart'; +import 'package:scouting_platform/utils/data/values/AutonomousValues.dart'; +import 'package:scouting_platform/builders/bases/CustomCheckbox.dart'; + +class AutonomousRow3 extends StatefulWidget { + const AutonomousRow3({ + super.key, + }); + + @override + State createState() => _AutonomousRow3State(); +} + +class _AutonomousRow3State extends State { + /// Increments an integer in a controller's value by one + void incrementNumber(TextEditingController controller) { + if (!mounted) return; + + int currentValue = int.parse(controller.text); + setState(() { + currentValue++; + controller.text = currentValue.toString(); + }); + } + + /// Decrements an integer in a controller's value by one unless it's 0 + void decrementNumber(TextEditingController controller) { + if (!mounted) return; + + int currentValue = int.parse(controller.text); + setState(() { + currentValue--; + controller.text = (currentValue > 0 ? currentValue : 0).toString(); + }); + } + + @override + Widget build(BuildContext context) { + return Container( + decoration: BoxDecoration(), + height: 50, // Set a height for the container + child: Row( + mainAxisAlignment: MainAxisAlignment.start, // Center the row contents + children: [ + // A + CustomCheckbox( + controller: AutonomousValues.l2A, + backgroundColor: Colors.grey.shade800, + checkColor: Colors.white, + labelColor: Colors.white, + margin: const EdgeInsets.only(right: 75.0)), + // L + CustomCheckbox( + controller: AutonomousValues.l2L, + backgroundColor: Colors.grey.shade800, + checkColor: Colors.white, + labelColor: Colors.white, + margin: const EdgeInsets.only(right: 75.0)), + // K + CustomCheckbox( + controller: AutonomousValues.l2K, + backgroundColor: Colors.grey.shade800, + checkColor: Colors.white, + labelColor: Colors.white, + margin: const EdgeInsets.only(right: 80.0)), + // J + CustomCheckbox( + controller: AutonomousValues.l2J, + backgroundColor: Colors.grey.shade800, + checkColor: Colors.white, + labelColor: Colors.white, + margin: const EdgeInsets.only(right: 75.0)), + // I + CustomCheckbox( + controller: AutonomousValues.l2I, + backgroundColor: Colors.grey.shade800, + checkColor: Colors.white, + labelColor: Colors.white, + margin: const EdgeInsets.only(right: 78.0)), + // H + CustomCheckbox( + controller: AutonomousValues.l2H, + backgroundColor: Colors.grey.shade800, + checkColor: Colors.white, + labelColor: Colors.white, + margin: const EdgeInsets.only(right: 0.0)), + ], + ), + ); + } +} diff --git a/lib/routes/data/fields/AutonomouscCheckboxRows/AutonomousRow4.dart b/lib/routes/data/fields/AutonomouscCheckboxRows/AutonomousRow4.dart new file mode 100644 index 0000000..7c95934 --- /dev/null +++ b/lib/routes/data/fields/AutonomouscCheckboxRows/AutonomousRow4.dart @@ -0,0 +1,91 @@ +import 'package:flutter/material.dart'; +import 'package:scouting_platform/utils/data/values/AutonomousValues.dart'; +import 'package:scouting_platform/builders/bases/CustomCheckbox.dart'; + +class AutonomousRow4 extends StatefulWidget { + const AutonomousRow4({ + super.key, + }); + + @override + State createState() => _AutonomousRow4State(); +} + +class _AutonomousRow4State extends State { + /// Increments an integer in a controller's value by one + void incrementNumber(TextEditingController controller) { + if (!mounted) return; + + int currentValue = int.parse(controller.text); + setState(() { + currentValue++; + controller.text = currentValue.toString(); + }); + } + + /// Decrements an integer in a controller's value by one unless it's 0 + void decrementNumber(TextEditingController controller) { + if (!mounted) return; + + int currentValue = int.parse(controller.text); + setState(() { + currentValue--; + controller.text = (currentValue > 0 ? currentValue : 0).toString(); + }); + } + + @override + Widget build(BuildContext context) { + return Container( + decoration: BoxDecoration(), + height: 50, // Set a height for the container + child: Row( + mainAxisAlignment: MainAxisAlignment.start, // Center the row contents + children: [ + // A + CustomCheckbox( + controller: AutonomousValues.l4B, + backgroundColor: Colors.grey.shade800, + checkColor: Colors.white, + labelColor: Colors.white, + margin: const EdgeInsets.only(right: 75.0)), + // L + CustomCheckbox( + controller: AutonomousValues.l4C, + backgroundColor: Colors.grey.shade800, + checkColor: Colors.white, + labelColor: Colors.white, + margin: const EdgeInsets.only(right: 75.0)), + // K + CustomCheckbox( + controller: AutonomousValues.l4D, + backgroundColor: Colors.grey.shade800, + checkColor: Colors.white, + labelColor: Colors.white, + margin: const EdgeInsets.only(right: 80.0)), + // J + CustomCheckbox( + controller: AutonomousValues.l4E, + backgroundColor: Colors.grey.shade800, + checkColor: Colors.white, + labelColor: Colors.white, + margin: const EdgeInsets.only(right: 75.0)), + // I + CustomCheckbox( + controller: AutonomousValues.l4F, + backgroundColor: Colors.grey.shade800, + checkColor: Colors.white, + labelColor: Colors.white, + margin: const EdgeInsets.only(right: 78.0)), + // H + CustomCheckbox( + controller: AutonomousValues.l4G, + backgroundColor: Colors.grey.shade800, + checkColor: Colors.white, + labelColor: Colors.white, + margin: const EdgeInsets.only(right: 0.0)), + ], + ), + ); + } +} diff --git a/lib/routes/data/fields/AutonomouscCheckboxRows/AutonomousRow5.dart b/lib/routes/data/fields/AutonomouscCheckboxRows/AutonomousRow5.dart new file mode 100644 index 0000000..01ec016 --- /dev/null +++ b/lib/routes/data/fields/AutonomouscCheckboxRows/AutonomousRow5.dart @@ -0,0 +1,91 @@ +import 'package:flutter/material.dart'; +import 'package:scouting_platform/utils/data/values/AutonomousValues.dart'; +import 'package:scouting_platform/builders/bases/CustomCheckbox.dart'; + +class AutonomousRow5 extends StatefulWidget { + const AutonomousRow5({ + super.key, + }); + + @override + State createState() => _AutonomousRow5State(); +} + +class _AutonomousRow5State extends State { + /// Increments an integer in a controller's value by one + void incrementNumber(TextEditingController controller) { + if (!mounted) return; + + int currentValue = int.parse(controller.text); + setState(() { + currentValue++; + controller.text = currentValue.toString(); + }); + } + + /// Decrements an integer in a controller's value by one unless it's 0 + void decrementNumber(TextEditingController controller) { + if (!mounted) return; + + int currentValue = int.parse(controller.text); + setState(() { + currentValue--; + controller.text = (currentValue > 0 ? currentValue : 0).toString(); + }); + } + + @override + Widget build(BuildContext context) { + return Container( + decoration: BoxDecoration(), + height: 50, // Set a height for the container + child: Row( + mainAxisAlignment: MainAxisAlignment.start, // Center the row contents + children: [ + // B + CustomCheckbox( + controller: AutonomousValues.l3B, + backgroundColor: Colors.grey.shade800, + checkColor: Colors.white, + labelColor: Colors.white, + margin: const EdgeInsets.only(right: 75.0)), + // C + CustomCheckbox( + controller: AutonomousValues.l3C, + backgroundColor: Colors.grey.shade800, + checkColor: Colors.white, + labelColor: Colors.white, + margin: const EdgeInsets.only(right: 75.0)), + // D + CustomCheckbox( + controller: AutonomousValues.l3D, + backgroundColor: Colors.grey.shade800, + checkColor: Colors.white, + labelColor: Colors.white, + margin: const EdgeInsets.only(right: 80.0)), + // E + CustomCheckbox( + controller: AutonomousValues.l3E, + backgroundColor: Colors.grey.shade800, + checkColor: Colors.white, + labelColor: Colors.white, + margin: const EdgeInsets.only(right: 75.0)), + // F + CustomCheckbox( + controller: AutonomousValues.l3F, + backgroundColor: Colors.grey.shade800, + checkColor: Colors.white, + labelColor: Colors.white, + margin: const EdgeInsets.only(right: 78.0)), + // G + CustomCheckbox( + controller: AutonomousValues.l3G, + backgroundColor: Colors.grey.shade800, + checkColor: Colors.white, + labelColor: Colors.white, + margin: const EdgeInsets.only(right: 0.0)), + ], + ), + ); + } +} diff --git a/lib/routes/data/fields/AutonomouscCheckboxRows/AutonomousRow6.dart b/lib/routes/data/fields/AutonomouscCheckboxRows/AutonomousRow6.dart new file mode 100644 index 0000000..3f884cb --- /dev/null +++ b/lib/routes/data/fields/AutonomouscCheckboxRows/AutonomousRow6.dart @@ -0,0 +1,91 @@ +import 'package:flutter/material.dart'; +import 'package:scouting_platform/utils/data/values/AutonomousValues.dart'; +import 'package:scouting_platform/builders/bases/CustomCheckbox.dart'; + +class AutonomousRow6 extends StatefulWidget { + const AutonomousRow6({ + super.key, + }); + + @override + State createState() => _AutonomousRow6State(); +} + +class _AutonomousRow6State extends State { + /// Increments an integer in a controller's value by one + void incrementNumber(TextEditingController controller) { + if (!mounted) return; + + int currentValue = int.parse(controller.text); + setState(() { + currentValue++; + controller.text = currentValue.toString(); + }); + } + + /// Decrements an integer in a controller's value by one unless it's 0 + void decrementNumber(TextEditingController controller) { + if (!mounted) return; + + int currentValue = int.parse(controller.text); + setState(() { + currentValue--; + controller.text = (currentValue > 0 ? currentValue : 0).toString(); + }); + } + + @override + Widget build(BuildContext context) { + return Container( + decoration: BoxDecoration(), + height: 50, // Set a height for the container + child: Row( + mainAxisAlignment: MainAxisAlignment.start, // Center the row contents + children: [ + // B + CustomCheckbox( + controller: AutonomousValues.l2B, + backgroundColor: Colors.grey.shade800, + checkColor: Colors.white, + labelColor: Colors.white, + margin: const EdgeInsets.only(right: 75.0)), + // C + CustomCheckbox( + controller: AutonomousValues.l2C, + backgroundColor: Colors.grey.shade800, + checkColor: Colors.white, + labelColor: Colors.white, + margin: const EdgeInsets.only(right: 75.0)), + // D + CustomCheckbox( + controller: AutonomousValues.l2D, + backgroundColor: Colors.grey.shade800, + checkColor: Colors.white, + labelColor: Colors.white, + margin: const EdgeInsets.only(right: 80.0)), + // E + CustomCheckbox( + controller: AutonomousValues.l2E, + backgroundColor: Colors.grey.shade800, + checkColor: Colors.white, + labelColor: Colors.white, + margin: const EdgeInsets.only(right: 75.0)), + // F + CustomCheckbox( + controller: AutonomousValues.l2F, + backgroundColor: Colors.grey.shade800, + checkColor: Colors.white, + labelColor: Colors.white, + margin: const EdgeInsets.only(right: 78.0)), + // G + CustomCheckbox( + controller: AutonomousValues.l2G, + backgroundColor: Colors.grey.shade800, + checkColor: Colors.white, + labelColor: Colors.white, + margin: const EdgeInsets.only(right: 0.0)), + ], + ), + ); + } +} diff --git a/lib/utils/data/constants/OptionConstants.dart b/lib/utils/data/constants/OptionConstants.dart index 390dcc1..a683f72 100644 --- a/lib/utils/data/constants/OptionConstants.dart +++ b/lib/utils/data/constants/OptionConstants.dart @@ -17,6 +17,8 @@ class OptionConstants { static final yesNoOptions = ["Yes", "No"]; + static final startPositions = ["Left", "Center", "Right"]; + static final endgameOptions = ["No", "Single", "Double", "Park"]; static List availableDriverstations = [ diff --git a/lib/utils/data/values/AutonomousValues.dart b/lib/utils/data/values/AutonomousValues.dart index 56e8aed..2749420 100644 --- a/lib/utils/data/values/AutonomousValues.dart +++ b/lib/utils/data/values/AutonomousValues.dart @@ -2,6 +2,17 @@ import 'package:flutter/material.dart'; class AutonomousValues { + // other + static TextEditingController autoStartPosition = + TextEditingController(text: "Center"); + static TextEditingController autoMobility = TextEditingController(text: "No"); + static TextEditingController autoSpeakerScored = + TextEditingController(text: "0"); + static TextEditingController autoSpeakerMissed = + TextEditingController(text: "0"); + static TextEditingController autoAmpScored = TextEditingController(text: "0"); + static TextEditingController autoAmpMissed = TextEditingController(text: "0"); + // L1 trough sides static TextEditingController l1NW = TextEditingController(text: "0"); static TextEditingController l1NE = TextEditingController(text: "0"); @@ -10,11 +21,48 @@ class AutonomousValues { static TextEditingController l1SW = TextEditingController(text: "0"); static TextEditingController l1SE = TextEditingController(text: "0"); - static TextEditingController autoMobility = TextEditingController(text: "No"); - static TextEditingController autoSpeakerScored = - TextEditingController(text: "0"); - static TextEditingController autoSpeakerMissed = - TextEditingController(text: "0"); - static TextEditingController autoAmpScored = TextEditingController(text: "0"); - static TextEditingController autoAmpMissed = TextEditingController(text: "0"); + // L4 trough sides + static TextEditingController l4A = TextEditingController(text: "0"); + static TextEditingController l4L = TextEditingController(text: "0"); + static TextEditingController l4K = TextEditingController(text: "0"); + static TextEditingController l4J = TextEditingController(text: "0"); + static TextEditingController l4I = TextEditingController(text: "0"); + static TextEditingController l4H = TextEditingController(text: "0"); + + static TextEditingController l4B = TextEditingController(text: "0"); + static TextEditingController l4C = TextEditingController(text: "0"); + static TextEditingController l4D = TextEditingController(text: "0"); + static TextEditingController l4E = TextEditingController(text: "0"); + static TextEditingController l4F = TextEditingController(text: "0"); + static TextEditingController l4G = TextEditingController(text: "0"); + + // L3 trough sides + static TextEditingController l3A = TextEditingController(text: "0"); + static TextEditingController l3L = TextEditingController(text: "0"); + static TextEditingController l3K = TextEditingController(text: "0"); + static TextEditingController l3J = TextEditingController(text: "0"); + static TextEditingController l3I = TextEditingController(text: "0"); + static TextEditingController l3H = TextEditingController(text: "0"); + + static TextEditingController l3B = TextEditingController(text: "0"); + static TextEditingController l3C = TextEditingController(text: "0"); + static TextEditingController l3D = TextEditingController(text: "0"); + static TextEditingController l3E = TextEditingController(text: "0"); + static TextEditingController l3F = TextEditingController(text: "0"); + static TextEditingController l3G = TextEditingController(text: "0"); + + // L2 through sides + static TextEditingController l2A = TextEditingController(text: "0"); + static TextEditingController l2L = TextEditingController(text: "0"); + static TextEditingController l2K = TextEditingController(text: "0"); + static TextEditingController l2J = TextEditingController(text: "0"); + static TextEditingController l2I = TextEditingController(text: "0"); + static TextEditingController l2H = TextEditingController(text: "0"); + + static TextEditingController l2B = TextEditingController(text: "0"); + static TextEditingController l2C = TextEditingController(text: "0"); + static TextEditingController l2D = TextEditingController(text: "0"); + static TextEditingController l2E = TextEditingController(text: "0"); + static TextEditingController l2F = TextEditingController(text: "0"); + static TextEditingController l2G = TextEditingController(text: "0"); } diff --git a/lib/utils/helpers/QRCodeHelper.dart b/lib/utils/helpers/QRCodeHelper.dart index 3affcab..01713a1 100644 --- a/lib/utils/helpers/QRCodeHelper.dart +++ b/lib/utils/helpers/QRCodeHelper.dart @@ -45,14 +45,54 @@ class QrcodeHelper { static String computeAutonomousValues() { return computeValues([ // L1 Coral Values - parseInt(AutonomousValues.l1NW.text), - parseInt(AutonomousValues.l1NE.text), - parseInt(AutonomousValues.l1W.text), - parseInt(AutonomousValues.l1E.text), - parseInt(AutonomousValues.l1SW.text), - parseInt(AutonomousValues.l1SE.text), + parseInt(AutonomousValues.l1NW.text), // index 4 + parseInt(AutonomousValues.l1NE.text), // index 5 + parseInt(AutonomousValues.l1W.text), // index 6 + parseInt(AutonomousValues.l1E.text), // index 7 + parseInt(AutonomousValues.l1SW.text), // index 8 + parseInt(AutonomousValues.l1SE.text), // index 9 // L2 Coral Values + parseInt(AutonomousValues.l2A.text), // index 10 + parseInt(AutonomousValues.l2B.text), // index 11 + parseInt(AutonomousValues.l2C.text), // index 12 + parseInt(AutonomousValues.l2D.text), // index 13 + parseInt(AutonomousValues.l2E.text), // index 14 + parseInt(AutonomousValues.l2F.text), // index 15 + parseInt(AutonomousValues.l2G.text), // index 16 + parseInt(AutonomousValues.l2H.text), // index 17 + parseInt(AutonomousValues.l2I.text), // index 18 + parseInt(AutonomousValues.l2J.text), // index 19 + parseInt(AutonomousValues.l2K.text), // index 20 + parseInt(AutonomousValues.l2L.text), // index 21 + + // L3 Coral Values + parseInt(AutonomousValues.l3A.text), // index 22 + parseInt(AutonomousValues.l3B.text), // index 23 + parseInt(AutonomousValues.l3C.text), // index 24 + parseInt(AutonomousValues.l3D.text), // index 25 + parseInt(AutonomousValues.l3E.text), // index 26 + parseInt(AutonomousValues.l3F.text), // index 27 + parseInt(AutonomousValues.l3G.text), // index 28 + parseInt(AutonomousValues.l3H.text), // index 29 + parseInt(AutonomousValues.l3I.text), // index 30 + parseInt(AutonomousValues.l3J.text), // index 31 + parseInt(AutonomousValues.l3K.text), // index 32 + parseInt(AutonomousValues.l3L.text), // index 33 + + // L4 Coral Values + parseInt(AutonomousValues.l3A.text), // index 34 + parseInt(AutonomousValues.l3B.text), // index 35 + parseInt(AutonomousValues.l3C.text), // index 36 + parseInt(AutonomousValues.l3D.text), // index 37 + parseInt(AutonomousValues.l3E.text), // index 38 + parseInt(AutonomousValues.l3F.text), // index 39 + parseInt(AutonomousValues.l3G.text), // index 40 + parseInt(AutonomousValues.l3H.text), // index 41 + parseInt(AutonomousValues.l3I.text), // index 42 + parseInt(AutonomousValues.l3J.text), // index 43 + parseInt(AutonomousValues.l3K.text), // index 44 + parseInt(AutonomousValues.l3L.text), // index 45 ]); } diff --git a/pubspec.yaml b/pubspec.yaml index 70bb182..33da6bd 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -68,9 +68,9 @@ flutter: - assets/images/nav_banner.png - assets/images/simbotics_logo.png # Reefscape diagram - - assets/images/reefscape/karthik-reef-diagram-top.png + - assets/images/reefscape/karthik-reef-diagram-top-shorter.png - assets/images/reefscape/karthik-reef-diagram-middle.png - - assets/images/reefscape/karthik-reef-diagram-bottom.png + - assets/images/reefscape/karthik-reef-diagram-bottom-shorter.png # QR code centerfolds - assets/images/centerfolds/jqr_code_centerfold.png - assets/images/centerfolds/jimmy_centerfold.png From d0da57b632a6c991368b69aaa83b197dbf593c8c Mon Sep 17 00:00:00 2001 From: HoodieRocks Date: Sat, 11 Jan 2025 15:42:36 -0500 Subject: [PATCH 03/15] Finshed auto screen --- ...karthik-reef-diagram-middle-compressed.png | Bin 0 -> 4692 bytes lib/builders/bases/CustomCheckbox.dart | 7 +- .../navigation/NavigationSidebar.dart | 5 - lib/routes/data/AutonomousDataRoute.dart | 32 ++- lib/routes/data/DataRoute.dart | 188 ------------------ lib/routes/data/fields/AutonomousFields.dart | 85 -------- .../AutonomousRightRow1.dart | 18 +- .../AutonomousRightRow2.dart | 70 +++++++ .../AutonomousRightRow3.dart | 70 +++++++ .../AutonomousBottomReef.dart | 7 +- .../AutonomousMiddleReef.dart | 7 +- .../AutonomousTopReef.dart | 7 +- .../AutonomousRow1.dart | 12 +- .../AutonomousRow2.dart | 12 +- .../AutonomousRow3.dart | 12 +- .../AutonomousRow4.dart | 12 +- .../AutonomousRow5.dart | 12 +- .../AutonomousRow6.dart | 12 +- lib/routes/data/labels/AutonomousLabels.dart | 2 +- .../AutonomousRightLabel1.dart | 53 +++++ .../AutonomousRightLabel2.dart | 68 +++++++ .../AutonomousRightLabel3.dart | 65 ++++++ .../prematch/fields/PrematchFields.dart | 6 +- lib/utils/data/values/AutonomousValues.dart | 12 +- pubspec.lock | 30 +-- pubspec.yaml | 2 +- 26 files changed, 443 insertions(+), 363 deletions(-) create mode 100644 assets/images/reefscape/karthik-reef-diagram-middle-compressed.png delete mode 100644 lib/routes/data/DataRoute.dart delete mode 100644 lib/routes/data/fields/AutonomousFields.dart create mode 100644 lib/routes/data/fields/AutonomousRightRows/AutonomousRightRow2.dart create mode 100644 lib/routes/data/fields/AutonomousRightRows/AutonomousRightRow3.dart create mode 100644 lib/routes/data/labels/AutonomousRightLabels/AutonomousRightLabel1.dart create mode 100644 lib/routes/data/labels/AutonomousRightLabels/AutonomousRightLabel2.dart create mode 100644 lib/routes/data/labels/AutonomousRightLabels/AutonomousRightLabel3.dart diff --git a/assets/images/reefscape/karthik-reef-diagram-middle-compressed.png b/assets/images/reefscape/karthik-reef-diagram-middle-compressed.png new file mode 100644 index 0000000000000000000000000000000000000000..d411690e7eccd46351547ca808de93c60a03482d GIT binary patch literal 4692 zcmeHKdr(tn7QawgC@f;#PNAa1H6o~Zlib`qNFX33JW>sfK$UE5<>o%%mb^@ENJ3{z zTSu$7RHby4D%!fTYDGt_R9Wm|3-|yEY|%lp3`J{IpjxNdRcX8Hem4Px>THLZ?SEuW z!u`(Uch32J=lh1cQJa+!8ayi)f}l`!rYakPp3s43GH4q3?VBcA0sgd<6y+ ztFg5yC2y&5)AQkeskiF7kErGfr>E}^j4GTHe^D*S_ROrhmT@&=zp6Q>Go+vy*EK{8 zU?D@RZVp2Oo1aR{|L&XzDKD9YrulW}H=kJYSALJ6Hle*MujRmC@7=FnKRRIiq7UCw zz4f#0x;=h(F9wG#?TWa3=8D1fam7$2E#1-}uU@eF{+qgp4O)941o=fXsi|6ZYU*f1 zppBi?TRwfhSvzB0W9^=+VL@f<^7bBix$E=XXATFaXg910Sb5M;(b5vVKDzCgxqrva zCd1sIzpXv=R^5&CkdW?pVf$I3t)n*tNqDl`dKdb#cG0TF?uNma|KTy`Ek4>hy&)y< z`kc;$8Z>FO{A|CC>u83+c$$$$aK(=1aEW+NXb&3cOO zG+Mx9Ku}_`(}EL46btLA0>-4|eb>;)gBeoETPe{9HI`JWkjX5uQaL4AxkO13At!ms zNx_Lu1pqKoEDk%329r(URPwyI3h>OS1w7d6!WJocc^WO8YPM3am@noFku)b$EaD{v z!--asR%ENvM|W5J3LyS(W23e!JBL&EC4S4MW7CQO z$Vfqtjj-i{b0o;7Y-YQapwfyd6FYA_1WAm=TkKYYw;hrYPzK5fTx}pLIw56-TB99{ z;3z0yj23ScAbWx*%g_(Wnot{O@wPL*5D-3wJHdOjcds+>(r6SaGhye-Q>&CbF28~_ z6AY>FK4O>{*T>8C2u%@kM2w;s5>Lv-2u7k33?m3sBF4u-sZBN(HxU#E1;F_Xz!8cl z6cb}&L?|Y4M6Abzh+dA#5s6enkRnVk7h>{p5HDC6FqODrd{rD237}A1M#u>qN2qv_ z3=w0P6w%WnF(M&kvUpl5mCzLBg(3+>y4h;P!FDo6ynqr|Oa)#8N4O$It5)(veBncl z)_}7#2vG8tF($k7p&^$sQaLQnv5CqssT2iCF(E2NW#gh(P*xk5L=F=b@-eA5oZA)! zXa*3Ab8`v+yn4`!BGpRatl64tHXD>Yt|XX?95ZXcaUyXRSK%xLK!qZSLWn9*G#5n` z5)mL25dzIPe>2I@u3z%z4iB8@+wx4t2J*YSD&L99q1O0TzNLZj9wiv|9ts6c_*$^x z#T4nS6JYsFL?Lb}pup`hGOnX~<}srn*3(i{O3M*KD5VfFO;dTKXIMLftNO8LWfDj>yj1dNg)<>9Nq+tPfXN-27 zD0qaEM6biRO9sUGbl~y=ccEbHG92NIyLNuX&&Xc4o_Owd zbBYYUI(=HK>GV4R+u)nWpN_4uKbzIN_MoMIaa>_bnfQK6((JwOX=i-hUV7Wpt6m>_ zV|K^pcYDd2ox z?>vYZ(p4nLThEb@q25IYWGLI-UgnvfyyKMS%Wvx5n|8_Cz4O}13#GcA+P;Xyw)ljA z-O|7+_c|zY_ps*Hm6gTaZQ;-#7V-agQDa4q*8K)q zh|4e80m{!@CZ_0*lKchwAoe$|U9nZ$BJcH_Iv2g^AQ@_{TzJj;A9hul4-Q={IYw8JE55Br=(rRY4Mh&` za=6}QHXbb=-hTUg4{!Iele=m?iLJT=15wvse1$HI^8e?Xk-?AMwnrEOUQ3oYLbI;r Vxb2(TV!-%8>a;A?;pg(-`Y&Quo09+l literal 0 HcmV?d00001 diff --git a/lib/builders/bases/CustomCheckbox.dart b/lib/builders/bases/CustomCheckbox.dart index 53b3775..904b234 100644 --- a/lib/builders/bases/CustomCheckbox.dart +++ b/lib/builders/bases/CustomCheckbox.dart @@ -12,7 +12,7 @@ class CustomCheckbox extends StatefulWidget { super.key, required this.controller, this.label = "", - this.margin = const EdgeInsets.all(5.0), + this.margin = const EdgeInsets.all(2.0), this.backgroundColor = Colors.grey, this.checkColor = Colors.white, this.labelColor = Colors.white, @@ -47,8 +47,9 @@ class _CustomCheckboxState extends State { @override Widget build(BuildContext context) { return Container( - height: 40, - padding: const EdgeInsets.all(5), + height: 30, + width: 50, + padding: const EdgeInsets.all(0), margin: widget.margin, color: widget.backgroundColor, child: Row( diff --git a/lib/components/navigation/NavigationSidebar.dart b/lib/components/navigation/NavigationSidebar.dart index 008e5fa..f897e06 100644 --- a/lib/components/navigation/NavigationSidebar.dart +++ b/lib/components/navigation/NavigationSidebar.dart @@ -3,7 +3,6 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:scouting_platform/components/navigation/components/SidebarItem.dart'; import 'package:scouting_platform/routes/comments/CommentsRoute.dart'; -import 'package:scouting_platform/routes/data/DataRoute.dart'; import 'package:scouting_platform/routes/data/AutonomousDataRoute.dart'; import 'package:scouting_platform/routes/qrcode/QRCodeRoute.dart'; import 'package:scouting_platform/routes/settings/SettingsRoute.dart'; @@ -36,10 +35,6 @@ class NavigationSidebar extends StatelessWidget { icon: Icon(Icons.fast_forward), itemName: "Auto Input", route: AutonomousDataRoute(title: "Auto Data Input")), - const SidebarItem( - icon: Icon(Icons.draw), - itemName: "Data Input", - route: DataRoute(title: 'Data Input')), const SidebarItem( icon: Icon(Icons.chat_bubble), itemName: "Comments", diff --git a/lib/routes/data/AutonomousDataRoute.dart b/lib/routes/data/AutonomousDataRoute.dart index bcc9a7a..c0858ae 100644 --- a/lib/routes/data/AutonomousDataRoute.dart +++ b/lib/routes/data/AutonomousDataRoute.dart @@ -2,6 +2,7 @@ import 'package:flutter/material.dart'; import 'package:scouting_platform/builders/PlatformRoute.dart'; import 'package:scouting_platform/routes/comments/CommentsRoute.dart'; +import 'package:scouting_platform/routes/data/fields/AutonomousRightRows/AutonomousRightRow2.dart'; import 'package:scouting_platform/routes/data/fields/AutonomousRows.dart/AutonomousBottomReef.dart'; import 'package:scouting_platform/routes/data/fields/AutonomousRows.dart/AutonomousMiddleReef.dart'; import 'package:scouting_platform/routes/data/fields/AutonomouscCheckboxRows/AutonomousRow1.dart'; @@ -10,7 +11,11 @@ import 'package:scouting_platform/routes/data/fields/AutonomouscCheckboxRows/Aut import 'package:scouting_platform/routes/data/fields/AutonomouscCheckboxRows/AutonomousRow4.dart'; import 'package:scouting_platform/routes/data/fields/AutonomouscCheckboxRows/AutonomousRow5.dart'; import 'package:scouting_platform/routes/data/fields/AutonomouscCheckboxRows/AutonomousRow6.dart'; -import 'package:scouting_platform/routes/data/fields/AutonomousRows.dart/Auto'; +import 'package:scouting_platform/routes/data/fields/AutonomousRightRows/AutonomousRightRow1.dart'; +import 'package:scouting_platform/routes/data/fields/AutonomousRightRows/AutonomousRightRow3.dart'; +import 'package:scouting_platform/routes/data/labels/AutonomousRightLabels/AutonomousRightLabel1.dart'; +import 'package:scouting_platform/routes/data/labels/AutonomousRightLabels/AutonomousRightLabel2.dart'; +import 'package:scouting_platform/routes/data/labels/AutonomousRightLabels/AutonomousRightLabel3.dart'; import 'package:scouting_platform/routes/prematch/PrematchRoute.dart'; import 'package:scouting_platform/styles/AppStyle.dart'; import 'package:scouting_platform/utils/helpers/ScheduleHelper.dart'; @@ -22,6 +27,7 @@ import 'package:scouting_platform/utils/data/values/SettingValues.dart'; import 'package:scouting_platform/utils/data/values/TeleoperatedValues.dart'; import 'package:scouting_platform/utils/helpers/UIHelper.dart'; import 'package:scouting_platform/routes/data/fields/AutonomousRows.dart/AutonomousTopReef.dart'; +import 'package:scouting_platform/styles/components/TitleStyle.dart'; class AutonomousDataRoute extends StatefulWidget { const AutonomousDataRoute({super.key, required this.title}); @@ -77,9 +83,16 @@ class _DataRouteState extends State { Row( mainAxisAlignment: MainAxisAlignment.end, children: [ + // TitleStyle( + // text: "L4", + // padding: const EdgeInsets.only( + // right: 0.0, bottom: 10.0)), + SizedBox( + width: 120.0, + ), ElevatedButton( style: ElevatedButton.styleFrom( - minimumSize: const Size(150.0, 47.0), + minimumSize: const Size(150.0, 37.0), backgroundColor: AppStyle.textInputColor, ), onPressed: () { @@ -97,7 +110,7 @@ class _DataRouteState extends State { const SizedBox(width: 16.0), ElevatedButton( style: ElevatedButton.styleFrom( - minimumSize: const Size(150.0, 47.0), + minimumSize: const Size(150.0, 37.0), backgroundColor: AppStyle.textInputColor, ), onPressed: () { @@ -117,6 +130,12 @@ class _DataRouteState extends State { ), ], ), + const AutonomousRightLabel1(), + const AutonomousRightRow1(), + const AutonomousRightLabel2(), + const AutonomousRightRow2(), + const AutonomousRightLabel3(), + const AutonomousRightRow3(), ], ), ), @@ -152,10 +171,9 @@ class _DataRouteState extends State { } setState(() { - AutonomousValues.autoSpeakerScored.text = "0"; - AutonomousValues.autoSpeakerMissed.text = "0"; - AutonomousValues.autoAmpMissed.text = "0"; - AutonomousValues.autoAmpScored.text = "0"; + AutonomousValues.coralHP.text = "0"; + AutonomousValues.coralMissed.text = "0"; + AutonomousValues.coralField.text = "0"; TeleoperatedValues.speaker.text = "0"; TeleoperatedValues.speakerMissed.text = "0"; TeleoperatedValues.amp.text = "0"; diff --git a/lib/routes/data/DataRoute.dart b/lib/routes/data/DataRoute.dart deleted file mode 100644 index e245838..0000000 --- a/lib/routes/data/DataRoute.dart +++ /dev/null @@ -1,188 +0,0 @@ -// ignore_for_file: file_names -import 'package:flutter/material.dart'; -import 'package:scouting_platform/builders/PlatformRoute.dart'; -import 'package:scouting_platform/routes/comments/CommentsRoute.dart'; -import 'package:scouting_platform/routes/data/fields/AutonomousFields.dart'; -import 'package:scouting_platform/routes/data/fields/TeleoperatedFields.dart'; -import 'package:scouting_platform/routes/data/fields/EndgameFields.dart'; -import 'package:scouting_platform/routes/data/labels/AutonomousLabels.dart'; -import 'package:scouting_platform/routes/data/labels/TeleoperatedLabels.dart'; -import 'package:scouting_platform/routes/data/labels/EndgameLabels.dart'; -import 'package:scouting_platform/routes/prematch/PrematchRoute.dart'; -import 'package:scouting_platform/styles/components/TitleStyle.dart'; -import 'package:scouting_platform/styles/AppStyle.dart'; -import 'package:scouting_platform/utils/helpers/ScheduleHelper.dart'; -import 'package:scouting_platform/utils/data/values/AutonomousValues.dart'; -import 'package:scouting_platform/utils/data/values/CommentValues.dart'; -import 'package:scouting_platform/utils/data/values/EndgameValues.dart'; -import 'package:scouting_platform/utils/data/values/PrematchValues.dart'; -import 'package:scouting_platform/utils/data/values/SettingValues.dart'; -import 'package:scouting_platform/utils/data/values/TeleoperatedValues.dart'; -import 'package:scouting_platform/utils/helpers/UIHelper.dart'; - -class DataRoute extends StatefulWidget { - const DataRoute({super.key, required this.title}); - final String title; - - @override - State createState() => _DataRouteState(); -} - -class _DataRouteState extends State { - @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: Column(children: [ - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - const TitleStyle( - text: "Auto Data", - padding: EdgeInsets.only(top: 10.0, left: 20.0)), - Padding( - padding: - const EdgeInsets.only(right: 50.0, top: 10.0, left: 125.0), - child: ElevatedButton( - style: ElevatedButton.styleFrom( - minimumSize: const Size(150.0, 47.0), - backgroundColor: AppStyle.textInputColor, - ), - onPressed: () { - showConformationDialog(context); - }, - child: const Text("Reset", - style: TextStyle( - fontSize: 16.0, - fontFamily: "Helvetica", - color: Colors.white)), - ), - ), - Align( - alignment: Alignment.bottomRight, - child: Container( - padding: const EdgeInsets.only(top: 4.0, right: 60), - // height: 47.0, - child: ElevatedButton( - style: ElevatedButton.styleFrom( - minimumSize: const Size(150.0, 47.0), - backgroundColor: AppStyle - .textInputColor, // Set the background color here - ), - 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)), - ))), - ], - ), - const AutonomousLabels(), - const AutonomousFields(), - const TitleStyle( - text: "Teleop Data", - padding: EdgeInsets.only(top: 20.0, left: 20.0)), - const TeleoperatedLabels(), - const TeleoperatedFields(), - const Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - TitleStyle( - text: "Endgame Data", - padding: EdgeInsets.only(top: 20.0, left: 20.0)), - ], - ), - const EndgameLabels(), - const EndgameFields(), - ]), - ), - ); - } - - showConformationDialog(BuildContext context) { - // set up the buttons - Widget cancelButton = TextButton( - child: const Text("No"), - onPressed: () { - Navigator.of(context, rootNavigator: true).pop('dialog'); - }, - ); - Widget continueButton = TextButton( - child: const Text("Yes"), - onPressed: () { - // Increment the match number - if (PrematchValues.matchNumber.text != "") { - PrematchValues.matchNumber.text = - (int.parse(PrematchValues.matchNumber.text) + 1).toString(); - } else { - PrematchValues.matchNumber.text = (2).toString(); - } - - if (SettingValues.isTeamNumberReadOnly) { - // Get the team number from the schedule and set the team number field to that - Schedulehelper.getTeamNumberFromSchedule( - int.parse(// Get the team number from the schedule - PrematchValues.matchNumber.text)) - .then((teamNumber) => - PrematchValues.teamNumber.text = teamNumber.toString()); - } - - setState(() { - AutonomousValues.autoSpeakerScored.text = "0"; - AutonomousValues.autoSpeakerMissed.text = "0"; - AutonomousValues.autoAmpMissed.text = "0"; - AutonomousValues.autoAmpScored.text = "0"; - TeleoperatedValues.speaker.text = "0"; - TeleoperatedValues.speakerMissed.text = "0"; - TeleoperatedValues.amp.text = "0"; - TeleoperatedValues.ampMissed.text = "0"; - AutonomousValues.autoMobility.text = "No"; - EndgameValues.endgame.text = "No"; // was climb, now endgame - EndgameValues.climbTime.text = "0"; // parked was below - EndgameValues.stopwatchState.text = "0"; - TeleoperatedValues.passes.text = "0"; - EndgameValues.trap.text = "0"; - EndgameValues.stopwatch.stop(); - EndgameValues.stopwatch.reset(); - CommentValues.autoComments.text = ""; - CommentValues.autoOrder.text = ""; - CommentValues.teleopComments.text = ""; - CommentValues.endgameComments.text = ""; - }); - Navigator.of(context, rootNavigator: true).pop('dialog'); - Navigator.push(context, MaterialPageRoute(builder: (context) { - return const PrematchRoute(title: "Prematch Data"); - })); - }, - ); // set up the AlertDialog - AlertDialog alert = AlertDialog( - title: const Text("Confirmation: Reset ALL Fields"), - content: const Text( - "Would you like to reset all of the fields current inputted?"), - actions: [ - cancelButton, - continueButton, - ], - ); // show the dialog - showDialog( - context: context, - builder: (BuildContext context) { - return alert; - }, - ); - } -} diff --git a/lib/routes/data/fields/AutonomousFields.dart b/lib/routes/data/fields/AutonomousFields.dart deleted file mode 100644 index abbd84f..0000000 --- a/lib/routes/data/fields/AutonomousFields.dart +++ /dev/null @@ -1,85 +0,0 @@ -// ignore_for_file: file_names -import 'package:flutter/material.dart'; -import 'package:scouting_platform/builders/bases/CounterNumberField.dart'; -import 'package:scouting_platform/builders/bases/PlatformDropdownMenu.dart'; -import 'package:scouting_platform/utils/data/constants/OptionConstants.dart'; -import 'package:scouting_platform/utils/data/values/AutonomousValues.dart'; - -class AutonomousFields extends StatefulWidget { - const AutonomousFields({ - super.key, - }); - - @override - State createState() => _AutonomousFieldsState(); -} - -class _AutonomousFieldsState extends State { - /// Increments an integer in a controllers value by one - void incrementNumber(TextEditingController controller) { - if (!mounted) return; - - int currentValue = int.parse(controller.text); - setState(() { - currentValue++; - controller.text = currentValue.toString(); - }); - } - - /// Decrements an integer in a controllers value by one unless it's 0 - void decrementNumber(TextEditingController controller) { - if (!mounted) return; - - int currentValue = int.parse(controller.text); - setState(() { - currentValue--; - controller.text = (currentValue > 0 ? currentValue : 0).toString(); - }); - } - - @override - Widget build(BuildContext context) { - return Row( - children: [ - // Auto mobility dropdown - PlatformDropdownMenu( - dropdownMenuSelectedItem: AutonomousValues.autoMobility.text, - onChanged: (value) { - setState(() { - AutonomousValues.autoMobility.text = value; - }); - }, - dropdownItems: OptionConstants.yesNoOptions, - margin: const EdgeInsets.only(left: 20)), - //speaker scored - CounterNumberField( - controller: AutonomousValues.autoSpeakerScored, - onTapDecrement: () => - decrementNumber(AutonomousValues.autoSpeakerScored), - onTapIncrement: () => - incrementNumber(AutonomousValues.autoSpeakerScored)), - //speaker missed - CounterNumberField( - controller: AutonomousValues.autoSpeakerMissed, - onTapDecrement: () => - decrementNumber(AutonomousValues.autoSpeakerMissed), - onTapIncrement: () => - incrementNumber(AutonomousValues.autoSpeakerMissed)), - //amp scored - CounterNumberField( - controller: AutonomousValues.autoAmpScored, - onTapDecrement: () => - decrementNumber(AutonomousValues.autoAmpScored), - onTapIncrement: () => - incrementNumber(AutonomousValues.autoAmpScored)), - //amp missed - CounterNumberField( - controller: AutonomousValues.autoAmpMissed, - onTapDecrement: () => - decrementNumber(AutonomousValues.autoAmpMissed), - onTapIncrement: () => - incrementNumber(AutonomousValues.autoAmpMissed)), - ], - ); - } -} diff --git a/lib/routes/data/fields/AutonomousRightRows/AutonomousRightRow1.dart b/lib/routes/data/fields/AutonomousRightRows/AutonomousRightRow1.dart index fb81546..a4a69ab 100644 --- a/lib/routes/data/fields/AutonomousRightRows/AutonomousRightRow1.dart +++ b/lib/routes/data/fields/AutonomousRightRows/AutonomousRightRow1.dart @@ -40,20 +40,30 @@ class _AutonomousRightRow1State extends State { Widget build(BuildContext context) { return Container( decoration: BoxDecoration(), - height: 50, // Set a height for the container + height: 60, // Set a height for the container child: Row( - mainAxisAlignment: MainAxisAlignment.center, // Center the row contents + mainAxisAlignment: MainAxisAlignment.start, // Center the row contents children: [ // Auto starting position PlatformDropdownMenu( dropdownMenuSelectedItem: AutonomousValues.autoStartPosition.text, + onChanged: (value) { + setState(() { + AutonomousValues.autoStartPosition.text = value; + }); + }, + dropdownItems: OptionConstants.startPositions), + // Auto mobility + PlatformDropdownMenu( + dropdownMenuSelectedItem: AutonomousValues.autoMobility.text, onChanged: (value) { setState(() { AutonomousValues.autoMobility.text = value; }); }, - dropdownItems: OptionConstants.startPositions, - margin: const EdgeInsets.only(left: 20)), + dropdownItems: OptionConstants.yesNoOptions, + margin: const EdgeInsets.only(left: 10)), + ], ), ); diff --git a/lib/routes/data/fields/AutonomousRightRows/AutonomousRightRow2.dart b/lib/routes/data/fields/AutonomousRightRows/AutonomousRightRow2.dart new file mode 100644 index 0000000..eb69a42 --- /dev/null +++ b/lib/routes/data/fields/AutonomousRightRows/AutonomousRightRow2.dart @@ -0,0 +1,70 @@ +import 'package:flutter/material.dart'; +import 'package:scouting_platform/builders/bases/CounterNumberField.dart'; +import 'package:scouting_platform/builders/bases/PlatformDropdownMenu.dart'; +import 'package:scouting_platform/utils/data/constants/OptionConstants.dart'; +import 'package:scouting_platform/utils/data/values/AutonomousValues.dart'; + +class AutonomousRightRow2 extends StatefulWidget { + const AutonomousRightRow2({ + super.key, + }); + + @override + State createState() => _AutonomousRightRow2State(); +} + +class _AutonomousRightRow2State extends State { + /// Increments an integer in a controller's value by one + void incrementNumber(TextEditingController controller) { + if (!mounted) return; + + int currentValue = int.parse(controller.text); + setState(() { + currentValue++; + controller.text = currentValue.toString(); + }); + } + + /// Decrements an integer in a controller's value by one unless it's 0 + void decrementNumber(TextEditingController controller) { + if (!mounted) return; + + int currentValue = int.parse(controller.text); + setState(() { + currentValue--; + controller.text = (currentValue > 0 ? currentValue : 0).toString(); + }); + } + + @override + Widget build(BuildContext context) { + return Container( + decoration: BoxDecoration(), + height: 60, // Set a height for the container + child: Row( + mainAxisAlignment: MainAxisAlignment.start, // Center the row contents + children: [ + CounterNumberField( + margin: EdgeInsets.zero, + controller: AutonomousValues.coralMissed, + onTapIncrement: () => + incrementNumber(AutonomousValues.coralMissed), + onTapDecrement: () => + decrementNumber(AutonomousValues.coralMissed)), + CounterNumberField( + margin: EdgeInsets.only(left: 10), + controller: AutonomousValues.coralField, + onTapIncrement: () => + incrementNumber(AutonomousValues.coralField), + onTapDecrement: () => + decrementNumber(AutonomousValues.coralField)), + CounterNumberField( + margin: EdgeInsets.only(left: 10), + controller: AutonomousValues.coralHP, + onTapIncrement: () => incrementNumber(AutonomousValues.coralHP), + onTapDecrement: () => decrementNumber(AutonomousValues.coralHP)), + ], + ), + ); + } +} diff --git a/lib/routes/data/fields/AutonomousRightRows/AutonomousRightRow3.dart b/lib/routes/data/fields/AutonomousRightRows/AutonomousRightRow3.dart new file mode 100644 index 0000000..dce1382 --- /dev/null +++ b/lib/routes/data/fields/AutonomousRightRows/AutonomousRightRow3.dart @@ -0,0 +1,70 @@ +import 'package:flutter/material.dart'; +import 'package:scouting_platform/builders/bases/CounterNumberField.dart'; +import 'package:scouting_platform/builders/bases/PlatformDropdownMenu.dart'; +import 'package:scouting_platform/utils/data/constants/OptionConstants.dart'; +import 'package:scouting_platform/utils/data/values/AutonomousValues.dart'; + +class AutonomousRightRow3 extends StatefulWidget { + const AutonomousRightRow3({ + super.key, + }); + + @override + State createState() => _AutonomousRightRow3State(); +} + +class _AutonomousRightRow3State extends State { + /// Increments an integer in a controller's value by one + void incrementNumber(TextEditingController controller) { + if (!mounted) return; + + int currentValue = int.parse(controller.text); + setState(() { + currentValue++; + controller.text = currentValue.toString(); + }); + } + + /// Decrements an integer in a controller's value by one unless it's 0 + void decrementNumber(TextEditingController controller) { + if (!mounted) return; + + int currentValue = int.parse(controller.text); + setState(() { + currentValue--; + controller.text = (currentValue > 0 ? currentValue : 0).toString(); + }); + } + + @override + Widget build(BuildContext context) { + return Container( + decoration: BoxDecoration(), + height: 60, // Set a height for the container + child: Row( + mainAxisAlignment: MainAxisAlignment.start, // Center the row contents + children: [ + CounterNumberField( + margin: EdgeInsets.zero, + controller: AutonomousValues.algaeRemoved, + onTapIncrement: () => + incrementNumber(AutonomousValues.algaeRemoved), + onTapDecrement: () => + decrementNumber(AutonomousValues.algaeRemoved)), + CounterNumberField( + margin: EdgeInsets.only(left: 10), + controller: AutonomousValues.algaeProcessor, + onTapIncrement: () => + incrementNumber(AutonomousValues.algaeProcessor), + onTapDecrement: () => + decrementNumber(AutonomousValues.algaeProcessor)), + CounterNumberField( + margin: EdgeInsets.only(left: 10), + controller: AutonomousValues.algaeBarge, + onTapIncrement: () => incrementNumber(AutonomousValues.algaeBarge), + onTapDecrement: () => decrementNumber(AutonomousValues.algaeBarge)), + ], + ), + ); + } +} diff --git a/lib/routes/data/fields/AutonomousRows.dart/AutonomousBottomReef.dart b/lib/routes/data/fields/AutonomousRows.dart/AutonomousBottomReef.dart index dbbf725..49c7b61 100644 --- a/lib/routes/data/fields/AutonomousRows.dart/AutonomousBottomReef.dart +++ b/lib/routes/data/fields/AutonomousRows.dart/AutonomousBottomReef.dart @@ -46,17 +46,18 @@ class _AutonomousRow1State extends State { fit: BoxFit.cover, ), ), - height: 130, // Set a height for the container + height: 95, + width: 440, child: Row( mainAxisAlignment: MainAxisAlignment.center, // Center the row contents children: [ CounterNumberField( - margin: EdgeInsets.only(right: 50.0, bottom: 40.0), + margin: EdgeInsets.only(right: 55.0, bottom: 0.0, left: 10.0), controller: AutonomousValues.l1SW, onTapDecrement: () => decrementNumber(AutonomousValues.l1SW), onTapIncrement: () => incrementNumber(AutonomousValues.l1SW)), CounterNumberField( - margin: EdgeInsets.only(right: 0.0, bottom: 40.0), + margin: EdgeInsets.only(right: 0.0, bottom: 0.0), controller: AutonomousValues.l1SE, onTapDecrement: () => decrementNumber(AutonomousValues.l1SE), onTapIncrement: () => incrementNumber(AutonomousValues.l1SE)), diff --git a/lib/routes/data/fields/AutonomousRows.dart/AutonomousMiddleReef.dart b/lib/routes/data/fields/AutonomousRows.dart/AutonomousMiddleReef.dart index d520c3e..bca1ae9 100644 --- a/lib/routes/data/fields/AutonomousRows.dart/AutonomousMiddleReef.dart +++ b/lib/routes/data/fields/AutonomousRows.dart/AutonomousMiddleReef.dart @@ -42,16 +42,17 @@ class _AutonomousRow1State extends State { decoration: BoxDecoration( image: DecorationImage( image: AssetImage( - 'assets/images/reefscape/karthik-reef-diagram-middle.png'), // Replace with your image path + 'assets/images/reefscape/karthik-reef-diagram-middle-compressed.png'), // Replace with your image path fit: BoxFit.cover, ), ), - height: 100, // Set a height for the container + height: 50, + width: 440, child: Row( mainAxisAlignment: MainAxisAlignment.center, // Center the row contents children: [ CounterNumberField( - margin: EdgeInsets.only(right: 250.0, top: 0.0), + margin: EdgeInsets.only(right: 100.0, bottom: 0.0), controller: AutonomousValues.l1W, onTapDecrement: () => decrementNumber(AutonomousValues.l1W), onTapIncrement: () => incrementNumber(AutonomousValues.l1W)), diff --git a/lib/routes/data/fields/AutonomousRows.dart/AutonomousTopReef.dart b/lib/routes/data/fields/AutonomousRows.dart/AutonomousTopReef.dart index 168af69..2ccb9fd 100644 --- a/lib/routes/data/fields/AutonomousRows.dart/AutonomousTopReef.dart +++ b/lib/routes/data/fields/AutonomousRows.dart/AutonomousTopReef.dart @@ -46,19 +46,20 @@ class _AutonomousRow1State extends State { fit: BoxFit.cover, ), ), - height: 130, // Set a height for the container + height: 95, + width: 440, child: Row( mainAxisAlignment: MainAxisAlignment.center, // Center the row contents children: [ // North West (Top Left) trough counter CounterNumberField( - margin: EdgeInsets.only(right: 50.0, top: 50.0, left: 100.0), + margin: EdgeInsets.only(right: 50.0, bottom: 20.0, left: 45.0), controller: AutonomousValues.l1NW, onTapDecrement: () => decrementNumber(AutonomousValues.l1NW), onTapIncrement: () => incrementNumber(AutonomousValues.l1NW)), // North East (Top Right) trough counter CounterNumberField( - margin: EdgeInsets.only(right: 100.0, top: 50.0), + margin: EdgeInsets.only(right: 40.0, bottom: 20.0), controller: AutonomousValues.l1NE, onTapDecrement: () => decrementNumber(AutonomousValues.l1NE), onTapIncrement: () => incrementNumber(AutonomousValues.l1NE)), diff --git a/lib/routes/data/fields/AutonomouscCheckboxRows/AutonomousRow1.dart b/lib/routes/data/fields/AutonomouscCheckboxRows/AutonomousRow1.dart index c193590..44f2851 100644 --- a/lib/routes/data/fields/AutonomouscCheckboxRows/AutonomousRow1.dart +++ b/lib/routes/data/fields/AutonomouscCheckboxRows/AutonomousRow1.dart @@ -38,7 +38,7 @@ class _AutonomousRow1State extends State { Widget build(BuildContext context) { return Container( decoration: BoxDecoration(), - height: 50, // Set a height for the container + height: 40, // Set a height for the container child: Row( mainAxisAlignment: MainAxisAlignment.start, // Center the row contents children: [ @@ -48,35 +48,35 @@ class _AutonomousRow1State extends State { backgroundColor: Colors.grey.shade800, checkColor: Colors.white, labelColor: Colors.white, - margin: const EdgeInsets.only(right: 75.0)), + margin: const EdgeInsets.only(right: 18.0)), // L CustomCheckbox( controller: AutonomousValues.l4L, backgroundColor: Colors.grey.shade800, checkColor: Colors.white, labelColor: Colors.white, - margin: const EdgeInsets.only(right: 75.0)), + margin: const EdgeInsets.only(right: 35.0)), // K CustomCheckbox( controller: AutonomousValues.l4K, backgroundColor: Colors.grey.shade800, checkColor: Colors.white, labelColor: Colors.white, - margin: const EdgeInsets.only(right: 80.0)), + margin: const EdgeInsets.only(right: 35.0)), // J CustomCheckbox( controller: AutonomousValues.l4J, backgroundColor: Colors.grey.shade800, checkColor: Colors.white, labelColor: Colors.white, - margin: const EdgeInsets.only(right: 75.0)), + margin: const EdgeInsets.only(right: 30.0)), // I CustomCheckbox( controller: AutonomousValues.l4I, backgroundColor: Colors.grey.shade800, checkColor: Colors.white, labelColor: Colors.white, - margin: const EdgeInsets.only(right: 78.0)), + margin: const EdgeInsets.only(right: 25.0)), // H CustomCheckbox( controller: AutonomousValues.l4H, diff --git a/lib/routes/data/fields/AutonomouscCheckboxRows/AutonomousRow2.dart b/lib/routes/data/fields/AutonomouscCheckboxRows/AutonomousRow2.dart index 32f7d3c..001ae08 100644 --- a/lib/routes/data/fields/AutonomouscCheckboxRows/AutonomousRow2.dart +++ b/lib/routes/data/fields/AutonomouscCheckboxRows/AutonomousRow2.dart @@ -38,7 +38,7 @@ class _AutonomousRow2State extends State { Widget build(BuildContext context) { return Container( decoration: BoxDecoration(), - height: 50, // Set a height for the container + height: 40, // Set a height for the container child: Row( mainAxisAlignment: MainAxisAlignment.start, // Center the row contents children: [ @@ -48,35 +48,35 @@ class _AutonomousRow2State extends State { backgroundColor: Colors.grey.shade800, checkColor: Colors.white, labelColor: Colors.white, - margin: const EdgeInsets.only(right: 75.0)), + margin: const EdgeInsets.only(right: 18.0)), // L CustomCheckbox( controller: AutonomousValues.l3L, backgroundColor: Colors.grey.shade800, checkColor: Colors.white, labelColor: Colors.white, - margin: const EdgeInsets.only(right: 75.0)), + margin: const EdgeInsets.only(right: 35.0)), // K CustomCheckbox( controller: AutonomousValues.l3K, backgroundColor: Colors.grey.shade800, checkColor: Colors.white, labelColor: Colors.white, - margin: const EdgeInsets.only(right: 80.0)), + margin: const EdgeInsets.only(right: 35.0)), // J CustomCheckbox( controller: AutonomousValues.l3J, backgroundColor: Colors.grey.shade800, checkColor: Colors.white, labelColor: Colors.white, - margin: const EdgeInsets.only(right: 75.0)), + margin: const EdgeInsets.only(right: 30.0)), // I CustomCheckbox( controller: AutonomousValues.l3I, backgroundColor: Colors.grey.shade800, checkColor: Colors.white, labelColor: Colors.white, - margin: const EdgeInsets.only(right: 78.0)), + margin: const EdgeInsets.only(right: 25.0)), // H CustomCheckbox( controller: AutonomousValues.l3H, diff --git a/lib/routes/data/fields/AutonomouscCheckboxRows/AutonomousRow3.dart b/lib/routes/data/fields/AutonomouscCheckboxRows/AutonomousRow3.dart index e6b43a8..89dd34f 100644 --- a/lib/routes/data/fields/AutonomouscCheckboxRows/AutonomousRow3.dart +++ b/lib/routes/data/fields/AutonomouscCheckboxRows/AutonomousRow3.dart @@ -38,7 +38,7 @@ class _AutonomousRow3State extends State { Widget build(BuildContext context) { return Container( decoration: BoxDecoration(), - height: 50, // Set a height for the container + height: 40, // Set a height for the container child: Row( mainAxisAlignment: MainAxisAlignment.start, // Center the row contents children: [ @@ -48,35 +48,35 @@ class _AutonomousRow3State extends State { backgroundColor: Colors.grey.shade800, checkColor: Colors.white, labelColor: Colors.white, - margin: const EdgeInsets.only(right: 75.0)), + margin: const EdgeInsets.only(right: 18.0)), // L CustomCheckbox( controller: AutonomousValues.l2L, backgroundColor: Colors.grey.shade800, checkColor: Colors.white, labelColor: Colors.white, - margin: const EdgeInsets.only(right: 75.0)), + margin: const EdgeInsets.only(right: 35.0)), // K CustomCheckbox( controller: AutonomousValues.l2K, backgroundColor: Colors.grey.shade800, checkColor: Colors.white, labelColor: Colors.white, - margin: const EdgeInsets.only(right: 80.0)), + margin: const EdgeInsets.only(right: 35.0)), // J CustomCheckbox( controller: AutonomousValues.l2J, backgroundColor: Colors.grey.shade800, checkColor: Colors.white, labelColor: Colors.white, - margin: const EdgeInsets.only(right: 75.0)), + margin: const EdgeInsets.only(right: 30.0)), // I CustomCheckbox( controller: AutonomousValues.l2I, backgroundColor: Colors.grey.shade800, checkColor: Colors.white, labelColor: Colors.white, - margin: const EdgeInsets.only(right: 78.0)), + margin: const EdgeInsets.only(right: 25.0)), // H CustomCheckbox( controller: AutonomousValues.l2H, diff --git a/lib/routes/data/fields/AutonomouscCheckboxRows/AutonomousRow4.dart b/lib/routes/data/fields/AutonomouscCheckboxRows/AutonomousRow4.dart index 7c95934..eaa5ebb 100644 --- a/lib/routes/data/fields/AutonomouscCheckboxRows/AutonomousRow4.dart +++ b/lib/routes/data/fields/AutonomouscCheckboxRows/AutonomousRow4.dart @@ -38,7 +38,7 @@ class _AutonomousRow4State extends State { Widget build(BuildContext context) { return Container( decoration: BoxDecoration(), - height: 50, // Set a height for the container + height: 40, // Set a height for the container child: Row( mainAxisAlignment: MainAxisAlignment.start, // Center the row contents children: [ @@ -48,35 +48,35 @@ class _AutonomousRow4State extends State { backgroundColor: Colors.grey.shade800, checkColor: Colors.white, labelColor: Colors.white, - margin: const EdgeInsets.only(right: 75.0)), + margin: const EdgeInsets.only(right: 18.0)), // L CustomCheckbox( controller: AutonomousValues.l4C, backgroundColor: Colors.grey.shade800, checkColor: Colors.white, labelColor: Colors.white, - margin: const EdgeInsets.only(right: 75.0)), + margin: const EdgeInsets.only(right: 35.0)), // K CustomCheckbox( controller: AutonomousValues.l4D, backgroundColor: Colors.grey.shade800, checkColor: Colors.white, labelColor: Colors.white, - margin: const EdgeInsets.only(right: 80.0)), + margin: const EdgeInsets.only(right: 35.0)), // J CustomCheckbox( controller: AutonomousValues.l4E, backgroundColor: Colors.grey.shade800, checkColor: Colors.white, labelColor: Colors.white, - margin: const EdgeInsets.only(right: 75.0)), + margin: const EdgeInsets.only(right: 30.0)), // I CustomCheckbox( controller: AutonomousValues.l4F, backgroundColor: Colors.grey.shade800, checkColor: Colors.white, labelColor: Colors.white, - margin: const EdgeInsets.only(right: 78.0)), + margin: const EdgeInsets.only(right: 25.0)), // H CustomCheckbox( controller: AutonomousValues.l4G, diff --git a/lib/routes/data/fields/AutonomouscCheckboxRows/AutonomousRow5.dart b/lib/routes/data/fields/AutonomouscCheckboxRows/AutonomousRow5.dart index 01ec016..8a868dd 100644 --- a/lib/routes/data/fields/AutonomouscCheckboxRows/AutonomousRow5.dart +++ b/lib/routes/data/fields/AutonomouscCheckboxRows/AutonomousRow5.dart @@ -38,7 +38,7 @@ class _AutonomousRow5State extends State { Widget build(BuildContext context) { return Container( decoration: BoxDecoration(), - height: 50, // Set a height for the container + height: 40, // Set a height for the container child: Row( mainAxisAlignment: MainAxisAlignment.start, // Center the row contents children: [ @@ -48,35 +48,35 @@ class _AutonomousRow5State extends State { backgroundColor: Colors.grey.shade800, checkColor: Colors.white, labelColor: Colors.white, - margin: const EdgeInsets.only(right: 75.0)), + margin: const EdgeInsets.only(right: 18.0)), // C CustomCheckbox( controller: AutonomousValues.l3C, backgroundColor: Colors.grey.shade800, checkColor: Colors.white, labelColor: Colors.white, - margin: const EdgeInsets.only(right: 75.0)), + margin: const EdgeInsets.only(right: 35.0)), // D CustomCheckbox( controller: AutonomousValues.l3D, backgroundColor: Colors.grey.shade800, checkColor: Colors.white, labelColor: Colors.white, - margin: const EdgeInsets.only(right: 80.0)), + margin: const EdgeInsets.only(right: 35.0)), // E CustomCheckbox( controller: AutonomousValues.l3E, backgroundColor: Colors.grey.shade800, checkColor: Colors.white, labelColor: Colors.white, - margin: const EdgeInsets.only(right: 75.0)), + margin: const EdgeInsets.only(right: 30)), // F CustomCheckbox( controller: AutonomousValues.l3F, backgroundColor: Colors.grey.shade800, checkColor: Colors.white, labelColor: Colors.white, - margin: const EdgeInsets.only(right: 78.0)), + margin: const EdgeInsets.only(right: 25.0)), // G CustomCheckbox( controller: AutonomousValues.l3G, diff --git a/lib/routes/data/fields/AutonomouscCheckboxRows/AutonomousRow6.dart b/lib/routes/data/fields/AutonomouscCheckboxRows/AutonomousRow6.dart index 3f884cb..0e4f64f 100644 --- a/lib/routes/data/fields/AutonomouscCheckboxRows/AutonomousRow6.dart +++ b/lib/routes/data/fields/AutonomouscCheckboxRows/AutonomousRow6.dart @@ -38,7 +38,7 @@ class _AutonomousRow6State extends State { Widget build(BuildContext context) { return Container( decoration: BoxDecoration(), - height: 50, // Set a height for the container + height: 40, // Set a height for the container child: Row( mainAxisAlignment: MainAxisAlignment.start, // Center the row contents children: [ @@ -48,35 +48,35 @@ class _AutonomousRow6State extends State { backgroundColor: Colors.grey.shade800, checkColor: Colors.white, labelColor: Colors.white, - margin: const EdgeInsets.only(right: 75.0)), + margin: const EdgeInsets.only(right: 18.0)), // C CustomCheckbox( controller: AutonomousValues.l2C, backgroundColor: Colors.grey.shade800, checkColor: Colors.white, labelColor: Colors.white, - margin: const EdgeInsets.only(right: 75.0)), + margin: const EdgeInsets.only(right: 35.0)), // D CustomCheckbox( controller: AutonomousValues.l2D, backgroundColor: Colors.grey.shade800, checkColor: Colors.white, labelColor: Colors.white, - margin: const EdgeInsets.only(right: 80.0)), + margin: const EdgeInsets.only(right: 35.0)), // E CustomCheckbox( controller: AutonomousValues.l2E, backgroundColor: Colors.grey.shade800, checkColor: Colors.white, labelColor: Colors.white, - margin: const EdgeInsets.only(right: 75.0)), + margin: const EdgeInsets.only(right: 30.0)), // F CustomCheckbox( controller: AutonomousValues.l2F, backgroundColor: Colors.grey.shade800, checkColor: Colors.white, labelColor: Colors.white, - margin: const EdgeInsets.only(right: 78.0)), + margin: const EdgeInsets.only(right: 25.0)), // G CustomCheckbox( controller: AutonomousValues.l2G, diff --git a/lib/routes/data/labels/AutonomousLabels.dart b/lib/routes/data/labels/AutonomousLabels.dart index 632bc59..42a1f80 100644 --- a/lib/routes/data/labels/AutonomousLabels.dart +++ b/lib/routes/data/labels/AutonomousLabels.dart @@ -97,4 +97,4 @@ class _AutonomousLabelsState extends State { ], ); } -} +} \ No newline at end of file diff --git a/lib/routes/data/labels/AutonomousRightLabels/AutonomousRightLabel1.dart b/lib/routes/data/labels/AutonomousRightLabels/AutonomousRightLabel1.dart new file mode 100644 index 0000000..804f72c --- /dev/null +++ b/lib/routes/data/labels/AutonomousRightLabels/AutonomousRightLabel1.dart @@ -0,0 +1,53 @@ +// ignore_for_file: file_names +import 'package:flutter/material.dart'; + +class AutonomousRightLabel1 extends StatefulWidget { + const AutonomousRightLabel1({ + super.key, + }); + + @override + State createState() => _AutonomousRightLabel1State(); +} + +class _AutonomousRightLabel1State extends State { + @override + Widget build(BuildContext context) { + return Row( + children: [ + // Auto mobility status + Align( + alignment: Alignment.centerLeft, + child: Container( + width: 150.0, + padding: + const EdgeInsets.only(top: 20.0, right: 30.0), + child: const Text( + "Start Position", + textAlign: TextAlign.left, + style: TextStyle( + color: Colors.white, + fontWeight: FontWeight.bold, + fontSize: 15.0), + ), + )), + Align( + alignment: Alignment.centerLeft, + child: Container( + width: 170.0, + padding: + const EdgeInsets.only(left: 65.0, top: 20.0, right: 30.0), + child: const Text( + "Mobility", + textAlign: TextAlign.left, + style: TextStyle( + color: Colors.white, + fontWeight: FontWeight.bold, + fontSize: 15.0), + ), + )), + const Divider(), + ], + ); + } +} diff --git a/lib/routes/data/labels/AutonomousRightLabels/AutonomousRightLabel2.dart b/lib/routes/data/labels/AutonomousRightLabels/AutonomousRightLabel2.dart new file mode 100644 index 0000000..251c300 --- /dev/null +++ b/lib/routes/data/labels/AutonomousRightLabels/AutonomousRightLabel2.dart @@ -0,0 +1,68 @@ +// ignore_for_file: file_names +import 'package:flutter/material.dart'; + +class AutonomousRightLabel2 extends StatefulWidget { + const AutonomousRightLabel2({ + super.key, + }); + + @override + State createState() => _AutonomousRightLabel2State(); +} + +class _AutonomousRightLabel2State extends State { + @override + Widget build(BuildContext context) { + return Row( + children: [ + // Auto mobility status + Align( + alignment: Alignment.centerLeft, + child: Container( + width: 160.0, + padding: + const EdgeInsets.only(top: 20.0, right: 0.0), + child: const Text( + "Coral Missed", + textAlign: TextAlign.left, + style: TextStyle( + color: Colors.white, + fontWeight: FontWeight.bold, + fontSize: 15.0), + ), + )), + Align( + alignment: Alignment.centerLeft, + child: Container( + width: 160.0, + padding: + const EdgeInsets.only(left: 0.0, top: 20.0, right: 0.0), + child: const Text( + "Coral Field", + textAlign: TextAlign.left, + style: TextStyle( + color: Colors.white, + fontWeight: FontWeight.bold, + fontSize: 15.0), + ), + )), + Align( + alignment: Alignment.centerLeft, + child: Container( + width: 130.0, + padding: + const EdgeInsets.only(left: 0.0, top: 20.0, right:0.0), + child: const Text( + "Coral Loading", + textAlign: TextAlign.left, + style: TextStyle( + color: Colors.white, + fontWeight: FontWeight.bold, + fontSize: 15.0), + ), + )), + const Divider(), + ], + ); + } +} diff --git a/lib/routes/data/labels/AutonomousRightLabels/AutonomousRightLabel3.dart b/lib/routes/data/labels/AutonomousRightLabels/AutonomousRightLabel3.dart new file mode 100644 index 0000000..6ddf3fa --- /dev/null +++ b/lib/routes/data/labels/AutonomousRightLabels/AutonomousRightLabel3.dart @@ -0,0 +1,65 @@ +// ignore_for_file: file_names +import 'package:flutter/material.dart'; + +class AutonomousRightLabel3 extends StatefulWidget { + const AutonomousRightLabel3({ + super.key, + }); + + @override + State createState() => _AutonomousRightLabel3State(); +} + +class _AutonomousRightLabel3State extends State { + @override + Widget build(BuildContext context) { + return Row( + children: [ + // Auto mobility status + Align( + alignment: Alignment.centerLeft, + child: Container( + width: 160.0, + padding: const EdgeInsets.only(top: 20.0, right: 0.0), + child: const Text( + "Algae Removed", + textAlign: TextAlign.left, + style: TextStyle( + color: Colors.white, + fontWeight: FontWeight.bold, + fontSize: 15.0), + ), + )), + Align( + alignment: Alignment.centerLeft, + child: Container( + width: 160.0, + padding: const EdgeInsets.only(left: 0.0, top: 20.0, right: 0.0), + child: const Text( + "Algae Processor", + textAlign: TextAlign.left, + style: TextStyle( + color: Colors.white, + fontWeight: FontWeight.bold, + fontSize: 15.0), + ), + )), + Align( + alignment: Alignment.centerLeft, + child: Container( + width: 130.0, + padding: const EdgeInsets.only(left: 0.0, top: 20.0, right: 0.0), + child: const Text( + "Algae Barge", + textAlign: TextAlign.left, + style: TextStyle( + color: Colors.white, + fontWeight: FontWeight.bold, + fontSize: 15.0), + ), + )), + const Divider(), + ], + ); + } +} diff --git a/lib/routes/prematch/fields/PrematchFields.dart b/lib/routes/prematch/fields/PrematchFields.dart index 72ec822..6cb6f47 100644 --- a/lib/routes/prematch/fields/PrematchFields.dart +++ b/lib/routes/prematch/fields/PrematchFields.dart @@ -2,7 +2,7 @@ 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/data/DataRoute.dart'; +import 'package:scouting_platform/routes/data/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'; @@ -154,10 +154,10 @@ class _PrematchFieldsState extends State { onPressed: () { Navigator.push(context, MaterialPageRoute(builder: (context) { - return const DataRoute(title: "Data Input"); + return const AutonomousDataRoute(title: "Data Input"); })); }, - child: const Text("Auto/Teleop >", + child: const Text("Auto >", style: TextStyle( fontSize: 16.0, fontFamily: "Helvetica", diff --git a/lib/utils/data/values/AutonomousValues.dart b/lib/utils/data/values/AutonomousValues.dart index 2749420..c43a70d 100644 --- a/lib/utils/data/values/AutonomousValues.dart +++ b/lib/utils/data/values/AutonomousValues.dart @@ -6,12 +6,12 @@ class AutonomousValues { static TextEditingController autoStartPosition = TextEditingController(text: "Center"); static TextEditingController autoMobility = TextEditingController(text: "No"); - static TextEditingController autoSpeakerScored = - TextEditingController(text: "0"); - static TextEditingController autoSpeakerMissed = - TextEditingController(text: "0"); - static TextEditingController autoAmpScored = TextEditingController(text: "0"); - static TextEditingController autoAmpMissed = TextEditingController(text: "0"); + static TextEditingController coralHP = TextEditingController(text: "0"); + static TextEditingController coralField = TextEditingController(text: "0"); + static TextEditingController coralMissed = TextEditingController(text: "0"); + static TextEditingController algaeRemoved = TextEditingController(text: "0"); + static TextEditingController algaeProcessor = TextEditingController(text: "0"); + static TextEditingController algaeBarge = TextEditingController(text: "0"); // L1 trough sides static TextEditingController l1NW = TextEditingController(text: "0"); diff --git a/pubspec.lock b/pubspec.lock index 72fefdc..54d4164 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -69,10 +69,10 @@ packages: dependency: transitive description: name: collection - sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a + sha256: a1ace0a119f20aabc852d165077c036cd864315bd99b7eaa10a60100341941bf url: "https://pub.dev" source: hosted - version: "1.18.0" + version: "1.19.0" crypto: dependency: transitive description: @@ -180,18 +180,18 @@ packages: dependency: transitive description: name: leak_tracker - sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05" + sha256: "7bb2830ebd849694d1ec25bf1f44582d6ac531a57a365a803a6034ff751d2d06" url: "https://pub.dev" source: hosted - version: "10.0.5" + version: "10.0.7" leak_tracker_flutter_testing: dependency: transitive description: name: leak_tracker_flutter_testing - sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806" + sha256: "9491a714cca3667b60b5c420da8217e6de0d1ba7a5ec322fab01758f6998f379" url: "https://pub.dev" source: hosted - version: "3.0.5" + version: "3.0.8" leak_tracker_testing: dependency: transitive description: @@ -436,7 +436,7 @@ packages: dependency: transitive description: flutter source: sdk - version: "0.0.99" + version: "0.0.0" source_span: dependency: transitive description: @@ -449,10 +449,10 @@ packages: dependency: transitive description: name: stack_trace - sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" + sha256: "9f47fd3630d76be3ab26f0ee06d213679aa425996925ff3feffdec504931c377" url: "https://pub.dev" source: hosted - version: "1.11.1" + version: "1.12.0" stream_channel: dependency: transitive description: @@ -465,10 +465,10 @@ packages: dependency: transitive description: name: string_scanner - sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" + sha256: "688af5ed3402a4bde5b3a6c15fd768dbf2621a614950b17f04626c431ab3c4c3" url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.3.0" term_glyph: dependency: transitive description: @@ -481,10 +481,10 @@ packages: dependency: transitive description: name: test_api - sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb" + sha256: "664d3a9a64782fcdeb83ce9c6b39e78fd2971d4e37827b9b06c3aa1edc5e760c" url: "https://pub.dev" source: hosted - version: "0.7.2" + version: "0.7.3" typed_data: dependency: transitive description: @@ -505,10 +505,10 @@ packages: dependency: transitive description: name: vm_service - sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d" + sha256: f6be3ed8bd01289b34d679c2b62226f63c0e69f9fd2e50a6b3c1c729a961041b url: "https://pub.dev" source: hosted - version: "14.2.5" + version: "14.3.0" web: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 33da6bd..1069498 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -69,7 +69,7 @@ flutter: - assets/images/simbotics_logo.png # Reefscape diagram - assets/images/reefscape/karthik-reef-diagram-top-shorter.png - - assets/images/reefscape/karthik-reef-diagram-middle.png + - assets/images/reefscape/karthik-reef-diagram-middle-compressed.png - assets/images/reefscape/karthik-reef-diagram-bottom-shorter.png # QR code centerfolds - assets/images/centerfolds/jqr_code_centerfold.png From 239edd191d2fe6861bf669d27bf71f90a2ae8876 Mon Sep 17 00:00:00 2001 From: noah-nm Date: Sat, 11 Jan 2025 16:24:17 -0500 Subject: [PATCH 04/15] Better comments and removed unused imports --- lib/routes/data/AutonomousDataRoute.dart | 13 +++++++- .../AutonomousRightRow1.dart | 2 -- .../AutonomousRightRow2.dart | 5 ++-- .../AutonomousRightRow3.dart | 11 ++++--- .../AutonomousBottomReef.dart | 4 +-- .../AutonomousMiddleReef.dart | 4 +-- .../AutonomousTopReef.dart | 2 -- .../AutonomousRow4.dart | 12 ++++---- pubspec.lock | 30 +++++++++---------- 9 files changed, 47 insertions(+), 36 deletions(-) diff --git a/lib/routes/data/AutonomousDataRoute.dart b/lib/routes/data/AutonomousDataRoute.dart index c0858ae..6e1748e 100644 --- a/lib/routes/data/AutonomousDataRoute.dart +++ b/lib/routes/data/AutonomousDataRoute.dart @@ -27,7 +27,6 @@ import 'package:scouting_platform/utils/data/values/SettingValues.dart'; import 'package:scouting_platform/utils/data/values/TeleoperatedValues.dart'; import 'package:scouting_platform/utils/helpers/UIHelper.dart'; import 'package:scouting_platform/routes/data/fields/AutonomousRows.dart/AutonomousTopReef.dart'; -import 'package:scouting_platform/styles/components/TitleStyle.dart'; class AutonomousDataRoute extends StatefulWidget { const AutonomousDataRoute({super.key, required this.title}); @@ -62,12 +61,18 @@ class _DataRouteState extends State { 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(), @@ -90,6 +95,8 @@ class _DataRouteState extends State { SizedBox( width: 120.0, ), + + // reset button ElevatedButton( style: ElevatedButton.styleFrom( minimumSize: const Size(150.0, 37.0), @@ -107,7 +114,10 @@ class _DataRouteState extends State { ), ), ), + const SizedBox(width: 16.0), + + // next page button ElevatedButton( style: ElevatedButton.styleFrom( minimumSize: const Size(150.0, 37.0), @@ -130,6 +140,7 @@ class _DataRouteState extends State { ), ], ), + // various right side data entry and labels const AutonomousRightLabel1(), const AutonomousRightRow1(), const AutonomousRightLabel2(), diff --git a/lib/routes/data/fields/AutonomousRightRows/AutonomousRightRow1.dart b/lib/routes/data/fields/AutonomousRightRows/AutonomousRightRow1.dart index a4a69ab..ee46faa 100644 --- a/lib/routes/data/fields/AutonomousRightRows/AutonomousRightRow1.dart +++ b/lib/routes/data/fields/AutonomousRightRows/AutonomousRightRow1.dart @@ -1,5 +1,4 @@ import 'package:flutter/material.dart'; -import 'package:scouting_platform/builders/bases/CounterNumberField.dart'; import 'package:scouting_platform/builders/bases/PlatformDropdownMenu.dart'; import 'package:scouting_platform/utils/data/constants/OptionConstants.dart'; import 'package:scouting_platform/utils/data/values/AutonomousValues.dart'; @@ -63,7 +62,6 @@ class _AutonomousRightRow1State extends State { }, dropdownItems: OptionConstants.yesNoOptions, margin: const EdgeInsets.only(left: 10)), - ], ), ); diff --git a/lib/routes/data/fields/AutonomousRightRows/AutonomousRightRow2.dart b/lib/routes/data/fields/AutonomousRightRows/AutonomousRightRow2.dart index eb69a42..e07cc60 100644 --- a/lib/routes/data/fields/AutonomousRightRows/AutonomousRightRow2.dart +++ b/lib/routes/data/fields/AutonomousRightRows/AutonomousRightRow2.dart @@ -1,7 +1,5 @@ import 'package:flutter/material.dart'; import 'package:scouting_platform/builders/bases/CounterNumberField.dart'; -import 'package:scouting_platform/builders/bases/PlatformDropdownMenu.dart'; -import 'package:scouting_platform/utils/data/constants/OptionConstants.dart'; import 'package:scouting_platform/utils/data/values/AutonomousValues.dart'; class AutonomousRightRow2 extends StatefulWidget { @@ -44,6 +42,7 @@ class _AutonomousRightRow2State extends State { child: Row( mainAxisAlignment: MainAxisAlignment.start, // Center the row contents children: [ + // Coral missed counter CounterNumberField( margin: EdgeInsets.zero, controller: AutonomousValues.coralMissed, @@ -51,6 +50,7 @@ class _AutonomousRightRow2State extends State { incrementNumber(AutonomousValues.coralMissed), onTapDecrement: () => decrementNumber(AutonomousValues.coralMissed)), + // Coral form field counter CounterNumberField( margin: EdgeInsets.only(left: 10), controller: AutonomousValues.coralField, @@ -58,6 +58,7 @@ class _AutonomousRightRow2State extends State { incrementNumber(AutonomousValues.coralField), onTapDecrement: () => decrementNumber(AutonomousValues.coralField)), + // Coral from human player / coral station counter CounterNumberField( margin: EdgeInsets.only(left: 10), controller: AutonomousValues.coralHP, diff --git a/lib/routes/data/fields/AutonomousRightRows/AutonomousRightRow3.dart b/lib/routes/data/fields/AutonomousRightRows/AutonomousRightRow3.dart index dce1382..2c7dec1 100644 --- a/lib/routes/data/fields/AutonomousRightRows/AutonomousRightRow3.dart +++ b/lib/routes/data/fields/AutonomousRightRows/AutonomousRightRow3.dart @@ -1,7 +1,5 @@ import 'package:flutter/material.dart'; import 'package:scouting_platform/builders/bases/CounterNumberField.dart'; -import 'package:scouting_platform/builders/bases/PlatformDropdownMenu.dart'; -import 'package:scouting_platform/utils/data/constants/OptionConstants.dart'; import 'package:scouting_platform/utils/data/values/AutonomousValues.dart'; class AutonomousRightRow3 extends StatefulWidget { @@ -44,6 +42,7 @@ class _AutonomousRightRow3State extends State { child: Row( mainAxisAlignment: MainAxisAlignment.start, // Center the row contents children: [ + // Algae removed from reef counter CounterNumberField( margin: EdgeInsets.zero, controller: AutonomousValues.algaeRemoved, @@ -51,6 +50,7 @@ class _AutonomousRightRow3State extends State { incrementNumber(AutonomousValues.algaeRemoved), onTapDecrement: () => decrementNumber(AutonomousValues.algaeRemoved)), + // Algae scored in processor counter CounterNumberField( margin: EdgeInsets.only(left: 10), controller: AutonomousValues.algaeProcessor, @@ -58,11 +58,14 @@ class _AutonomousRightRow3State extends State { incrementNumber(AutonomousValues.algaeProcessor), onTapDecrement: () => decrementNumber(AutonomousValues.algaeProcessor)), + // Algae scored in barge counter CounterNumberField( margin: EdgeInsets.only(left: 10), controller: AutonomousValues.algaeBarge, - onTapIncrement: () => incrementNumber(AutonomousValues.algaeBarge), - onTapDecrement: () => decrementNumber(AutonomousValues.algaeBarge)), + onTapIncrement: () => + incrementNumber(AutonomousValues.algaeBarge), + onTapDecrement: () => + decrementNumber(AutonomousValues.algaeBarge)), ], ), ); diff --git a/lib/routes/data/fields/AutonomousRows.dart/AutonomousBottomReef.dart b/lib/routes/data/fields/AutonomousRows.dart/AutonomousBottomReef.dart index 49c7b61..a202a67 100644 --- a/lib/routes/data/fields/AutonomousRows.dart/AutonomousBottomReef.dart +++ b/lib/routes/data/fields/AutonomousRows.dart/AutonomousBottomReef.dart @@ -1,7 +1,5 @@ import 'package:flutter/material.dart'; import 'package:scouting_platform/builders/bases/CounterNumberField.dart'; -import 'package:scouting_platform/builders/bases/PlatformDropdownMenu.dart'; -import 'package:scouting_platform/utils/data/constants/OptionConstants.dart'; import 'package:scouting_platform/utils/data/values/AutonomousValues.dart'; class AutonomousBottomReef extends StatefulWidget { @@ -51,11 +49,13 @@ class _AutonomousRow1State extends State { child: Row( mainAxisAlignment: MainAxisAlignment.center, // Center the row contents children: [ + // bottom left side trough counter CounterNumberField( margin: EdgeInsets.only(right: 55.0, bottom: 0.0, left: 10.0), controller: AutonomousValues.l1SW, onTapDecrement: () => decrementNumber(AutonomousValues.l1SW), onTapIncrement: () => incrementNumber(AutonomousValues.l1SW)), + // bottom right side trough counter CounterNumberField( margin: EdgeInsets.only(right: 0.0, bottom: 0.0), controller: AutonomousValues.l1SE, diff --git a/lib/routes/data/fields/AutonomousRows.dart/AutonomousMiddleReef.dart b/lib/routes/data/fields/AutonomousRows.dart/AutonomousMiddleReef.dart index bca1ae9..a9b824e 100644 --- a/lib/routes/data/fields/AutonomousRows.dart/AutonomousMiddleReef.dart +++ b/lib/routes/data/fields/AutonomousRows.dart/AutonomousMiddleReef.dart @@ -1,7 +1,5 @@ import 'package:flutter/material.dart'; import 'package:scouting_platform/builders/bases/CounterNumberField.dart'; -import 'package:scouting_platform/builders/bases/PlatformDropdownMenu.dart'; -import 'package:scouting_platform/utils/data/constants/OptionConstants.dart'; import 'package:scouting_platform/utils/data/values/AutonomousValues.dart'; class AutonomousMiddleReef extends StatefulWidget { @@ -51,11 +49,13 @@ class _AutonomousRow1State extends State { child: Row( mainAxisAlignment: MainAxisAlignment.center, // Center the row contents children: [ + // left side trough counter CounterNumberField( margin: EdgeInsets.only(right: 100.0, bottom: 0.0), controller: AutonomousValues.l1W, onTapDecrement: () => decrementNumber(AutonomousValues.l1W), onTapIncrement: () => incrementNumber(AutonomousValues.l1W)), + // right side trough counter CounterNumberField( margin: EdgeInsets.only(right: 0.0, top: 0.0), controller: AutonomousValues.l1E, diff --git a/lib/routes/data/fields/AutonomousRows.dart/AutonomousTopReef.dart b/lib/routes/data/fields/AutonomousRows.dart/AutonomousTopReef.dart index 2ccb9fd..56c9aac 100644 --- a/lib/routes/data/fields/AutonomousRows.dart/AutonomousTopReef.dart +++ b/lib/routes/data/fields/AutonomousRows.dart/AutonomousTopReef.dart @@ -1,7 +1,5 @@ import 'package:flutter/material.dart'; import 'package:scouting_platform/builders/bases/CounterNumberField.dart'; -import 'package:scouting_platform/builders/bases/PlatformDropdownMenu.dart'; -import 'package:scouting_platform/utils/data/constants/OptionConstants.dart'; import 'package:scouting_platform/utils/data/values/AutonomousValues.dart'; class AutonomousTopReef extends StatefulWidget { diff --git a/lib/routes/data/fields/AutonomouscCheckboxRows/AutonomousRow4.dart b/lib/routes/data/fields/AutonomouscCheckboxRows/AutonomousRow4.dart index eaa5ebb..64765d5 100644 --- a/lib/routes/data/fields/AutonomouscCheckboxRows/AutonomousRow4.dart +++ b/lib/routes/data/fields/AutonomouscCheckboxRows/AutonomousRow4.dart @@ -42,42 +42,42 @@ class _AutonomousRow4State extends State { child: Row( mainAxisAlignment: MainAxisAlignment.start, // Center the row contents children: [ - // A + // B CustomCheckbox( controller: AutonomousValues.l4B, backgroundColor: Colors.grey.shade800, checkColor: Colors.white, labelColor: Colors.white, margin: const EdgeInsets.only(right: 18.0)), - // L + // C CustomCheckbox( controller: AutonomousValues.l4C, backgroundColor: Colors.grey.shade800, checkColor: Colors.white, labelColor: Colors.white, margin: const EdgeInsets.only(right: 35.0)), - // K + // D CustomCheckbox( controller: AutonomousValues.l4D, backgroundColor: Colors.grey.shade800, checkColor: Colors.white, labelColor: Colors.white, margin: const EdgeInsets.only(right: 35.0)), - // J + // E CustomCheckbox( controller: AutonomousValues.l4E, backgroundColor: Colors.grey.shade800, checkColor: Colors.white, labelColor: Colors.white, margin: const EdgeInsets.only(right: 30.0)), - // I + // F CustomCheckbox( controller: AutonomousValues.l4F, backgroundColor: Colors.grey.shade800, checkColor: Colors.white, labelColor: Colors.white, margin: const EdgeInsets.only(right: 25.0)), - // H + // G CustomCheckbox( controller: AutonomousValues.l4G, backgroundColor: Colors.grey.shade800, diff --git a/pubspec.lock b/pubspec.lock index 54d4164..72fefdc 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -69,10 +69,10 @@ packages: dependency: transitive description: name: collection - sha256: a1ace0a119f20aabc852d165077c036cd864315bd99b7eaa10a60100341941bf + sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a url: "https://pub.dev" source: hosted - version: "1.19.0" + version: "1.18.0" crypto: dependency: transitive description: @@ -180,18 +180,18 @@ packages: dependency: transitive description: name: leak_tracker - sha256: "7bb2830ebd849694d1ec25bf1f44582d6ac531a57a365a803a6034ff751d2d06" + sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05" url: "https://pub.dev" source: hosted - version: "10.0.7" + version: "10.0.5" leak_tracker_flutter_testing: dependency: transitive description: name: leak_tracker_flutter_testing - sha256: "9491a714cca3667b60b5c420da8217e6de0d1ba7a5ec322fab01758f6998f379" + sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806" url: "https://pub.dev" source: hosted - version: "3.0.8" + version: "3.0.5" leak_tracker_testing: dependency: transitive description: @@ -436,7 +436,7 @@ packages: dependency: transitive description: flutter source: sdk - version: "0.0.0" + version: "0.0.99" source_span: dependency: transitive description: @@ -449,10 +449,10 @@ packages: dependency: transitive description: name: stack_trace - sha256: "9f47fd3630d76be3ab26f0ee06d213679aa425996925ff3feffdec504931c377" + sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" url: "https://pub.dev" source: hosted - version: "1.12.0" + version: "1.11.1" stream_channel: dependency: transitive description: @@ -465,10 +465,10 @@ packages: dependency: transitive description: name: string_scanner - sha256: "688af5ed3402a4bde5b3a6c15fd768dbf2621a614950b17f04626c431ab3c4c3" + sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" url: "https://pub.dev" source: hosted - version: "1.3.0" + version: "1.2.0" term_glyph: dependency: transitive description: @@ -481,10 +481,10 @@ packages: dependency: transitive description: name: test_api - sha256: "664d3a9a64782fcdeb83ce9c6b39e78fd2971d4e37827b9b06c3aa1edc5e760c" + sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb" url: "https://pub.dev" source: hosted - version: "0.7.3" + version: "0.7.2" typed_data: dependency: transitive description: @@ -505,10 +505,10 @@ packages: dependency: transitive description: name: vm_service - sha256: f6be3ed8bd01289b34d679c2b62226f63c0e69f9fd2e50a6b3c1c729a961041b + sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d" url: "https://pub.dev" source: hosted - version: "14.3.0" + version: "14.2.5" web: dependency: transitive description: From 7282dd1ec9d1ceeccfef54c09c0fefb17781b233 Mon Sep 17 00:00:00 2001 From: noah-nm Date: Sat, 11 Jan 2025 16:48:06 -0500 Subject: [PATCH 05/15] folder renames --- .../AutonomousRightRow1.dart | 0 .../AutonomousRightRow2.dart | 0 .../AutonomousRightRow3.dart | 0 .../AutonomousRow1.dart | 0 .../AutonomousRow2.dart | 0 .../AutonomousRow3.dart | 0 .../AutonomousRow4.dart | 0 .../AutonomousRow5.dart | 0 .../AutonomousRow6.dart | 0 .../AutonomousBottomReef.dart | 0 .../AutonomousMiddleReef.dart | 0 .../AutonomousTopReef.dart | 0 12 files changed, 0 insertions(+), 0 deletions(-) rename lib/routes/data/fields/{AutonomousRightRows => autonomou_right_rows}/AutonomousRightRow1.dart (100%) rename lib/routes/data/fields/{AutonomousRightRows => autonomou_right_rows}/AutonomousRightRow2.dart (100%) rename lib/routes/data/fields/{AutonomousRightRows => autonomou_right_rows}/AutonomousRightRow3.dart (100%) rename lib/routes/data/fields/{AutonomouscCheckboxRows => autonomous_checkbox_rows}/AutonomousRow1.dart (100%) rename lib/routes/data/fields/{AutonomouscCheckboxRows => autonomous_checkbox_rows}/AutonomousRow2.dart (100%) rename lib/routes/data/fields/{AutonomouscCheckboxRows => autonomous_checkbox_rows}/AutonomousRow3.dart (100%) rename lib/routes/data/fields/{AutonomouscCheckboxRows => autonomous_checkbox_rows}/AutonomousRow4.dart (100%) rename lib/routes/data/fields/{AutonomouscCheckboxRows => autonomous_checkbox_rows}/AutonomousRow5.dart (100%) rename lib/routes/data/fields/{AutonomouscCheckboxRows => autonomous_checkbox_rows}/AutonomousRow6.dart (100%) rename lib/routes/data/fields/{AutonomousRows.dart => autonomous_rows.dart}/AutonomousBottomReef.dart (100%) rename lib/routes/data/fields/{AutonomousRows.dart => autonomous_rows.dart}/AutonomousMiddleReef.dart (100%) rename lib/routes/data/fields/{AutonomousRows.dart => autonomous_rows.dart}/AutonomousTopReef.dart (100%) diff --git a/lib/routes/data/fields/AutonomousRightRows/AutonomousRightRow1.dart b/lib/routes/data/fields/autonomou_right_rows/AutonomousRightRow1.dart similarity index 100% rename from lib/routes/data/fields/AutonomousRightRows/AutonomousRightRow1.dart rename to lib/routes/data/fields/autonomou_right_rows/AutonomousRightRow1.dart diff --git a/lib/routes/data/fields/AutonomousRightRows/AutonomousRightRow2.dart b/lib/routes/data/fields/autonomou_right_rows/AutonomousRightRow2.dart similarity index 100% rename from lib/routes/data/fields/AutonomousRightRows/AutonomousRightRow2.dart rename to lib/routes/data/fields/autonomou_right_rows/AutonomousRightRow2.dart diff --git a/lib/routes/data/fields/AutonomousRightRows/AutonomousRightRow3.dart b/lib/routes/data/fields/autonomou_right_rows/AutonomousRightRow3.dart similarity index 100% rename from lib/routes/data/fields/AutonomousRightRows/AutonomousRightRow3.dart rename to lib/routes/data/fields/autonomou_right_rows/AutonomousRightRow3.dart diff --git a/lib/routes/data/fields/AutonomouscCheckboxRows/AutonomousRow1.dart b/lib/routes/data/fields/autonomous_checkbox_rows/AutonomousRow1.dart similarity index 100% rename from lib/routes/data/fields/AutonomouscCheckboxRows/AutonomousRow1.dart rename to lib/routes/data/fields/autonomous_checkbox_rows/AutonomousRow1.dart diff --git a/lib/routes/data/fields/AutonomouscCheckboxRows/AutonomousRow2.dart b/lib/routes/data/fields/autonomous_checkbox_rows/AutonomousRow2.dart similarity index 100% rename from lib/routes/data/fields/AutonomouscCheckboxRows/AutonomousRow2.dart rename to lib/routes/data/fields/autonomous_checkbox_rows/AutonomousRow2.dart diff --git a/lib/routes/data/fields/AutonomouscCheckboxRows/AutonomousRow3.dart b/lib/routes/data/fields/autonomous_checkbox_rows/AutonomousRow3.dart similarity index 100% rename from lib/routes/data/fields/AutonomouscCheckboxRows/AutonomousRow3.dart rename to lib/routes/data/fields/autonomous_checkbox_rows/AutonomousRow3.dart diff --git a/lib/routes/data/fields/AutonomouscCheckboxRows/AutonomousRow4.dart b/lib/routes/data/fields/autonomous_checkbox_rows/AutonomousRow4.dart similarity index 100% rename from lib/routes/data/fields/AutonomouscCheckboxRows/AutonomousRow4.dart rename to lib/routes/data/fields/autonomous_checkbox_rows/AutonomousRow4.dart diff --git a/lib/routes/data/fields/AutonomouscCheckboxRows/AutonomousRow5.dart b/lib/routes/data/fields/autonomous_checkbox_rows/AutonomousRow5.dart similarity index 100% rename from lib/routes/data/fields/AutonomouscCheckboxRows/AutonomousRow5.dart rename to lib/routes/data/fields/autonomous_checkbox_rows/AutonomousRow5.dart diff --git a/lib/routes/data/fields/AutonomouscCheckboxRows/AutonomousRow6.dart b/lib/routes/data/fields/autonomous_checkbox_rows/AutonomousRow6.dart similarity index 100% rename from lib/routes/data/fields/AutonomouscCheckboxRows/AutonomousRow6.dart rename to lib/routes/data/fields/autonomous_checkbox_rows/AutonomousRow6.dart diff --git a/lib/routes/data/fields/AutonomousRows.dart/AutonomousBottomReef.dart b/lib/routes/data/fields/autonomous_rows.dart/AutonomousBottomReef.dart similarity index 100% rename from lib/routes/data/fields/AutonomousRows.dart/AutonomousBottomReef.dart rename to lib/routes/data/fields/autonomous_rows.dart/AutonomousBottomReef.dart diff --git a/lib/routes/data/fields/AutonomousRows.dart/AutonomousMiddleReef.dart b/lib/routes/data/fields/autonomous_rows.dart/AutonomousMiddleReef.dart similarity index 100% rename from lib/routes/data/fields/AutonomousRows.dart/AutonomousMiddleReef.dart rename to lib/routes/data/fields/autonomous_rows.dart/AutonomousMiddleReef.dart diff --git a/lib/routes/data/fields/AutonomousRows.dart/AutonomousTopReef.dart b/lib/routes/data/fields/autonomous_rows.dart/AutonomousTopReef.dart similarity index 100% rename from lib/routes/data/fields/AutonomousRows.dart/AutonomousTopReef.dart rename to lib/routes/data/fields/autonomous_rows.dart/AutonomousTopReef.dart From 85fa7fac84cce4f69212ec71e5e08bf0ee806331 Mon Sep 17 00:00:00 2001 From: noah-nm Date: Sat, 11 Jan 2025 16:52:39 -0500 Subject: [PATCH 06/15] revert folder names --- .../AutonomousRightRow1.dart | 0 .../AutonomousRightRow2.dart | 0 .../AutonomousRightRow3.dart | 0 .../AutonomousBottomReef.dart | 0 .../AutonomousMiddleReef.dart | 0 .../AutonomousTopReef.dart | 0 .../AutonomousRow1.dart | 0 .../AutonomousRow2.dart | 0 .../AutonomousRow3.dart | 0 .../AutonomousRow4.dart | 0 .../AutonomousRow5.dart | 0 .../AutonomousRow6.dart | 0 12 files changed, 0 insertions(+), 0 deletions(-) rename lib/routes/data/fields/{autonomou_right_rows => AutonomousRightRows}/AutonomousRightRow1.dart (100%) rename lib/routes/data/fields/{autonomou_right_rows => AutonomousRightRows}/AutonomousRightRow2.dart (100%) rename lib/routes/data/fields/{autonomou_right_rows => AutonomousRightRows}/AutonomousRightRow3.dart (100%) rename lib/routes/data/fields/{autonomous_rows.dart => AutonomousRows.dart}/AutonomousBottomReef.dart (100%) rename lib/routes/data/fields/{autonomous_rows.dart => AutonomousRows.dart}/AutonomousMiddleReef.dart (100%) rename lib/routes/data/fields/{autonomous_rows.dart => AutonomousRows.dart}/AutonomousTopReef.dart (100%) rename lib/routes/data/fields/{autonomous_checkbox_rows => AutonomouscCheckboxRows}/AutonomousRow1.dart (100%) rename lib/routes/data/fields/{autonomous_checkbox_rows => AutonomouscCheckboxRows}/AutonomousRow2.dart (100%) rename lib/routes/data/fields/{autonomous_checkbox_rows => AutonomouscCheckboxRows}/AutonomousRow3.dart (100%) rename lib/routes/data/fields/{autonomous_checkbox_rows => AutonomouscCheckboxRows}/AutonomousRow4.dart (100%) rename lib/routes/data/fields/{autonomous_checkbox_rows => AutonomouscCheckboxRows}/AutonomousRow5.dart (100%) rename lib/routes/data/fields/{autonomous_checkbox_rows => AutonomouscCheckboxRows}/AutonomousRow6.dart (100%) diff --git a/lib/routes/data/fields/autonomou_right_rows/AutonomousRightRow1.dart b/lib/routes/data/fields/AutonomousRightRows/AutonomousRightRow1.dart similarity index 100% rename from lib/routes/data/fields/autonomou_right_rows/AutonomousRightRow1.dart rename to lib/routes/data/fields/AutonomousRightRows/AutonomousRightRow1.dart diff --git a/lib/routes/data/fields/autonomou_right_rows/AutonomousRightRow2.dart b/lib/routes/data/fields/AutonomousRightRows/AutonomousRightRow2.dart similarity index 100% rename from lib/routes/data/fields/autonomou_right_rows/AutonomousRightRow2.dart rename to lib/routes/data/fields/AutonomousRightRows/AutonomousRightRow2.dart diff --git a/lib/routes/data/fields/autonomou_right_rows/AutonomousRightRow3.dart b/lib/routes/data/fields/AutonomousRightRows/AutonomousRightRow3.dart similarity index 100% rename from lib/routes/data/fields/autonomou_right_rows/AutonomousRightRow3.dart rename to lib/routes/data/fields/AutonomousRightRows/AutonomousRightRow3.dart diff --git a/lib/routes/data/fields/autonomous_rows.dart/AutonomousBottomReef.dart b/lib/routes/data/fields/AutonomousRows.dart/AutonomousBottomReef.dart similarity index 100% rename from lib/routes/data/fields/autonomous_rows.dart/AutonomousBottomReef.dart rename to lib/routes/data/fields/AutonomousRows.dart/AutonomousBottomReef.dart diff --git a/lib/routes/data/fields/autonomous_rows.dart/AutonomousMiddleReef.dart b/lib/routes/data/fields/AutonomousRows.dart/AutonomousMiddleReef.dart similarity index 100% rename from lib/routes/data/fields/autonomous_rows.dart/AutonomousMiddleReef.dart rename to lib/routes/data/fields/AutonomousRows.dart/AutonomousMiddleReef.dart diff --git a/lib/routes/data/fields/autonomous_rows.dart/AutonomousTopReef.dart b/lib/routes/data/fields/AutonomousRows.dart/AutonomousTopReef.dart similarity index 100% rename from lib/routes/data/fields/autonomous_rows.dart/AutonomousTopReef.dart rename to lib/routes/data/fields/AutonomousRows.dart/AutonomousTopReef.dart diff --git a/lib/routes/data/fields/autonomous_checkbox_rows/AutonomousRow1.dart b/lib/routes/data/fields/AutonomouscCheckboxRows/AutonomousRow1.dart similarity index 100% rename from lib/routes/data/fields/autonomous_checkbox_rows/AutonomousRow1.dart rename to lib/routes/data/fields/AutonomouscCheckboxRows/AutonomousRow1.dart diff --git a/lib/routes/data/fields/autonomous_checkbox_rows/AutonomousRow2.dart b/lib/routes/data/fields/AutonomouscCheckboxRows/AutonomousRow2.dart similarity index 100% rename from lib/routes/data/fields/autonomous_checkbox_rows/AutonomousRow2.dart rename to lib/routes/data/fields/AutonomouscCheckboxRows/AutonomousRow2.dart diff --git a/lib/routes/data/fields/autonomous_checkbox_rows/AutonomousRow3.dart b/lib/routes/data/fields/AutonomouscCheckboxRows/AutonomousRow3.dart similarity index 100% rename from lib/routes/data/fields/autonomous_checkbox_rows/AutonomousRow3.dart rename to lib/routes/data/fields/AutonomouscCheckboxRows/AutonomousRow3.dart diff --git a/lib/routes/data/fields/autonomous_checkbox_rows/AutonomousRow4.dart b/lib/routes/data/fields/AutonomouscCheckboxRows/AutonomousRow4.dart similarity index 100% rename from lib/routes/data/fields/autonomous_checkbox_rows/AutonomousRow4.dart rename to lib/routes/data/fields/AutonomouscCheckboxRows/AutonomousRow4.dart diff --git a/lib/routes/data/fields/autonomous_checkbox_rows/AutonomousRow5.dart b/lib/routes/data/fields/AutonomouscCheckboxRows/AutonomousRow5.dart similarity index 100% rename from lib/routes/data/fields/autonomous_checkbox_rows/AutonomousRow5.dart rename to lib/routes/data/fields/AutonomouscCheckboxRows/AutonomousRow5.dart diff --git a/lib/routes/data/fields/autonomous_checkbox_rows/AutonomousRow6.dart b/lib/routes/data/fields/AutonomouscCheckboxRows/AutonomousRow6.dart similarity index 100% rename from lib/routes/data/fields/autonomous_checkbox_rows/AutonomousRow6.dart rename to lib/routes/data/fields/AutonomouscCheckboxRows/AutonomousRow6.dart From 1b4c9e78dca4a7a89d38e3e253289cccd2d9f1b2 Mon Sep 17 00:00:00 2001 From: noah-nm Date: Sat, 11 Jan 2025 17:09:53 -0500 Subject: [PATCH 07/15] Ignore stupid flutter snakecase naming --- lib/builders/bases/CustomCheckbox.dart | 1 + lib/routes/data/AutonomousDataRoute.dart | 12 ++++++------ .../AutonomousRow1.dart | 1 + .../AutonomousRow2.dart | 1 + .../AutonomousRow3.dart | 1 + .../AutonomousRow4.dart | 1 + .../AutonomousRow5.dart | 1 + .../AutonomousRow6.dart | 1 + .../AutonomousRightRows/AutonomousRightRow1.dart | 1 + .../AutonomousRightRows/AutonomousRightRow2.dart | 1 + .../AutonomousRightRows/AutonomousRightRow3.dart | 1 + .../AutonomousRows.dart/AutonomousBottomReef.dart | 1 + .../AutonomousRows.dart/AutonomousMiddleReef.dart | 1 + .../AutonomousRows.dart/AutonomousTopReef.dart | 1 + 14 files changed, 19 insertions(+), 6 deletions(-) rename lib/routes/data/fields/{AutonomouscCheckboxRows => AutonomousCheckboxRows}/AutonomousRow1.dart (98%) rename lib/routes/data/fields/{AutonomouscCheckboxRows => AutonomousCheckboxRows}/AutonomousRow2.dart (98%) rename lib/routes/data/fields/{AutonomouscCheckboxRows => AutonomousCheckboxRows}/AutonomousRow3.dart (98%) rename lib/routes/data/fields/{AutonomouscCheckboxRows => AutonomousCheckboxRows}/AutonomousRow4.dart (98%) rename lib/routes/data/fields/{AutonomouscCheckboxRows => AutonomousCheckboxRows}/AutonomousRow5.dart (98%) rename lib/routes/data/fields/{AutonomouscCheckboxRows => AutonomousCheckboxRows}/AutonomousRow6.dart (98%) diff --git a/lib/builders/bases/CustomCheckbox.dart b/lib/builders/bases/CustomCheckbox.dart index 904b234..016b4b2 100644 --- a/lib/builders/bases/CustomCheckbox.dart +++ b/lib/builders/bases/CustomCheckbox.dart @@ -1,3 +1,4 @@ +// ignore_for_file: file_names import 'package:flutter/material.dart'; class CustomCheckbox extends StatefulWidget { diff --git a/lib/routes/data/AutonomousDataRoute.dart b/lib/routes/data/AutonomousDataRoute.dart index 6e1748e..ad2afd6 100644 --- a/lib/routes/data/AutonomousDataRoute.dart +++ b/lib/routes/data/AutonomousDataRoute.dart @@ -5,12 +5,12 @@ import 'package:scouting_platform/routes/comments/CommentsRoute.dart'; import 'package:scouting_platform/routes/data/fields/AutonomousRightRows/AutonomousRightRow2.dart'; import 'package:scouting_platform/routes/data/fields/AutonomousRows.dart/AutonomousBottomReef.dart'; import 'package:scouting_platform/routes/data/fields/AutonomousRows.dart/AutonomousMiddleReef.dart'; -import 'package:scouting_platform/routes/data/fields/AutonomouscCheckboxRows/AutonomousRow1.dart'; -import 'package:scouting_platform/routes/data/fields/AutonomouscCheckboxRows/AutonomousRow2.dart'; -import 'package:scouting_platform/routes/data/fields/AutonomouscCheckboxRows/AutonomousRow3.dart'; -import 'package:scouting_platform/routes/data/fields/AutonomouscCheckboxRows/AutonomousRow4.dart'; -import 'package:scouting_platform/routes/data/fields/AutonomouscCheckboxRows/AutonomousRow5.dart'; -import 'package:scouting_platform/routes/data/fields/AutonomouscCheckboxRows/AutonomousRow6.dart'; +import 'package:scouting_platform/routes/data/fields/AutonomousCheckboxRows/AutonomousRow1.dart'; +import 'package:scouting_platform/routes/data/fields/AutonomousCheckboxRows/AutonomousRow2.dart'; +import 'package:scouting_platform/routes/data/fields/AutonomousCheckboxRows/AutonomousRow3.dart'; +import 'package:scouting_platform/routes/data/fields/AutonomousCheckboxRows/AutonomousRow4.dart'; +import 'package:scouting_platform/routes/data/fields/AutonomousCheckboxRows/AutonomousRow5.dart'; +import 'package:scouting_platform/routes/data/fields/AutonomousCheckboxRows/AutonomousRow6.dart'; import 'package:scouting_platform/routes/data/fields/AutonomousRightRows/AutonomousRightRow1.dart'; import 'package:scouting_platform/routes/data/fields/AutonomousRightRows/AutonomousRightRow3.dart'; import 'package:scouting_platform/routes/data/labels/AutonomousRightLabels/AutonomousRightLabel1.dart'; diff --git a/lib/routes/data/fields/AutonomouscCheckboxRows/AutonomousRow1.dart b/lib/routes/data/fields/AutonomousCheckboxRows/AutonomousRow1.dart similarity index 98% rename from lib/routes/data/fields/AutonomouscCheckboxRows/AutonomousRow1.dart rename to lib/routes/data/fields/AutonomousCheckboxRows/AutonomousRow1.dart index 44f2851..20eb355 100644 --- a/lib/routes/data/fields/AutonomouscCheckboxRows/AutonomousRow1.dart +++ b/lib/routes/data/fields/AutonomousCheckboxRows/AutonomousRow1.dart @@ -1,3 +1,4 @@ +// ignore_for_file: file_names import 'package:flutter/material.dart'; import 'package:scouting_platform/utils/data/values/AutonomousValues.dart'; import 'package:scouting_platform/builders/bases/CustomCheckbox.dart'; diff --git a/lib/routes/data/fields/AutonomouscCheckboxRows/AutonomousRow2.dart b/lib/routes/data/fields/AutonomousCheckboxRows/AutonomousRow2.dart similarity index 98% rename from lib/routes/data/fields/AutonomouscCheckboxRows/AutonomousRow2.dart rename to lib/routes/data/fields/AutonomousCheckboxRows/AutonomousRow2.dart index 001ae08..9273b26 100644 --- a/lib/routes/data/fields/AutonomouscCheckboxRows/AutonomousRow2.dart +++ b/lib/routes/data/fields/AutonomousCheckboxRows/AutonomousRow2.dart @@ -1,3 +1,4 @@ +// ignore_for_file: file_names import 'package:flutter/material.dart'; import 'package:scouting_platform/utils/data/values/AutonomousValues.dart'; import 'package:scouting_platform/builders/bases/CustomCheckbox.dart'; diff --git a/lib/routes/data/fields/AutonomouscCheckboxRows/AutonomousRow3.dart b/lib/routes/data/fields/AutonomousCheckboxRows/AutonomousRow3.dart similarity index 98% rename from lib/routes/data/fields/AutonomouscCheckboxRows/AutonomousRow3.dart rename to lib/routes/data/fields/AutonomousCheckboxRows/AutonomousRow3.dart index 89dd34f..76cbd21 100644 --- a/lib/routes/data/fields/AutonomouscCheckboxRows/AutonomousRow3.dart +++ b/lib/routes/data/fields/AutonomousCheckboxRows/AutonomousRow3.dart @@ -1,3 +1,4 @@ +// ignore_for_file: file_names import 'package:flutter/material.dart'; import 'package:scouting_platform/utils/data/values/AutonomousValues.dart'; import 'package:scouting_platform/builders/bases/CustomCheckbox.dart'; diff --git a/lib/routes/data/fields/AutonomouscCheckboxRows/AutonomousRow4.dart b/lib/routes/data/fields/AutonomousCheckboxRows/AutonomousRow4.dart similarity index 98% rename from lib/routes/data/fields/AutonomouscCheckboxRows/AutonomousRow4.dart rename to lib/routes/data/fields/AutonomousCheckboxRows/AutonomousRow4.dart index 64765d5..8135e84 100644 --- a/lib/routes/data/fields/AutonomouscCheckboxRows/AutonomousRow4.dart +++ b/lib/routes/data/fields/AutonomousCheckboxRows/AutonomousRow4.dart @@ -1,3 +1,4 @@ +// ignore_for_file: file_names import 'package:flutter/material.dart'; import 'package:scouting_platform/utils/data/values/AutonomousValues.dart'; import 'package:scouting_platform/builders/bases/CustomCheckbox.dart'; diff --git a/lib/routes/data/fields/AutonomouscCheckboxRows/AutonomousRow5.dart b/lib/routes/data/fields/AutonomousCheckboxRows/AutonomousRow5.dart similarity index 98% rename from lib/routes/data/fields/AutonomouscCheckboxRows/AutonomousRow5.dart rename to lib/routes/data/fields/AutonomousCheckboxRows/AutonomousRow5.dart index 8a868dd..0f30462 100644 --- a/lib/routes/data/fields/AutonomouscCheckboxRows/AutonomousRow5.dart +++ b/lib/routes/data/fields/AutonomousCheckboxRows/AutonomousRow5.dart @@ -1,3 +1,4 @@ +// ignore_for_file: file_names import 'package:flutter/material.dart'; import 'package:scouting_platform/utils/data/values/AutonomousValues.dart'; import 'package:scouting_platform/builders/bases/CustomCheckbox.dart'; diff --git a/lib/routes/data/fields/AutonomouscCheckboxRows/AutonomousRow6.dart b/lib/routes/data/fields/AutonomousCheckboxRows/AutonomousRow6.dart similarity index 98% rename from lib/routes/data/fields/AutonomouscCheckboxRows/AutonomousRow6.dart rename to lib/routes/data/fields/AutonomousCheckboxRows/AutonomousRow6.dart index 0e4f64f..e50a65b 100644 --- a/lib/routes/data/fields/AutonomouscCheckboxRows/AutonomousRow6.dart +++ b/lib/routes/data/fields/AutonomousCheckboxRows/AutonomousRow6.dart @@ -1,3 +1,4 @@ +// ignore_for_file: file_names import 'package:flutter/material.dart'; import 'package:scouting_platform/utils/data/values/AutonomousValues.dart'; import 'package:scouting_platform/builders/bases/CustomCheckbox.dart'; diff --git a/lib/routes/data/fields/AutonomousRightRows/AutonomousRightRow1.dart b/lib/routes/data/fields/AutonomousRightRows/AutonomousRightRow1.dart index ee46faa..c674265 100644 --- a/lib/routes/data/fields/AutonomousRightRows/AutonomousRightRow1.dart +++ b/lib/routes/data/fields/AutonomousRightRows/AutonomousRightRow1.dart @@ -1,3 +1,4 @@ +// ignore_for_file: file_names import 'package:flutter/material.dart'; import 'package:scouting_platform/builders/bases/PlatformDropdownMenu.dart'; import 'package:scouting_platform/utils/data/constants/OptionConstants.dart'; diff --git a/lib/routes/data/fields/AutonomousRightRows/AutonomousRightRow2.dart b/lib/routes/data/fields/AutonomousRightRows/AutonomousRightRow2.dart index e07cc60..8d93138 100644 --- a/lib/routes/data/fields/AutonomousRightRows/AutonomousRightRow2.dart +++ b/lib/routes/data/fields/AutonomousRightRows/AutonomousRightRow2.dart @@ -1,3 +1,4 @@ +// ignore_for_file: file_names import 'package:flutter/material.dart'; import 'package:scouting_platform/builders/bases/CounterNumberField.dart'; import 'package:scouting_platform/utils/data/values/AutonomousValues.dart'; diff --git a/lib/routes/data/fields/AutonomousRightRows/AutonomousRightRow3.dart b/lib/routes/data/fields/AutonomousRightRows/AutonomousRightRow3.dart index 2c7dec1..2b0a199 100644 --- a/lib/routes/data/fields/AutonomousRightRows/AutonomousRightRow3.dart +++ b/lib/routes/data/fields/AutonomousRightRows/AutonomousRightRow3.dart @@ -1,3 +1,4 @@ +// ignore_for_file: file_names import 'package:flutter/material.dart'; import 'package:scouting_platform/builders/bases/CounterNumberField.dart'; import 'package:scouting_platform/utils/data/values/AutonomousValues.dart'; diff --git a/lib/routes/data/fields/AutonomousRows.dart/AutonomousBottomReef.dart b/lib/routes/data/fields/AutonomousRows.dart/AutonomousBottomReef.dart index a202a67..9710ec2 100644 --- a/lib/routes/data/fields/AutonomousRows.dart/AutonomousBottomReef.dart +++ b/lib/routes/data/fields/AutonomousRows.dart/AutonomousBottomReef.dart @@ -1,3 +1,4 @@ +// ignore_for_file: file_names import 'package:flutter/material.dart'; import 'package:scouting_platform/builders/bases/CounterNumberField.dart'; import 'package:scouting_platform/utils/data/values/AutonomousValues.dart'; diff --git a/lib/routes/data/fields/AutonomousRows.dart/AutonomousMiddleReef.dart b/lib/routes/data/fields/AutonomousRows.dart/AutonomousMiddleReef.dart index a9b824e..51d2ded 100644 --- a/lib/routes/data/fields/AutonomousRows.dart/AutonomousMiddleReef.dart +++ b/lib/routes/data/fields/AutonomousRows.dart/AutonomousMiddleReef.dart @@ -1,3 +1,4 @@ +// ignore_for_file: file_names import 'package:flutter/material.dart'; import 'package:scouting_platform/builders/bases/CounterNumberField.dart'; import 'package:scouting_platform/utils/data/values/AutonomousValues.dart'; diff --git a/lib/routes/data/fields/AutonomousRows.dart/AutonomousTopReef.dart b/lib/routes/data/fields/AutonomousRows.dart/AutonomousTopReef.dart index 56c9aac..db9d79e 100644 --- a/lib/routes/data/fields/AutonomousRows.dart/AutonomousTopReef.dart +++ b/lib/routes/data/fields/AutonomousRows.dart/AutonomousTopReef.dart @@ -1,3 +1,4 @@ +// ignore_for_file: file_names import 'package:flutter/material.dart'; import 'package:scouting_platform/builders/bases/CounterNumberField.dart'; import 'package:scouting_platform/utils/data/values/AutonomousValues.dart'; From cbbfdcb26722deca22e455aebd1a8513040e8ce4 Mon Sep 17 00:00:00 2001 From: noah-nm Date: Sat, 11 Jan 2025 17:34:43 -0500 Subject: [PATCH 08/15] Updated default state --- lib/routes/data/AutonomousDataRoute.dart | 74 ++++++++++++++++++------ 1 file changed, 57 insertions(+), 17 deletions(-) diff --git a/lib/routes/data/AutonomousDataRoute.dart b/lib/routes/data/AutonomousDataRoute.dart index ad2afd6..6a0b4e0 100644 --- a/lib/routes/data/AutonomousDataRoute.dart +++ b/lib/routes/data/AutonomousDataRoute.dart @@ -182,25 +182,65 @@ class _DataRouteState extends State { } setState(() { - AutonomousValues.coralHP.text = "0"; + // main + AutonomousValues.autoStartPosition.text = "center"; + AutonomousValues.autoMobility.text = "no"; AutonomousValues.coralMissed.text = "0"; + AutonomousValues.coralHP.text = "0"; AutonomousValues.coralField.text = "0"; - TeleoperatedValues.speaker.text = "0"; - TeleoperatedValues.speakerMissed.text = "0"; - TeleoperatedValues.amp.text = "0"; - TeleoperatedValues.ampMissed.text = "0"; - AutonomousValues.autoMobility.text = "No"; - EndgameValues.endgame.text = "No"; - EndgameValues.climbTime.text = "0"; - EndgameValues.stopwatchState.text = "0"; - TeleoperatedValues.passes.text = "0"; - EndgameValues.trap.text = "0"; - EndgameValues.stopwatch.stop(); - EndgameValues.stopwatch.reset(); - CommentValues.autoComments.text = ""; - CommentValues.autoOrder.text = ""; - CommentValues.teleopComments.text = ""; - CommentValues.endgameComments.text = ""; + AutonomousValues.algaeRemoved.text = "0"; + AutonomousValues.algaeBarge.text = "0"; + AutonomousValues.algaeProcessor.text = "0"; + + // tough coral + AutonomousValues.l1E.text = "0"; + AutonomousValues.l1NE.text = "0"; + AutonomousValues.l1NW.text = "0"; + AutonomousValues.l1SE.text = "0"; + AutonomousValues.l1SW.text = "0"; + AutonomousValues.l1W.text = "0"; + + // L2 coral + AutonomousValues.l2A.text = "0"; + AutonomousValues.l2B.text = "0"; + AutonomousValues.l2C.text = "0"; + AutonomousValues.l2D.text = "0"; + AutonomousValues.l2E.text = "0"; + AutonomousValues.l2F.text = "0"; + AutonomousValues.l2G.text = "0"; + AutonomousValues.l2H.text = "0"; + AutonomousValues.l2I.text = "0"; + AutonomousValues.l2J.text = "0"; + AutonomousValues.l2K.text = "0"; + AutonomousValues.l2L.text = "0"; + + // L3 coral + AutonomousValues.l3A.text = "0"; + AutonomousValues.l3B.text = "0"; + AutonomousValues.l3C.text = "0"; + AutonomousValues.l3D.text = "0"; + AutonomousValues.l3E.text = "0"; + AutonomousValues.l3F.text = "0"; + AutonomousValues.l3G.text = "0"; + AutonomousValues.l3H.text = "0"; + AutonomousValues.l3I.text = "0"; + AutonomousValues.l3J.text = "0"; + AutonomousValues.l3K.text = "0"; + AutonomousValues.l3L.text = "0"; + + // L4 coral + AutonomousValues.l4A.text = "0"; + AutonomousValues.l4B.text = "0"; + AutonomousValues.l4C.text = "0"; + AutonomousValues.l4D.text = "0"; + AutonomousValues.l4E.text = "0"; + AutonomousValues.l4F.text = "0"; + AutonomousValues.l4G.text = "0"; + AutonomousValues.l4H.text = "0"; + AutonomousValues.l4I.text = "0"; + AutonomousValues.l4J.text = "0"; + AutonomousValues.l4K.text = "0"; + AutonomousValues.l4L.text = "0"; }); Navigator.of(context, rootNavigator: true).pop('dialog'); Navigator.push(context, MaterialPageRoute(builder: (context) { From 69a32dccc93a26bbf251c0056c9974ab6d2915e2 Mon Sep 17 00:00:00 2001 From: HoodieRocks Date: Sun, 12 Jan 2025 10:46:14 -0500 Subject: [PATCH 09/15] fix merging oversights --- lib/routes/auto/AutonomousDataRoute.dart | 34 +++++++++++++++++++++--- 1 file changed, 31 insertions(+), 3 deletions(-) diff --git a/lib/routes/auto/AutonomousDataRoute.dart b/lib/routes/auto/AutonomousDataRoute.dart index c2b11a4..d0aff58 100644 --- a/lib/routes/auto/AutonomousDataRoute.dart +++ b/lib/routes/auto/AutonomousDataRoute.dart @@ -16,12 +16,15 @@ import 'package:scouting_platform/routes/auto/fields/AutonomousRows.dart/Autonom 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/comments/CommentsRoute.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/AutonomousValues.dart'; +import 'package:scouting_platform/utils/data/values/CommentValues.dart'; +import 'package:scouting_platform/utils/data/values/EndgameValues.dart'; import 'package:scouting_platform/utils/data/values/PrematchValues.dart'; import 'package:scouting_platform/utils/data/values/SettingValues.dart'; +import 'package:scouting_platform/utils/data/values/TeleoperatedValues.dart'; import 'package:scouting_platform/utils/helpers/ScheduleHelper.dart'; import 'package:scouting_platform/utils/helpers/UIHelper.dart'; @@ -123,11 +126,11 @@ class _DataRouteState extends State { onPressed: () { Navigator.push(context, MaterialPageRoute(builder: (context) { - return const CommentsRoute(title: "Comments"); + return const TeleopRoute(title: "Comments"); })); }, child: const Text( - "Comments >", + "Teleop >", style: TextStyle( fontSize: 16.0, fontFamily: "Helvetica", @@ -238,6 +241,31 @@ class _DataRouteState extends State { AutonomousValues.l4J.text = "0"; AutonomousValues.l4K.text = "0"; AutonomousValues.l4L.text = "0"; + + TeleoperatedValues.coralNearL1.text = "0"; + TeleoperatedValues.coralNearL2.text = "0"; + TeleoperatedValues.coralNearL3.text = "0"; + TeleoperatedValues.coralNearL4.text = "0"; + TeleoperatedValues.coralFarL1.text = "0"; + TeleoperatedValues.coralFarL2.text = "0"; + TeleoperatedValues.coralFarL3.text = "0"; + TeleoperatedValues.coralFarL4.text = "0"; + TeleoperatedValues.coralMissed.text = "0"; + TeleoperatedValues.algaeRemoved.text = "0"; + TeleoperatedValues.algaeProcessor.text = "0"; + TeleoperatedValues.algaeBarge.text = "0"; + TeleoperatedValues.humanPlayerMisses.text = "0"; + TeleoperatedValues.fieldCrosses.text = "0"; + AutonomousValues.autoMobility.text = "No"; + EndgameValues.endgame.text = "No"; // was climb, now endgame + EndgameValues.climbTime.text = "0"; // parked was below + EndgameValues.stopwatchState.text = "0"; + EndgameValues.stopwatch.stop(); + EndgameValues.stopwatch.reset(); + CommentValues.autoComments.text = ""; + CommentValues.autoOrder.text = ""; + CommentValues.teleopComments.text = ""; + CommentValues.endgameComments.text = ""; }); Navigator.of(context, rootNavigator: true).pop('dialog'); Navigator.push(context, MaterialPageRoute(builder: (context) { From d06719607b1e4307142d09ec0bca6c2e9b9374f4 Mon Sep 17 00:00:00 2001 From: HoodieRocks Date: Sun, 12 Jan 2025 12:06:05 -0500 Subject: [PATCH 10/15] reorder teleop, move reset state --- lib/routes/auto/AutonomousDataRoute.dart | 116 +++----------- .../comments/fields/CommentsFields.dart | 24 +++ lib/routes/teleop/TeleopRoute.dart | 145 +++++------------- lib/routes/teleop/fields/EndgameFields.dart | 63 -------- .../teleop/fields/TeleoperatedFields.dart | 20 +-- .../teleop/fields/TeleoperatedFields2.dart | 28 +--- .../teleop/fields/TeleoperatedFields3.dart | 34 ++-- .../teleop/fields/TeleoperatedFields4.dart | 86 +++++++++++ lib/routes/teleop/labels/EndgameLabels.dart | 53 ------- .../teleop/labels/TeleoperatedLabels.dart | 35 +---- .../teleop/labels/TeleoperatedLabels2.dart | 38 +---- .../teleop/labels/TeleoperatedLabels3.dart | 27 +++- .../teleop/labels/TeleoperatedLabels4.dart | 98 ++++++++++++ lib/utils/helpers/AppDataHelper.dart | 107 +++++++++++++ 14 files changed, 436 insertions(+), 438 deletions(-) delete mode 100644 lib/routes/teleop/fields/EndgameFields.dart create mode 100644 lib/routes/teleop/fields/TeleoperatedFields4.dart delete mode 100644 lib/routes/teleop/labels/EndgameLabels.dart create mode 100644 lib/routes/teleop/labels/TeleoperatedLabels4.dart diff --git a/lib/routes/auto/AutonomousDataRoute.dart b/lib/routes/auto/AutonomousDataRoute.dart index d0aff58..0885fe7 100644 --- a/lib/routes/auto/AutonomousDataRoute.dart +++ b/lib/routes/auto/AutonomousDataRoute.dart @@ -25,6 +25,7 @@ import 'package:scouting_platform/utils/data/values/EndgameValues.dart'; import 'package:scouting_platform/utils/data/values/PrematchValues.dart'; import 'package:scouting_platform/utils/data/values/SettingValues.dart'; import 'package:scouting_platform/utils/data/values/TeleoperatedValues.dart'; +import 'package:scouting_platform/utils/helpers/AppDataHelper.dart'; import 'package:scouting_platform/utils/helpers/ScheduleHelper.dart'; import 'package:scouting_platform/utils/helpers/UIHelper.dart'; @@ -88,13 +89,27 @@ class _DataRouteState extends State { Row( mainAxisAlignment: MainAxisAlignment.end, children: [ - // TitleStyle( - // text: "L4", - // padding: const EdgeInsets.only( - // right: 0.0, bottom: 10.0)), - SizedBox( - width: 120.0, - ), + // reset button + ElevatedButton( + style: ElevatedButton.styleFrom( + minimumSize: const Size(150.0, 37.0), + backgroundColor: AppStyle.textInputColor, + ), + 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), // reset button ElevatedButton( @@ -115,7 +130,7 @@ class _DataRouteState extends State { ), ), - const SizedBox(width: 16.0), + const SizedBox(width: 8.0), // next page button ElevatedButton( @@ -182,90 +197,7 @@ class _DataRouteState extends State { } setState(() { - // main - AutonomousValues.autoStartPosition.text = "center"; - AutonomousValues.autoMobility.text = "no"; - AutonomousValues.coralMissed.text = "0"; - AutonomousValues.coralHP.text = "0"; - AutonomousValues.coralField.text = "0"; - AutonomousValues.algaeRemoved.text = "0"; - AutonomousValues.algaeBarge.text = "0"; - AutonomousValues.algaeProcessor.text = "0"; - - // tough coral - AutonomousValues.l1E.text = "0"; - AutonomousValues.l1NE.text = "0"; - AutonomousValues.l1NW.text = "0"; - AutonomousValues.l1SE.text = "0"; - AutonomousValues.l1SW.text = "0"; - AutonomousValues.l1W.text = "0"; - - // L2 coral - AutonomousValues.l2A.text = "0"; - AutonomousValues.l2B.text = "0"; - AutonomousValues.l2C.text = "0"; - AutonomousValues.l2D.text = "0"; - AutonomousValues.l2E.text = "0"; - AutonomousValues.l2F.text = "0"; - AutonomousValues.l2G.text = "0"; - AutonomousValues.l2H.text = "0"; - AutonomousValues.l2I.text = "0"; - AutonomousValues.l2J.text = "0"; - AutonomousValues.l2K.text = "0"; - AutonomousValues.l2L.text = "0"; - - // L3 coral - AutonomousValues.l3A.text = "0"; - AutonomousValues.l3B.text = "0"; - AutonomousValues.l3C.text = "0"; - AutonomousValues.l3D.text = "0"; - AutonomousValues.l3E.text = "0"; - AutonomousValues.l3F.text = "0"; - AutonomousValues.l3G.text = "0"; - AutonomousValues.l3H.text = "0"; - AutonomousValues.l3I.text = "0"; - AutonomousValues.l3J.text = "0"; - AutonomousValues.l3K.text = "0"; - AutonomousValues.l3L.text = "0"; - - // L4 coral - AutonomousValues.l4A.text = "0"; - AutonomousValues.l4B.text = "0"; - AutonomousValues.l4C.text = "0"; - AutonomousValues.l4D.text = "0"; - AutonomousValues.l4E.text = "0"; - AutonomousValues.l4F.text = "0"; - AutonomousValues.l4G.text = "0"; - AutonomousValues.l4H.text = "0"; - AutonomousValues.l4I.text = "0"; - AutonomousValues.l4J.text = "0"; - AutonomousValues.l4K.text = "0"; - AutonomousValues.l4L.text = "0"; - - TeleoperatedValues.coralNearL1.text = "0"; - TeleoperatedValues.coralNearL2.text = "0"; - TeleoperatedValues.coralNearL3.text = "0"; - TeleoperatedValues.coralNearL4.text = "0"; - TeleoperatedValues.coralFarL1.text = "0"; - TeleoperatedValues.coralFarL2.text = "0"; - TeleoperatedValues.coralFarL3.text = "0"; - TeleoperatedValues.coralFarL4.text = "0"; - TeleoperatedValues.coralMissed.text = "0"; - TeleoperatedValues.algaeRemoved.text = "0"; - TeleoperatedValues.algaeProcessor.text = "0"; - TeleoperatedValues.algaeBarge.text = "0"; - TeleoperatedValues.humanPlayerMisses.text = "0"; - TeleoperatedValues.fieldCrosses.text = "0"; - AutonomousValues.autoMobility.text = "No"; - EndgameValues.endgame.text = "No"; // was climb, now endgame - EndgameValues.climbTime.text = "0"; // parked was below - EndgameValues.stopwatchState.text = "0"; - EndgameValues.stopwatch.stop(); - EndgameValues.stopwatch.reset(); - CommentValues.autoComments.text = ""; - CommentValues.autoOrder.text = ""; - CommentValues.teleopComments.text = ""; - CommentValues.endgameComments.text = ""; + AppDataHelper.resetStates(); }); Navigator.of(context, rootNavigator: true).pop('dialog'); Navigator.push(context, MaterialPageRoute(builder: (context) { diff --git a/lib/routes/comments/fields/CommentsFields.dart b/lib/routes/comments/fields/CommentsFields.dart index 284c482..deaf686 100644 --- a/lib/routes/comments/fields/CommentsFields.dart +++ b/lib/routes/comments/fields/CommentsFields.dart @@ -2,6 +2,7 @@ import 'package:flutter/material.dart'; import 'package:scouting_platform/builders/bases/TextInputField.dart'; import 'package:scouting_platform/routes/qrcode/QRCodeRoute.dart'; +import 'package:scouting_platform/routes/teleop/TeleopRoute.dart'; import 'package:scouting_platform/styles/AppStyle.dart'; import 'package:scouting_platform/styles/components/TitleStyle.dart'; import 'package:scouting_platform/utils/data/values/CommentValues.dart'; @@ -97,6 +98,29 @@ class _CommentsFields extends State { fontSize: 24.0, fontFamily: "Helvetica", color: Colors.white)), + ))), + 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 TeleopRoute(title: "Teleop/Endgame"); + })); + }, + child: const Text("< Teleop/Endgame", + style: TextStyle( + fontSize: 24.0, + fontFamily: "Helvetica", + color: Colors.white)), ))) ], ); diff --git a/lib/routes/teleop/TeleopRoute.dart b/lib/routes/teleop/TeleopRoute.dart index ee71573..994f1de 100644 --- a/lib/routes/teleop/TeleopRoute.dart +++ b/lib/routes/teleop/TeleopRoute.dart @@ -1,24 +1,22 @@ // ignore_for_file: file_names import 'package:flutter/material.dart'; import 'package:scouting_platform/builders/PlatformRoute.dart'; +import 'package:scouting_platform/routes/auto/AutonomousDataRoute.dart'; import 'package:scouting_platform/routes/comments/CommentsRoute.dart'; +import 'package:scouting_platform/routes/prematch/PrematchRoute.dart'; import 'package:scouting_platform/routes/teleop/fields/TeleoperatedFields.dart'; import 'package:scouting_platform/routes/teleop/fields/TeleoperatedFields2.dart'; import 'package:scouting_platform/routes/teleop/fields/TeleoperatedFields3.dart'; +import 'package:scouting_platform/routes/teleop/fields/TeleoperatedFields4.dart'; import 'package:scouting_platform/routes/teleop/labels/TeleoperatedLabels.dart'; import 'package:scouting_platform/routes/teleop/labels/TeleoperatedLabels2.dart'; import 'package:scouting_platform/routes/teleop/labels/TeleoperatedLabels3.dart'; -import 'package:scouting_platform/routes/teleop/fields/EndgameFields.dart'; -import 'package:scouting_platform/routes/teleop/labels/EndgameLabels.dart'; -import 'package:scouting_platform/routes/prematch/PrematchRoute.dart'; +import 'package:scouting_platform/routes/teleop/labels/TeleoperatedLabels4.dart'; import 'package:scouting_platform/styles/AppStyle.dart'; -import 'package:scouting_platform/utils/helpers/ScheduleHelper.dart'; -import 'package:scouting_platform/utils/data/values/AutonomousValues.dart'; -import 'package:scouting_platform/utils/data/values/CommentValues.dart'; -import 'package:scouting_platform/utils/data/values/EndgameValues.dart'; import 'package:scouting_platform/utils/data/values/PrematchValues.dart'; import 'package:scouting_platform/utils/data/values/SettingValues.dart'; -import 'package:scouting_platform/utils/data/values/TeleoperatedValues.dart'; +import 'package:scouting_platform/utils/helpers/AppDataHelper.dart'; +import 'package:scouting_platform/utils/helpers/ScheduleHelper.dart'; import 'package:scouting_platform/utils/helpers/UIHelper.dart'; class TeleopRoute extends StatefulWidget { @@ -47,11 +45,10 @@ class _TeleopRouteState extends State { mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Padding( - padding: - const EdgeInsets.only(right: 50.0, top: 10.0, left: 125.0), + padding: const EdgeInsets.only(left: 20, top: 10.0), child: ElevatedButton( style: ElevatedButton.styleFrom( - minimumSize: const Size(150.0, 47.0), + minimumSize: const Size(150.0, 40.0), backgroundColor: AppStyle.textInputColor, ), onPressed: () { @@ -59,7 +56,7 @@ class _TeleopRouteState extends State { }, child: const Text("Reset", style: TextStyle( - fontSize: 16.0, + fontSize: 14.0, fontFamily: "Helvetica", color: Colors.white)), ), @@ -71,7 +68,30 @@ class _TeleopRouteState extends State { // height: 47.0, child: ElevatedButton( style: ElevatedButton.styleFrom( - minimumSize: const Size(150.0, 47.0), + minimumSize: const Size(150.0, 40.0), + 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: 14.0, + fontFamily: "Helvetica", + color: Colors.white)), + ))), + Align( + alignment: Alignment.bottomRight, + child: Container( + padding: const EdgeInsets.only(top: 4.0, right: 60), + // height: 47.0, + child: ElevatedButton( + style: ElevatedButton.styleFrom( + minimumSize: const Size(150.0, 40.0), backgroundColor: AppStyle .textInputColor, // Set the background color here ), @@ -83,20 +103,20 @@ class _TeleopRouteState extends State { }, child: const Text("Comments >", style: TextStyle( - fontSize: 16.0, + fontSize: 14.0, fontFamily: "Helvetica", color: Colors.white)), ))), ], ), - const TeleoperatedLabels(), - const TeleoperatedFields(), - const TeleoperatedLabels2(), - const TeleoperatedFields2(), + const TeleoperatedLabels4(), + const TeleoperatedFields4(), const TeleoperatedLabels3(), const TeleoperatedFields3(), - const EndgameLabels(), - const EndgameFields(), + const TeleoperatedLabels2(), + const TeleoperatedFields2(), + const TeleoperatedLabels(), + const TeleoperatedFields(), ]), ), ); @@ -131,90 +151,7 @@ class _TeleopRouteState extends State { } setState(() { - // main - AutonomousValues.autoStartPosition.text = "center"; - AutonomousValues.autoMobility.text = "no"; - AutonomousValues.coralMissed.text = "0"; - AutonomousValues.coralHP.text = "0"; - AutonomousValues.coralField.text = "0"; - AutonomousValues.algaeRemoved.text = "0"; - AutonomousValues.algaeBarge.text = "0"; - AutonomousValues.algaeProcessor.text = "0"; - - // tough coral - AutonomousValues.l1E.text = "0"; - AutonomousValues.l1NE.text = "0"; - AutonomousValues.l1NW.text = "0"; - AutonomousValues.l1SE.text = "0"; - AutonomousValues.l1SW.text = "0"; - AutonomousValues.l1W.text = "0"; - - // L2 coral - AutonomousValues.l2A.text = "0"; - AutonomousValues.l2B.text = "0"; - AutonomousValues.l2C.text = "0"; - AutonomousValues.l2D.text = "0"; - AutonomousValues.l2E.text = "0"; - AutonomousValues.l2F.text = "0"; - AutonomousValues.l2G.text = "0"; - AutonomousValues.l2H.text = "0"; - AutonomousValues.l2I.text = "0"; - AutonomousValues.l2J.text = "0"; - AutonomousValues.l2K.text = "0"; - AutonomousValues.l2L.text = "0"; - - // L3 coral - AutonomousValues.l3A.text = "0"; - AutonomousValues.l3B.text = "0"; - AutonomousValues.l3C.text = "0"; - AutonomousValues.l3D.text = "0"; - AutonomousValues.l3E.text = "0"; - AutonomousValues.l3F.text = "0"; - AutonomousValues.l3G.text = "0"; - AutonomousValues.l3H.text = "0"; - AutonomousValues.l3I.text = "0"; - AutonomousValues.l3J.text = "0"; - AutonomousValues.l3K.text = "0"; - AutonomousValues.l3L.text = "0"; - - // L4 coral - AutonomousValues.l4A.text = "0"; - AutonomousValues.l4B.text = "0"; - AutonomousValues.l4C.text = "0"; - AutonomousValues.l4D.text = "0"; - AutonomousValues.l4E.text = "0"; - AutonomousValues.l4F.text = "0"; - AutonomousValues.l4G.text = "0"; - AutonomousValues.l4H.text = "0"; - AutonomousValues.l4I.text = "0"; - AutonomousValues.l4J.text = "0"; - AutonomousValues.l4K.text = "0"; - AutonomousValues.l4L.text = "0"; - - TeleoperatedValues.coralNearL1.text = "0"; - TeleoperatedValues.coralNearL2.text = "0"; - TeleoperatedValues.coralNearL3.text = "0"; - TeleoperatedValues.coralNearL4.text = "0"; - TeleoperatedValues.coralFarL1.text = "0"; - TeleoperatedValues.coralFarL2.text = "0"; - TeleoperatedValues.coralFarL3.text = "0"; - TeleoperatedValues.coralFarL4.text = "0"; - TeleoperatedValues.coralMissed.text = "0"; - TeleoperatedValues.algaeRemoved.text = "0"; - TeleoperatedValues.algaeProcessor.text = "0"; - TeleoperatedValues.algaeBarge.text = "0"; - TeleoperatedValues.humanPlayerMisses.text = "0"; - TeleoperatedValues.fieldCrosses.text = "0"; - AutonomousValues.autoMobility.text = "No"; - EndgameValues.endgame.text = "No"; // was climb, now endgame - EndgameValues.climbTime.text = "0"; // parked was below - EndgameValues.stopwatchState.text = "0"; - EndgameValues.stopwatch.stop(); - EndgameValues.stopwatch.reset(); - CommentValues.autoComments.text = ""; - CommentValues.autoOrder.text = ""; - CommentValues.teleopComments.text = ""; - CommentValues.endgameComments.text = ""; + AppDataHelper.resetStates(); }); Navigator.of(context, rootNavigator: true).pop('dialog'); Navigator.push(context, MaterialPageRoute(builder: (context) { diff --git a/lib/routes/teleop/fields/EndgameFields.dart b/lib/routes/teleop/fields/EndgameFields.dart deleted file mode 100644 index 1f0dc04..0000000 --- a/lib/routes/teleop/fields/EndgameFields.dart +++ /dev/null @@ -1,63 +0,0 @@ -// ignore_for_file: file_names -import 'package:flutter/material.dart'; -import 'package:scouting_platform/builders/bases/PlatformDropdownMenu.dart'; -import 'package:scouting_platform/builders/bases/StopwatchButton.dart'; -import 'package:scouting_platform/utils/data/constants/OptionConstants.dart'; -import 'package:scouting_platform/utils/data/values/EndgameValues.dart'; - -class EndgameFields extends StatefulWidget { - const EndgameFields({ - super.key, - }); - - @override - State createState() => _EndgameFieldsState(); -} - -class _EndgameFieldsState extends State { - /// Increments an integer in a controllers value by one - void incrementNumber(TextEditingController controller) { - if (!mounted) return; - - int currentValue = int.parse(controller.text); - setState(() { - currentValue++; - controller.text = currentValue.toString(); - }); - } - - /// Decrements an integer in a controllers value by one unless it's 0 - void decrementNumber(TextEditingController controller) { - if (!mounted) return; - - int currentValue = int.parse(controller.text); - setState(() { - currentValue--; - controller.text = (currentValue > 0 ? currentValue : 0).toString(); - }); - } - - @override - Widget build(BuildContext context) { - return Row( - children: [ - //endgame dropdown - PlatformDropdownMenu( - dropdownMenuSelectedItem: EndgameValues.endgame.text, - onChanged: (value) { - setState(() { - EndgameValues.endgame.text = value; - }); - }, - dropdownItems: OptionConstants.endgameOptions, - margin: const EdgeInsets.only(left: 20)), - //climb time - StopwatchButton( - value: EndgameValues.climbTime, - state: EndgameValues.stopwatchState, - timer: EndgameValues.stopwatch, - ), - ], - ); - } -} diff --git a/lib/routes/teleop/fields/TeleoperatedFields.dart b/lib/routes/teleop/fields/TeleoperatedFields.dart index 2a10e65..de36961 100644 --- a/lib/routes/teleop/fields/TeleoperatedFields.dart +++ b/lib/routes/teleop/fields/TeleoperatedFields.dart @@ -48,25 +48,11 @@ class _TeleoperatedFieldsState extends State { incrementNumber(TeleoperatedValues.coralNearL1)), //coral l2 scored CounterNumberField( - controller: TeleoperatedValues.coralNearL2, + controller: TeleoperatedValues.coralFarL1, onTapDecrement: () => - decrementNumber(TeleoperatedValues.coralNearL2), + decrementNumber(TeleoperatedValues.coralFarL1), onTapIncrement: () => - incrementNumber(TeleoperatedValues.coralNearL2)), - //coral l3 scored - CounterNumberField( - controller: TeleoperatedValues.coralNearL3, - onTapDecrement: () => - decrementNumber(TeleoperatedValues.coralNearL3), - onTapIncrement: () => - incrementNumber(TeleoperatedValues.coralNearL3)), - //coral l4 scored - CounterNumberField( - controller: TeleoperatedValues.coralNearL4, - onTapDecrement: () => - decrementNumber(TeleoperatedValues.coralNearL4), - onTapIncrement: () => - incrementNumber(TeleoperatedValues.coralNearL4)), + incrementNumber(TeleoperatedValues.coralFarL1)), //coral missed CounterNumberField( controller: TeleoperatedValues.coralMissed, diff --git a/lib/routes/teleop/fields/TeleoperatedFields2.dart b/lib/routes/teleop/fields/TeleoperatedFields2.dart index de8725b..ebea5ea 100644 --- a/lib/routes/teleop/fields/TeleoperatedFields2.dart +++ b/lib/routes/teleop/fields/TeleoperatedFields2.dart @@ -41,11 +41,11 @@ class _TeleoperatedFields2State extends State { children: [ // coral far l1 CounterNumberField( - controller: TeleoperatedValues.coralFarL1, + controller: TeleoperatedValues.coralNearL2, onTapDecrement: () => - decrementNumber(TeleoperatedValues.coralFarL1), + decrementNumber(TeleoperatedValues.coralNearL2), onTapIncrement: () => - incrementNumber(TeleoperatedValues.coralFarL1)), + incrementNumber(TeleoperatedValues.coralNearL2)), // coral far l2 CounterNumberField( controller: TeleoperatedValues.coralFarL2, @@ -53,27 +53,13 @@ class _TeleoperatedFields2State extends State { decrementNumber(TeleoperatedValues.coralFarL2), onTapIncrement: () => incrementNumber(TeleoperatedValues.coralFarL2)), - // coral far l3 + //algae removed CounterNumberField( - controller: TeleoperatedValues.coralFarL3, + controller: TeleoperatedValues.algaeRemoved, onTapDecrement: () => - decrementNumber(TeleoperatedValues.coralFarL3), + decrementNumber(TeleoperatedValues.algaeRemoved), onTapIncrement: () => - incrementNumber(TeleoperatedValues.coralFarL3)), - // coral far l4 - CounterNumberField( - controller: TeleoperatedValues.coralFarL4, - onTapDecrement: () => - decrementNumber(TeleoperatedValues.coralFarL4), - onTapIncrement: () => - incrementNumber(TeleoperatedValues.coralFarL4)), - //algae barge - CounterNumberField( - controller: TeleoperatedValues.algaeBarge, - onTapDecrement: () => - decrementNumber(TeleoperatedValues.algaeBarge), - onTapIncrement: () => - incrementNumber(TeleoperatedValues.algaeBarge)), + incrementNumber(TeleoperatedValues.algaeRemoved)), ], ); } diff --git a/lib/routes/teleop/fields/TeleoperatedFields3.dart b/lib/routes/teleop/fields/TeleoperatedFields3.dart index a8dfaad..5d644ea 100644 --- a/lib/routes/teleop/fields/TeleoperatedFields3.dart +++ b/lib/routes/teleop/fields/TeleoperatedFields3.dart @@ -1,6 +1,8 @@ // ignore_for_file: file_names import 'package:flutter/material.dart'; import 'package:scouting_platform/builders/bases/CounterNumberField.dart'; +import 'package:scouting_platform/builders/bases/StopwatchButton.dart'; +import 'package:scouting_platform/utils/data/values/EndgameValues.dart'; import 'package:scouting_platform/utils/data/values/TeleoperatedValues.dart'; class TeleoperatedFields3 extends StatefulWidget { @@ -39,34 +41,40 @@ class _TeleoperatedFields3State extends State { Widget build(BuildContext context) { return Row( children: [ - //algae removed CounterNumberField( - controller: TeleoperatedValues.algaeRemoved, + controller: TeleoperatedValues.coralNearL3, onTapDecrement: () => - decrementNumber(TeleoperatedValues.algaeRemoved), + decrementNumber(TeleoperatedValues.coralNearL3), onTapIncrement: () => - incrementNumber(TeleoperatedValues.algaeRemoved)), - //algae processor + incrementNumber(TeleoperatedValues.coralNearL3)), + // coral far l3 + CounterNumberField( + controller: TeleoperatedValues.coralFarL3, + onTapDecrement: () => + decrementNumber(TeleoperatedValues.coralFarL3), + onTapIncrement: () => + incrementNumber(TeleoperatedValues.coralFarL3)), + //coral l3 scored + // human player misses CounterNumberField( controller: TeleoperatedValues.algaeProcessor, onTapDecrement: () => decrementNumber(TeleoperatedValues.algaeProcessor), onTapIncrement: () => incrementNumber(TeleoperatedValues.algaeProcessor)), - // human player misses + // field crosses CounterNumberField( controller: TeleoperatedValues.humanPlayerMisses, onTapDecrement: () => decrementNumber(TeleoperatedValues.humanPlayerMisses), onTapIncrement: () => incrementNumber(TeleoperatedValues.humanPlayerMisses)), - // field crosses - CounterNumberField( - controller: TeleoperatedValues.fieldCrosses, - onTapDecrement: () => - decrementNumber(TeleoperatedValues.fieldCrosses), - onTapIncrement: () => - incrementNumber(TeleoperatedValues.fieldCrosses)), + //climb time + StopwatchButton( + value: EndgameValues.climbTime, + state: EndgameValues.stopwatchState, + timer: EndgameValues.stopwatch, + ), ], ); } diff --git a/lib/routes/teleop/fields/TeleoperatedFields4.dart b/lib/routes/teleop/fields/TeleoperatedFields4.dart new file mode 100644 index 0000000..83db341 --- /dev/null +++ b/lib/routes/teleop/fields/TeleoperatedFields4.dart @@ -0,0 +1,86 @@ +// ignore_for_file: file_names +import 'package:flutter/material.dart'; +import 'package:scouting_platform/builders/bases/CounterNumberField.dart'; +import 'package:scouting_platform/builders/bases/PlatformDropdownMenu.dart'; +import 'package:scouting_platform/utils/data/constants/OptionConstants.dart'; +import 'package:scouting_platform/utils/data/values/EndgameValues.dart'; +import 'package:scouting_platform/utils/data/values/TeleoperatedValues.dart'; + +class TeleoperatedFields4 extends StatefulWidget { + const TeleoperatedFields4({ + super.key, + }); + + @override + State createState() => _TeleoperatedFields4State(); +} + +class _TeleoperatedFields4State extends State { + /// Increments an integer in a controllers value by one + void incrementNumber(TextEditingController controller) { + if (!mounted) return; + + int currentValue = int.parse(controller.text); + setState(() { + currentValue++; + controller.text = currentValue.toString(); + }); + } + + /// Decrements an integer in a controllers value by one unless it's 0 + void decrementNumber(TextEditingController controller) { + if (!mounted) return; + + int currentValue = int.parse(controller.text); + setState(() { + currentValue--; + controller.text = (currentValue > 0 ? currentValue : 0).toString(); + }); + } + + @override + Widget build(BuildContext context) { + return Row( + children: [ + //coral l4 scored + CounterNumberField( + controller: TeleoperatedValues.coralNearL4, + onTapDecrement: () => + decrementNumber(TeleoperatedValues.coralNearL4), + onTapIncrement: () => + incrementNumber(TeleoperatedValues.coralNearL4)), + // coral far l4 + CounterNumberField( + controller: TeleoperatedValues.coralFarL4, + onTapDecrement: () => + decrementNumber(TeleoperatedValues.coralFarL4), + onTapIncrement: () => + incrementNumber(TeleoperatedValues.coralFarL4)), + //algae removed + CounterNumberField( + controller: TeleoperatedValues.algaeBarge, + onTapDecrement: () => + decrementNumber(TeleoperatedValues.algaeBarge), + onTapIncrement: () => + incrementNumber(TeleoperatedValues.algaeBarge)), + //algae processor + CounterNumberField( + controller: TeleoperatedValues.fieldCrosses, + onTapDecrement: () => + decrementNumber(TeleoperatedValues.fieldCrosses), + onTapIncrement: () => + incrementNumber(TeleoperatedValues.fieldCrosses)), + //endgame dropdown + PlatformDropdownMenu( + dropdownMenuSelectedItem: EndgameValues.endgame.text, + onChanged: (value) { + setState(() { + EndgameValues.endgame.text = value; + }); + }, + dropdownItems: OptionConstants.endgameOptions, + margin: const EdgeInsets.only(left: 20)), + ], + ); + } +} diff --git a/lib/routes/teleop/labels/EndgameLabels.dart b/lib/routes/teleop/labels/EndgameLabels.dart deleted file mode 100644 index b9cd074..0000000 --- a/lib/routes/teleop/labels/EndgameLabels.dart +++ /dev/null @@ -1,53 +0,0 @@ -// ignore_for_file: file_names -import 'package:flutter/material.dart'; - -class EndgameLabels extends StatefulWidget { - const EndgameLabels({ - super.key, - }); - - @override - State createState() => _EndgameLabelsState(); -} - -class _EndgameLabelsState extends State { - @override - Widget build(BuildContext context) { - return Row( - children: [ - //climbing - Align( - alignment: Alignment.centerLeft, - child: Container( - width: 170.0, - padding: const EdgeInsets.only(left: 20.0, top: 20.0), - child: const Text( - "Endgame", - textAlign: TextAlign.left, - style: TextStyle( - color: Colors.white, - fontWeight: FontWeight.bold, - fontSize: 15.0), - ), - )), - //climb time - Align( - alignment: Alignment.centerLeft, - child: Container( - width: 170.0, - margin: const EdgeInsets.only(left: 55.0), - padding: const EdgeInsets.only(left: 20.0, top: 20.0), - child: const Text( - "Climb Time", - textAlign: TextAlign.left, - style: TextStyle( - color: Colors.white, - fontWeight: FontWeight.bold, - fontSize: 15.0), - ), - )), - const Divider(), - ], - ); - } -} diff --git a/lib/routes/teleop/labels/TeleoperatedLabels.dart b/lib/routes/teleop/labels/TeleoperatedLabels.dart index be03f22..fbf26ae 100644 --- a/lib/routes/teleop/labels/TeleoperatedLabels.dart +++ b/lib/routes/teleop/labels/TeleoperatedLabels.dart @@ -25,7 +25,7 @@ class _TeleoperatedLabelsState extends State { top: 20.0, ), child: const Text( - "Coral L1 Near Scored", + "L1 Coral Near", textAlign: TextAlign.left, style: TextStyle( color: Colors.white, @@ -40,38 +40,7 @@ class _TeleoperatedLabelsState extends State { width: 170.0, padding: const EdgeInsets.only(left: 20.0, top: 20.0), child: const Text( - "Coral L2 Near Scored", - textAlign: TextAlign.left, - style: TextStyle( - color: Colors.white, - fontWeight: FontWeight.bold, - fontSize: 15.0), - ), - )), - //coral l3 - Align( - alignment: Alignment.centerLeft, - child: Container( - width: 170.0, - padding: const EdgeInsets.only(left: 20.0, top: 20.0), - child: const Text( - "Coral L3 Near Scored", - textAlign: TextAlign.left, - style: TextStyle( - color: Colors.white, - fontWeight: FontWeight.bold, - fontSize: 15.0), - ), - )), - // coral l4 - Align( - alignment: Alignment.centerLeft, - child: Container( - width: 170.0, - padding: - const EdgeInsets.only(left: 20.0, top: 20.0, right: 30.0), - child: const Text( - "Coral L4 Near Scored", + "L1 Coral Far", textAlign: TextAlign.left, style: TextStyle( color: Colors.white, diff --git a/lib/routes/teleop/labels/TeleoperatedLabels2.dart b/lib/routes/teleop/labels/TeleoperatedLabels2.dart index 6d84e05..7243c12 100644 --- a/lib/routes/teleop/labels/TeleoperatedLabels2.dart +++ b/lib/routes/teleop/labels/TeleoperatedLabels2.dart @@ -23,7 +23,7 @@ class _TeleoperatedLabels2State extends State { padding: const EdgeInsets.only(left: 20.0, top: 20.0, right: 30.0), child: const Text( - "Coral L1 Far Scored", + "L2 Coral Near", textAlign: TextAlign.left, style: TextStyle( color: Colors.white, @@ -39,7 +39,7 @@ class _TeleoperatedLabels2State extends State { padding: const EdgeInsets.only(left: 20.0, top: 20.0, right: 30.0), child: const Text( - "Coral L2 Far Scored", + "L2 Coral Far", textAlign: TextAlign.left, style: TextStyle( color: Colors.white, @@ -55,39 +55,7 @@ class _TeleoperatedLabels2State extends State { padding: const EdgeInsets.only(left: 20.0, top: 20.0, right: 30.0), child: const Text( - "Coral L3 Far Scored", - textAlign: TextAlign.left, - style: TextStyle( - color: Colors.white, - fontWeight: FontWeight.bold, - fontSize: 15.0), - ), - )), - // coral l4 far scored - Align( - alignment: Alignment.centerLeft, - child: Container( - width: 170.0, - padding: - const EdgeInsets.only(left: 20.0, top: 20.0, right: 30.0), - child: const Text( - "Coral L4 Far Scored", - textAlign: TextAlign.left, - style: TextStyle( - color: Colors.white, - fontWeight: FontWeight.bold, - fontSize: 15.0), - ), - )), - // algae barge - Align( - alignment: Alignment.centerLeft, - child: Container( - width: 170.0, - padding: - const EdgeInsets.only(left: 20.0, top: 20.0, right: 30.0), - child: const Text( - "Algae Barge", + "Algae Removed", textAlign: TextAlign.left, style: TextStyle( color: Colors.white, diff --git a/lib/routes/teleop/labels/TeleoperatedLabels3.dart b/lib/routes/teleop/labels/TeleoperatedLabels3.dart index c204f0b..235ef02 100644 --- a/lib/routes/teleop/labels/TeleoperatedLabels3.dart +++ b/lib/routes/teleop/labels/TeleoperatedLabels3.dart @@ -23,7 +23,7 @@ class _TeleoperatedLabels3State extends State { padding: const EdgeInsets.only(left: 20.0, top: 20.0, right: 30.0), child: const Text( - "Algae Removed", + "L3 Coral Near", textAlign: TextAlign.left, style: TextStyle( color: Colors.white, @@ -33,6 +33,21 @@ class _TeleoperatedLabels3State extends State { )), // algae processor Align( + alignment: Alignment.centerLeft, + child: Container( + width: 170.0, + padding: + const EdgeInsets.only(left: 20.0, top: 20.0, right: 30.0), + child: const Text( + "L3 Coral Far", + textAlign: TextAlign.left, + style: TextStyle( + color: Colors.white, + fontWeight: FontWeight.bold, + fontSize: 15.0), + ), + )), + Align( alignment: Alignment.centerLeft, child: Container( width: 170.0, @@ -47,15 +62,14 @@ class _TeleoperatedLabels3State extends State { fontSize: 15.0), ), )), - // human player misses - Align( + Align( alignment: Alignment.centerLeft, child: Container( width: 170.0, padding: const EdgeInsets.only(left: 20.0, top: 20.0, right: 30.0), child: const Text( - "Human Player Misses", + "HP Misses", textAlign: TextAlign.left, style: TextStyle( color: Colors.white, @@ -63,15 +77,14 @@ class _TeleoperatedLabels3State extends State { fontSize: 15.0), ), )), - // field crosses - Align( + Align( alignment: Alignment.centerLeft, child: Container( width: 170.0, padding: const EdgeInsets.only(left: 20.0, top: 20.0, right: 30.0), child: const Text( - "Field Crosses", + "Climb Time", textAlign: TextAlign.left, style: TextStyle( color: Colors.white, diff --git a/lib/routes/teleop/labels/TeleoperatedLabels4.dart b/lib/routes/teleop/labels/TeleoperatedLabels4.dart new file mode 100644 index 0000000..b5cebf6 --- /dev/null +++ b/lib/routes/teleop/labels/TeleoperatedLabels4.dart @@ -0,0 +1,98 @@ +// ignore_for_file: file_names +import 'package:flutter/material.dart'; + +class TeleoperatedLabels4 extends StatefulWidget { + const TeleoperatedLabels4({ + super.key, + }); + + @override + State createState() => _TeleoperatedLabels4State(); +} + +class _TeleoperatedLabels4State extends State { + @override + Widget build(BuildContext context) { + return Row( + children: [ + //coral l3 + Align( + alignment: Alignment.centerLeft, + child: Container( + width: 170.0, + padding: const EdgeInsets.only(left: 20.0, top: 20.0), + child: const Text( + "L4 Coral Near", + textAlign: TextAlign.left, + style: TextStyle( + color: Colors.white, + fontWeight: FontWeight.bold, + fontSize: 15.0), + ), + )), + // coral l4 + Align( + alignment: Alignment.centerLeft, + child: Container( + width: 170.0, + padding: + const EdgeInsets.only(left: 20.0, top: 20.0, right: 30.0), + child: const Text( + "L4 Coral Far", + textAlign: TextAlign.left, + style: TextStyle( + color: Colors.white, + fontWeight: FontWeight.bold, + fontSize: 15.0), + ), + )), + Align( + alignment: Alignment.centerLeft, + child: Container( + width: 170.0, + padding: + const EdgeInsets.only(left: 20.0, top: 20.0, right: 30.0), + child: const Text( + "Algae Barge", + textAlign: TextAlign.left, + style: TextStyle( + color: Colors.white, + fontWeight: FontWeight.bold, + fontSize: 15.0), + ), + )), + Align( + alignment: Alignment.centerLeft, + child: Container( + width: 170.0, + padding: + const EdgeInsets.only(left: 20.0, top: 20.0, right: 30.0), + child: const Text( + "Field Crosses", + textAlign: TextAlign.left, + style: TextStyle( + color: Colors.white, + fontWeight: FontWeight.bold, + fontSize: 15.0), + ), + )), + Align( + alignment: Alignment.centerLeft, + child: Container( + width: 170.0, + padding: + const EdgeInsets.only(left: 20.0, top: 20.0, right: 30.0), + child: const Text( + "Endgame", + textAlign: TextAlign.left, + style: TextStyle( + color: Colors.white, + fontWeight: FontWeight.bold, + fontSize: 15.0), + ), + )), + const Divider(), + ], + ); + } +} diff --git a/lib/utils/helpers/AppDataHelper.dart b/lib/utils/helpers/AppDataHelper.dart index 90efa81..cfcbe90 100644 --- a/lib/utils/helpers/AppDataHelper.dart +++ b/lib/utils/helpers/AppDataHelper.dart @@ -3,7 +3,11 @@ import 'dart:io'; import 'package:permission_handler/permission_handler.dart'; import 'package:scouting_platform/utils/data/constants/AppConstants.dart'; +import 'package:scouting_platform/utils/data/values/AutonomousValues.dart'; +import 'package:scouting_platform/utils/data/values/CommentValues.dart'; +import 'package:scouting_platform/utils/data/values/EndgameValues.dart'; import 'package:scouting_platform/utils/data/values/SettingValues.dart'; +import 'package:scouting_platform/utils/data/values/TeleoperatedValues.dart'; class AppDataHelper { // Save the current event ID to a file called "current_event_id.txt" @@ -32,4 +36,107 @@ class AppDataHelper { throw Exception('Permission denied'); } } + + static void resetStates() { + resetAutoEtcValues(); + resetAutoReef(); + resetTeleopValues(); + resetEndgameValues(); + resetComments(); + } + + static void resetAutoEtcValues() { + AutonomousValues.autoStartPosition.text = "Center"; + AutonomousValues.autoMobility.text = "No"; + AutonomousValues.coralMissed.text = "0"; + AutonomousValues.coralHP.text = "0"; + AutonomousValues.coralField.text = "0"; + AutonomousValues.algaeRemoved.text = "0"; + AutonomousValues.algaeBarge.text = "0"; + AutonomousValues.algaeProcessor.text = "0"; + } + + static void resetAutoReef() { + // tough coral + AutonomousValues.l1E.text = "0"; + AutonomousValues.l1NE.text = "0"; + AutonomousValues.l1NW.text = "0"; + AutonomousValues.l1SE.text = "0"; + AutonomousValues.l1SW.text = "0"; + AutonomousValues.l1W.text = "0"; + + // L2 coral + AutonomousValues.l2A.text = "0"; + AutonomousValues.l2B.text = "0"; + AutonomousValues.l2C.text = "0"; + AutonomousValues.l2D.text = "0"; + AutonomousValues.l2E.text = "0"; + AutonomousValues.l2F.text = "0"; + AutonomousValues.l2G.text = "0"; + AutonomousValues.l2H.text = "0"; + AutonomousValues.l2I.text = "0"; + AutonomousValues.l2J.text = "0"; + AutonomousValues.l2K.text = "0"; + AutonomousValues.l2L.text = "0"; + + // L3 coral + AutonomousValues.l3A.text = "0"; + AutonomousValues.l3B.text = "0"; + AutonomousValues.l3C.text = "0"; + AutonomousValues.l3D.text = "0"; + AutonomousValues.l3E.text = "0"; + AutonomousValues.l3F.text = "0"; + AutonomousValues.l3G.text = "0"; + AutonomousValues.l3H.text = "0"; + AutonomousValues.l3I.text = "0"; + AutonomousValues.l3J.text = "0"; + AutonomousValues.l3K.text = "0"; + AutonomousValues.l3L.text = "0"; + + // L4 coral + AutonomousValues.l4A.text = "0"; + AutonomousValues.l4B.text = "0"; + AutonomousValues.l4C.text = "0"; + AutonomousValues.l4D.text = "0"; + AutonomousValues.l4E.text = "0"; + AutonomousValues.l4F.text = "0"; + AutonomousValues.l4G.text = "0"; + AutonomousValues.l4H.text = "0"; + AutonomousValues.l4I.text = "0"; + AutonomousValues.l4J.text = "0"; + AutonomousValues.l4K.text = "0"; + AutonomousValues.l4L.text = "0"; + } + + static void resetTeleopValues() { + TeleoperatedValues.coralNearL1.text = "0"; + TeleoperatedValues.coralNearL2.text = "0"; + TeleoperatedValues.coralNearL3.text = "0"; + TeleoperatedValues.coralNearL4.text = "0"; + TeleoperatedValues.coralFarL1.text = "0"; + TeleoperatedValues.coralFarL2.text = "0"; + TeleoperatedValues.coralFarL3.text = "0"; + TeleoperatedValues.coralFarL4.text = "0"; + TeleoperatedValues.coralMissed.text = "0"; + TeleoperatedValues.algaeRemoved.text = "0"; + TeleoperatedValues.algaeProcessor.text = "0"; + TeleoperatedValues.algaeBarge.text = "0"; + TeleoperatedValues.humanPlayerMisses.text = "0"; + TeleoperatedValues.fieldCrosses.text = "0"; + } + + static void resetEndgameValues() { + EndgameValues.endgame.text = "No"; // was climb, now endgame + EndgameValues.climbTime.text = "0"; // parked was below + EndgameValues.stopwatchState.text = "0"; + EndgameValues.stopwatch.stop(); + EndgameValues.stopwatch.reset(); + } + + static void resetComments() { + CommentValues.autoComments.text = ""; + CommentValues.autoOrder.text = ""; + CommentValues.teleopComments.text = ""; + CommentValues.endgameComments.text = ""; + } } From 056a2dc50e6e91c885e52aeaa2d2243debb2f82e Mon Sep 17 00:00:00 2001 From: HoodieRocks Date: Sun, 12 Jan 2025 13:29:52 -0500 Subject: [PATCH 11/15] fix endgame options, add additional scout data --- lib/routes/auto/AutonomousDataRoute.dart | 14 +++ .../AutonomousRightRow3.dart | 1 - lib/routes/auto/fields/EndgameFields.dart | 63 ----------- .../auto/fields/TeleoperatedFields.dart | 80 -------------- .../auto/fields/TeleoperatedFields2.dart | 80 -------------- .../auto/fields/TeleoperatedFields3.dart | 73 ------------- lib/routes/auto/labels/EndgameLabels.dart | 53 --------- .../auto/labels/TeleoperatedLabels.dart | 102 ------------------ .../auto/labels/TeleoperatedLabels2.dart | 102 ------------------ .../auto/labels/TeleoperatedLabels3.dart | 86 --------------- .../prematch/fields/PrematchFields.dart | 2 +- lib/routes/teleop/TeleopRoute.dart | 14 +++ lib/utils/data/constants/AppConstants.dart | 4 +- lib/utils/data/constants/OptionConstants.dart | 2 +- 14 files changed, 32 insertions(+), 644 deletions(-) delete mode 100644 lib/routes/auto/fields/EndgameFields.dart delete mode 100644 lib/routes/auto/fields/TeleoperatedFields.dart delete mode 100644 lib/routes/auto/fields/TeleoperatedFields2.dart delete mode 100644 lib/routes/auto/fields/TeleoperatedFields3.dart delete mode 100644 lib/routes/auto/labels/EndgameLabels.dart delete mode 100644 lib/routes/auto/labels/TeleoperatedLabels.dart delete mode 100644 lib/routes/auto/labels/TeleoperatedLabels2.dart delete mode 100644 lib/routes/auto/labels/TeleoperatedLabels3.dart diff --git a/lib/routes/auto/AutonomousDataRoute.dart b/lib/routes/auto/AutonomousDataRoute.dart index 0885fe7..ba2e462 100644 --- a/lib/routes/auto/AutonomousDataRoute.dart +++ b/lib/routes/auto/AutonomousDataRoute.dart @@ -155,6 +155,20 @@ class _DataRouteState extends State { ), ], ), + Align( + alignment: Alignment.centerLeft, + child: Container( + width: 400.0, + padding: const EdgeInsets.only(top: 20.0, right: 0.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), + ), + )), // various right side data entry and labels const AutonomousRightLabel1(), const AutonomousRightRow1(), diff --git a/lib/routes/auto/fields/AutonomousRightRows/AutonomousRightRow3.dart b/lib/routes/auto/fields/AutonomousRightRows/AutonomousRightRow3.dart index 2b0a199..a5d96c5 100644 --- a/lib/routes/auto/fields/AutonomousRightRows/AutonomousRightRow3.dart +++ b/lib/routes/auto/fields/AutonomousRightRows/AutonomousRightRow3.dart @@ -2,7 +2,6 @@ import 'package:flutter/material.dart'; import 'package:scouting_platform/builders/bases/CounterNumberField.dart'; import 'package:scouting_platform/utils/data/values/AutonomousValues.dart'; - class AutonomousRightRow3 extends StatefulWidget { const AutonomousRightRow3({ super.key, diff --git a/lib/routes/auto/fields/EndgameFields.dart b/lib/routes/auto/fields/EndgameFields.dart deleted file mode 100644 index 1f0dc04..0000000 --- a/lib/routes/auto/fields/EndgameFields.dart +++ /dev/null @@ -1,63 +0,0 @@ -// ignore_for_file: file_names -import 'package:flutter/material.dart'; -import 'package:scouting_platform/builders/bases/PlatformDropdownMenu.dart'; -import 'package:scouting_platform/builders/bases/StopwatchButton.dart'; -import 'package:scouting_platform/utils/data/constants/OptionConstants.dart'; -import 'package:scouting_platform/utils/data/values/EndgameValues.dart'; - -class EndgameFields extends StatefulWidget { - const EndgameFields({ - super.key, - }); - - @override - State createState() => _EndgameFieldsState(); -} - -class _EndgameFieldsState extends State { - /// Increments an integer in a controllers value by one - void incrementNumber(TextEditingController controller) { - if (!mounted) return; - - int currentValue = int.parse(controller.text); - setState(() { - currentValue++; - controller.text = currentValue.toString(); - }); - } - - /// Decrements an integer in a controllers value by one unless it's 0 - void decrementNumber(TextEditingController controller) { - if (!mounted) return; - - int currentValue = int.parse(controller.text); - setState(() { - currentValue--; - controller.text = (currentValue > 0 ? currentValue : 0).toString(); - }); - } - - @override - Widget build(BuildContext context) { - return Row( - children: [ - //endgame dropdown - PlatformDropdownMenu( - dropdownMenuSelectedItem: EndgameValues.endgame.text, - onChanged: (value) { - setState(() { - EndgameValues.endgame.text = value; - }); - }, - dropdownItems: OptionConstants.endgameOptions, - margin: const EdgeInsets.only(left: 20)), - //climb time - StopwatchButton( - value: EndgameValues.climbTime, - state: EndgameValues.stopwatchState, - timer: EndgameValues.stopwatch, - ), - ], - ); - } -} diff --git a/lib/routes/auto/fields/TeleoperatedFields.dart b/lib/routes/auto/fields/TeleoperatedFields.dart deleted file mode 100644 index 2a10e65..0000000 --- a/lib/routes/auto/fields/TeleoperatedFields.dart +++ /dev/null @@ -1,80 +0,0 @@ -// ignore_for_file: file_names -import 'package:flutter/material.dart'; -import 'package:scouting_platform/builders/bases/CounterNumberField.dart'; -import 'package:scouting_platform/utils/data/values/TeleoperatedValues.dart'; - -class TeleoperatedFields extends StatefulWidget { - const TeleoperatedFields({ - super.key, - }); - - @override - State createState() => _TeleoperatedFieldsState(); -} - -class _TeleoperatedFieldsState extends State { - /// Increments an integer in a controllers value by one - void incrementNumber(TextEditingController controller) { - if (!mounted) return; - - int currentValue = int.parse(controller.text); - setState(() { - currentValue++; - controller.text = currentValue.toString(); - }); - } - - /// Decrements an integer in a controllers value by one unless it's 0 - void decrementNumber(TextEditingController controller) { - if (!mounted) return; - - int currentValue = int.parse(controller.text); - setState(() { - currentValue--; - controller.text = (currentValue > 0 ? currentValue : 0).toString(); - }); - } - - @override - Widget build(BuildContext context) { - return Row( - children: [ - //coral l1 scored - CounterNumberField( - controller: TeleoperatedValues.coralNearL1, - onTapDecrement: () => - decrementNumber(TeleoperatedValues.coralNearL1), - onTapIncrement: () => - incrementNumber(TeleoperatedValues.coralNearL1)), - //coral l2 scored - CounterNumberField( - controller: TeleoperatedValues.coralNearL2, - onTapDecrement: () => - decrementNumber(TeleoperatedValues.coralNearL2), - onTapIncrement: () => - incrementNumber(TeleoperatedValues.coralNearL2)), - //coral l3 scored - CounterNumberField( - controller: TeleoperatedValues.coralNearL3, - onTapDecrement: () => - decrementNumber(TeleoperatedValues.coralNearL3), - onTapIncrement: () => - incrementNumber(TeleoperatedValues.coralNearL3)), - //coral l4 scored - CounterNumberField( - controller: TeleoperatedValues.coralNearL4, - onTapDecrement: () => - decrementNumber(TeleoperatedValues.coralNearL4), - onTapIncrement: () => - incrementNumber(TeleoperatedValues.coralNearL4)), - //coral missed - CounterNumberField( - controller: TeleoperatedValues.coralMissed, - onTapDecrement: () => - decrementNumber(TeleoperatedValues.coralMissed), - onTapIncrement: () => - incrementNumber(TeleoperatedValues.coralMissed)), - ], - ); - } -} diff --git a/lib/routes/auto/fields/TeleoperatedFields2.dart b/lib/routes/auto/fields/TeleoperatedFields2.dart deleted file mode 100644 index de8725b..0000000 --- a/lib/routes/auto/fields/TeleoperatedFields2.dart +++ /dev/null @@ -1,80 +0,0 @@ -// ignore_for_file: file_names -import 'package:flutter/material.dart'; -import 'package:scouting_platform/builders/bases/CounterNumberField.dart'; -import 'package:scouting_platform/utils/data/values/TeleoperatedValues.dart'; - -class TeleoperatedFields2 extends StatefulWidget { - const TeleoperatedFields2({ - super.key, - }); - - @override - State createState() => _TeleoperatedFields2State(); -} - -class _TeleoperatedFields2State extends State { - /// Increments an integer in a controllers value by one - void incrementNumber(TextEditingController controller) { - if (!mounted) return; - - int currentValue = int.parse(controller.text); - setState(() { - currentValue++; - controller.text = currentValue.toString(); - }); - } - - /// Decrements an integer in a controllers value by one unless it's 0 - void decrementNumber(TextEditingController controller) { - if (!mounted) return; - - int currentValue = int.parse(controller.text); - setState(() { - currentValue--; - controller.text = (currentValue > 0 ? currentValue : 0).toString(); - }); - } - - @override - Widget build(BuildContext context) { - return Row( - children: [ - // coral far l1 - CounterNumberField( - controller: TeleoperatedValues.coralFarL1, - onTapDecrement: () => - decrementNumber(TeleoperatedValues.coralFarL1), - onTapIncrement: () => - incrementNumber(TeleoperatedValues.coralFarL1)), - // coral far l2 - CounterNumberField( - controller: TeleoperatedValues.coralFarL2, - onTapDecrement: () => - decrementNumber(TeleoperatedValues.coralFarL2), - onTapIncrement: () => - incrementNumber(TeleoperatedValues.coralFarL2)), - // coral far l3 - CounterNumberField( - controller: TeleoperatedValues.coralFarL3, - onTapDecrement: () => - decrementNumber(TeleoperatedValues.coralFarL3), - onTapIncrement: () => - incrementNumber(TeleoperatedValues.coralFarL3)), - // coral far l4 - CounterNumberField( - controller: TeleoperatedValues.coralFarL4, - onTapDecrement: () => - decrementNumber(TeleoperatedValues.coralFarL4), - onTapIncrement: () => - incrementNumber(TeleoperatedValues.coralFarL4)), - //algae barge - CounterNumberField( - controller: TeleoperatedValues.algaeBarge, - onTapDecrement: () => - decrementNumber(TeleoperatedValues.algaeBarge), - onTapIncrement: () => - incrementNumber(TeleoperatedValues.algaeBarge)), - ], - ); - } -} diff --git a/lib/routes/auto/fields/TeleoperatedFields3.dart b/lib/routes/auto/fields/TeleoperatedFields3.dart deleted file mode 100644 index a8dfaad..0000000 --- a/lib/routes/auto/fields/TeleoperatedFields3.dart +++ /dev/null @@ -1,73 +0,0 @@ -// ignore_for_file: file_names -import 'package:flutter/material.dart'; -import 'package:scouting_platform/builders/bases/CounterNumberField.dart'; -import 'package:scouting_platform/utils/data/values/TeleoperatedValues.dart'; - -class TeleoperatedFields3 extends StatefulWidget { - const TeleoperatedFields3({ - super.key, - }); - - @override - State createState() => _TeleoperatedFields3State(); -} - -class _TeleoperatedFields3State extends State { - /// Increments an integer in a controllers value by one - void incrementNumber(TextEditingController controller) { - if (!mounted) return; - - int currentValue = int.parse(controller.text); - setState(() { - currentValue++; - controller.text = currentValue.toString(); - }); - } - - /// Decrements an integer in a controllers value by one unless it's 0 - void decrementNumber(TextEditingController controller) { - if (!mounted) return; - - int currentValue = int.parse(controller.text); - setState(() { - currentValue--; - controller.text = (currentValue > 0 ? currentValue : 0).toString(); - }); - } - - @override - Widget build(BuildContext context) { - return Row( - children: [ - //algae removed - CounterNumberField( - controller: TeleoperatedValues.algaeRemoved, - onTapDecrement: () => - decrementNumber(TeleoperatedValues.algaeRemoved), - onTapIncrement: () => - incrementNumber(TeleoperatedValues.algaeRemoved)), - //algae processor - CounterNumberField( - controller: TeleoperatedValues.algaeProcessor, - onTapDecrement: () => - decrementNumber(TeleoperatedValues.algaeProcessor), - onTapIncrement: () => - incrementNumber(TeleoperatedValues.algaeProcessor)), - // human player misses - CounterNumberField( - controller: TeleoperatedValues.humanPlayerMisses, - onTapDecrement: () => - decrementNumber(TeleoperatedValues.humanPlayerMisses), - onTapIncrement: () => - incrementNumber(TeleoperatedValues.humanPlayerMisses)), - // field crosses - CounterNumberField( - controller: TeleoperatedValues.fieldCrosses, - onTapDecrement: () => - decrementNumber(TeleoperatedValues.fieldCrosses), - onTapIncrement: () => - incrementNumber(TeleoperatedValues.fieldCrosses)), - ], - ); - } -} diff --git a/lib/routes/auto/labels/EndgameLabels.dart b/lib/routes/auto/labels/EndgameLabels.dart deleted file mode 100644 index b9cd074..0000000 --- a/lib/routes/auto/labels/EndgameLabels.dart +++ /dev/null @@ -1,53 +0,0 @@ -// ignore_for_file: file_names -import 'package:flutter/material.dart'; - -class EndgameLabels extends StatefulWidget { - const EndgameLabels({ - super.key, - }); - - @override - State createState() => _EndgameLabelsState(); -} - -class _EndgameLabelsState extends State { - @override - Widget build(BuildContext context) { - return Row( - children: [ - //climbing - Align( - alignment: Alignment.centerLeft, - child: Container( - width: 170.0, - padding: const EdgeInsets.only(left: 20.0, top: 20.0), - child: const Text( - "Endgame", - textAlign: TextAlign.left, - style: TextStyle( - color: Colors.white, - fontWeight: FontWeight.bold, - fontSize: 15.0), - ), - )), - //climb time - Align( - alignment: Alignment.centerLeft, - child: Container( - width: 170.0, - margin: const EdgeInsets.only(left: 55.0), - padding: const EdgeInsets.only(left: 20.0, top: 20.0), - child: const Text( - "Climb Time", - textAlign: TextAlign.left, - style: TextStyle( - color: Colors.white, - fontWeight: FontWeight.bold, - fontSize: 15.0), - ), - )), - const Divider(), - ], - ); - } -} diff --git a/lib/routes/auto/labels/TeleoperatedLabels.dart b/lib/routes/auto/labels/TeleoperatedLabels.dart deleted file mode 100644 index be03f22..0000000 --- a/lib/routes/auto/labels/TeleoperatedLabels.dart +++ /dev/null @@ -1,102 +0,0 @@ -// ignore_for_file: file_names -import 'package:flutter/material.dart'; - -class TeleoperatedLabels extends StatefulWidget { - const TeleoperatedLabels({ - super.key, - }); - - @override - State createState() => _TeleoperatedLabelsState(); -} - -class _TeleoperatedLabelsState extends State { - @override - Widget build(BuildContext context) { - return Row( - children: [ - //coral l1 - Align( - alignment: Alignment.centerLeft, - child: Container( - width: 170.0, - padding: const EdgeInsets.only( - left: 20.0, - top: 20.0, - ), - child: const Text( - "Coral L1 Near Scored", - textAlign: TextAlign.left, - style: TextStyle( - color: Colors.white, - fontWeight: FontWeight.bold, - fontSize: 15.0), - ), - )), - //coral l2 - Align( - alignment: Alignment.centerLeft, - child: Container( - width: 170.0, - padding: const EdgeInsets.only(left: 20.0, top: 20.0), - child: const Text( - "Coral L2 Near Scored", - textAlign: TextAlign.left, - style: TextStyle( - color: Colors.white, - fontWeight: FontWeight.bold, - fontSize: 15.0), - ), - )), - //coral l3 - Align( - alignment: Alignment.centerLeft, - child: Container( - width: 170.0, - padding: const EdgeInsets.only(left: 20.0, top: 20.0), - child: const Text( - "Coral L3 Near Scored", - textAlign: TextAlign.left, - style: TextStyle( - color: Colors.white, - fontWeight: FontWeight.bold, - fontSize: 15.0), - ), - )), - // coral l4 - Align( - alignment: Alignment.centerLeft, - child: Container( - width: 170.0, - padding: - const EdgeInsets.only(left: 20.0, top: 20.0, right: 30.0), - child: const Text( - "Coral L4 Near Scored", - textAlign: TextAlign.left, - style: TextStyle( - color: Colors.white, - fontWeight: FontWeight.bold, - fontSize: 15.0), - ), - )), - // coral missed - Align( - alignment: Alignment.centerLeft, - child: Container( - width: 170.0, - padding: - const EdgeInsets.only(left: 20.0, top: 20.0, right: 30.0), - child: const Text( - "Coral Missed", - textAlign: TextAlign.left, - style: TextStyle( - color: Colors.white, - fontWeight: FontWeight.bold, - fontSize: 15.0), - ), - )), - const Divider(), - ], - ); - } -} diff --git a/lib/routes/auto/labels/TeleoperatedLabels2.dart b/lib/routes/auto/labels/TeleoperatedLabels2.dart deleted file mode 100644 index 6d84e05..0000000 --- a/lib/routes/auto/labels/TeleoperatedLabels2.dart +++ /dev/null @@ -1,102 +0,0 @@ -// ignore_for_file: file_names -import 'package:flutter/material.dart'; - -class TeleoperatedLabels2 extends StatefulWidget { - const TeleoperatedLabels2({ - super.key, - }); - - @override - State createState() => _TeleoperatedLabels2State(); -} - -class _TeleoperatedLabels2State extends State { - @override - Widget build(BuildContext context) { - return Row( - children: [ - // coral l1 far scored - Align( - alignment: Alignment.centerLeft, - child: Container( - width: 170.0, - padding: - const EdgeInsets.only(left: 20.0, top: 20.0, right: 30.0), - child: const Text( - "Coral L1 Far Scored", - textAlign: TextAlign.left, - style: TextStyle( - color: Colors.white, - fontWeight: FontWeight.bold, - fontSize: 15.0), - ), - )), - // coral l2 far scored - Align( - alignment: Alignment.centerLeft, - child: Container( - width: 170.0, - padding: - const EdgeInsets.only(left: 20.0, top: 20.0, right: 30.0), - child: const Text( - "Coral L2 Far Scored", - textAlign: TextAlign.left, - style: TextStyle( - color: Colors.white, - fontWeight: FontWeight.bold, - fontSize: 15.0), - ), - )), - // coral l3 far scored - Align( - alignment: Alignment.centerLeft, - child: Container( - width: 170.0, - padding: - const EdgeInsets.only(left: 20.0, top: 20.0, right: 30.0), - child: const Text( - "Coral L3 Far Scored", - textAlign: TextAlign.left, - style: TextStyle( - color: Colors.white, - fontWeight: FontWeight.bold, - fontSize: 15.0), - ), - )), - // coral l4 far scored - Align( - alignment: Alignment.centerLeft, - child: Container( - width: 170.0, - padding: - const EdgeInsets.only(left: 20.0, top: 20.0, right: 30.0), - child: const Text( - "Coral L4 Far Scored", - textAlign: TextAlign.left, - style: TextStyle( - color: Colors.white, - fontWeight: FontWeight.bold, - fontSize: 15.0), - ), - )), - // algae barge - Align( - alignment: Alignment.centerLeft, - child: Container( - width: 170.0, - padding: - const EdgeInsets.only(left: 20.0, top: 20.0, right: 30.0), - child: const Text( - "Algae Barge", - textAlign: TextAlign.left, - style: TextStyle( - color: Colors.white, - fontWeight: FontWeight.bold, - fontSize: 15.0), - ), - )), - const Divider(), - ], - ); - } -} diff --git a/lib/routes/auto/labels/TeleoperatedLabels3.dart b/lib/routes/auto/labels/TeleoperatedLabels3.dart deleted file mode 100644 index c204f0b..0000000 --- a/lib/routes/auto/labels/TeleoperatedLabels3.dart +++ /dev/null @@ -1,86 +0,0 @@ -// ignore_for_file: file_names -import 'package:flutter/material.dart'; - -class TeleoperatedLabels3 extends StatefulWidget { - const TeleoperatedLabels3({ - super.key, - }); - - @override - State createState() => _TeleoperatedLabels3State(); -} - -class _TeleoperatedLabels3State extends State { - @override - Widget build(BuildContext context) { - return Row( - children: [ - // algae removed - Align( - alignment: Alignment.centerLeft, - child: Container( - width: 170.0, - padding: - const EdgeInsets.only(left: 20.0, top: 20.0, right: 30.0), - child: const Text( - "Algae Removed", - textAlign: TextAlign.left, - style: TextStyle( - color: Colors.white, - fontWeight: FontWeight.bold, - fontSize: 15.0), - ), - )), - // algae processor - Align( - alignment: Alignment.centerLeft, - child: Container( - width: 170.0, - padding: - const EdgeInsets.only(left: 20.0, top: 20.0, right: 30.0), - child: const Text( - "Algae Processor", - textAlign: TextAlign.left, - style: TextStyle( - color: Colors.white, - fontWeight: FontWeight.bold, - fontSize: 15.0), - ), - )), - // human player misses - Align( - alignment: Alignment.centerLeft, - child: Container( - width: 170.0, - padding: - const EdgeInsets.only(left: 20.0, top: 20.0, right: 30.0), - child: const Text( - "Human Player Misses", - textAlign: TextAlign.left, - style: TextStyle( - color: Colors.white, - fontWeight: FontWeight.bold, - fontSize: 15.0), - ), - )), - // field crosses - Align( - alignment: Alignment.centerLeft, - child: Container( - width: 170.0, - padding: - const EdgeInsets.only(left: 20.0, top: 20.0, right: 30.0), - child: const Text( - "Field Crosses", - textAlign: TextAlign.left, - style: TextStyle( - color: Colors.white, - fontWeight: FontWeight.bold, - fontSize: 15.0), - ), - )), - const Divider(), - ], - ); - } -} diff --git a/lib/routes/prematch/fields/PrematchFields.dart b/lib/routes/prematch/fields/PrematchFields.dart index 56cb67b..72c3280 100644 --- a/lib/routes/prematch/fields/PrematchFields.dart +++ b/lib/routes/prematch/fields/PrematchFields.dart @@ -154,7 +154,7 @@ class _PrematchFieldsState extends State { onPressed: () { Navigator.push(context, MaterialPageRoute(builder: (context) { - return const AutonomousDataRoute(title: "Data Input"); + return const AutonomousDataRoute(title: "Auto"); })); }, child: const Text("Auto >", diff --git a/lib/routes/teleop/TeleopRoute.dart b/lib/routes/teleop/TeleopRoute.dart index 994f1de..95ed61b 100644 --- a/lib/routes/teleop/TeleopRoute.dart +++ b/lib/routes/teleop/TeleopRoute.dart @@ -109,6 +109,20 @@ class _TeleopRouteState extends State { ))), ], ), + Align( + alignment: Alignment.centerLeft, + child: Container( + width: 400.0, + padding: const EdgeInsets.only(top: 20.0, left: 20.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), + ), + )), const TeleoperatedLabels4(), const TeleoperatedFields4(), const TeleoperatedLabels3(), diff --git a/lib/utils/data/constants/AppConstants.dart b/lib/utils/data/constants/AppConstants.dart index 7bcf0da..26d39a3 100644 --- a/lib/utils/data/constants/AppConstants.dart +++ b/lib/utils/data/constants/AppConstants.dart @@ -1,12 +1,12 @@ // ignore_for_file: file_names class AppConstants { - static const int year = 2024; + static const int year = 2025; static const String appName = "Scouting Platform"; static const bool isDebug = false; - static const String defaultEventID = "2024onha2"; + static const String defaultEventID = "2023oncmp2"; static const String defaultFileName = "2024-STEMley"; static const String githubSchedulesCDN = diff --git a/lib/utils/data/constants/OptionConstants.dart b/lib/utils/data/constants/OptionConstants.dart index a683f72..1411c8e 100644 --- a/lib/utils/data/constants/OptionConstants.dart +++ b/lib/utils/data/constants/OptionConstants.dart @@ -19,7 +19,7 @@ class OptionConstants { static final startPositions = ["Left", "Center", "Right"]; - static final endgameOptions = ["No", "Single", "Double", "Park"]; + static final endgameOptions = ["No", "Shallow", "Deep", "Park"]; static List availableDriverstations = [ "Red 1", From 452a8add2925a967dca490391413548c3458d45e Mon Sep 17 00:00:00 2001 From: HoodieRocks Date: Sun, 12 Jan 2025 13:43:59 -0500 Subject: [PATCH 12/15] remove unused imports --- lib/routes/auto/AutonomousDataRoute.dart | 4 ---- 1 file changed, 4 deletions(-) diff --git a/lib/routes/auto/AutonomousDataRoute.dart b/lib/routes/auto/AutonomousDataRoute.dart index ba2e462..fe57592 100644 --- a/lib/routes/auto/AutonomousDataRoute.dart +++ b/lib/routes/auto/AutonomousDataRoute.dart @@ -19,12 +19,8 @@ import 'package:scouting_platform/routes/auto/labels/AutonomousRightLabels/Auton 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/AutonomousValues.dart'; -import 'package:scouting_platform/utils/data/values/CommentValues.dart'; -import 'package:scouting_platform/utils/data/values/EndgameValues.dart'; import 'package:scouting_platform/utils/data/values/PrematchValues.dart'; import 'package:scouting_platform/utils/data/values/SettingValues.dart'; -import 'package:scouting_platform/utils/data/values/TeleoperatedValues.dart'; import 'package:scouting_platform/utils/helpers/AppDataHelper.dart'; import 'package:scouting_platform/utils/helpers/ScheduleHelper.dart'; import 'package:scouting_platform/utils/helpers/UIHelper.dart'; From b72d5dd835f4001343455c6824a5762dc0be2d7c Mon Sep 17 00:00:00 2001 From: HoodieRocks Date: Sun, 12 Jan 2025 14:06:07 -0500 Subject: [PATCH 13/15] formatting and commenting --- lib/routes/auto/AutonomousDataRoute.dart | 5 +++-- .../AutonomousRightRows/AutonomousRightRow3.dart | 1 + .../AutonomousRightLabel1.dart | 6 +++--- .../AutonomousRightLabel2.dart | 13 ++++++------- .../AutonomousRightLabel3.dart | 4 +++- lib/routes/comments/fields/CommentsFields.dart | 2 +- lib/routes/teleop/TeleopRoute.dart | 1 + lib/routes/teleop/fields/TeleoperatedFields.dart | 4 ++-- lib/routes/teleop/fields/TeleoperatedFields2.dart | 2 +- lib/routes/teleop/fields/TeleoperatedFields3.dart | 6 +++--- lib/routes/teleop/fields/TeleoperatedFields4.dart | 10 +++++----- lib/routes/teleop/labels/TeleoperatedLabels.dart | 4 ++-- lib/routes/teleop/labels/TeleoperatedLabels2.dart | 4 ++-- lib/routes/teleop/labels/TeleoperatedLabels3.dart | 13 ++++++++----- lib/routes/teleop/labels/TeleoperatedLabels4.dart | 13 ++++++++----- lib/utils/data/values/AutonomousValues.dart | 3 ++- lib/utils/helpers/QRCodeHelper.dart | 3 ++- 17 files changed, 53 insertions(+), 41 deletions(-) diff --git a/lib/routes/auto/AutonomousDataRoute.dart b/lib/routes/auto/AutonomousDataRoute.dart index fe57592..3371cab 100644 --- a/lib/routes/auto/AutonomousDataRoute.dart +++ b/lib/routes/auto/AutonomousDataRoute.dart @@ -151,13 +151,14 @@ class _DataRouteState extends State { ), ], ), - Align( + // robot information + Align( alignment: Alignment.centerLeft, child: Container( width: 400.0, padding: const EdgeInsets.only(top: 20.0, right: 0.0), child: Text( - "Driver Station: ${SettingValues.selectedDriverStation.text}, Match #: ${PrematchValues.matchNumber.text}, Team # ${PrematchValues.teamNumber.text}", + "Driver Station: ${SettingValues.selectedDriverStation.text}, Match #: ${PrematchValues.matchNumber.text}, Team # ${PrematchValues.teamNumber.text}", textAlign: TextAlign.left, style: TextStyle( color: Colors.white, diff --git a/lib/routes/auto/fields/AutonomousRightRows/AutonomousRightRow3.dart b/lib/routes/auto/fields/AutonomousRightRows/AutonomousRightRow3.dart index a5d96c5..2b0a199 100644 --- a/lib/routes/auto/fields/AutonomousRightRows/AutonomousRightRow3.dart +++ b/lib/routes/auto/fields/AutonomousRightRows/AutonomousRightRow3.dart @@ -2,6 +2,7 @@ import 'package:flutter/material.dart'; import 'package:scouting_platform/builders/bases/CounterNumberField.dart'; import 'package:scouting_platform/utils/data/values/AutonomousValues.dart'; + class AutonomousRightRow3 extends StatefulWidget { const AutonomousRightRow3({ super.key, diff --git a/lib/routes/auto/labels/AutonomousRightLabels/AutonomousRightLabel1.dart b/lib/routes/auto/labels/AutonomousRightLabels/AutonomousRightLabel1.dart index 804f72c..5ff12e3 100644 --- a/lib/routes/auto/labels/AutonomousRightLabels/AutonomousRightLabel1.dart +++ b/lib/routes/auto/labels/AutonomousRightLabels/AutonomousRightLabel1.dart @@ -15,13 +15,12 @@ class _AutonomousRightLabel1State extends State { Widget build(BuildContext context) { return Row( children: [ - // Auto mobility status + // start pos Align( alignment: Alignment.centerLeft, child: Container( width: 150.0, - padding: - const EdgeInsets.only(top: 20.0, right: 30.0), + padding: const EdgeInsets.only(top: 20.0, right: 30.0), child: const Text( "Start Position", textAlign: TextAlign.left, @@ -31,6 +30,7 @@ class _AutonomousRightLabel1State extends State { fontSize: 15.0), ), )), + // auto mobility Align( alignment: Alignment.centerLeft, child: Container( diff --git a/lib/routes/auto/labels/AutonomousRightLabels/AutonomousRightLabel2.dart b/lib/routes/auto/labels/AutonomousRightLabels/AutonomousRightLabel2.dart index 251c300..ea15c90 100644 --- a/lib/routes/auto/labels/AutonomousRightLabels/AutonomousRightLabel2.dart +++ b/lib/routes/auto/labels/AutonomousRightLabels/AutonomousRightLabel2.dart @@ -15,13 +15,12 @@ class _AutonomousRightLabel2State extends State { Widget build(BuildContext context) { return Row( children: [ - // Auto mobility status + // coral miss auto Align( alignment: Alignment.centerLeft, child: Container( width: 160.0, - padding: - const EdgeInsets.only(top: 20.0, right: 0.0), + padding: const EdgeInsets.only(top: 20.0, right: 0.0), child: const Text( "Coral Missed", textAlign: TextAlign.left, @@ -31,12 +30,12 @@ class _AutonomousRightLabel2State extends State { fontSize: 15.0), ), )), + // coral from field Align( alignment: Alignment.centerLeft, child: Container( width: 160.0, - padding: - const EdgeInsets.only(left: 0.0, top: 20.0, right: 0.0), + padding: const EdgeInsets.only(left: 0.0, top: 20.0, right: 0.0), child: const Text( "Coral Field", textAlign: TextAlign.left, @@ -46,12 +45,12 @@ class _AutonomousRightLabel2State extends State { fontSize: 15.0), ), )), + // coral from hp Align( alignment: Alignment.centerLeft, child: Container( width: 130.0, - padding: - const EdgeInsets.only(left: 0.0, top: 20.0, right:0.0), + padding: const EdgeInsets.only(left: 0.0, top: 20.0, right: 0.0), child: const Text( "Coral Loading", textAlign: TextAlign.left, diff --git a/lib/routes/auto/labels/AutonomousRightLabels/AutonomousRightLabel3.dart b/lib/routes/auto/labels/AutonomousRightLabels/AutonomousRightLabel3.dart index 6ddf3fa..d1eda48 100644 --- a/lib/routes/auto/labels/AutonomousRightLabels/AutonomousRightLabel3.dart +++ b/lib/routes/auto/labels/AutonomousRightLabels/AutonomousRightLabel3.dart @@ -15,7 +15,7 @@ class _AutonomousRightLabel3State extends State { Widget build(BuildContext context) { return Row( children: [ - // Auto mobility status + // Alage removed Align( alignment: Alignment.centerLeft, child: Container( @@ -30,6 +30,7 @@ class _AutonomousRightLabel3State extends State { fontSize: 15.0), ), )), + // processor Align( alignment: Alignment.centerLeft, child: Container( @@ -44,6 +45,7 @@ class _AutonomousRightLabel3State extends State { fontSize: 15.0), ), )), + // barge algae Align( alignment: Alignment.centerLeft, child: Container( diff --git a/lib/routes/comments/fields/CommentsFields.dart b/lib/routes/comments/fields/CommentsFields.dart index deaf686..8ce8fa3 100644 --- a/lib/routes/comments/fields/CommentsFields.dart +++ b/lib/routes/comments/fields/CommentsFields.dart @@ -99,7 +99,7 @@ class _CommentsFields extends State { fontFamily: "Helvetica", color: Colors.white)), ))), - Align( + Align( alignment: Alignment.bottomRight, child: Container( padding: const EdgeInsets.only( diff --git a/lib/routes/teleop/TeleopRoute.dart b/lib/routes/teleop/TeleopRoute.dart index 95ed61b..48a0657 100644 --- a/lib/routes/teleop/TeleopRoute.dart +++ b/lib/routes/teleop/TeleopRoute.dart @@ -109,6 +109,7 @@ class _TeleopRouteState extends State { ))), ], ), + // robot info Align( alignment: Alignment.centerLeft, child: Container( diff --git a/lib/routes/teleop/fields/TeleoperatedFields.dart b/lib/routes/teleop/fields/TeleoperatedFields.dart index de36961..d50df26 100644 --- a/lib/routes/teleop/fields/TeleoperatedFields.dart +++ b/lib/routes/teleop/fields/TeleoperatedFields.dart @@ -39,14 +39,14 @@ class _TeleoperatedFieldsState extends State { Widget build(BuildContext context) { return Row( children: [ - //coral l1 scored + //coral l1 near scored CounterNumberField( controller: TeleoperatedValues.coralNearL1, onTapDecrement: () => decrementNumber(TeleoperatedValues.coralNearL1), onTapIncrement: () => incrementNumber(TeleoperatedValues.coralNearL1)), - //coral l2 scored + //coral l1 far scored CounterNumberField( controller: TeleoperatedValues.coralFarL1, onTapDecrement: () => diff --git a/lib/routes/teleop/fields/TeleoperatedFields2.dart b/lib/routes/teleop/fields/TeleoperatedFields2.dart index ebea5ea..5423c63 100644 --- a/lib/routes/teleop/fields/TeleoperatedFields2.dart +++ b/lib/routes/teleop/fields/TeleoperatedFields2.dart @@ -39,7 +39,7 @@ class _TeleoperatedFields2State extends State { Widget build(BuildContext context) { return Row( children: [ - // coral far l1 + // coral near l2 CounterNumberField( controller: TeleoperatedValues.coralNearL2, onTapDecrement: () => diff --git a/lib/routes/teleop/fields/TeleoperatedFields3.dart b/lib/routes/teleop/fields/TeleoperatedFields3.dart index 5d644ea..0c0492f 100644 --- a/lib/routes/teleop/fields/TeleoperatedFields3.dart +++ b/lib/routes/teleop/fields/TeleoperatedFields3.dart @@ -41,6 +41,7 @@ class _TeleoperatedFields3State extends State { Widget build(BuildContext context) { return Row( children: [ + // coral near l3 CounterNumberField( controller: TeleoperatedValues.coralNearL3, onTapDecrement: () => @@ -54,15 +55,14 @@ class _TeleoperatedFields3State extends State { decrementNumber(TeleoperatedValues.coralFarL3), onTapIncrement: () => incrementNumber(TeleoperatedValues.coralFarL3)), - //coral l3 scored - // human player misses + // algae processor CounterNumberField( controller: TeleoperatedValues.algaeProcessor, onTapDecrement: () => decrementNumber(TeleoperatedValues.algaeProcessor), onTapIncrement: () => incrementNumber(TeleoperatedValues.algaeProcessor)), - // field crosses + // human player misses CounterNumberField( controller: TeleoperatedValues.humanPlayerMisses, onTapDecrement: () => diff --git a/lib/routes/teleop/fields/TeleoperatedFields4.dart b/lib/routes/teleop/fields/TeleoperatedFields4.dart index 83db341..6feea9a 100644 --- a/lib/routes/teleop/fields/TeleoperatedFields4.dart +++ b/lib/routes/teleop/fields/TeleoperatedFields4.dart @@ -42,35 +42,35 @@ class _TeleoperatedFields4State extends State { Widget build(BuildContext context) { return Row( children: [ - //coral l4 scored + //coral l4 near CounterNumberField( controller: TeleoperatedValues.coralNearL4, onTapDecrement: () => decrementNumber(TeleoperatedValues.coralNearL4), onTapIncrement: () => incrementNumber(TeleoperatedValues.coralNearL4)), - // coral far l4 + // coral far l4 CounterNumberField( controller: TeleoperatedValues.coralFarL4, onTapDecrement: () => decrementNumber(TeleoperatedValues.coralFarL4), onTapIncrement: () => incrementNumber(TeleoperatedValues.coralFarL4)), - //algae removed + //algae barge CounterNumberField( controller: TeleoperatedValues.algaeBarge, onTapDecrement: () => decrementNumber(TeleoperatedValues.algaeBarge), onTapIncrement: () => incrementNumber(TeleoperatedValues.algaeBarge)), - //algae processor + //field crosses CounterNumberField( controller: TeleoperatedValues.fieldCrosses, onTapDecrement: () => decrementNumber(TeleoperatedValues.fieldCrosses), onTapIncrement: () => incrementNumber(TeleoperatedValues.fieldCrosses)), - //endgame dropdown + //endgame dropdown PlatformDropdownMenu( dropdownMenuSelectedItem: EndgameValues.endgame.text, onChanged: (value) { diff --git a/lib/routes/teleop/labels/TeleoperatedLabels.dart b/lib/routes/teleop/labels/TeleoperatedLabels.dart index fbf26ae..a9406b2 100644 --- a/lib/routes/teleop/labels/TeleoperatedLabels.dart +++ b/lib/routes/teleop/labels/TeleoperatedLabels.dart @@ -15,7 +15,7 @@ class _TeleoperatedLabelsState extends State { Widget build(BuildContext context) { return Row( children: [ - //coral l1 + //coral l1 near Align( alignment: Alignment.centerLeft, child: Container( @@ -33,7 +33,7 @@ class _TeleoperatedLabelsState extends State { fontSize: 15.0), ), )), - //coral l2 + //coral l1 far Align( alignment: Alignment.centerLeft, child: Container( diff --git a/lib/routes/teleop/labels/TeleoperatedLabels2.dart b/lib/routes/teleop/labels/TeleoperatedLabels2.dart index 7243c12..0990d28 100644 --- a/lib/routes/teleop/labels/TeleoperatedLabels2.dart +++ b/lib/routes/teleop/labels/TeleoperatedLabels2.dart @@ -15,7 +15,7 @@ class _TeleoperatedLabels2State extends State { Widget build(BuildContext context) { return Row( children: [ - // coral l1 far scored + // coral l2 near scored Align( alignment: Alignment.centerLeft, child: Container( @@ -47,7 +47,7 @@ class _TeleoperatedLabels2State extends State { fontSize: 15.0), ), )), - // coral l3 far scored + // algae removed Align( alignment: Alignment.centerLeft, child: Container( diff --git a/lib/routes/teleop/labels/TeleoperatedLabels3.dart b/lib/routes/teleop/labels/TeleoperatedLabels3.dart index 235ef02..e3b4a66 100644 --- a/lib/routes/teleop/labels/TeleoperatedLabels3.dart +++ b/lib/routes/teleop/labels/TeleoperatedLabels3.dart @@ -15,7 +15,7 @@ class _TeleoperatedLabels3State extends State { Widget build(BuildContext context) { return Row( children: [ - // algae removed + // l3 coral near Align( alignment: Alignment.centerLeft, child: Container( @@ -31,7 +31,7 @@ class _TeleoperatedLabels3State extends State { fontSize: 15.0), ), )), - // algae processor + // l3 coral far Align( alignment: Alignment.centerLeft, child: Container( @@ -47,7 +47,8 @@ class _TeleoperatedLabels3State extends State { fontSize: 15.0), ), )), - Align( + // processor + Align( alignment: Alignment.centerLeft, child: Container( width: 170.0, @@ -62,7 +63,8 @@ class _TeleoperatedLabels3State extends State { fontSize: 15.0), ), )), - Align( + // human player misses + Align( alignment: Alignment.centerLeft, child: Container( width: 170.0, @@ -77,7 +79,8 @@ class _TeleoperatedLabels3State extends State { fontSize: 15.0), ), )), - Align( + // climb time + Align( alignment: Alignment.centerLeft, child: Container( width: 170.0, diff --git a/lib/routes/teleop/labels/TeleoperatedLabels4.dart b/lib/routes/teleop/labels/TeleoperatedLabels4.dart index b5cebf6..87adefd 100644 --- a/lib/routes/teleop/labels/TeleoperatedLabels4.dart +++ b/lib/routes/teleop/labels/TeleoperatedLabels4.dart @@ -15,7 +15,7 @@ class _TeleoperatedLabels4State extends State { Widget build(BuildContext context) { return Row( children: [ - //coral l3 + //coral l4 near Align( alignment: Alignment.centerLeft, child: Container( @@ -30,7 +30,7 @@ class _TeleoperatedLabels4State extends State { fontSize: 15.0), ), )), - // coral l4 + // coral l4 far Align( alignment: Alignment.centerLeft, child: Container( @@ -46,7 +46,8 @@ class _TeleoperatedLabels4State extends State { fontSize: 15.0), ), )), - Align( + // algae barge + Align( alignment: Alignment.centerLeft, child: Container( width: 170.0, @@ -61,7 +62,8 @@ class _TeleoperatedLabels4State extends State { fontSize: 15.0), ), )), - Align( + // field crosses + Align( alignment: Alignment.centerLeft, child: Container( width: 170.0, @@ -76,7 +78,8 @@ class _TeleoperatedLabels4State extends State { fontSize: 15.0), ), )), - Align( + // endgame + Align( alignment: Alignment.centerLeft, child: Container( width: 170.0, diff --git a/lib/utils/data/values/AutonomousValues.dart b/lib/utils/data/values/AutonomousValues.dart index c43a70d..0c4741f 100644 --- a/lib/utils/data/values/AutonomousValues.dart +++ b/lib/utils/data/values/AutonomousValues.dart @@ -10,7 +10,8 @@ class AutonomousValues { static TextEditingController coralField = TextEditingController(text: "0"); static TextEditingController coralMissed = TextEditingController(text: "0"); static TextEditingController algaeRemoved = TextEditingController(text: "0"); - static TextEditingController algaeProcessor = TextEditingController(text: "0"); + static TextEditingController algaeProcessor = + TextEditingController(text: "0"); static TextEditingController algaeBarge = TextEditingController(text: "0"); // L1 trough sides diff --git a/lib/utils/helpers/QRCodeHelper.dart b/lib/utils/helpers/QRCodeHelper.dart index 4b6bed9..306c664 100644 --- a/lib/utils/helpers/QRCodeHelper.dart +++ b/lib/utils/helpers/QRCodeHelper.dart @@ -160,6 +160,7 @@ class QrcodeHelper { /// Removes any character that is not a letter, number, whitespace or a special character static String stripEmoji(String value) { - return value.replaceAll(RegExp("[^A-z0-9.,\\-';/?!()[\\]+=\\s@#\$%&*~]"), ''); + return value.replaceAll( + RegExp("[^A-z0-9.,\\-';/?!()[\\]+=\\s@#\$%&*~]"), ''); } } From bff042a186db4b6f527b7fb4a0d102e43d1ed1c6 Mon Sep 17 00:00:00 2001 From: HoodieRocks Date: Sun, 12 Jan 2025 14:47:51 -0500 Subject: [PATCH 14/15] update index comments for QR code --- lib/utils/helpers/QRCodeHelper.dart | 42 ++++++++++++++--------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/lib/utils/helpers/QRCodeHelper.dart b/lib/utils/helpers/QRCodeHelper.dart index 306c664..6005a18 100644 --- a/lib/utils/helpers/QRCodeHelper.dart +++ b/lib/utils/helpers/QRCodeHelper.dart @@ -99,38 +99,38 @@ class QrcodeHelper { /// Computes all teleoperated values and returns them as a single string separated by a caret static String computeTeleopValues() { return computeValues([ - parseInt(TeleoperatedValues.coralNearL1.text), // index: 9 - parseInt(TeleoperatedValues.coralNearL2.text), // index: 10 - parseInt(TeleoperatedValues.coralNearL3.text), // index: 11 - parseInt(TeleoperatedValues.coralNearL4.text), // index: 12 - parseInt(TeleoperatedValues.coralFarL1.text), // index: 9 - parseInt(TeleoperatedValues.coralFarL2.text), // index: 10 - parseInt(TeleoperatedValues.coralFarL3.text), // index: 11 - parseInt(TeleoperatedValues.coralFarL4.text), // index: 12 - parseInt(TeleoperatedValues.coralMissed.text), // index: 13 - parseInt(TeleoperatedValues.algaeRemoved.text), // index: 14 - parseInt(TeleoperatedValues.algaeProcessor.text), // index: 15 - parseInt(TeleoperatedValues.algaeBarge.text), // index: 16 - parseInt(TeleoperatedValues.humanPlayerMisses.text), // index: 17 - parseInt(TeleoperatedValues.fieldCrosses.text), // index: 18 + parseInt(TeleoperatedValues.coralNearL1.text), // index: 46 + parseInt(TeleoperatedValues.coralNearL2.text), // index: 47 + parseInt(TeleoperatedValues.coralNearL3.text), // index: 48 + parseInt(TeleoperatedValues.coralNearL4.text), // index: 49 + parseInt(TeleoperatedValues.coralFarL1.text), // index: 50 + parseInt(TeleoperatedValues.coralFarL2.text), // index: 51 + parseInt(TeleoperatedValues.coralFarL3.text), // index: 52 + parseInt(TeleoperatedValues.coralFarL4.text), // index: 53 + parseInt(TeleoperatedValues.coralMissed.text), // index: 54 + parseInt(TeleoperatedValues.algaeRemoved.text), // index: 55 + parseInt(TeleoperatedValues.algaeProcessor.text), // index: 56 + parseInt(TeleoperatedValues.algaeBarge.text), // index: 57 + parseInt(TeleoperatedValues.humanPlayerMisses.text),// index: 58 + parseInt(TeleoperatedValues.fieldCrosses.text), // index: 59 ]); } /// Computes all endgame values and returns them as a single string separated by a caret static String computeEndgameValues() { return computeValues([ - parseString(EndgameValues.endgame.text), // index: 19 - parseString(EndgameValues.climbTime.text), // index: 20 + parseString(EndgameValues.endgame.text), // index: 60 + parseString(EndgameValues.climbTime.text), // index: 61 ]); } /// Computes all comment values and returns them as a single string separated by a caret static String computeCommentValues() { return computeValues([ - parseString(stripEmoji(CommentValues.autoComments.text)), // index: 17 - parseString(stripEmoji(CommentValues.autoOrder.text)), // index: 18 - parseString(stripEmoji(CommentValues.teleopComments.text)), // index: 19 - parseString(stripEmoji(CommentValues.endgameComments.text)) // index: 20 + parseString(stripEmoji(CommentValues.autoComments.text)), // index: 62 + parseString(stripEmoji(CommentValues.autoOrder.text)), // index: 63 + parseString(stripEmoji(CommentValues.teleopComments.text)), // index: 64 + parseString(stripEmoji(CommentValues.endgameComments.text)) // index: 65 ]); } @@ -139,7 +139,7 @@ class QrcodeHelper { return computeValues([ parseString(OptionConstants.availableDriverstations .indexOf(SettingValues.selectedDriverStation.text) - .toString()) // index: 26 + .toString()) // index: 66 ]); } From 83a07f456a7e081f8b7bb16b37fd799c72cef462 Mon Sep 17 00:00:00 2001 From: HoodieRocks Date: Sun, 12 Jan 2025 15:09:12 -0500 Subject: [PATCH 15/15] move reset methods to respective value file --- lib/utils/data/values/AutonomousValues.dart | 65 +++++++++++ lib/utils/data/values/CommentValues.dart | 8 ++ lib/utils/data/values/EndgameValues.dart | 10 ++ lib/utils/data/values/TeleoperatedValues.dart | 19 ++++ lib/utils/helpers/AppDataHelper.dart | 105 +----------------- 5 files changed, 107 insertions(+), 100 deletions(-) diff --git a/lib/utils/data/values/AutonomousValues.dart b/lib/utils/data/values/AutonomousValues.dart index 0c4741f..8219ff4 100644 --- a/lib/utils/data/values/AutonomousValues.dart +++ b/lib/utils/data/values/AutonomousValues.dart @@ -66,4 +66,69 @@ class AutonomousValues { static TextEditingController l2E = TextEditingController(text: "0"); static TextEditingController l2F = TextEditingController(text: "0"); static TextEditingController l2G = TextEditingController(text: "0"); + + + static void resetAutoEtcValues() { + AutonomousValues.autoStartPosition.text = "Center"; + AutonomousValues.autoMobility.text = "No"; + AutonomousValues.coralMissed.text = "0"; + AutonomousValues.coralHP.text = "0"; + AutonomousValues.coralField.text = "0"; + AutonomousValues.algaeRemoved.text = "0"; + AutonomousValues.algaeBarge.text = "0"; + AutonomousValues.algaeProcessor.text = "0"; + } + + static void resetAutoReef() { + // tough coral + AutonomousValues.l1E.text = "0"; + AutonomousValues.l1NE.text = "0"; + AutonomousValues.l1NW.text = "0"; + AutonomousValues.l1SE.text = "0"; + AutonomousValues.l1SW.text = "0"; + AutonomousValues.l1W.text = "0"; + + // L2 coral + AutonomousValues.l2A.text = "0"; + AutonomousValues.l2B.text = "0"; + AutonomousValues.l2C.text = "0"; + AutonomousValues.l2D.text = "0"; + AutonomousValues.l2E.text = "0"; + AutonomousValues.l2F.text = "0"; + AutonomousValues.l2G.text = "0"; + AutonomousValues.l2H.text = "0"; + AutonomousValues.l2I.text = "0"; + AutonomousValues.l2J.text = "0"; + AutonomousValues.l2K.text = "0"; + AutonomousValues.l2L.text = "0"; + + // L3 coral + AutonomousValues.l3A.text = "0"; + AutonomousValues.l3B.text = "0"; + AutonomousValues.l3C.text = "0"; + AutonomousValues.l3D.text = "0"; + AutonomousValues.l3E.text = "0"; + AutonomousValues.l3F.text = "0"; + AutonomousValues.l3G.text = "0"; + AutonomousValues.l3H.text = "0"; + AutonomousValues.l3I.text = "0"; + AutonomousValues.l3J.text = "0"; + AutonomousValues.l3K.text = "0"; + AutonomousValues.l3L.text = "0"; + + // L4 coral + AutonomousValues.l4A.text = "0"; + AutonomousValues.l4B.text = "0"; + AutonomousValues.l4C.text = "0"; + AutonomousValues.l4D.text = "0"; + AutonomousValues.l4E.text = "0"; + AutonomousValues.l4F.text = "0"; + AutonomousValues.l4G.text = "0"; + AutonomousValues.l4H.text = "0"; + AutonomousValues.l4I.text = "0"; + AutonomousValues.l4J.text = "0"; + AutonomousValues.l4K.text = "0"; + AutonomousValues.l4L.text = "0"; + } + } diff --git a/lib/utils/data/values/CommentValues.dart b/lib/utils/data/values/CommentValues.dart index f3b4b9e..c9d0b10 100644 --- a/lib/utils/data/values/CommentValues.dart +++ b/lib/utils/data/values/CommentValues.dart @@ -10,4 +10,12 @@ class CommentValues { TextEditingController(text: ""); static final TextEditingController endgameComments = TextEditingController(text: ""); + + + static void resetComments() { + CommentValues.autoComments.text = ""; + CommentValues.autoOrder.text = ""; + CommentValues.teleopComments.text = ""; + CommentValues.endgameComments.text = ""; + } } diff --git a/lib/utils/data/values/EndgameValues.dart b/lib/utils/data/values/EndgameValues.dart index c50477c..3b60c7e 100644 --- a/lib/utils/data/values/EndgameValues.dart +++ b/lib/utils/data/values/EndgameValues.dart @@ -10,4 +10,14 @@ class EndgameValues { static TextEditingController endgame = TextEditingController(text: "No"); static TextEditingController climbTime = TextEditingController(text: "0"); + + + static void resetEndgameValues() { + EndgameValues.endgame.text = "No"; // was climb, now endgame + EndgameValues.climbTime.text = "0"; // parked was below + EndgameValues.stopwatchState.text = "0"; + EndgameValues.stopwatch.stop(); + EndgameValues.stopwatch.reset(); + } + } diff --git a/lib/utils/data/values/TeleoperatedValues.dart b/lib/utils/data/values/TeleoperatedValues.dart index ccf1381..ae73d6e 100644 --- a/lib/utils/data/values/TeleoperatedValues.dart +++ b/lib/utils/data/values/TeleoperatedValues.dart @@ -18,4 +18,23 @@ class TeleoperatedValues { static TextEditingController humanPlayerMisses = TextEditingController(text: "0"); static TextEditingController fieldCrosses = TextEditingController(text: "0"); + + + static void resetTeleopValues() { + TeleoperatedValues.coralNearL1.text = "0"; + TeleoperatedValues.coralNearL2.text = "0"; + TeleoperatedValues.coralNearL3.text = "0"; + TeleoperatedValues.coralNearL4.text = "0"; + TeleoperatedValues.coralFarL1.text = "0"; + TeleoperatedValues.coralFarL2.text = "0"; + TeleoperatedValues.coralFarL3.text = "0"; + TeleoperatedValues.coralFarL4.text = "0"; + TeleoperatedValues.coralMissed.text = "0"; + TeleoperatedValues.algaeRemoved.text = "0"; + TeleoperatedValues.algaeProcessor.text = "0"; + TeleoperatedValues.algaeBarge.text = "0"; + TeleoperatedValues.humanPlayerMisses.text = "0"; + TeleoperatedValues.fieldCrosses.text = "0"; + } + } diff --git a/lib/utils/helpers/AppDataHelper.dart b/lib/utils/helpers/AppDataHelper.dart index cfcbe90..f62bb60 100644 --- a/lib/utils/helpers/AppDataHelper.dart +++ b/lib/utils/helpers/AppDataHelper.dart @@ -38,105 +38,10 @@ class AppDataHelper { } static void resetStates() { - resetAutoEtcValues(); - resetAutoReef(); - resetTeleopValues(); - resetEndgameValues(); - resetComments(); - } - - static void resetAutoEtcValues() { - AutonomousValues.autoStartPosition.text = "Center"; - AutonomousValues.autoMobility.text = "No"; - AutonomousValues.coralMissed.text = "0"; - AutonomousValues.coralHP.text = "0"; - AutonomousValues.coralField.text = "0"; - AutonomousValues.algaeRemoved.text = "0"; - AutonomousValues.algaeBarge.text = "0"; - AutonomousValues.algaeProcessor.text = "0"; - } - - static void resetAutoReef() { - // tough coral - AutonomousValues.l1E.text = "0"; - AutonomousValues.l1NE.text = "0"; - AutonomousValues.l1NW.text = "0"; - AutonomousValues.l1SE.text = "0"; - AutonomousValues.l1SW.text = "0"; - AutonomousValues.l1W.text = "0"; - - // L2 coral - AutonomousValues.l2A.text = "0"; - AutonomousValues.l2B.text = "0"; - AutonomousValues.l2C.text = "0"; - AutonomousValues.l2D.text = "0"; - AutonomousValues.l2E.text = "0"; - AutonomousValues.l2F.text = "0"; - AutonomousValues.l2G.text = "0"; - AutonomousValues.l2H.text = "0"; - AutonomousValues.l2I.text = "0"; - AutonomousValues.l2J.text = "0"; - AutonomousValues.l2K.text = "0"; - AutonomousValues.l2L.text = "0"; - - // L3 coral - AutonomousValues.l3A.text = "0"; - AutonomousValues.l3B.text = "0"; - AutonomousValues.l3C.text = "0"; - AutonomousValues.l3D.text = "0"; - AutonomousValues.l3E.text = "0"; - AutonomousValues.l3F.text = "0"; - AutonomousValues.l3G.text = "0"; - AutonomousValues.l3H.text = "0"; - AutonomousValues.l3I.text = "0"; - AutonomousValues.l3J.text = "0"; - AutonomousValues.l3K.text = "0"; - AutonomousValues.l3L.text = "0"; - - // L4 coral - AutonomousValues.l4A.text = "0"; - AutonomousValues.l4B.text = "0"; - AutonomousValues.l4C.text = "0"; - AutonomousValues.l4D.text = "0"; - AutonomousValues.l4E.text = "0"; - AutonomousValues.l4F.text = "0"; - AutonomousValues.l4G.text = "0"; - AutonomousValues.l4H.text = "0"; - AutonomousValues.l4I.text = "0"; - AutonomousValues.l4J.text = "0"; - AutonomousValues.l4K.text = "0"; - AutonomousValues.l4L.text = "0"; - } - - static void resetTeleopValues() { - TeleoperatedValues.coralNearL1.text = "0"; - TeleoperatedValues.coralNearL2.text = "0"; - TeleoperatedValues.coralNearL3.text = "0"; - TeleoperatedValues.coralNearL4.text = "0"; - TeleoperatedValues.coralFarL1.text = "0"; - TeleoperatedValues.coralFarL2.text = "0"; - TeleoperatedValues.coralFarL3.text = "0"; - TeleoperatedValues.coralFarL4.text = "0"; - TeleoperatedValues.coralMissed.text = "0"; - TeleoperatedValues.algaeRemoved.text = "0"; - TeleoperatedValues.algaeProcessor.text = "0"; - TeleoperatedValues.algaeBarge.text = "0"; - TeleoperatedValues.humanPlayerMisses.text = "0"; - TeleoperatedValues.fieldCrosses.text = "0"; - } - - static void resetEndgameValues() { - EndgameValues.endgame.text = "No"; // was climb, now endgame - EndgameValues.climbTime.text = "0"; // parked was below - EndgameValues.stopwatchState.text = "0"; - EndgameValues.stopwatch.stop(); - EndgameValues.stopwatch.reset(); - } - - static void resetComments() { - CommentValues.autoComments.text = ""; - CommentValues.autoOrder.text = ""; - CommentValues.teleopComments.text = ""; - CommentValues.endgameComments.text = ""; + AutonomousValues.resetAutoEtcValues(); + AutonomousValues.resetAutoReef(); + TeleoperatedValues.resetTeleopValues(); + EndgameValues.resetEndgameValues(); + CommentValues.resetComments(); } }