Revert "git things"

This reverts commit 1b95afdfc2.
This commit is contained in:
Kima
2024-05-01 19:53:33 +02:00
parent ca177ad69f
commit d0599bed7d
13 changed files with 48 additions and 21 deletions

View File

@@ -147,8 +147,8 @@ class _GradeSubjectViewState extends State<GradeSubjectView>
),
));
tiles.addAll(
[
if (!gradeCalcMode) {
tiles.addAll([
const SizedBox(
height: 5.0,
),
@@ -162,8 +162,8 @@ class _GradeSubjectViewState extends State<GradeSubjectView>
controller: _tabController,
disableFading: true,
),
],
);
]);
}
if (showGraph(subjectGrades) && _tabController.index == 0) {
tiles.add(gradeGraph);
@@ -380,13 +380,31 @@ class _GradeSubjectViewState extends State<GradeSubjectView>
.where((e) => e.type == GradeType.midYear)
.isNotEmpty,
child: ExpandableFab(
openButtonBuilder: FloatingActionButtonBuilder(
size: 20.0,
builder: (context, onPressed, progress) =>
FloatingActionButton.small(
onPressed: onPressed,
backgroundColor: Theme.of(context).colorScheme.tertiary,
child: const Icon(Icons.more_horiz_outlined),
),
),
closeButtonBuilder: FloatingActionButtonBuilder(
size: 20.0,
builder: (context, onPressed, progress) =>
FloatingActionButton.small(
onPressed: onPressed,
backgroundColor: Theme.of(context).colorScheme.tertiary,
child: const Icon(Icons.close),
),
),
type: ExpandableFabType.up,
distance: 50,
childrenOffset: const Offset(-3.8, 0.0),
// childrenOffset: const Offset(-8.8, 0.0),
children: [
FloatingActionButton.small(
heroTag: "btn_ghost_grades",
backgroundColor: Theme.of(context).colorScheme.secondary,
backgroundColor: Theme.of(context).colorScheme.tertiary,
onPressed: () {
gradeCalc(context);
},
@@ -394,7 +412,7 @@ class _GradeSubjectViewState extends State<GradeSubjectView>
),
FloatingActionButton.small(
heroTag: "btn_goal_planner",
backgroundColor: Theme.of(context).colorScheme.secondary,
backgroundColor: Theme.of(context).colorScheme.tertiary,
onPressed: () {
// if (!Provider.of<PlusProvider>(context, listen: false)
// .hasScope(PremiumScopes.goalPlanner)) {
@@ -533,6 +551,10 @@ class _GradeSubjectViewState extends State<GradeSubjectView>
elevation: 12.0,
);
// set tab
int tabIndex = _tabController.index;
_tabController.animateTo(0);
// Hide the fab and grades
setState(() {
gradeCalcMode = true;
@@ -541,6 +563,9 @@ class _GradeSubjectViewState extends State<GradeSubjectView>
_sheetController!.closed.then((value) {
// Show fab and grades
if (mounted) {
// set tab
_tabController.animateTo(tabIndex);
setState(() {
gradeCalcMode = false;
});