Refactor width calculation for AnimatedContainer in StatusBar widget
This commit is contained in:
@@ -305,6 +305,8 @@ class _GradeSubjectViewState extends State<GradeSubjectView>
|
||||
if (DateTime.now().day > 5) {
|
||||
_timetableController.next(context);
|
||||
}
|
||||
|
||||
fetchGoalPlans();
|
||||
}
|
||||
|
||||
void fetchGoalPlans() async {
|
||||
@@ -370,8 +372,6 @@ class _GradeSubjectViewState extends State<GradeSubjectView>
|
||||
buildTiles(ghostGrades);
|
||||
}
|
||||
|
||||
fetchGoalPlans();
|
||||
|
||||
return Scaffold(
|
||||
key: _scaffoldKey,
|
||||
floatingActionButtonLocation: ExpandableFab.location,
|
||||
|
||||
@@ -86,9 +86,8 @@ class StatusBarState extends State<StatusBar> {
|
||||
child: AnimatedContainer(
|
||||
duration: const Duration(milliseconds: 250),
|
||||
curve: Curves.easeInOut,
|
||||
width: MediaQuery.of(context).size.width *
|
||||
statusProvider.progress -
|
||||
36.0,
|
||||
width: (MediaQuery.of(context).size.width - 36.0) *
|
||||
statusProvider.progress,
|
||||
alignment: Alignment.centerRight,
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
|
||||
Reference in New Issue
Block a user