-
Notifications
You must be signed in to change notification settings - Fork 2
Add battery warning display for low voltage #235
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent work! You've picked up the structure of the dashboard and flutter very well. Just a few minor things that could be improved before merging.
child: Wrap( | ||
crossAxisAlignment: WrapCrossAlignment.center, | ||
alignment: WrapAlignment.spaceBetween, | ||
children: [ | ||
MessageDisplay(showLogs: showLogs), | ||
const StatusIcons(), | ||
], | ||
child: SizedBox( | ||
height: 48, | ||
child: Row( | ||
children: [ | ||
Expanded( | ||
child: Align( | ||
alignment: Alignment.centerLeft, | ||
child: MessageDisplay(showLogs: showLogs), | ||
), | ||
), | ||
const Expanded( | ||
child: Center( | ||
child: BatteryWarningDisplay(), | ||
), | ||
), | ||
const Expanded( | ||
child: Align( | ||
alignment: Alignment.centerRight, | ||
child: StatusIcons(), | ||
), | ||
), | ||
], | ||
), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While this would make the battery display centered, if the window was made more narrow, this would cause issues with proportions when some widgets stopped fitting. Look into using a NavigationToolbar instead which should handle this better.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still get the same RenderFlex overflow issue when the window size is smaller than the minimum required width with the NavigationToolbar Implementation.
The NavigationToolbar currently just wraps the existing components and doesn't manage layout scaling. So, I guess, unless I update the individual widget properties to adapt to the available space. Or is there a better way to do this?
The RenderFlex overflow error was already occurring before the battery indicator implementation when the window was smaller than required.
@override | ||
void initState() { | ||
super.initState(); | ||
_footerModel = FooterViewModel(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To avoid data possibly getting out of sync, the footer view model should be passed into the widget instead of having it be created in the state
-Added Critical Indicator

-Added Warning Indicator with blinking Animation

-The values are from the preset values for the rover.