forked from firka/student-legacy
fixed things that were fucked up by pub upgrade
This commit is contained in:
parent
9f5e57eec6
commit
56500406e5
@ -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"
|
||||
|
@ -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();
|
||||
|
@ -13,7 +13,8 @@ class FilterBar extends StatefulWidget implements PreferredSizeWidget {
|
||||
this.disableFading = false,
|
||||
this.scrollable = true,
|
||||
this.censored = false,
|
||||
}) : assert(items.length == controller.length);
|
||||
this.tabAlignment = TabAlignment.start,
|
||||
}) : assert(items.length == controller.length);
|
||||
|
||||
final List<Widget> items;
|
||||
final TabController controller;
|
||||
@ -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,18 +70,21 @@ class _FilterBarState extends State<FilterBar> {
|
||||
tabs: widget.censored
|
||||
? censoredItemsWidth
|
||||
.map(
|
||||
(e) => Container(
|
||||
width: e,
|
||||
height: 15,
|
||||
decoration: BoxDecoration(
|
||||
color: AppColors.of(context).text.withOpacity(.45),
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
(e) => Tab(
|
||||
child: Container(
|
||||
width: e,
|
||||
height: 15,
|
||||
decoration: BoxDecoration(
|
||||
color: AppColors.of(context).text.withOpacity(.45),
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
.toList()
|
||||
: widget.items,
|
||||
onTap: widget.onTap,
|
||||
tabAlignment: widget.tabAlignment,
|
||||
);
|
||||
|
||||
return Container(
|
||||
@ -92,19 +99,26 @@ 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: [
|
||||
index < 0.2 ? Colors.transparent : bg,
|
||||
Colors.transparent,
|
||||
Colors.transparent,
|
||||
index > widget.controller.length - 1.2 ? Colors.transparent : bg
|
||||
], stops: const [
|
||||
0,
|
||||
0.1,
|
||||
0.9,
|
||||
1
|
||||
]).createShader(bounds);
|
||||
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 [
|
||||
0,
|
||||
0.1,
|
||||
0.9,
|
||||
1
|
||||
]).createShader(bounds);
|
||||
},
|
||||
blendMode: BlendMode.dstOut,
|
||||
child: child);
|
||||
|
@ -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",
|
||||
|
Loading…
x
Reference in New Issue
Block a user