fixed things that were fucked up by pub upgrade

This commit is contained in:
Kima 2023-12-09 17:23:21 +01:00
parent 9f5e57eec6
commit 56500406e5
4 changed files with 38 additions and 25 deletions

View File

@ -1,7 +1,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" package="hu.refilc.naplo">
<application android:name="${applicationName}" android:label="reFilc" tools:replace="android:label" android:icon="@mipmap/ic_launcher"
android:requestLegacyExternalStorage="true">
android:requestLegacyExternalStorage="true" android:enableOnBackInvokedCallback="true">
<activity android:exported="true" android:name="hu.refilc.naplo.MainActivity"
android:launchMode="singleTop" android:theme="@style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"

View File

@ -17,7 +17,8 @@ import 'package:flutter_local_notifications/flutter_local_notifications.dart';
void main() async {
// Initalize
WidgetsBinding binding = WidgetsFlutterBinding.ensureInitialized();
binding.renderViews.first.automaticSystemUiAdjustment = false;
// ignore: deprecated_member_use
binding.renderView.automaticSystemUiAdjustment = false;
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
// Startup
Startup startup = Startup();

View File

@ -13,6 +13,7 @@ class FilterBar extends StatefulWidget implements PreferredSizeWidget {
this.disableFading = false,
this.scrollable = true,
this.censored = false,
this.tabAlignment = TabAlignment.start,
}) : assert(items.length == controller.length);
final List<Widget> items;
@ -22,6 +23,7 @@ class FilterBar extends StatefulWidget implements PreferredSizeWidget {
final bool disableFading;
final bool scrollable;
final bool censored;
final TabAlignment tabAlignment;
@override
final Size preferredSize = const Size.fromHeight(42.0);
@ -36,7 +38,9 @@ class _FilterBarState extends State<FilterBar> {
void initState() {
super.initState();
censoredItemsWidth = List.generate(widget.items.length, (index) => 25 + Random().nextDouble() * 50).toList();
censoredItemsWidth = List.generate(
widget.items.length, (index) => 25 + Random().nextDouble() * 50)
.toList();
}
@override
@ -66,7 +70,8 @@ class _FilterBarState extends State<FilterBar> {
tabs: widget.censored
? censoredItemsWidth
.map(
(e) => Container(
(e) => Tab(
child: Container(
width: e,
height: 15,
decoration: BoxDecoration(
@ -74,10 +79,12 @@ class _FilterBarState extends State<FilterBar> {
borderRadius: BorderRadius.circular(8.0),
),
),
),
)
.toList()
: widget.items,
onTap: widget.onTap,
tabAlignment: widget.tabAlignment,
);
return Container(
@ -92,14 +99,21 @@ class _FilterBarState extends State<FilterBar> {
// avoid fading over selected tab
return ShaderMask(
shaderCallback: (Rect bounds) {
final Color bg = Theme.of(context).scaffoldBackgroundColor;
final Color bg =
Theme.of(context).scaffoldBackgroundColor;
final double index = widget.controller.animation!.value;
return LinearGradient(begin: Alignment.topLeft, end: Alignment.bottomRight, colors: [
return LinearGradient(
begin: Alignment.topLeft,
end: Alignment.bottomRight,
colors: [
index < 0.2 ? Colors.transparent : bg,
Colors.transparent,
Colors.transparent,
index > widget.controller.length - 1.2 ? Colors.transparent : bg
], stops: const [
index > widget.controller.length - 1.2
? Colors.transparent
: bg
],
stops: const [
0,
0.1,
0.9,

View File

@ -229,11 +229,9 @@ class _GradeSubjectViewState extends State<GradeSubjectView> {
.where((e) => e.type == GradeType.midYear)
.isNotEmpty,
child: ExpandableFab(
overlayStyle: ExpandableFabOverlayStyle(
color: Theme.of(context).colorScheme.secondary,
),
type: ExpandableFabType.up,
distance: 50,
childrenOffset: const Offset(-3.8, 0.0),
children: [
FloatingActionButton.small(
heroTag: "btn_ghost_grades",