edit
This commit is contained in:
@@ -31,7 +31,7 @@ class ErrorReportScreen extends StatelessWidget {
|
||||
child: Text(
|
||||
"ekretaYou".i18n,
|
||||
style: TextStyle(
|
||||
color: AppColors.of(context).text.withOpacity(0.7),
|
||||
color: AppColors.of(context).text.withValues(alpha: 0.7),
|
||||
fontSize: 24.0,
|
||||
fontWeight: FontWeight.w700,
|
||||
),
|
||||
@@ -88,7 +88,8 @@ class ErrorReportScreen extends StatelessWidget {
|
||||
style: TextStyle(
|
||||
fontFamily: 'GeistMono',
|
||||
fontWeight: FontWeight.w500,
|
||||
color: AppColors.of(context).text.withOpacity(0.9),
|
||||
color:
|
||||
AppColors.of(context).text.withValues(alpha: 0.9),
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -276,4 +277,4 @@ class ErrorDetail extends StatelessWidget {
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@ class _LoginInputState extends State<LoginInput> {
|
||||
obscureText: obscure,
|
||||
scrollPhysics: const BouncingScrollPhysics(),
|
||||
decoration: InputDecoration(
|
||||
// fillColor: Colors.black.withOpacity(0.15),
|
||||
// fillColor: Colors.black.withValues(alpha: 0.15),
|
||||
filled: false,
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(12.0),
|
||||
@@ -104,13 +104,17 @@ class _LoginInputState extends State<LoginInput> {
|
||||
icon: widget.style == LoginInputStyle.password
|
||||
? Icon(
|
||||
obscure ? FeatherIcons.eye : FeatherIcons.eyeOff,
|
||||
color: AppColors.of(context).text.withOpacity(0.8),
|
||||
color: AppColors.of(context)
|
||||
.text
|
||||
.withValues(alpha: 0.8),
|
||||
weight: 0.1,
|
||||
size: 18.0,
|
||||
)
|
||||
: Icon(
|
||||
FeatherIcons.x,
|
||||
color: AppColors.of(context).text.withOpacity(0.8),
|
||||
color: AppColors.of(context)
|
||||
.text
|
||||
.withValues(alpha: 0.8),
|
||||
weight: 0.1,
|
||||
size: 20.0,
|
||||
),
|
||||
@@ -122,7 +126,7 @@ class _LoginInputState extends State<LoginInput> {
|
||||
style: TextStyle(
|
||||
fontSize: 14.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: AppColors.of(context).text.withOpacity(0.8),
|
||||
color: AppColors.of(context).text.withValues(alpha: 0.8),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -59,20 +59,20 @@ class LoginScreenState extends State<LoginScreen> {
|
||||
systemNavigationBarIconBrightness: Brightness.dark,
|
||||
));
|
||||
|
||||
FilcAPI.getSchools().then((schools) {
|
||||
if (schools != null) {
|
||||
schoolController.update(() {
|
||||
schoolController.schools = schools;
|
||||
});
|
||||
} else {
|
||||
ScaffoldMessenger.of(context).showSnackBar(CustomSnackBar(
|
||||
content: Text("schools_error".i18n,
|
||||
style: const TextStyle(color: Colors.white)),
|
||||
backgroundColor: AppColors.of(context).red,
|
||||
context: context,
|
||||
));
|
||||
}
|
||||
});
|
||||
// FilcAPI.getSchools().then((schools) {
|
||||
// if (schools != null) {
|
||||
// schoolController.update(() {
|
||||
// schoolController.schools = schools;
|
||||
// });
|
||||
// } else {
|
||||
// ScaffoldMessenger.of(context).showSnackBar(CustomSnackBar(
|
||||
// content: Text("schools_error".i18n,
|
||||
// style: const TextStyle(color: Colors.white)),
|
||||
// backgroundColor: AppColors.of(context).red,
|
||||
// context: context,
|
||||
// ));
|
||||
// }
|
||||
// });
|
||||
}
|
||||
|
||||
double paddingTop = 0;
|
||||
|
||||
@@ -88,7 +88,7 @@ class SchoolInputState extends State<SchoolInput> {
|
||||
width: double.infinity,
|
||||
padding: const EdgeInsets.symmetric(vertical: 10.0),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.black.withOpacity(0.15),
|
||||
color: Colors.black.withValues(alpha: 0.15),
|
||||
borderRadius: BorderRadius.circular(12.0),
|
||||
),
|
||||
child: const Center(
|
||||
|
||||
@@ -34,7 +34,7 @@ class NavbarItem extends StatelessWidget {
|
||||
padding: const EdgeInsets.all(12.0),
|
||||
decoration: BoxDecoration(
|
||||
color: active
|
||||
? Theme.of(context).colorScheme.tertiary.withOpacity(.2)
|
||||
? Theme.of(context).colorScheme.tertiary.withValues(alpha: .2)
|
||||
: null,
|
||||
borderRadius: BorderRadius.circular(14.0),
|
||||
),
|
||||
@@ -50,8 +50,8 @@ class NavbarItem extends StatelessWidget {
|
||||
// IconTheme(
|
||||
// data: IconThemeData(
|
||||
// color: Theme.of(context).brightness == Brightness.light
|
||||
// ? Colors.black.withOpacity(.5)
|
||||
// : Colors.white.withOpacity(.3),
|
||||
// ? Colors.black.withValues(alpha: .5)
|
||||
// : Colors.white.withValues(alpha: .3),
|
||||
// ),
|
||||
// child: icon,
|
||||
// ),
|
||||
|
||||
@@ -59,8 +59,10 @@ class StatusBarState extends State<StatusBar> {
|
||||
statusProvider.progress -
|
||||
36.0,
|
||||
decoration: BoxDecoration(
|
||||
color:
|
||||
Theme.of(context).colorScheme.secondary.withOpacity(0.8),
|
||||
color: Theme.of(context)
|
||||
.colorScheme
|
||||
.secondary
|
||||
.withValues(alpha: 0.8),
|
||||
borderRadius: BorderRadius.circular(45.0),
|
||||
),
|
||||
),
|
||||
|
||||
@@ -37,7 +37,7 @@ class AccountTile extends StatelessWidget {
|
||||
splashRadius: 24.0,
|
||||
onPressed: onTapMenu,
|
||||
icon: Icon(FeatherIcons.moreVertical,
|
||||
color: AppColors.of(context).text.withOpacity(0.8)),
|
||||
color: AppColors.of(context).text.withValues(alpha: 0.8)),
|
||||
),
|
||||
)
|
||||
: null,
|
||||
|
||||
@@ -49,12 +49,12 @@ class MenuRenamedSubjects extends StatelessWidget {
|
||||
style: TextStyle(
|
||||
color: AppColors.of(context)
|
||||
.text
|
||||
.withOpacity(settings.renamedSubjectsEnabled ? 1.0 : .5)),
|
||||
.withValues(alpha: settings.renamedSubjectsEnabled ? 1.0 : .5)),
|
||||
),
|
||||
leading: settings.renamedSubjectsEnabled
|
||||
? const Icon(FeatherIcons.penTool)
|
||||
: Icon(FeatherIcons.penTool,
|
||||
color: AppColors.of(context).text.withOpacity(.25)),
|
||||
color: AppColors.of(context).text.withValues(alpha: .25)),
|
||||
trailingDivider: true,
|
||||
trailing: Switch(
|
||||
onChanged: (v) async {
|
||||
@@ -200,7 +200,8 @@ class _ModifySubjectNamesState extends State<ModifySubjectNames> {
|
||||
.name,
|
||||
style: Theme.of(context).textTheme.titleSmall!.copyWith(
|
||||
fontWeight: FontWeight.w700,
|
||||
color: AppColors.of(context).text.withOpacity(0.75)),
|
||||
color:
|
||||
AppColors.of(context).text.withValues(alpha: 0.75)),
|
||||
overflow: TextOverflow.ellipsis,
|
||||
maxLines: 2,
|
||||
textAlign: TextAlign.center,
|
||||
@@ -330,7 +331,8 @@ class _ModifySubjectNamesState extends State<ModifySubjectNames> {
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.w600,
|
||||
fontSize: 18,
|
||||
color: AppColors.of(context).text.withOpacity(.85),
|
||||
color:
|
||||
AppColors.of(context).text.withValues(alpha: .85),
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -414,7 +416,7 @@ class RenamedSubjectItem extends StatelessWidget {
|
||||
onTap: () {},
|
||||
leading: Icon(
|
||||
SubjectIcon.resolveVariant(subject: subject, context: context),
|
||||
color: AppColors.of(context).text.withOpacity(.75)),
|
||||
color: AppColors.of(context).text.withValues(alpha: .75)),
|
||||
title: InkWell(
|
||||
onTap: modifyCallback,
|
||||
child: Column(
|
||||
@@ -425,7 +427,7 @@ class RenamedSubjectItem extends StatelessWidget {
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.w500,
|
||||
fontSize: 14,
|
||||
color: AppColors.of(context).text.withOpacity(.75)),
|
||||
color: AppColors.of(context).text.withValues(alpha: .75)),
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
@@ -441,7 +443,7 @@ class RenamedSubjectItem extends StatelessWidget {
|
||||
trailing: InkWell(
|
||||
onTap: removeCallback,
|
||||
child: Icon(FeatherIcons.trash,
|
||||
color: AppColors.of(context).red.withOpacity(.75)),
|
||||
color: AppColors.of(context).red.withValues(alpha: .75)),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,277 +1,277 @@
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:refilc/api/providers/database_provider.dart';
|
||||
import 'package:refilc/api/providers/user_provider.dart';
|
||||
import 'package:refilc/helpers/notification_helper.dart';
|
||||
import 'package:refilc/models/settings.dart';
|
||||
import 'package:refilc/models/user.dart';
|
||||
import 'package:refilc/theme/colors/colors.dart';
|
||||
// import 'package:refilc_mobile_ui/common/beta_chip.dart';
|
||||
import 'package:refilc_mobile_ui/common/panel/panel_button.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_feather_icons/flutter_feather_icons.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:refilc_mobile_ui/common/splitted_panel/splitted_panel.dart';
|
||||
import 'notifications_screen.i18n.dart';
|
||||
// import 'package:flutter/foundation.dart';
|
||||
// import 'package:refilc/api/providers/database_provider.dart';
|
||||
// import 'package:refilc/api/providers/user_provider.dart';
|
||||
// import 'package:refilc/helpers/notification_helper.dart';
|
||||
// import 'package:refilc/models/settings.dart';
|
||||
// import 'package:refilc/models/user.dart';
|
||||
// import 'package:refilc/theme/colors/colors.dart';
|
||||
// // import 'package:refilc_mobile_ui/common/beta_chip.dart';
|
||||
// import 'package:refilc_mobile_ui/common/panel/panel_button.dart';
|
||||
// import 'package:flutter/cupertino.dart';
|
||||
// import 'package:flutter/material.dart';
|
||||
// import 'package:flutter_feather_icons/flutter_feather_icons.dart';
|
||||
// import 'package:provider/provider.dart';
|
||||
// import 'package:refilc_mobile_ui/common/splitted_panel/splitted_panel.dart';
|
||||
// import 'notifications_screen.i18n.dart';
|
||||
|
||||
class MenuNotifications extends StatelessWidget {
|
||||
const MenuNotifications({
|
||||
super.key,
|
||||
this.borderRadius = const BorderRadius.vertical(
|
||||
top: Radius.circular(4.0), bottom: Radius.circular(4.0)),
|
||||
});
|
||||
// class MenuNotifications extends StatelessWidget {
|
||||
// const MenuNotifications({
|
||||
// super.key,
|
||||
// this.borderRadius = const BorderRadius.vertical(
|
||||
// top: Radius.circular(4.0), bottom: Radius.circular(4.0)),
|
||||
// });
|
||||
|
||||
final BorderRadius borderRadius;
|
||||
// final BorderRadius borderRadius;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return PanelButton(
|
||||
onPressed: () => Navigator.of(context, rootNavigator: true).push(
|
||||
CupertinoPageRoute(builder: (context) => const NotificationsScreen()),
|
||||
),
|
||||
title: Row(
|
||||
children: [
|
||||
Text(
|
||||
"notifications_screen".i18n,
|
||||
),
|
||||
// const SizedBox(width: 5.0),
|
||||
// const BetaChip(
|
||||
// disabled: false,
|
||||
// ),
|
||||
],
|
||||
),
|
||||
leading: Icon(
|
||||
FeatherIcons.messageCircle,
|
||||
size: 22.0,
|
||||
color: AppColors.of(context).text.withOpacity(0.95),
|
||||
),
|
||||
trailing: Icon(
|
||||
FeatherIcons.chevronRight,
|
||||
size: 22.0,
|
||||
color: AppColors.of(context).text.withOpacity(0.95),
|
||||
),
|
||||
borderRadius: borderRadius,
|
||||
);
|
||||
}
|
||||
}
|
||||
// @override
|
||||
// Widget build(BuildContext context) {
|
||||
// return PanelButton(
|
||||
// onPressed: () => Navigator.of(context, rootNavigator: true).push(
|
||||
// CupertinoPageRoute(builder: (context) => const NotificationsScreen()),
|
||||
// ),
|
||||
// title: Row(
|
||||
// children: [
|
||||
// Text(
|
||||
// "notifications_screen".i18n,
|
||||
// ),
|
||||
// // const SizedBox(width: 5.0),
|
||||
// // const BetaChip(
|
||||
// // disabled: false,
|
||||
// // ),
|
||||
// ],
|
||||
// ),
|
||||
// leading: Icon(
|
||||
// FeatherIcons.messageCircle,
|
||||
// size: 22.0,
|
||||
// color: AppColors.of(context).text.withValues(alpha: 0.95),
|
||||
// ),
|
||||
// trailing: Icon(
|
||||
// FeatherIcons.chevronRight,
|
||||
// size: 22.0,
|
||||
// color: AppColors.of(context).text.withValues(alpha: 0.95),
|
||||
// ),
|
||||
// borderRadius: borderRadius,
|
||||
// );
|
||||
// }
|
||||
// }
|
||||
|
||||
class NotificationsScreen extends StatelessWidget {
|
||||
const NotificationsScreen({super.key});
|
||||
// class NotificationsScreen extends StatelessWidget {
|
||||
// const NotificationsScreen({super.key});
|
||||
|
||||
// Set all notification categories as seen to avoid spamming the user with notifications when they turn on notifications
|
||||
void setAll(BuildContext context, DateTime date) {
|
||||
DatabaseProvider database =
|
||||
Provider.of<DatabaseProvider>(context, listen: false);
|
||||
User? user = Provider.of<UserProvider>(context, listen: false).user;
|
||||
if (user != null) {
|
||||
for (LastSeenCategory category in LastSeenCategory.values) {
|
||||
database.userStore
|
||||
.storeLastSeen(date, userId: user.id, category: category);
|
||||
}
|
||||
}
|
||||
}
|
||||
// Set all notification categories as seen to avoid spamming the user with notifications when they turn on notifications
|
||||
// void setAll(BuildContext context, DateTime date) {
|
||||
// DatabaseProvider database =
|
||||
// Provider.of<DatabaseProvider>(context, listen: false);
|
||||
// User? user = Provider.of<UserProvider>(context, listen: false).user;
|
||||
// if (user != null) {
|
||||
// for (LastSeenCategory category in LastSeenCategory.values) {
|
||||
// database.userStore
|
||||
// .storeLastSeen(date, userId: user.id, category: category);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
SettingsProvider settings = Provider.of<SettingsProvider>(context);
|
||||
// @override
|
||||
// Widget build(BuildContext context) {
|
||||
// SettingsProvider settings = Provider.of<SettingsProvider>(context);
|
||||
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
surfaceTintColor: Theme.of(context).scaffoldBackgroundColor,
|
||||
leading: BackButton(color: AppColors.of(context).text),
|
||||
title: Text(
|
||||
"notifications_screen".i18n,
|
||||
style: TextStyle(color: AppColors.of(context).text),
|
||||
),
|
||||
),
|
||||
body: SingleChildScrollView(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 16.0, horizontal: 24.0),
|
||||
child: Column(
|
||||
children: [
|
||||
SplittedPanel(
|
||||
padding: const EdgeInsets.only(top: 8.0),
|
||||
cardPadding: const EdgeInsets.all(4.0),
|
||||
isSeparated: true,
|
||||
children: [
|
||||
PanelButton(
|
||||
padding: const EdgeInsets.only(left: 14.0, right: 6.0),
|
||||
onPressed: () {
|
||||
settings.update(
|
||||
notificationsGradesEnabled:
|
||||
!settings.notificationsGradesEnabled);
|
||||
setAll(context, DateTime.now());
|
||||
},
|
||||
title: Text(
|
||||
"grades".i18n,
|
||||
style: TextStyle(
|
||||
color: AppColors.of(context).text.withOpacity(
|
||||
settings.notificationsGradesEnabled ? .95 : .25),
|
||||
),
|
||||
),
|
||||
leading: Icon(
|
||||
FeatherIcons.bookmark,
|
||||
size: 22.0,
|
||||
color: AppColors.of(context).text.withOpacity(
|
||||
settings.notificationsGradesEnabled ? .95 : .25),
|
||||
),
|
||||
trailing: Switch(
|
||||
onChanged: (v) =>
|
||||
settings.update(notificationsGradesEnabled: v),
|
||||
value: settings.notificationsGradesEnabled,
|
||||
activeColor: Theme.of(context).colorScheme.secondary,
|
||||
),
|
||||
borderRadius: const BorderRadius.vertical(
|
||||
top: Radius.circular(12.0),
|
||||
bottom: Radius.circular(12.0),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
SplittedPanel(
|
||||
padding: const EdgeInsets.only(top: 8.0),
|
||||
cardPadding: const EdgeInsets.all(4.0),
|
||||
isSeparated: true,
|
||||
children: [
|
||||
PanelButton(
|
||||
padding: const EdgeInsets.only(left: 14.0, right: 6.0),
|
||||
onPressed: () {
|
||||
settings.update(
|
||||
notificationsAbsencesEnabled:
|
||||
!settings.notificationsAbsencesEnabled);
|
||||
setAll(context, DateTime.now());
|
||||
},
|
||||
title: Text(
|
||||
"absences".i18n,
|
||||
style: TextStyle(
|
||||
color: AppColors.of(context).text.withOpacity(
|
||||
settings.notificationsAbsencesEnabled ? .95 : .25),
|
||||
),
|
||||
),
|
||||
leading: Icon(
|
||||
FeatherIcons.clock,
|
||||
size: 22.0,
|
||||
color: AppColors.of(context).text.withOpacity(
|
||||
settings.notificationsAbsencesEnabled ? .95 : .25),
|
||||
),
|
||||
trailing: Switch(
|
||||
onChanged: (v) =>
|
||||
settings.update(notificationsAbsencesEnabled: v),
|
||||
value: settings.notificationsAbsencesEnabled,
|
||||
activeColor: Theme.of(context).colorScheme.secondary,
|
||||
),
|
||||
borderRadius: const BorderRadius.vertical(
|
||||
top: Radius.circular(12.0),
|
||||
bottom: Radius.circular(12.0),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
SplittedPanel(
|
||||
padding: const EdgeInsets.only(top: 8.0),
|
||||
cardPadding: const EdgeInsets.all(4.0),
|
||||
isSeparated: true,
|
||||
children: [
|
||||
PanelButton(
|
||||
padding: const EdgeInsets.only(left: 14.0, right: 6.0),
|
||||
onPressed: () {
|
||||
settings.update(
|
||||
notificationsMessagesEnabled:
|
||||
!settings.notificationsMessagesEnabled);
|
||||
setAll(context, DateTime.now());
|
||||
},
|
||||
title: Text(
|
||||
"messages".i18n,
|
||||
style: TextStyle(
|
||||
color: AppColors.of(context).text.withOpacity(
|
||||
settings.notificationsMessagesEnabled ? .95 : .25),
|
||||
),
|
||||
),
|
||||
leading: Icon(
|
||||
FeatherIcons.messageSquare,
|
||||
size: 22.0,
|
||||
color: AppColors.of(context).text.withOpacity(
|
||||
settings.notificationsMessagesEnabled ? .95 : .25),
|
||||
),
|
||||
trailing: Switch(
|
||||
onChanged: (v) =>
|
||||
settings.update(notificationsMessagesEnabled: v),
|
||||
value: settings.notificationsMessagesEnabled,
|
||||
activeColor: Theme.of(context).colorScheme.secondary,
|
||||
),
|
||||
borderRadius: const BorderRadius.vertical(
|
||||
top: Radius.circular(12.0),
|
||||
bottom: Radius.circular(12.0),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
SplittedPanel(
|
||||
padding: const EdgeInsets.only(top: 8.0),
|
||||
cardPadding: const EdgeInsets.all(4.0),
|
||||
isSeparated: true,
|
||||
children: [
|
||||
PanelButton(
|
||||
padding: const EdgeInsets.only(left: 14.0, right: 6.0),
|
||||
onPressed: () {
|
||||
settings.update(
|
||||
notificationsLessonsEnabled:
|
||||
!settings.notificationsLessonsEnabled);
|
||||
setAll(context, DateTime.now());
|
||||
},
|
||||
title: Text(
|
||||
"lessons".i18n,
|
||||
style: TextStyle(
|
||||
color: AppColors.of(context).text.withOpacity(
|
||||
settings.notificationsLessonsEnabled ? .95 : .25),
|
||||
),
|
||||
),
|
||||
leading: Icon(
|
||||
FeatherIcons.bookmark,
|
||||
size: 22.0,
|
||||
color: AppColors.of(context).text.withOpacity(
|
||||
settings.notificationsLessonsEnabled ? .95 : .25),
|
||||
),
|
||||
trailing: Switch(
|
||||
onChanged: (v) =>
|
||||
settings.update(notificationsLessonsEnabled: v),
|
||||
value: settings.notificationsLessonsEnabled,
|
||||
activeColor: Theme.of(context).colorScheme.secondary,
|
||||
),
|
||||
borderRadius: const BorderRadius.vertical(
|
||||
top: Radius.circular(12.0),
|
||||
bottom: Radius.circular(12.0),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
// only used for debugging, pressing **will** cause notification spam
|
||||
kDebugMode
|
||||
? SplittedPanel(
|
||||
padding: const EdgeInsets.only(top: 9.0),
|
||||
cardPadding: const EdgeInsets.all(4.0),
|
||||
isSeparated: true,
|
||||
children: [
|
||||
PanelButton(
|
||||
onPressed: () => setAll(
|
||||
context, DateTime(1970, 1, 1, 0, 0, 0, 0, 0)),
|
||||
title: Text("set_all_as_unseen".i18n),
|
||||
leading: Icon(
|
||||
FeatherIcons.mail,
|
||||
size: 22.0,
|
||||
color: AppColors.of(context).text.withOpacity(0.95),
|
||||
),
|
||||
borderRadius: const BorderRadius.vertical(
|
||||
top: Radius.circular(12.0),
|
||||
bottom: Radius.circular(12.0)),
|
||||
)
|
||||
],
|
||||
)
|
||||
: const SizedBox.shrink(),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
// return Scaffold(
|
||||
// appBar: AppBar(
|
||||
// surfaceTintColor: Theme.of(context).scaffoldBackgroundColor,
|
||||
// leading: BackButton(color: AppColors.of(context).text),
|
||||
// title: Text(
|
||||
// "notifications_screen".i18n,
|
||||
// style: TextStyle(color: AppColors.of(context).text),
|
||||
// ),
|
||||
// ),
|
||||
// body: SingleChildScrollView(
|
||||
// child: Padding(
|
||||
// padding: const EdgeInsets.symmetric(vertical: 16.0, horizontal: 24.0),
|
||||
// child: Column(
|
||||
// children: [
|
||||
// SplittedPanel(
|
||||
// padding: const EdgeInsets.only(top: 8.0),
|
||||
// cardPadding: const EdgeInsets.all(4.0),
|
||||
// isSeparated: true,
|
||||
// children: [
|
||||
// PanelButton(
|
||||
// padding: const EdgeInsets.only(left: 14.0, right: 6.0),
|
||||
// onPressed: () {
|
||||
// settings.update(
|
||||
// notificationsGradesEnabled:
|
||||
// !settings.notificationsGradesEnabled);
|
||||
// setAll(context, DateTime.now());
|
||||
// },
|
||||
// title: Text(
|
||||
// "grades".i18n,
|
||||
// style: TextStyle(
|
||||
// color: AppColors.of(context).text.withValues(alpha:
|
||||
// settings.notificationsGradesEnabled ? .95 : .25),
|
||||
// ),
|
||||
// ),
|
||||
// leading: Icon(
|
||||
// FeatherIcons.bookmark,
|
||||
// size: 22.0,
|
||||
// color: AppColors.of(context).text.withValues(alpha:
|
||||
// settings.notificationsGradesEnabled ? .95 : .25),
|
||||
// ),
|
||||
// trailing: Switch(
|
||||
// onChanged: (v) =>
|
||||
// settings.update(notificationsGradesEnabled: v),
|
||||
// value: settings.notificationsGradesEnabled,
|
||||
// activeColor: Theme.of(context).colorScheme.secondary,
|
||||
// ),
|
||||
// borderRadius: const BorderRadius.vertical(
|
||||
// top: Radius.circular(12.0),
|
||||
// bottom: Radius.circular(12.0),
|
||||
// ),
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// SplittedPanel(
|
||||
// padding: const EdgeInsets.only(top: 8.0),
|
||||
// cardPadding: const EdgeInsets.all(4.0),
|
||||
// isSeparated: true,
|
||||
// children: [
|
||||
// PanelButton(
|
||||
// padding: const EdgeInsets.only(left: 14.0, right: 6.0),
|
||||
// onPressed: () {
|
||||
// settings.update(
|
||||
// notificationsAbsencesEnabled:
|
||||
// !settings.notificationsAbsencesEnabled);
|
||||
// setAll(context, DateTime.now());
|
||||
// },
|
||||
// title: Text(
|
||||
// "absences".i18n,
|
||||
// style: TextStyle(
|
||||
// color: AppColors.of(context).text.withValues(alpha:
|
||||
// settings.notificationsAbsencesEnabled ? .95 : .25),
|
||||
// ),
|
||||
// ),
|
||||
// leading: Icon(
|
||||
// FeatherIcons.clock,
|
||||
// size: 22.0,
|
||||
// color: AppColors.of(context).text.withValues(alpha:
|
||||
// settings.notificationsAbsencesEnabled ? .95 : .25),
|
||||
// ),
|
||||
// trailing: Switch(
|
||||
// onChanged: (v) =>
|
||||
// settings.update(notificationsAbsencesEnabled: v),
|
||||
// value: settings.notificationsAbsencesEnabled,
|
||||
// activeColor: Theme.of(context).colorScheme.secondary,
|
||||
// ),
|
||||
// borderRadius: const BorderRadius.vertical(
|
||||
// top: Radius.circular(12.0),
|
||||
// bottom: Radius.circular(12.0),
|
||||
// ),
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// SplittedPanel(
|
||||
// padding: const EdgeInsets.only(top: 8.0),
|
||||
// cardPadding: const EdgeInsets.all(4.0),
|
||||
// isSeparated: true,
|
||||
// children: [
|
||||
// PanelButton(
|
||||
// padding: const EdgeInsets.only(left: 14.0, right: 6.0),
|
||||
// onPressed: () {
|
||||
// settings.update(
|
||||
// notificationsMessagesEnabled:
|
||||
// !settings.notificationsMessagesEnabled);
|
||||
// setAll(context, DateTime.now());
|
||||
// },
|
||||
// title: Text(
|
||||
// "messages".i18n,
|
||||
// style: TextStyle(
|
||||
// color: AppColors.of(context).text.withValues(alpha:
|
||||
// settings.notificationsMessagesEnabled ? .95 : .25),
|
||||
// ),
|
||||
// ),
|
||||
// leading: Icon(
|
||||
// FeatherIcons.messageSquare,
|
||||
// size: 22.0,
|
||||
// color: AppColors.of(context).text.withValues(alpha:
|
||||
// settings.notificationsMessagesEnabled ? .95 : .25),
|
||||
// ),
|
||||
// trailing: Switch(
|
||||
// onChanged: (v) =>
|
||||
// settings.update(notificationsMessagesEnabled: v),
|
||||
// value: settings.notificationsMessagesEnabled,
|
||||
// activeColor: Theme.of(context).colorScheme.secondary,
|
||||
// ),
|
||||
// borderRadius: const BorderRadius.vertical(
|
||||
// top: Radius.circular(12.0),
|
||||
// bottom: Radius.circular(12.0),
|
||||
// ),
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// SplittedPanel(
|
||||
// padding: const EdgeInsets.only(top: 8.0),
|
||||
// cardPadding: const EdgeInsets.all(4.0),
|
||||
// isSeparated: true,
|
||||
// children: [
|
||||
// PanelButton(
|
||||
// padding: const EdgeInsets.only(left: 14.0, right: 6.0),
|
||||
// onPressed: () {
|
||||
// settings.update(
|
||||
// notificationsLessonsEnabled:
|
||||
// !settings.notificationsLessonsEnabled);
|
||||
// setAll(context, DateTime.now());
|
||||
// },
|
||||
// title: Text(
|
||||
// "lessons".i18n,
|
||||
// style: TextStyle(
|
||||
// color: AppColors.of(context).text.withValues(alpha:
|
||||
// settings.notificationsLessonsEnabled ? .95 : .25),
|
||||
// ),
|
||||
// ),
|
||||
// leading: Icon(
|
||||
// FeatherIcons.bookmark,
|
||||
// size: 22.0,
|
||||
// color: AppColors.of(context).text.withValues(alpha:
|
||||
// settings.notificationsLessonsEnabled ? .95 : .25),
|
||||
// ),
|
||||
// trailing: Switch(
|
||||
// onChanged: (v) =>
|
||||
// settings.update(notificationsLessonsEnabled: v),
|
||||
// value: settings.notificationsLessonsEnabled,
|
||||
// activeColor: Theme.of(context).colorScheme.secondary,
|
||||
// ),
|
||||
// borderRadius: const BorderRadius.vertical(
|
||||
// top: Radius.circular(12.0),
|
||||
// bottom: Radius.circular(12.0),
|
||||
// ),
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// // only used for debugging, pressing **will** cause notification spam
|
||||
// kDebugMode
|
||||
// ? SplittedPanel(
|
||||
// padding: const EdgeInsets.only(top: 9.0),
|
||||
// cardPadding: const EdgeInsets.all(4.0),
|
||||
// isSeparated: true,
|
||||
// children: [
|
||||
// PanelButton(
|
||||
// onPressed: () => setAll(
|
||||
// context, DateTime(1970, 1, 1, 0, 0, 0, 0, 0)),
|
||||
// title: Text("set_all_as_unseen".i18n),
|
||||
// leading: Icon(
|
||||
// FeatherIcons.mail,
|
||||
// size: 22.0,
|
||||
// color: AppColors.of(context).text.withValues(alpha: 0.95),
|
||||
// ),
|
||||
// borderRadius: const BorderRadius.vertical(
|
||||
// top: Radius.circular(12.0),
|
||||
// bottom: Radius.circular(12.0)),
|
||||
// )
|
||||
// ],
|
||||
// )
|
||||
// : const SizedBox.shrink(),
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// );
|
||||
// }
|
||||
// }
|
||||
|
||||
@@ -401,10 +401,8 @@ class SettingsHelper {
|
||||
width: 12.0,
|
||||
height: 12.0,
|
||||
decoration: BoxDecoration(
|
||||
color: Theme.of(context)
|
||||
.colorScheme
|
||||
.secondary
|
||||
.withOpacity((index + 1) / (vibrationTitle.length + 1)),
|
||||
color: Theme.of(context).colorScheme.secondary.withValues(
|
||||
alpha: (index + 1) / (vibrationTitle.length + 1)),
|
||||
shape: BoxShape.circle,
|
||||
),
|
||||
),
|
||||
@@ -448,7 +446,7 @@ class SettingsHelper {
|
||||
// width: 175.0,
|
||||
// decoration: BoxDecoration(
|
||||
// borderRadius: BorderRadius.circular(12.0),
|
||||
// color: AppColors.of(context).text.withOpacity(.25),
|
||||
// color: AppColors.of(context).text.withValues(alpha: .25),
|
||||
// ),
|
||||
// ),
|
||||
// );
|
||||
@@ -745,7 +743,7 @@ class _BellDelaySettingState extends State<BellDelaySetting>
|
||||
style: TextStyle(
|
||||
fontSize: 12.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: AppColors.of(context).text.withOpacity(.75))),
|
||||
color: AppColors.of(context).text.withValues(alpha: .75))),
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(bottom: 12.0, top: 6.0),
|
||||
child: Column(
|
||||
@@ -922,6 +920,7 @@ class _LiveActivityColorSettingState extends State<LiveActivityColorSetting> {
|
||||
child: Column(children: [
|
||||
MaterialColorPicker(
|
||||
allowShades: false,
|
||||
colors: [...fullMaterialColors],
|
||||
selectedColor: settings.liveActivityColor,
|
||||
onMainColorChange: (k) {
|
||||
if (!Provider.of<PlusProvider>(context, listen: false)
|
||||
|
||||
@@ -1452,4 +1452,4 @@ class SettingsScreenState extends State<SettingsScreen>
|
||||
void openSubMenu(BuildContext context, StatefulWidget screen) =>
|
||||
Navigator.of(context)
|
||||
.push(CupertinoPageRoute(builder: (context) => screen));
|
||||
}
|
||||
}
|
||||
@@ -2,14 +2,12 @@
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:refilc/api/client.dart';
|
||||
import 'package:refilc/api/providers/database_provider.dart';
|
||||
import 'package:refilc/api/providers/user_provider.dart';
|
||||
import 'package:refilc/models/settings.dart';
|
||||
import 'package:refilc/theme/colors/colors.dart';
|
||||
import 'package:refilc_mobile_ui/common/panel/panel_button.dart';
|
||||
import 'package:refilc_mobile_ui/common/splitted_panel/splitted_panel.dart';
|
||||
import 'package:refilc_mobile_ui/screens/login/qwid_login.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_feather_icons/flutter_feather_icons.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
@@ -29,15 +27,19 @@ class MenuCloudSyncSettings extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return PanelButton(
|
||||
onPressed: () => Navigator.of(context, rootNavigator: true).push(
|
||||
CupertinoPageRoute(
|
||||
builder: (context) => const CloudSyncSettingsScreen()),
|
||||
// onPressed: () => Navigator.of(context, rootNavigator: true).push(
|
||||
// CupertinoPageRoute(
|
||||
// builder: (context) => const CloudSyncSettingsScreen()),
|
||||
// ),
|
||||
title: Text(
|
||||
"cloud_sync".i18n,
|
||||
style:
|
||||
TextStyle(color: AppColors.of(context).text.withValues(alpha: 0.3)),
|
||||
),
|
||||
title: Text("cloud_sync".i18n),
|
||||
leading: Icon(
|
||||
FeatherIcons.uploadCloud,
|
||||
size: 22.0,
|
||||
color: AppColors.of(context).text.withOpacity(0.95),
|
||||
color: AppColors.of(context).text.withValues(alpha: 0.25),
|
||||
),
|
||||
borderRadius: borderRadius,
|
||||
);
|
||||
@@ -163,8 +165,9 @@ class CloudSyncSettingsScreenState extends State<CloudSyncSettingsScreen> {
|
||||
title: Text(
|
||||
"qwit_sign_in".i18n,
|
||||
style: TextStyle(
|
||||
color: AppColors.of(context).text.withOpacity(
|
||||
settingsProvider.gradeOpeningFun ? .95 : .25),
|
||||
color: AppColors.of(context).text.withValues(
|
||||
alpha:
|
||||
settingsProvider.gradeOpeningFun ? .95 : .25),
|
||||
),
|
||||
),
|
||||
borderRadius: const BorderRadius.vertical(
|
||||
@@ -232,8 +235,9 @@ class CloudSyncSettingsScreenState extends State<CloudSyncSettingsScreen> {
|
||||
title: Text(
|
||||
"sync_now".i18n,
|
||||
style: TextStyle(
|
||||
color: AppColors.of(context).text.withOpacity(
|
||||
settingsProvider.gradeOpeningFun ? .95 : .25),
|
||||
color: AppColors.of(context).text.withValues(
|
||||
alpha:
|
||||
settingsProvider.gradeOpeningFun ? .95 : .25),
|
||||
),
|
||||
),
|
||||
borderRadius: const BorderRadius.vertical(
|
||||
|
||||
@@ -111,7 +111,7 @@ class EditSubjectScreenState extends State<EditSubjectScreen> {
|
||||
leading: Icon(
|
||||
FeatherIcons.penTool,
|
||||
size: 22.0,
|
||||
color: AppColors.of(context).text.withOpacity(0.95),
|
||||
color: AppColors.of(context).text.withValues(alpha: 0.95),
|
||||
),
|
||||
borderRadius: const BorderRadius.vertical(
|
||||
top: Radius.circular(12.0),
|
||||
@@ -134,7 +134,7 @@ class EditSubjectScreenState extends State<EditSubjectScreen> {
|
||||
leading: Icon(
|
||||
FeatherIcons.user,
|
||||
size: 22.0,
|
||||
color: AppColors.of(context).text.withOpacity(0.95),
|
||||
color: AppColors.of(context).text.withValues(alpha: 0.95),
|
||||
),
|
||||
borderRadius: const BorderRadius.vertical(
|
||||
top: Radius.circular(12.0),
|
||||
@@ -157,13 +157,13 @@ class EditSubjectScreenState extends State<EditSubjectScreen> {
|
||||
// title: Text(
|
||||
// "rounding".i18n,
|
||||
// style: TextStyle(
|
||||
// color: AppColors.of(context).text.withOpacity(.95),
|
||||
// color: AppColors.of(context).text.withValues(alpha: .95),
|
||||
// ),
|
||||
// ),
|
||||
// leading: Icon(
|
||||
// FeatherIcons.gitCommit,
|
||||
// size: 22.0,
|
||||
// color: AppColors.of(context).text.withOpacity(.95),
|
||||
// color: AppColors.of(context).text.withValues(alpha: .95),
|
||||
// ),
|
||||
// trailing: Text(
|
||||
// ((widget.subject.customRounding ??
|
||||
@@ -273,6 +273,9 @@ class EditSubjectScreenState extends State<EditSubjectScreen> {
|
||||
await databaseProvider.userStore
|
||||
.storeRenamedSubjects(renamedSubjs, userId: user.id!);
|
||||
|
||||
print("USER ID BELOW FOR DEBUG:");
|
||||
print(user.id);
|
||||
|
||||
updateProviders();
|
||||
|
||||
Navigator.of(context).pop();
|
||||
|
||||
@@ -38,7 +38,7 @@ class MenuExtrasSettings extends StatelessWidget {
|
||||
leading: Icon(
|
||||
FeatherIcons.edit,
|
||||
size: 22.0,
|
||||
color: AppColors.of(context).text.withOpacity(0.95),
|
||||
color: AppColors.of(context).text.withValues(alpha: 0.95),
|
||||
),
|
||||
trailing: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
@@ -51,7 +51,7 @@ class MenuExtrasSettings extends StatelessWidget {
|
||||
Icon(
|
||||
FeatherIcons.chevronRight,
|
||||
size: 22.0,
|
||||
color: AppColors.of(context).text.withOpacity(0.95),
|
||||
color: AppColors.of(context).text.withValues(alpha: 0.95),
|
||||
)
|
||||
],
|
||||
),
|
||||
@@ -126,15 +126,16 @@ class ExtrasSettingsScreenState extends State<ExtrasSettingsScreen> {
|
||||
title: Text(
|
||||
"surprise_grades".i18n,
|
||||
style: TextStyle(
|
||||
color: AppColors.of(context).text.withOpacity(
|
||||
settingsProvider.gradeOpeningFun ? .95 : .25),
|
||||
color: AppColors.of(context).text.withValues(
|
||||
alpha:
|
||||
settingsProvider.gradeOpeningFun ? .95 : .25),
|
||||
),
|
||||
),
|
||||
leading: Icon(
|
||||
FeatherIcons.gift,
|
||||
size: 22.0,
|
||||
color: AppColors.of(context).text.withOpacity(
|
||||
settingsProvider.gradeOpeningFun ? .95 : .25),
|
||||
color: AppColors.of(context).text.withValues(
|
||||
alpha: settingsProvider.gradeOpeningFun ? .95 : .25),
|
||||
),
|
||||
trailing: Switch(
|
||||
onChanged: (v) async {
|
||||
|
||||
@@ -30,12 +30,12 @@ class MenuGeneralSettings extends StatelessWidget {
|
||||
leading: Icon(
|
||||
FeatherIcons.settings,
|
||||
size: 22.0,
|
||||
color: AppColors.of(context).text.withOpacity(0.95),
|
||||
color: AppColors.of(context).text.withValues(alpha: 0.95),
|
||||
),
|
||||
trailing: Icon(
|
||||
FeatherIcons.chevronRight,
|
||||
size: 22.0,
|
||||
color: AppColors.of(context).text.withOpacity(0.95),
|
||||
color: AppColors.of(context).text.withValues(alpha: 0.95),
|
||||
),
|
||||
borderRadius: borderRadius,
|
||||
);
|
||||
@@ -94,8 +94,9 @@ class GeneralSettingsScreenState extends State<GeneralSettingsScreen> {
|
||||
title: Text(
|
||||
"bell_delay".i18n,
|
||||
style: TextStyle(
|
||||
color: AppColors.of(context).text.withOpacity(
|
||||
settingsProvider.bellDelayEnabled ? .95 : .25),
|
||||
color: AppColors.of(context).text.withValues(
|
||||
alpha:
|
||||
settingsProvider.bellDelayEnabled ? .95 : .25),
|
||||
),
|
||||
),
|
||||
leading: Icon(
|
||||
@@ -103,8 +104,8 @@ class GeneralSettingsScreenState extends State<GeneralSettingsScreen> {
|
||||
? FeatherIcons.bell
|
||||
: FeatherIcons.bellOff,
|
||||
size: 22.0,
|
||||
color: AppColors.of(context).text.withOpacity(
|
||||
settingsProvider.bellDelayEnabled ? .95 : .25),
|
||||
color: AppColors.of(context).text.withValues(
|
||||
alpha: settingsProvider.bellDelayEnabled ? .95 : .25),
|
||||
),
|
||||
trailingDivider: true,
|
||||
trailing: Switch(
|
||||
@@ -133,13 +134,14 @@ class GeneralSettingsScreenState extends State<GeneralSettingsScreen> {
|
||||
title: Text(
|
||||
"rounding".i18n,
|
||||
style: TextStyle(
|
||||
color: AppColors.of(context).text.withOpacity(.95),
|
||||
color:
|
||||
AppColors.of(context).text.withValues(alpha: .95),
|
||||
),
|
||||
),
|
||||
leading: Icon(
|
||||
FeatherIcons.gitCommit,
|
||||
size: 22.0,
|
||||
color: AppColors.of(context).text.withOpacity(.95),
|
||||
color: AppColors.of(context).text.withValues(alpha: .95),
|
||||
),
|
||||
trailing: Text(
|
||||
(settingsProvider.rounding / 10).toStringAsFixed(1),
|
||||
@@ -167,15 +169,15 @@ class GeneralSettingsScreenState extends State<GeneralSettingsScreen> {
|
||||
title: Text(
|
||||
"graph_class_avg".i18n,
|
||||
style: TextStyle(
|
||||
color: AppColors.of(context).text.withOpacity(
|
||||
settingsProvider.graphClassAvg ? .95 : .25),
|
||||
color: AppColors.of(context).text.withValues(
|
||||
alpha: settingsProvider.graphClassAvg ? .95 : .25),
|
||||
),
|
||||
),
|
||||
leading: Icon(
|
||||
FeatherIcons.barChart,
|
||||
size: 22.0,
|
||||
color: AppColors.of(context).text.withOpacity(
|
||||
settingsProvider.graphClassAvg ? .95 : .25),
|
||||
color: AppColors.of(context).text.withValues(
|
||||
alpha: settingsProvider.graphClassAvg ? .95 : .25),
|
||||
),
|
||||
trailing: Switch(
|
||||
onChanged: (v) =>
|
||||
@@ -203,13 +205,14 @@ class GeneralSettingsScreenState extends State<GeneralSettingsScreen> {
|
||||
title: Text(
|
||||
"startpage".i18n,
|
||||
style: TextStyle(
|
||||
color: AppColors.of(context).text.withOpacity(.95),
|
||||
color:
|
||||
AppColors.of(context).text.withValues(alpha: .95),
|
||||
),
|
||||
),
|
||||
leading: Icon(
|
||||
FeatherIcons.play,
|
||||
size: 22.0,
|
||||
color: AppColors.of(context).text.withOpacity(.95),
|
||||
color: AppColors.of(context).text.withValues(alpha: .95),
|
||||
),
|
||||
trailing: Text(
|
||||
startPageTitle.capital(),
|
||||
@@ -235,13 +238,14 @@ class GeneralSettingsScreenState extends State<GeneralSettingsScreen> {
|
||||
title: Text(
|
||||
"language".i18n,
|
||||
style: TextStyle(
|
||||
color: AppColors.of(context).text.withOpacity(.95),
|
||||
color:
|
||||
AppColors.of(context).text.withValues(alpha: .95),
|
||||
),
|
||||
),
|
||||
leading: Icon(
|
||||
FeatherIcons.globe,
|
||||
size: 22.0,
|
||||
color: AppColors.of(context).text.withOpacity(.95),
|
||||
color: AppColors.of(context).text.withValues(alpha: .95),
|
||||
),
|
||||
trailing: Text(
|
||||
languageText,
|
||||
@@ -267,13 +271,13 @@ class GeneralSettingsScreenState extends State<GeneralSettingsScreen> {
|
||||
// title: Text(
|
||||
// "vibrate".i18n,
|
||||
// style: TextStyle(
|
||||
// color: AppColors.of(context).text.withOpacity(.95),
|
||||
// color: AppColors.of(context).text.withValues(alpha: .95),
|
||||
// ),
|
||||
// ),
|
||||
// leading: Icon(
|
||||
// FeatherIcons.radio,
|
||||
// size: 22.0,
|
||||
// color: AppColors.of(context).text.withOpacity(.95),
|
||||
// color: AppColors.of(context).text.withValues(alpha: .95),
|
||||
// ),
|
||||
// trailing: Text(
|
||||
// vibrateTitle,
|
||||
@@ -301,8 +305,8 @@ class GeneralSettingsScreenState extends State<GeneralSettingsScreen> {
|
||||
title: Text(
|
||||
"show_breaks".i18n,
|
||||
style: TextStyle(
|
||||
color: AppColors.of(context).text.withOpacity(
|
||||
settingsProvider.showBreaks ? .95 : .25),
|
||||
color: AppColors.of(context).text.withValues(
|
||||
alpha: settingsProvider.showBreaks ? .95 : .25),
|
||||
),
|
||||
),
|
||||
leading: Icon(
|
||||
@@ -310,9 +314,8 @@ class GeneralSettingsScreenState extends State<GeneralSettingsScreen> {
|
||||
? FeatherIcons.eye
|
||||
: FeatherIcons.eyeOff,
|
||||
size: 22.0,
|
||||
color: AppColors.of(context)
|
||||
.text
|
||||
.withOpacity(settingsProvider.showBreaks ? .95 : .25),
|
||||
color: AppColors.of(context).text.withValues(
|
||||
alpha: settingsProvider.showBreaks ? .95 : .25),
|
||||
),
|
||||
trailing: Switch(
|
||||
onChanged: (v) => settingsProvider.update(showBreaks: v),
|
||||
@@ -341,15 +344,15 @@ class GeneralSettingsScreenState extends State<GeneralSettingsScreen> {
|
||||
title: Text(
|
||||
"news".i18n,
|
||||
style: TextStyle(
|
||||
color: AppColors.of(context).text.withOpacity(
|
||||
settingsProvider.newsEnabled ? .95 : .25),
|
||||
color: AppColors.of(context).text.withValues(
|
||||
alpha: settingsProvider.newsEnabled ? .95 : .25),
|
||||
),
|
||||
),
|
||||
leading: Icon(
|
||||
Icons.newspaper_outlined,
|
||||
size: 22.0,
|
||||
color: AppColors.of(context).text.withOpacity(
|
||||
settingsProvider.newsEnabled ? .95 : .25),
|
||||
color: AppColors.of(context).text.withValues(
|
||||
alpha: settingsProvider.newsEnabled ? .95 : .25),
|
||||
),
|
||||
trailing: Switch(
|
||||
onChanged: (v) => settingsProvider.update(newsEnabled: v),
|
||||
|
||||
@@ -86,7 +86,7 @@ class GradeColorsSettingsScreenState extends State<GradeColorsSettingsScreen> {
|
||||
color: Theme.of(context)
|
||||
.colorScheme
|
||||
.shadow
|
||||
.withOpacity(.1),
|
||||
.withValues(alpha: .1),
|
||||
blurRadius: 10.0,
|
||||
offset: const Offset(0, 5),
|
||||
),
|
||||
@@ -198,7 +198,7 @@ class GradeColorsSettingsScreenState extends State<GradeColorsSettingsScreen> {
|
||||
: Theme.of(context)
|
||||
.colorScheme
|
||||
.secondary
|
||||
.withOpacity(.2),
|
||||
.withValues(alpha: .2),
|
||||
width: 1.0,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(50.0),
|
||||
@@ -235,7 +235,7 @@ class GradeColorsSettingsScreenState extends State<GradeColorsSettingsScreen> {
|
||||
: Theme.of(context)
|
||||
.colorScheme
|
||||
.secondary
|
||||
.withOpacity(.2),
|
||||
.withValues(alpha: .2),
|
||||
width: 1.0,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(50.0),
|
||||
@@ -272,7 +272,7 @@ class GradeColorsSettingsScreenState extends State<GradeColorsSettingsScreen> {
|
||||
: Theme.of(context)
|
||||
.colorScheme
|
||||
.secondary
|
||||
.withOpacity(.2),
|
||||
.withValues(alpha: .2),
|
||||
width: 1.0,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(50.0),
|
||||
@@ -309,7 +309,7 @@ class GradeColorsSettingsScreenState extends State<GradeColorsSettingsScreen> {
|
||||
: Theme.of(context)
|
||||
.colorScheme
|
||||
.secondary
|
||||
.withOpacity(.2),
|
||||
.withValues(alpha: .2),
|
||||
width: 1.0,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(50.0),
|
||||
@@ -346,7 +346,7 @@ class GradeColorsSettingsScreenState extends State<GradeColorsSettingsScreen> {
|
||||
: Theme.of(context)
|
||||
.colorScheme
|
||||
.secondary
|
||||
.withOpacity(.2),
|
||||
.withValues(alpha: .2),
|
||||
width: 1.0,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(50.0),
|
||||
|
||||
@@ -42,18 +42,18 @@ class MenuPaintList extends StatelessWidget {
|
||||
title: Text(
|
||||
"own_paints".i18n,
|
||||
style: TextStyle(
|
||||
color: AppColors.of(context).text.withOpacity(.95),
|
||||
color: AppColors.of(context).text.withValues(alpha: .95),
|
||||
),
|
||||
),
|
||||
leading: Icon(
|
||||
FeatherIcons.list,
|
||||
size: 22.0,
|
||||
color: AppColors.of(context).text.withOpacity(.95),
|
||||
color: AppColors.of(context).text.withValues(alpha: .95),
|
||||
),
|
||||
trailing: Icon(
|
||||
FeatherIcons.chevronRight,
|
||||
size: 22.0,
|
||||
color: AppColors.of(context).text.withOpacity(0.95),
|
||||
color: AppColors.of(context).text.withValues(alpha: 0.95),
|
||||
),
|
||||
borderRadius: borderRadius,
|
||||
);
|
||||
@@ -117,13 +117,13 @@ class PaintListScreenState extends State<PaintListScreen>
|
||||
Text(
|
||||
t.displayName,
|
||||
style: TextStyle(
|
||||
color: AppColors.of(context).text.withOpacity(.95),
|
||||
color: AppColors.of(context).text.withValues(alpha: .95),
|
||||
),
|
||||
),
|
||||
Text(
|
||||
t.nickname,
|
||||
style: TextStyle(
|
||||
color: AppColors.of(context).text.withOpacity(.75),
|
||||
color: AppColors.of(context).text.withValues(alpha: .75),
|
||||
),
|
||||
),
|
||||
],
|
||||
@@ -219,13 +219,16 @@ class PaintListScreenState extends State<PaintListScreen>
|
||||
title: Text(
|
||||
"enter_id".i18n,
|
||||
style: TextStyle(
|
||||
color: AppColors.of(context).text.withOpacity(.95),
|
||||
color: AppColors.of(context)
|
||||
.text
|
||||
.withValues(alpha: .95),
|
||||
),
|
||||
),
|
||||
leading: Icon(
|
||||
FeatherIcons.plus,
|
||||
size: 22.0,
|
||||
color: AppColors.of(context).text.withOpacity(.95),
|
||||
color:
|
||||
AppColors.of(context).text.withValues(alpha: .95),
|
||||
),
|
||||
borderRadius: const BorderRadius.vertical(
|
||||
top: Radius.circular(12.0),
|
||||
@@ -264,8 +267,9 @@ class PaintListScreenState extends State<PaintListScreen>
|
||||
? settingsProvider.currentThemeDisplayName
|
||||
: 'no_name'.i18n,
|
||||
style: TextStyle(
|
||||
color:
|
||||
AppColors.of(context).text.withOpacity(.95),
|
||||
color: AppColors.of(context)
|
||||
.text
|
||||
.withValues(alpha: .95),
|
||||
),
|
||||
),
|
||||
Text(
|
||||
@@ -273,8 +277,9 @@ class PaintListScreenState extends State<PaintListScreen>
|
||||
? settingsProvider.currentThemeCreator
|
||||
: 'Anonymous',
|
||||
style: TextStyle(
|
||||
color:
|
||||
AppColors.of(context).text.withOpacity(.65),
|
||||
color: AppColors.of(context)
|
||||
.text
|
||||
.withValues(alpha: .65),
|
||||
fontSize: 15.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
@@ -300,7 +305,7 @@ class PaintListScreenState extends State<PaintListScreen>
|
||||
BoxShadow(
|
||||
color: AppColors.of(context)
|
||||
.text
|
||||
.withOpacity(0.15),
|
||||
.withValues(alpha: 0.15),
|
||||
offset: const Offset(1, 2),
|
||||
blurRadius: 3,
|
||||
),
|
||||
@@ -323,7 +328,7 @@ class PaintListScreenState extends State<PaintListScreen>
|
||||
BoxShadow(
|
||||
color: AppColors.of(context)
|
||||
.text
|
||||
.withOpacity(0.15),
|
||||
.withValues(alpha: 0.15),
|
||||
offset: const Offset(1, 2),
|
||||
blurRadius: 3,
|
||||
),
|
||||
@@ -346,7 +351,7 @@ class PaintListScreenState extends State<PaintListScreen>
|
||||
BoxShadow(
|
||||
color: AppColors.of(context)
|
||||
.text
|
||||
.withOpacity(0.15),
|
||||
.withValues(alpha: 0.15),
|
||||
offset: const Offset(1, 2),
|
||||
blurRadius: 3,
|
||||
),
|
||||
|
||||
@@ -52,12 +52,12 @@ class MenuPersonalizeSettings extends StatelessWidget {
|
||||
leading: Icon(
|
||||
Icons.palette_outlined,
|
||||
size: 22.0,
|
||||
color: AppColors.of(context).text.withOpacity(0.95),
|
||||
color: AppColors.of(context).text.withValues(alpha: 0.95),
|
||||
),
|
||||
trailing: Icon(
|
||||
FeatherIcons.chevronRight,
|
||||
size: 22.0,
|
||||
color: AppColors.of(context).text.withOpacity(0.95),
|
||||
color: AppColors.of(context).text.withValues(alpha: 0.95),
|
||||
),
|
||||
borderRadius: borderRadius,
|
||||
);
|
||||
@@ -175,7 +175,7 @@ class PersonalizeSettingsScreenState extends State<PersonalizeSettingsScreen>
|
||||
: s.subject.name.capital()) ??
|
||||
'',
|
||||
style: TextStyle(
|
||||
color: AppColors.of(context).text.withOpacity(.95),
|
||||
color: AppColors.of(context).text.withValues(alpha: .95),
|
||||
fontStyle: settingsProvider.renamedSubjectsItalics
|
||||
? FontStyle.italic
|
||||
: FontStyle.normal,
|
||||
@@ -187,7 +187,7 @@ class PersonalizeSettingsScreenState extends State<PersonalizeSettingsScreen>
|
||||
: s.teacher.name.capital()) ??
|
||||
'',
|
||||
style: TextStyle(
|
||||
color: AppColors.of(context).text.withOpacity(.85),
|
||||
color: AppColors.of(context).text.withValues(alpha: .85),
|
||||
fontWeight: FontWeight.w400,
|
||||
fontSize: 15.0,
|
||||
height: 1.2,
|
||||
@@ -198,12 +198,12 @@ class PersonalizeSettingsScreenState extends State<PersonalizeSettingsScreen>
|
||||
leading: Icon(
|
||||
SubjectIcon.resolveVariant(context: context, subject: s.subject),
|
||||
size: 22.0,
|
||||
color: AppColors.of(context).text.withOpacity(.95),
|
||||
color: AppColors.of(context).text.withValues(alpha: .95),
|
||||
),
|
||||
trailing: Icon(
|
||||
FeatherIcons.chevronRight,
|
||||
size: 22.0,
|
||||
color: AppColors.of(context).text.withOpacity(0.95),
|
||||
color: AppColors.of(context).text.withValues(alpha: 0.95),
|
||||
),
|
||||
borderRadius: BorderRadius.vertical(
|
||||
top: Radius.circular(i == 0 ? 12.0 : 4.0),
|
||||
@@ -242,7 +242,7 @@ class PersonalizeSettingsScreenState extends State<PersonalizeSettingsScreen>
|
||||
// f,
|
||||
// style: GoogleFonts.getFont(
|
||||
// f,
|
||||
// color: AppColors.of(context).text.withOpacity(.95),
|
||||
// color: AppColors.of(context).text.withValues(alpha: .95),
|
||||
// fontStyle: settingsProvider.renamedSubjectsItalics
|
||||
// ? FontStyle.italic
|
||||
// : FontStyle.normal,
|
||||
@@ -252,7 +252,7 @@ class PersonalizeSettingsScreenState extends State<PersonalizeSettingsScreen>
|
||||
// ? Icon(
|
||||
// FeatherIcons.chevronRight,
|
||||
// size: 22.0,
|
||||
// color: AppColors.of(context).text.withOpacity(0.95),
|
||||
// color: AppColors.of(context).text.withValues(alpha: 0.95),
|
||||
// )
|
||||
// : null,
|
||||
// borderRadius: BorderRadius.circular(12.0),
|
||||
@@ -324,7 +324,9 @@ class PersonalizeSettingsScreenState extends State<PersonalizeSettingsScreen>
|
||||
leading: Icon(
|
||||
FeatherIcons.sun,
|
||||
size: 22.0,
|
||||
color: AppColors.of(context).text.withOpacity(0.95),
|
||||
color: AppColors.of(context)
|
||||
.text
|
||||
.withValues(alpha: 0.95),
|
||||
),
|
||||
trailing: Text(
|
||||
themeModeText,
|
||||
@@ -354,13 +356,16 @@ class PersonalizeSettingsScreenState extends State<PersonalizeSettingsScreen>
|
||||
title: Text(
|
||||
"color".i18n,
|
||||
style: TextStyle(
|
||||
color: AppColors.of(context).text.withOpacity(.95),
|
||||
color: AppColors.of(context)
|
||||
.text
|
||||
.withValues(alpha: .95),
|
||||
),
|
||||
),
|
||||
leading: Icon(
|
||||
FeatherIcons.droplet,
|
||||
size: 22.0,
|
||||
color: AppColors.of(context).text.withOpacity(.95),
|
||||
color:
|
||||
AppColors.of(context).text.withValues(alpha: .95),
|
||||
),
|
||||
trailing: Container(
|
||||
width: 12.0,
|
||||
@@ -388,15 +393,15 @@ class PersonalizeSettingsScreenState extends State<PersonalizeSettingsScreen>
|
||||
title: Text(
|
||||
"new_colors".i18n,
|
||||
style: TextStyle(
|
||||
color: AppColors.of(context).text.withOpacity(
|
||||
settingsProvider.newColors ? .95 : .25),
|
||||
color: AppColors.of(context).text.withValues(
|
||||
alpha: settingsProvider.newColors ? .95 : .25),
|
||||
),
|
||||
),
|
||||
leading: Icon(
|
||||
Icons.flare_outlined,
|
||||
size: 22.0,
|
||||
color: AppColors.of(context).text.withOpacity(
|
||||
settingsProvider.newColors ? .95 : .25),
|
||||
color: AppColors.of(context).text.withValues(
|
||||
alpha: settingsProvider.newColors ? .95 : .25),
|
||||
),
|
||||
trailing: Switch(
|
||||
onChanged: (v) async {
|
||||
@@ -437,15 +442,16 @@ class PersonalizeSettingsScreenState extends State<PersonalizeSettingsScreen>
|
||||
title: Text(
|
||||
"shadow_effect".i18n,
|
||||
style: TextStyle(
|
||||
color: AppColors.of(context).text.withOpacity(
|
||||
settingsProvider.shadowEffect ? .95 : .25),
|
||||
color: AppColors.of(context).text.withValues(
|
||||
alpha:
|
||||
settingsProvider.shadowEffect ? .95 : .25),
|
||||
),
|
||||
),
|
||||
leading: Icon(
|
||||
FeatherIcons.moon,
|
||||
size: 22.0,
|
||||
color: AppColors.of(context).text.withOpacity(
|
||||
settingsProvider.shadowEffect ? .95 : .25),
|
||||
color: AppColors.of(context).text.withValues(
|
||||
alpha: settingsProvider.shadowEffect ? .95 : .25),
|
||||
),
|
||||
trailing: Switch(
|
||||
onChanged: (v) async {
|
||||
@@ -480,15 +486,15 @@ class PersonalizeSettingsScreenState extends State<PersonalizeSettingsScreen>
|
||||
title: Text(
|
||||
"new_popups".i18n,
|
||||
style: TextStyle(
|
||||
color: AppColors.of(context).text.withOpacity(
|
||||
settingsProvider.newPopups ? .95 : .25),
|
||||
color: AppColors.of(context).text.withValues(
|
||||
alpha: settingsProvider.newPopups ? .95 : .25),
|
||||
),
|
||||
),
|
||||
leading: Icon(
|
||||
FeatherIcons.alertOctagon,
|
||||
size: 22.0,
|
||||
color: AppColors.of(context).text.withOpacity(
|
||||
settingsProvider.newPopups ? .95 : .25),
|
||||
color: AppColors.of(context).text.withValues(
|
||||
alpha: settingsProvider.newPopups ? .95 : .25),
|
||||
),
|
||||
trailing: Switch(
|
||||
onChanged: (v) async {
|
||||
@@ -519,13 +525,13 @@ class PersonalizeSettingsScreenState extends State<PersonalizeSettingsScreen>
|
||||
// title: Text(
|
||||
// "icon_pack".i18n,
|
||||
// style: TextStyle(
|
||||
// color: AppColors.of(context).text.withOpacity(.95),
|
||||
// color: AppColors.of(context).text.withValues(alpha: .95),
|
||||
// ),
|
||||
// ),
|
||||
// leading: Icon(
|
||||
// FeatherIcons.grid,
|
||||
// size: 22.0,
|
||||
// color: AppColors.of(context).text.withOpacity(.95),
|
||||
// color: AppColors.of(context).text.withValues(alpha: .95),
|
||||
// ),
|
||||
// trailing: Text(
|
||||
// settingsProvider.iconPack.name.capital(),
|
||||
@@ -558,13 +564,16 @@ class PersonalizeSettingsScreenState extends State<PersonalizeSettingsScreen>
|
||||
title: Text(
|
||||
"grade_colors".i18n,
|
||||
style: TextStyle(
|
||||
color: AppColors.of(context).text.withOpacity(.95),
|
||||
color: AppColors.of(context)
|
||||
.text
|
||||
.withValues(alpha: .95),
|
||||
),
|
||||
),
|
||||
leading: Icon(
|
||||
FeatherIcons.star,
|
||||
size: 22.0,
|
||||
color: AppColors.of(context).text.withOpacity(.95),
|
||||
color:
|
||||
AppColors.of(context).text.withValues(alpha: .95),
|
||||
),
|
||||
trailing: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
@@ -616,8 +625,8 @@ class PersonalizeSettingsScreenState extends State<PersonalizeSettingsScreen>
|
||||
title: Text(
|
||||
"rename_subjects".i18n,
|
||||
style: TextStyle(
|
||||
color: AppColors.of(context).text.withOpacity(
|
||||
settingsProvider.renamedSubjectsEnabled
|
||||
color: AppColors.of(context).text.withValues(
|
||||
alpha: settingsProvider.renamedSubjectsEnabled
|
||||
? .95
|
||||
: .25),
|
||||
),
|
||||
@@ -625,8 +634,8 @@ class PersonalizeSettingsScreenState extends State<PersonalizeSettingsScreen>
|
||||
leading: Icon(
|
||||
Icons.school_outlined,
|
||||
size: 22.0,
|
||||
color: AppColors.of(context).text.withOpacity(
|
||||
settingsProvider.renamedSubjectsEnabled
|
||||
color: AppColors.of(context).text.withValues(
|
||||
alpha: settingsProvider.renamedSubjectsEnabled
|
||||
? .95
|
||||
: .25),
|
||||
),
|
||||
@@ -675,8 +684,8 @@ class PersonalizeSettingsScreenState extends State<PersonalizeSettingsScreen>
|
||||
title: Text(
|
||||
"rename_teachers".i18n,
|
||||
style: TextStyle(
|
||||
color: AppColors.of(context).text.withOpacity(
|
||||
settingsProvider.renamedTeachersEnabled
|
||||
color: AppColors.of(context).text.withValues(
|
||||
alpha: settingsProvider.renamedTeachersEnabled
|
||||
? .95
|
||||
: .25),
|
||||
),
|
||||
@@ -684,8 +693,8 @@ class PersonalizeSettingsScreenState extends State<PersonalizeSettingsScreen>
|
||||
leading: Icon(
|
||||
FeatherIcons.user,
|
||||
size: 22.0,
|
||||
color: AppColors.of(context).text.withOpacity(
|
||||
settingsProvider.renamedTeachersEnabled
|
||||
color: AppColors.of(context).text.withValues(
|
||||
alpha: settingsProvider.renamedTeachersEnabled
|
||||
? .95
|
||||
: .25),
|
||||
),
|
||||
@@ -729,14 +738,17 @@ class PersonalizeSettingsScreenState extends State<PersonalizeSettingsScreen>
|
||||
title: Text(
|
||||
"live_activity_color".i18n,
|
||||
style: TextStyle(
|
||||
color:
|
||||
AppColors.of(context).text.withOpacity(.95),
|
||||
color: AppColors.of(context)
|
||||
.text
|
||||
.withValues(alpha: .95),
|
||||
),
|
||||
),
|
||||
leading: Icon(
|
||||
FeatherIcons.activity,
|
||||
size: 22.0,
|
||||
color: AppColors.of(context).text.withOpacity(.95),
|
||||
color: AppColors.of(context)
|
||||
.text
|
||||
.withValues(alpha: .95),
|
||||
),
|
||||
trailing: Container(
|
||||
margin: const EdgeInsets.only(left: 2.0),
|
||||
@@ -855,7 +867,7 @@ class PersonalizeSettingsScreenState extends State<PersonalizeSettingsScreen>
|
||||
style: TextStyle(
|
||||
color: AppColors.of(context)
|
||||
.text
|
||||
.withOpacity(.95),
|
||||
.withValues(alpha: .95),
|
||||
),
|
||||
),
|
||||
leading: Icon(
|
||||
@@ -863,7 +875,7 @@ class PersonalizeSettingsScreenState extends State<PersonalizeSettingsScreen>
|
||||
size: 22.0,
|
||||
color: AppColors.of(context)
|
||||
.text
|
||||
.withOpacity(.95),
|
||||
.withValues(alpha: .95),
|
||||
),
|
||||
borderRadius: const BorderRadius.vertical(
|
||||
top: Radius.circular(12.0),
|
||||
@@ -1022,13 +1034,16 @@ class PersonalizeSettingsScreenState extends State<PersonalizeSettingsScreen>
|
||||
title: Text(
|
||||
"font_family".i18n,
|
||||
style: TextStyle(
|
||||
color: AppColors.of(context).text.withOpacity(.95),
|
||||
color: AppColors.of(context)
|
||||
.text
|
||||
.withValues(alpha: .95),
|
||||
),
|
||||
),
|
||||
leading: Icon(
|
||||
FeatherIcons.type,
|
||||
size: 22.0,
|
||||
color: AppColors.of(context).text.withOpacity(.95),
|
||||
color:
|
||||
AppColors.of(context).text.withValues(alpha: .95),
|
||||
),
|
||||
trailing: Text(
|
||||
settingsProvider.fontFamily != ''
|
||||
@@ -1066,15 +1081,17 @@ class PersonalizeSettingsScreenState extends State<PersonalizeSettingsScreen>
|
||||
title: Text(
|
||||
"only_ch_title_font".i18n,
|
||||
style: TextStyle(
|
||||
color: AppColors.of(context).text.withOpacity(
|
||||
settingsProvider.titleOnlyFont ? .95 : .25),
|
||||
color: AppColors.of(context).text.withValues(
|
||||
alpha:
|
||||
settingsProvider.titleOnlyFont ? .95 : .25),
|
||||
),
|
||||
),
|
||||
leading: Icon(
|
||||
Icons.text_increase_rounded,
|
||||
size: 22.0,
|
||||
color: AppColors.of(context).text.withOpacity(
|
||||
settingsProvider.titleOnlyFont ? .95 : .25),
|
||||
color: AppColors.of(context).text.withValues(
|
||||
alpha:
|
||||
settingsProvider.titleOnlyFont ? .95 : .25),
|
||||
),
|
||||
trailing: Switch(
|
||||
onChanged: (v) async {
|
||||
|
||||
@@ -271,9 +271,12 @@ class _PremiumCustomAccentColorSettingState
|
||||
stops: const [0.0, 0.75],
|
||||
colors: isBackgroundDifferent
|
||||
? [
|
||||
Theme.of(context).colorScheme.surface.withOpacity(1 -
|
||||
((currentTheme == ThemeMode.dark ? 0.65 : 0.25) *
|
||||
backgroundAnimation.value)),
|
||||
Theme.of(context).colorScheme.surface.withValues(
|
||||
alpha: 1 -
|
||||
((currentTheme == ThemeMode.dark
|
||||
? 0.65
|
||||
: 0.25) *
|
||||
backgroundAnimation.value)),
|
||||
backgroundGradientBottomColor,
|
||||
]
|
||||
: [
|
||||
|
||||
@@ -16,7 +16,7 @@ import 'package:flutter_feather_icons/flutter_feather_icons.dart';
|
||||
import 'package:refilc_mobile_ui/screens/settings/settings_screen.i18n.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:image_picker/image_picker.dart';
|
||||
import 'package:image_crop/image_crop.dart';
|
||||
import 'package:image_crop_plus/image_crop_plus.dart';
|
||||
|
||||
// ignore: must_be_immutable
|
||||
class UserMenuProfilePic extends StatelessWidget {
|
||||
|
||||
@@ -112,7 +112,7 @@ class GradesBodyState extends State<GradesBody> {
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: 20.0,
|
||||
color: Colors.white.withOpacity(0.98),
|
||||
color: Colors.white.withValues(alpha: 0.98),
|
||||
fontStyle: settings.renamedSubjectsItalics && subject.isRenamed
|
||||
? FontStyle.italic
|
||||
: null,
|
||||
@@ -145,7 +145,7 @@ class GradesBodyState extends State<GradesBody> {
|
||||
style: TextStyle(
|
||||
fontSize: 18.0,
|
||||
height: 2.0,
|
||||
color: Colors.white.withOpacity(0.5)),
|
||||
color: Colors.white.withValues(alpha: 0.5)),
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -331,10 +331,10 @@ class GradesBodyState extends State<GradesBody> {
|
||||
horizontal: 16.0, vertical: 4.0),
|
||||
decoration: BoxDecoration(
|
||||
color: gradeColor(context: context, value: endYearAvg)
|
||||
.withOpacity(.2),
|
||||
.withValues(alpha: .2),
|
||||
border: Border.all(
|
||||
color: (gradeColor(context: context, value: endYearAvg))
|
||||
.withOpacity(0.0),
|
||||
.withValues(alpha: 0.0),
|
||||
width: 2.0,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(45.0),
|
||||
|
||||
@@ -310,7 +310,7 @@ class LessonsBodyState extends State<LessonsBody> {
|
||||
style: TextStyle(
|
||||
fontSize: 18.0,
|
||||
height: 2.0,
|
||||
color: Colors.white.withOpacity(0.5)),
|
||||
color: Colors.white.withValues(alpha: 0.5)),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
@@ -10,7 +10,7 @@ import 'package:provider/provider.dart';
|
||||
import 'package:screenshot/screenshot.dart';
|
||||
import 'package:share_plus/share_plus.dart';
|
||||
import 'package:path_provider/path_provider.dart';
|
||||
import 'package:image_gallery_saver/image_gallery_saver.dart';
|
||||
import 'package:image_gallery_saver_plus/image_gallery_saver_plus.dart';
|
||||
|
||||
class PersonalityBody extends StatefulWidget {
|
||||
const PersonalityBody({super.key});
|
||||
@@ -47,7 +47,8 @@ class PersonalityBodyState extends State<PersonalityBody> {
|
||||
savePersonality() async {
|
||||
await screenshotController.capture().then((image) async {
|
||||
if (image != null) {
|
||||
await ImageGallerySaver.saveImage(image, name: 'refilc_personality');
|
||||
await ImageGallerySaverPlus.saveImage(image,
|
||||
name: 'refilc_personality');
|
||||
}
|
||||
}).catchError((err) {
|
||||
throw err;
|
||||
@@ -97,7 +98,7 @@ class PersonalityBodyState extends State<PersonalityBody> {
|
||||
),
|
||||
style: ButtonStyle(
|
||||
backgroundColor: WidgetStateProperty.all(
|
||||
Colors.white.withOpacity(0.2)),
|
||||
Colors.white.withValues(alpha: 0.2)),
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
@@ -114,7 +115,7 @@ class PersonalityBodyState extends State<PersonalityBody> {
|
||||
),
|
||||
style: ButtonStyle(
|
||||
backgroundColor: WidgetStateProperty.all(
|
||||
Colors.white.withOpacity(0.2)),
|
||||
Colors.white.withValues(alpha: 0.2)),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
||||
@@ -44,7 +44,7 @@ class StartBodyState extends State<StartBody> {
|
||||
context,
|
||||
useRootNavigator: true,
|
||||
builder: (context) => SlidingSheetDialog(
|
||||
color: Colors.black.withOpacity(0.99),
|
||||
color: Colors.black.withValues(alpha: 0.99),
|
||||
duration: const Duration(milliseconds: 400),
|
||||
scrollSpec: const ScrollSpec.bouncingScroll(),
|
||||
snapSpec: const SnapSpec(
|
||||
@@ -84,7 +84,7 @@ class StartBodyState extends State<StartBody> {
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.w500,
|
||||
fontSize: 16.0,
|
||||
color: Colors.white.withOpacity(0.7),
|
||||
color: Colors.white.withValues(alpha: 0.7),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
||||
@@ -196,7 +196,7 @@ class SummaryScreenState extends State<SummaryScreen>
|
||||
context,
|
||||
useRootNavigator: true,
|
||||
builder: (context) => SlidingSheetDialog(
|
||||
color: Colors.black.withOpacity(0.99),
|
||||
color: Colors.black.withValues(alpha: 0.99),
|
||||
duration: const Duration(milliseconds: 400),
|
||||
scrollSpec: const ScrollSpec.bouncingScroll(),
|
||||
snapSpec: const SnapSpec(
|
||||
|
||||
Reference in New Issue
Block a user