diff --git a/refilc/lib/api/providers/live_card_provider.dart b/refilc/lib/api/providers/live_card_provider.dart index 36a02d7..8b50a74 100644 --- a/refilc/lib/api/providers/live_card_provider.dart +++ b/refilc/lib/api/providers/live_card_provider.dart @@ -85,8 +85,8 @@ class LiveCardProvider extends ChangeNotifier { } Map toMap() { - print("LIVE ACTIVITY COLOR BELOW:"); - print(_settings.liveActivityColor.toHexString().substring(2)); + // print("LIVE ACTIVITY COLOR BELOW:"); + // print(_settings.liveActivityColor.toHexString().substring(2)); String color = '#${_settings.liveActivityColor.toHexString().substring(2)}'; switch (currentState) { diff --git a/refilc/lib/theme/theme.dart b/refilc/lib/theme/theme.dart index 405ac95..0d85638 100644 --- a/refilc/lib/theme/theme.dart +++ b/refilc/lib/theme/theme.dart @@ -115,42 +115,42 @@ class AppTheme { primary: accent, onPrimary: (accent.computeLuminance() > 0.5 ? Colors.black : Colors.white) - .withOpacity(.9), + .withValues(alpha: .9), secondary: newSecondary, onSecondary: (newSecondary.computeLuminance() > 0.5 ? Colors.black : Colors.white) - .withOpacity(.9), + .withValues(alpha: .9), tertiary: newTertiary, onTertiary: (newTertiary.computeLuminance() > 0.5 ? Colors.black : Colors.white) - .withOpacity(.9), + .withValues(alpha: .9), brightness: Brightness.light, error: lightColors.red, - onError: Colors.white.withOpacity(.9), + onError: Colors.white.withValues(alpha: .9), surface: highlightColor, - onSurface: Colors.black.withOpacity(.9), + onSurface: Colors.black.withValues(alpha: .9), ), - shadowColor: lightColors.shadow.withOpacity(.5), + shadowColor: lightColors.shadow.withValues(alpha: .5), appBarTheme: AppBarTheme(backgroundColor: backgroundColor), indicatorColor: accent, - iconTheme: IconThemeData(color: lightColors.text.withOpacity(.75)), + iconTheme: IconThemeData(color: lightColors.text.withValues(alpha: .75)), navigationBarTheme: NavigationBarThemeData( - indicatorColor: - accent.withOpacity(accentColor == AccentColor.adaptive ? 0.4 : 0.8), + indicatorColor: accent.withValues( + alpha: accentColor == AccentColor.adaptive ? 0.4 : 0.8), iconTheme: WidgetStateProperty.all(IconThemeData(color: lightColors.text)), backgroundColor: highlightColor, labelTextStyle: WidgetStateProperty.all(TextStyle( fontSize: 13.0, fontWeight: FontWeight.w500, - color: lightColors.text.withOpacity(0.8), + color: lightColors.text.withValues(alpha: 0.8), )), labelBehavior: NavigationDestinationLabelBehavior.alwaysShow, height: 76.0, ), sliderTheme: SliderThemeData( - inactiveTrackColor: accent.withOpacity(.3), + inactiveTrackColor: accent.withValues(alpha: .3), ), progressIndicatorTheme: ProgressIndicatorThemeData(color: accent), expansionTileTheme: ExpansionTileThemeData(iconColor: accent), @@ -238,48 +238,48 @@ class AppTheme { primary: accent, onPrimary: (accent.computeLuminance() > 0.5 ? Colors.black : Colors.white) - .withOpacity(.9), + .withValues(alpha: .9), secondary: newSecondary, onSecondary: (newSecondary.computeLuminance() > 0.5 ? Colors.black : Colors.white) - .withOpacity(.9), + .withValues(alpha: .9), tertiary: newTertiary, onTertiary: (newTertiary.computeLuminance() > 0.5 ? Colors.black : Colors.white) - .withOpacity(.9), + .withValues(alpha: .9), brightness: Brightness.dark, error: darkColors.red, - onError: Colors.black.withOpacity(.9), + onError: Colors.black.withValues(alpha: .9), surface: highlightColor, - onSurface: Colors.white.withOpacity(.9), + onSurface: Colors.white.withValues(alpha: .9), ), - shadowColor: highlightColor.withOpacity(.5), //darkColors.shadow, + shadowColor: highlightColor.withValues(alpha: .5), //darkColors.shadow, appBarTheme: AppBarTheme(backgroundColor: backgroundColor), indicatorColor: accent, - iconTheme: IconThemeData(color: darkColors.text.withOpacity(.75)), + iconTheme: IconThemeData(color: darkColors.text.withValues(alpha: .75)), navigationBarTheme: NavigationBarThemeData( - indicatorColor: - accent.withOpacity(accentColor == AccentColor.adaptive ? 0.4 : 0.8), + indicatorColor: accent.withValues( + alpha: accentColor == AccentColor.adaptive ? 0.4 : 0.8), iconTheme: WidgetStateProperty.all(IconThemeData(color: darkColors.text)), backgroundColor: highlightColor, labelTextStyle: WidgetStateProperty.all(TextStyle( fontSize: 13.0, fontWeight: FontWeight.w500, - color: darkColors.text.withOpacity(0.8), + color: darkColors.text.withValues(alpha: 0.8), )), labelBehavior: NavigationDestinationLabelBehavior.alwaysShow, height: 76.0, ), sliderTheme: SliderThemeData( - inactiveTrackColor: accent.withOpacity(.3), + inactiveTrackColor: accent.withValues(alpha: .3), ), progressIndicatorTheme: ProgressIndicatorThemeData(color: accent), expansionTileTheme: ExpansionTileThemeData(iconColor: accent), cardColor: highlightColor, chipTheme: ChipThemeData( - backgroundColor: accent.withOpacity(.2), + backgroundColor: accent.withValues(alpha: .2), elevation: 1, ), bottomNavigationBarTheme: BottomNavigationBarThemeData( diff --git a/refilc/lib/ui/filter/sort.dart b/refilc/lib/ui/filter/sort.dart index a955ca5..0b255be 100644 --- a/refilc/lib/ui/filter/sort.dart +++ b/refilc/lib/ui/filter/sort.dart @@ -191,7 +191,7 @@ List sortDateWidgets( width: 150.0, decoration: BoxDecoration( borderRadius: BorderRadius.circular(12.0), - color: AppColors.of(context).text.withOpacity(.25), + color: AppColors.of(context).text.withValues(alpha: .25), ), ), ), diff --git a/refilc/lib/ui/filter/widgets.dart b/refilc/lib/ui/filter/widgets.dart index b9bcec1..16953c2 100644 --- a/refilc/lib/ui/filter/widgets.dart +++ b/refilc/lib/ui/filter/widgets.dart @@ -178,8 +178,7 @@ Future> getFilterWidgets(FilterType activeData, // Ads case FilterType.ads: if (adProvider.available) { - items = ad_filter.getWidgets( - adProvider.ads, context); + items = ad_filter.getWidgets(adProvider.ads, context); } break; } @@ -233,8 +232,8 @@ Widget filterItemBuilder( BoxShadow( offset: const Offset(0, 21), blurRadius: 23.0, - color: Theme.of(context).shadowColor.withOpacity( - Theme.of(context).shadowColor.opacity * + color: Theme.of(context).shadowColor.withValues( + alpha: Theme.of(context).shadowColor.opacity * CurvedAnimation( parent: CurvedAnimation( parent: animation, diff --git a/refilc/lib/ui/flutter_colorpicker/block_picker.dart b/refilc/lib/ui/flutter_colorpicker/block_picker.dart index ce16e91..83cd8f3 100644 --- a/refilc/lib/ui/flutter_colorpicker/block_picker.dart +++ b/refilc/lib/ui/flutter_colorpicker/block_picker.dart @@ -73,7 +73,7 @@ Widget _defaultItemBuilder( color: color, boxShadow: [ BoxShadow( - color: color.withOpacity(0.8), + color: color.withValues(alpha: 0.8), offset: const Offset(1, 2), blurRadius: 5) ], diff --git a/refilc/lib/ui/flutter_colorpicker/colorpicker.dart b/refilc/lib/ui/flutter_colorpicker/colorpicker.dart index 4a1bd3f..caa749a 100644 --- a/refilc/lib/ui/flutter_colorpicker/colorpicker.dart +++ b/refilc/lib/ui/flutter_colorpicker/colorpicker.dart @@ -380,7 +380,7 @@ class FilcColorPickerState extends State { fontSize: 16.0, color: AppColors.of(context) .text - .withOpacity(isAdvancedView ? 1.0 : .5), + .withValues(alpha: isAdvancedView ? 1.0 : .5), ), ), ], diff --git a/refilc/lib/ui/flutter_colorpicker/palette.dart b/refilc/lib/ui/flutter_colorpicker/palette.dart index b569b2b..7869fee 100644 --- a/refilc/lib/ui/flutter_colorpicker/palette.dart +++ b/refilc/lib/ui/flutter_colorpicker/palette.dart @@ -210,32 +210,32 @@ class TrackPainter extends CustomPainter { break; case TrackType.red: final List colors = [ - hsvColor.toColor().withRed(0).withOpacity(1.0), - hsvColor.toColor().withRed(255).withOpacity(1.0), + hsvColor.toColor().withRed(0).withValues(alpha: 1.0), + hsvColor.toColor().withRed(255).withValues(alpha: 1.0), ]; Gradient gradient = LinearGradient(colors: colors); canvas.drawRect(rect, Paint()..shader = gradient.createShader(rect)); break; case TrackType.green: final List colors = [ - hsvColor.toColor().withGreen(0).withOpacity(1.0), - hsvColor.toColor().withGreen(255).withOpacity(1.0), + hsvColor.toColor().withGreen(0).withValues(alpha: 1.0), + hsvColor.toColor().withGreen(255).withValues(alpha: 1.0), ]; Gradient gradient = LinearGradient(colors: colors); canvas.drawRect(rect, Paint()..shader = gradient.createShader(rect)); break; case TrackType.blue: final List colors = [ - hsvColor.toColor().withBlue(0).withOpacity(1.0), - hsvColor.toColor().withBlue(255).withOpacity(1.0), + hsvColor.toColor().withBlue(0).withValues(alpha: 1.0), + hsvColor.toColor().withBlue(255).withValues(alpha: 1.0), ]; Gradient gradient = LinearGradient(colors: colors); canvas.drawRect(rect, Paint()..shader = gradient.createShader(rect)); break; case TrackType.alpha: final List colors = [ - hsvColor.toColor().withOpacity(0.0), - hsvColor.toColor().withOpacity(1.0), + hsvColor.toColor().withValues(alpha: 0.0), + hsvColor.toColor().withValues(alpha: 1.0), ]; Gradient gradient = LinearGradient(colors: colors); canvas.drawRect(rect, Paint()..shader = gradient.createShader(rect)); @@ -390,7 +390,7 @@ class ColorPickerInputState extends State { ), contentPadding: const EdgeInsets.symmetric(vertical: 8.0, horizontal: 8.0), - fillColor: AppColors.of(context).text.withOpacity(.1), + fillColor: AppColors.of(context).text.withValues(alpha: .1), ), onChanged: (String value) { String input = value; @@ -603,20 +603,20 @@ class ColorPickerSlider extends StatelessWidget { break; case TrackType.red: thumbOffset += (box.maxWidth - 30.0) * hsvColor.toColor().red / 0xff; - thumbColor = hsvColor.toColor().withOpacity(1.0); + thumbColor = hsvColor.toColor().withValues(alpha: 1.0); break; case TrackType.green: thumbOffset += (box.maxWidth - 30.0) * hsvColor.toColor().green / 0xff; - thumbColor = hsvColor.toColor().withOpacity(1.0); + thumbColor = hsvColor.toColor().withValues(alpha: 1.0); break; case TrackType.blue: thumbOffset += (box.maxWidth - 30.0) * hsvColor.toColor().blue / 0xff; - thumbColor = hsvColor.toColor().withOpacity(1.0); + thumbColor = hsvColor.toColor().withValues(alpha: 1.0); break; case TrackType.alpha: thumbOffset += (box.maxWidth - 30.0) * hsvColor.toColor().opacity; - thumbColor = hsvColor.toColor().withOpacity(hsvColor.alpha); + thumbColor = hsvColor.toColor().withValues(alpha: hsvColor.alpha); break; } @@ -709,8 +709,8 @@ class ColorIndicator extends StatelessWidget { boxShadow: [ BoxShadow( color: useWhiteForeground(color) - ? Colors.white.withOpacity(.5) - : Colors.black.withOpacity(.5), + ? Colors.white.withValues(alpha: .5) + : Colors.black.withValues(alpha: .5), offset: const Offset(0, 0), blurRadius: 5) ], diff --git a/refilc/lib/ui/widgets/grade/grade_tile.dart b/refilc/lib/ui/widgets/grade/grade_tile.dart index c86b3db..92d87f4 100644 --- a/refilc/lib/ui/widgets/grade/grade_tile.dart +++ b/refilc/lib/ui/widgets/grade/grade_tile.dart @@ -199,7 +199,7 @@ class GradeTile extends StatelessWidget { : Icon( SubjectIcon.resolveVariant( context: context, subject: grade.subject), - color: AppColors.of(context).text.withOpacity(.5), + color: AppColors.of(context).text.withValues(alpha: .5), ), minLeadingWidth: isSubjectView ? 32.0 : 0, ), @@ -288,7 +288,8 @@ class GradeValueWidget extends StatelessWidget { shadows: [ if (value.weight >= 200) Shadow( - color: (contrast ? Colors.white : color).withOpacity(.4), + color: + (contrast ? Colors.white : color).withValues(alpha: .4), offset: const Offset(-4, -3), ) ], @@ -312,7 +313,7 @@ class GradeValueWidget extends StatelessWidget { width: size * 1.4, height: size * 1.4, decoration: BoxDecoration( - color: color.withOpacity(contrast ? 1.0 : .25), + color: color.withValues(alpha: contrast ? 1.0 : .25), shape: BoxShape.circle, boxShadow: [ if (shadow && diff --git a/refilc/lib/ui/widgets/lesson/lesson_tile.dart b/refilc/lib/ui/widgets/lesson/lesson_tile.dart index b7ab6f1..dcea5eb 100644 --- a/refilc/lib/ui/widgets/lesson/lesson_tile.dart +++ b/refilc/lib/ui/widgets/lesson/lesson_tile.dart @@ -75,7 +75,7 @@ class LessonTile extends StatelessWidget { } if (lesson.isEmpty) { - accent = AppColors.of(context).text.withOpacity(0.6); + accent = AppColors.of(context).text.withValues(alpha: 0.6); } if (!lesson.studentPresence) { @@ -182,9 +182,8 @@ class LessonTile extends StatelessWidget { fontSize: 16.5, color: fill ? accent - : AppColors.of(context) - .text - .withOpacity(!lesson.isEmpty ? 1.0 : 0.5), + : AppColors.of(context).text.withValues( + alpha: !lesson.isEmpty ? 1.0 : 0.5), fontStyle: lesson.subject.isRenamed && settingsProvider.renamedSubjectsItalics ? FontStyle.italic @@ -199,8 +198,10 @@ class LessonTile extends StatelessWidget { fontWeight: FontWeight.w600, fontSize: 14.0, color: fill - ? accent.withOpacity(.9) - : AppColors.of(context).text.withOpacity(.9), + ? accent.withValues(alpha: .9) + : AppColors.of(context) + .text + .withValues(alpha: .9), ), ), ), @@ -217,7 +218,7 @@ class LessonTile extends StatelessWidget { // color: Theme.of(context) // .colorScheme // .secondary - // .withOpacity(.15), + // .withValues(alpha: .15), // borderRadius: BorderRadius.circular(10.0), // ), // child: Text( @@ -229,7 +230,7 @@ class LessonTile extends StatelessWidget { // color: Theme.of(context) // .colorScheme // .secondary - // .withOpacity(.9), + // .withValues(alpha: .9), // ), // ), // ) @@ -246,11 +247,11 @@ class LessonTile extends StatelessWidget { horizontal: 5.5, vertical: 3.0), decoration: BoxDecoration( color: fill - ? accent.withOpacity(.15) + ? accent.withValues(alpha: .15) : Theme.of(context) .colorScheme .tertiary - .withOpacity(.15), + .withValues(alpha: .15), borderRadius: BorderRadius.circular(10.0), ), child: Text( @@ -261,11 +262,11 @@ class LessonTile extends StatelessWidget { fontSize: 12.0, fontWeight: FontWeight.w600, color: fill - ? accent.withOpacity(0.9) + ? accent.withValues(alpha: 0.9) : Theme.of(context) .colorScheme .secondary - .withOpacity(.9), + .withValues(alpha: .9), ), ), ), @@ -277,7 +278,9 @@ class LessonTile extends StatelessWidget { textAlign: TextAlign.start, style: TextStyle( fontSize: 14.0, - color: fill ? accent.withOpacity(0.5) : null, + color: fill + ? accent.withValues(alpha: 0.5) + : null, ), ), ], @@ -344,7 +347,7 @@ class LessonTile extends StatelessWidget { ? Theme.of(context) .colorScheme .secondary - .withOpacity(.3) + .withValues(alpha: .3) : const Color(0x00000000), borderRadius: BorderRadius.circular(12.0), boxShadow: [ @@ -353,7 +356,7 @@ class LessonTile extends StatelessWidget { color: Theme.of(context) .colorScheme .secondary - .withOpacity(.25), + .withValues(alpha: .25), blurRadius: 6.0, ) ], @@ -386,7 +389,7 @@ class LessonTile extends StatelessWidget { // fontWeight: FontWeight.w500, // color: AppColors.of(context) // .text - // .withOpacity(.75), + // .withValues(alpha: .75), // ), // ), // ), @@ -398,11 +401,11 @@ class LessonTile extends StatelessWidget { horizontal: 6.0, vertical: 3.5), decoration: BoxDecoration( color: fill - ? accent.withOpacity(.15) + ? accent.withValues(alpha: .15) : Theme.of(context) .colorScheme .tertiary - .withOpacity(.15), + .withValues(alpha: .15), borderRadius: BorderRadius.circular(10.0), ), child: Text( @@ -413,11 +416,11 @@ class LessonTile extends StatelessWidget { fontSize: 12.5, fontWeight: FontWeight.w600, color: fill - ? accent.withOpacity(0.9) + ? accent.withValues(alpha: 0.9) : Theme.of(context) .colorScheme .secondary - .withOpacity(.9), + .withValues(alpha: .9), ), ), ), @@ -438,10 +441,10 @@ class LessonTile extends StatelessWidget { style: TextStyle( fontWeight: FontWeight.w500, color: fill - ? accent.withOpacity(.9) + ? accent.withValues(alpha: .9) : AppColors.of(context) .text - .withOpacity(.9), + .withValues(alpha: .9), ), ), ], @@ -502,8 +505,8 @@ class LessonSubtile extends StatelessWidget { Center( child: SizedBox( width: 30.0, - child: - Icon(icon, color: iconColor.withOpacity(.75), size: 20.0), + child: Icon(icon, + color: iconColor.withValues(alpha: .75), size: 20.0), ), ), Expanded( @@ -515,7 +518,8 @@ class LessonSubtile extends StatelessWidget { overflow: TextOverflow.ellipsis, style: TextStyle( fontWeight: FontWeight.w500, - color: AppColors.of(context).text.withOpacity(.65)), + color: + AppColors.of(context).text.withValues(alpha: .65)), ), ), ), diff --git a/refilc/lib/ui/widgets/message/message_tile.dart b/refilc/lib/ui/widgets/message/message_tile.dart index 62428f4..affc357 100644 --- a/refilc/lib/ui/widgets/message/message_tile.dart +++ b/refilc/lib/ui/widgets/message/message_tile.dart @@ -58,7 +58,8 @@ class MessageTile extends StatelessWidget { width: 105, height: 15, decoration: BoxDecoration( - color: AppColors.of(context).text.withOpacity(.85), + color: + AppColors.of(context).text.withValues(alpha: .85), borderRadius: BorderRadius.circular(8.0), ), ), @@ -89,7 +90,8 @@ class MessageTile extends StatelessWidget { width: 150, height: 10, decoration: BoxDecoration( - color: AppColors.of(context).text.withOpacity(.45), + color: + AppColors.of(context).text.withValues(alpha: .45), borderRadius: BorderRadius.circular(8.0), ), ), @@ -109,7 +111,8 @@ class MessageTile extends StatelessWidget { width: 35, height: 15, decoration: BoxDecoration( - color: AppColors.of(context).text.withOpacity(.45), + color: + AppColors.of(context).text.withValues(alpha: .45), borderRadius: BorderRadius.circular(8.0), ), ), @@ -120,7 +123,7 @@ class MessageTile extends StatelessWidget { style: TextStyle( fontWeight: FontWeight.w500, fontSize: 14.0, - color: AppColors.of(context).text.withOpacity(.75), + color: AppColors.of(context).text.withValues(alpha: .75), ), ), ), diff --git a/refilc_mobile_ui/lib/common/action_button.dart b/refilc_mobile_ui/lib/common/action_button.dart index e176766..0abc95e 100644 --- a/refilc_mobile_ui/lib/common/action_button.dart +++ b/refilc_mobile_ui/lib/common/action_button.dart @@ -1,7 +1,8 @@ import 'package:flutter/material.dart'; class ActionButton extends StatelessWidget { - const ActionButton({super.key, required this.label, this.activeColor, this.onTap}); + const ActionButton( + {super.key, required this.label, this.activeColor, this.onTap}); final Color? activeColor; final void Function()? onTap; @@ -19,7 +20,8 @@ class ActionButton extends StatelessWidget { curve: Curves.easeInOut, height: 32.0, decoration: BoxDecoration( - color: (activeColor ?? Theme.of(context).colorScheme.secondary).withOpacity(0.25), + color: (activeColor ?? Theme.of(context).colorScheme.secondary) + .withValues(alpha: 0.25), borderRadius: BorderRadius.circular(6.0), ), padding: const EdgeInsets.symmetric(vertical: 6.0, horizontal: 12.0), @@ -28,7 +30,11 @@ class ActionButton extends StatelessWidget { maxLines: 1, softWrap: false, overflow: TextOverflow.ellipsis, - style: TextStyle(fontSize: 15.0, fontWeight: FontWeight.w600, color: activeColor ?? Theme.of(context).colorScheme.secondary))), + style: TextStyle( + fontSize: 15.0, + fontWeight: FontWeight.w600, + color: activeColor ?? + Theme.of(context).colorScheme.secondary))), ), ), ); diff --git a/refilc_mobile_ui/lib/common/average_display.dart b/refilc_mobile_ui/lib/common/average_display.dart index ebadd35..c22b6ae 100644 --- a/refilc_mobile_ui/lib/common/average_display.dart +++ b/refilc_mobile_ui/lib/common/average_display.dart @@ -21,7 +21,7 @@ class AverageDisplay extends StatelessWidget { @override Widget build(BuildContext context) { Color color = average == 0.0 - ? AppColors.of(context).text.withOpacity(.8) + ? AppColors.of(context).text.withValues(alpha: .8) : gradeColor(context: context, value: average); String averageText = average.toStringAsFixed(2); @@ -49,16 +49,18 @@ class AverageDisplay extends StatelessWidget { borderRadius: (border && dashed) ? null : BorderRadius.circular(45.0 * scale), border: border && !dashed - ? Border.fromBorderSide( - BorderSide(color: color.withOpacity(.5), width: 1.0 * scale)) + ? Border.fromBorderSide(BorderSide( + color: color.withValues(alpha: .5), width: 1.0 * scale)) + : null, + color: !border + ? color.withValues(alpha: average == 0.0 ? .15 : .25) : null, - color: !border ? color.withOpacity(average == 0.0 ? .15 : .25) : null, ), child: (border && dashed) ? DottedBorder( strokeWidth: 1.0 * scale, padding: EdgeInsets.all(4.0 * scale), - color: color.withOpacity(.5), + color: color.withValues(alpha: .5), dashPattern: const [6, 6], radius: Radius.circular(45.0 * scale), borderType: BorderType.RRect, diff --git a/refilc_mobile_ui/lib/common/bottom_card.dart b/refilc_mobile_ui/lib/common/bottom_card.dart index 689b209..476cc4a 100644 --- a/refilc_mobile_ui/lib/common/bottom_card.dart +++ b/refilc_mobile_ui/lib/common/bottom_card.dart @@ -25,7 +25,7 @@ class BottomCard extends StatelessWidget { margin: const EdgeInsets.only(top: 12.0, bottom: 4.0), decoration: BoxDecoration( borderRadius: BorderRadius.circular(45.0), - color: AppColors.of(context).text.withOpacity(0.10), + color: AppColors.of(context).text.withValues(alpha: 0.10), ), ), if (child != null) child!, diff --git a/refilc_mobile_ui/lib/common/bottom_sheet_menu/rounded_bottom_sheet.dart b/refilc_mobile_ui/lib/common/bottom_sheet_menu/rounded_bottom_sheet.dart index 8c60603..ac07c95 100644 --- a/refilc_mobile_ui/lib/common/bottom_sheet_menu/rounded_bottom_sheet.dart +++ b/refilc_mobile_ui/lib/common/bottom_sheet_menu/rounded_bottom_sheet.dart @@ -38,7 +38,7 @@ class RoundedBottomSheet extends StatelessWidget { margin: const EdgeInsets.only(top: 12.0, bottom: 4.0), decoration: BoxDecoration( borderRadius: BorderRadius.circular(45.0), - color: AppColors.of(context).text.withOpacity(0.10), + color: AppColors.of(context).text.withValues(alpha: 0.10), ), ), if (child != null) child!, diff --git a/refilc_mobile_ui/lib/common/chips/beta_chip.dart b/refilc_mobile_ui/lib/common/chips/beta_chip.dart index 2967a47..f8335ba 100644 --- a/refilc_mobile_ui/lib/common/chips/beta_chip.dart +++ b/refilc_mobile_ui/lib/common/chips/beta_chip.dart @@ -16,7 +16,7 @@ class BetaChip extends StatelessWidget { decoration: BoxDecoration( color: !disabled ? Theme.of(context).colorScheme.secondary - : AppColors.of(context).text.withOpacity(.25), + : AppColors.of(context).text.withValues(alpha: .25), borderRadius: BorderRadius.circular(40), ), child: Padding( @@ -28,7 +28,7 @@ class BetaChip extends StatelessWidget { style: TextStyle( fontSize: 10, color: disabled - ? AppColors.of(context).text.withOpacity(.5) + ? AppColors.of(context).text.withValues(alpha: .5) : Colors.white, fontWeight: FontWeight.w600, overflow: TextOverflow.ellipsis, diff --git a/refilc_mobile_ui/lib/common/chips/new_chip.dart b/refilc_mobile_ui/lib/common/chips/new_chip.dart index a482962..ea32b1a 100644 --- a/refilc_mobile_ui/lib/common/chips/new_chip.dart +++ b/refilc_mobile_ui/lib/common/chips/new_chip.dart @@ -11,8 +11,9 @@ class NewChip extends StatelessWidget { Widget build(BuildContext context) { return Container( decoration: BoxDecoration( - color: - disabled ? AppColors.of(context).text.withOpacity(.25) : Colors.red, + color: disabled + ? AppColors.of(context).text.withValues(alpha: .25) + : Colors.red, borderRadius: BorderRadius.circular(12.0), ), padding: @@ -23,7 +24,7 @@ class NewChip extends StatelessWidget { Icon( Icons.hotel_class_rounded, color: disabled - ? AppColors.of(context).text.withOpacity(.5) + ? AppColors.of(context).text.withValues(alpha: .5) : Colors.white, size: 14.0, ), @@ -32,7 +33,7 @@ class NewChip extends StatelessWidget { 'new'.i18n, style: TextStyle( color: disabled - ? AppColors.of(context).text.withOpacity(.5) + ? AppColors.of(context).text.withValues(alpha: .5) : Colors.white, fontSize: 12.0, fontWeight: FontWeight.bold, diff --git a/refilc_mobile_ui/lib/common/custom_snack_bar.dart b/refilc_mobile_ui/lib/common/custom_snack_bar.dart index 789c7db..6b2ccc5 100644 --- a/refilc_mobile_ui/lib/common/custom_snack_bar.dart +++ b/refilc_mobile_ui/lib/common/custom_snack_bar.dart @@ -24,7 +24,7 @@ SnackBar CustomSnackBar({ color: _backgroundColor, borderRadius: BorderRadius.circular(6.0), boxShadow: [ - BoxShadow(color: Colors.black.withOpacity(.15), blurRadius: 4.0) + BoxShadow(color: Colors.black.withValues(alpha: .15), blurRadius: 4.0) ], ), padding: const EdgeInsets.all(12.0), diff --git a/refilc_mobile_ui/lib/common/detail.dart b/refilc_mobile_ui/lib/common/detail.dart index 1882e15..47f9bd9 100644 --- a/refilc_mobile_ui/lib/common/detail.dart +++ b/refilc_mobile_ui/lib/common/detail.dart @@ -26,7 +26,7 @@ class Detail extends StatelessWidget { text: description, style: TextStyle( fontWeight: FontWeight.w500, - color: AppColors.of(context).text.withOpacity(0.85)), + color: AppColors.of(context).text.withValues(alpha: 0.85)), ), ], ), diff --git a/refilc_mobile_ui/lib/common/empty.dart b/refilc_mobile_ui/lib/common/empty.dart index fd484c5..04ec3a5 100644 --- a/refilc_mobile_ui/lib/common/empty.dart +++ b/refilc_mobile_ui/lib/common/empty.dart @@ -34,7 +34,7 @@ class Empty extends StatelessWidget { style: TextStyle( fontSize: 32.0, fontWeight: FontWeight.w500, - color: AppColors.of(context).text.withOpacity(.75)), + color: AppColors.of(context).text.withValues(alpha: .75)), children: subtitle != null ? [ TextSpan( @@ -42,7 +42,9 @@ class Empty extends StatelessWidget { style: TextStyle( fontSize: 18.0, height: 2.0, - color: AppColors.of(context).text.withOpacity(.5))) + color: AppColors.of(context) + .text + .withValues(alpha: .5))) ] : [], ), diff --git a/refilc_mobile_ui/lib/common/filter_bar.dart b/refilc_mobile_ui/lib/common/filter_bar.dart index e4e1f04..4d7a32d 100644 --- a/refilc_mobile_ui/lib/common/filter_bar.dart +++ b/refilc_mobile_ui/lib/common/filter_bar.dart @@ -56,12 +56,12 @@ class _FilterBarState extends State { ), labelPadding: const EdgeInsets.symmetric(horizontal: 12, vertical: 3), labelColor: Theme.of(context).colorScheme.secondary, - unselectedLabelColor: AppColors.of(context).text.withOpacity(0.65), + unselectedLabelColor: AppColors.of(context).text.withValues(alpha: 0.65), // indicator indicatorSize: TabBarIndicatorSize.tab, indicatorPadding: const EdgeInsets.symmetric(vertical: 8.0), indicator: BoxDecoration( - color: Theme.of(context).colorScheme.tertiary.withOpacity(.2), + color: Theme.of(context).colorScheme.tertiary.withValues(alpha: .2), borderRadius: BorderRadius.circular(45.0), ), overlayColor: WidgetStateProperty.all(const Color(0x00000000)), @@ -77,7 +77,7 @@ class _FilterBarState extends State { width: e, height: 15, decoration: BoxDecoration( - color: AppColors.of(context).text.withOpacity(.45), + color: AppColors.of(context).text.withValues(alpha: .45), borderRadius: BorderRadius.circular(8.0), ), ), diff --git a/refilc_mobile_ui/lib/common/hero_scrollview.dart b/refilc_mobile_ui/lib/common/hero_scrollview.dart index c6f6a35..3945f97 100644 --- a/refilc_mobile_ui/lib/common/hero_scrollview.dart +++ b/refilc_mobile_ui/lib/common/hero_scrollview.dart @@ -79,7 +79,7 @@ class HeroScrollViewState extends State { child: Row( children: [ Icon(widget.icon, - color: AppColors.of(context).text.withOpacity(.8)), + color: AppColors.of(context).text.withValues(alpha: .8)), const SizedBox(width: 8.0), Expanded( child: Text( @@ -123,7 +123,7 @@ class HeroScrollViewState extends State { Theme.of(context).colorScheme.secondary, amount: 0.1, ) - .withOpacity(0.4), + .withValues(alpha: 0.4), width: MediaQuery.of(context).size.width, fit: BoxFit.cover, ), @@ -135,10 +135,10 @@ class HeroScrollViewState extends State { Theme.of(context).scaffoldBackgroundColor, Theme.of(context) .scaffoldBackgroundColor - .withOpacity(0.1), + .withValues(alpha: 0.1), Theme.of(context) .scaffoldBackgroundColor - .withOpacity(0.1), + .withValues(alpha: 0.1), Theme.of(context).scaffoldBackgroundColor, ], stops: const [0.1, 0.5, 0.7, 0.98], @@ -164,7 +164,7 @@ class HeroScrollViewState extends State { Theme.of(context).colorScheme.secondary, amount: 0.1, ) - .withOpacity(0.9), + .withValues(alpha: 0.9), width: 1.5, padding: 12.0, icon: Icon( @@ -175,7 +175,7 @@ class HeroScrollViewState extends State { Theme.of(context).colorScheme.secondary, amount: 0.1, ) - .withOpacity(0.8), + .withValues(alpha: 0.8), ), ), ), @@ -192,7 +192,7 @@ class HeroScrollViewState extends State { textAlign: TextAlign.center, style: TextStyle( fontSize: 26.0, - color: AppColors.of(context).text.withOpacity(.8), + color: AppColors.of(context).text.withValues(alpha: .8), fontStyle: widget.italic ? FontStyle.italic : null, fontWeight: FontWeight.bold, ), diff --git a/refilc_mobile_ui/lib/common/material_action_button.dart b/refilc_mobile_ui/lib/common/material_action_button.dart index 46217f7..50c14e8 100644 --- a/refilc_mobile_ui/lib/common/material_action_button.dart +++ b/refilc_mobile_ui/lib/common/material_action_button.dart @@ -19,7 +19,8 @@ class MaterialActionButton extends StatelessWidget { return RawMaterialButton( padding: const EdgeInsets.symmetric(horizontal: 16.0), shape: const StadiumBorder(), - fillColor: backgroundColor ?? AppColors.of(context).text.withOpacity(.15), + fillColor: + backgroundColor ?? AppColors.of(context).text.withValues(alpha: .15), elevation: 0, highlightElevation: 0, onPressed: onPressed, diff --git a/refilc_mobile_ui/lib/common/outlined_round_button.dart b/refilc_mobile_ui/lib/common/outlined_round_button.dart index ae3fd5c..8306fbf 100644 --- a/refilc_mobile_ui/lib/common/outlined_round_button.dart +++ b/refilc_mobile_ui/lib/common/outlined_round_button.dart @@ -24,7 +24,8 @@ class OutlinedRoundButton extends StatelessWidget { decoration: BoxDecoration( color: Theme.of(context).colorScheme.surface, border: Border.all( - color: Theme.of(context).colorScheme.secondary.withOpacity(0.1), + color: + Theme.of(context).colorScheme.secondary.withValues(alpha: 0.1), width: 1.1, ), borderRadius: BorderRadius.circular(8.0), diff --git a/refilc_mobile_ui/lib/common/panel/panel.dart b/refilc_mobile_ui/lib/common/panel/panel.dart index 3c61396..60ee500 100644 --- a/refilc_mobile_ui/lib/common/panel/panel.dart +++ b/refilc_mobile_ui/lib/common/panel/panel.dart @@ -67,7 +67,7 @@ class PanelTitle extends StatelessWidget { child: DefaultTextStyle( style: Theme.of(context).textTheme.titleMedium!.copyWith( fontWeight: FontWeight.w600, - color: AppColors.of(context).text.withOpacity(0.65)), + color: AppColors.of(context).text.withValues(alpha: 0.65)), child: title, ), ); diff --git a/refilc_mobile_ui/lib/common/panel/panel_action_button.dart b/refilc_mobile_ui/lib/common/panel/panel_action_button.dart index 0b78409..ecbdf8f 100644 --- a/refilc_mobile_ui/lib/common/panel/panel_action_button.dart +++ b/refilc_mobile_ui/lib/common/panel/panel_action_button.dart @@ -23,18 +23,28 @@ class PanelActionButton extends StatelessWidget { padding: padding, shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(8.0), - side: BorderSide(color: Theme.of(context).colorScheme.secondary.withOpacity(.6), width: 2), + side: BorderSide( + color: + Theme.of(context).colorScheme.secondary.withValues(alpha: .6), + width: 2), ), child: ListTile( leading: leading != null ? Theme( - data: Theme.of(context).copyWith(iconTheme: IconThemeData(color: Theme.of(context).colorScheme.secondary)), + data: Theme.of(context).copyWith( + iconTheme: IconThemeData( + color: Theme.of(context).colorScheme.secondary)), child: leading!, ) : null, trailing: trailing, title: title != null - ? DefaultTextStyle(style: Theme.of(context).textTheme.titleMedium!.copyWith(fontWeight: FontWeight.w500, fontSize: 15.0), child: title!) + ? DefaultTextStyle( + style: Theme.of(context) + .textTheme + .titleMedium! + .copyWith(fontWeight: FontWeight.w500, fontSize: 15.0), + child: title!) : null, contentPadding: EdgeInsets.zero, visualDensity: VisualDensity.compact, diff --git a/refilc_mobile_ui/lib/common/panel/panel_button.dart b/refilc_mobile_ui/lib/common/panel/panel_button.dart index 1c7ebc6..955681d 100644 --- a/refilc_mobile_ui/lib/common/panel/panel_button.dart +++ b/refilc_mobile_ui/lib/common/panel/panel_button.dart @@ -36,8 +36,9 @@ class PanelButton extends StatelessWidget { shape: RoundedRectangleBorder( borderRadius: borderRadius ?? BorderRadius.circular(12.0)), fillColor: background - ? Colors.white.withOpacity( - Theme.of(context).brightness == Brightness.light ? .35 : .2) + ? Colors.white.withValues( + alpha: + Theme.of(context).brightness == Brightness.light ? .35 : .2) : null, child: ListTile( leading: leading != null @@ -57,7 +58,7 @@ class PanelButton extends StatelessWidget { width: 2.0, height: 32.0, decoration: BoxDecoration( - color: AppColors.of(context).text.withOpacity(.15), + color: AppColors.of(context).text.withValues(alpha: .15), borderRadius: BorderRadius.circular(45.0), ), ), diff --git a/refilc_mobile_ui/lib/common/personality_card/empty_card.dart b/refilc_mobile_ui/lib/common/personality_card/empty_card.dart index 356d897..f7fe5ef 100644 --- a/refilc_mobile_ui/lib/common/personality_card/empty_card.dart +++ b/refilc_mobile_ui/lib/common/personality_card/empty_card.dart @@ -44,7 +44,7 @@ class _EmptyCardState extends State { if (Provider.of(context, listen: false) .shadowEffect) BoxShadow( - color: Colors.black.withOpacity(0.08), + color: Colors.black.withValues(alpha: 0.08), offset: const Offset(0, 5), blurRadius: 20, spreadRadius: 10, @@ -52,7 +52,7 @@ class _EmptyCardState extends State { ], ), child: DottedBorder( - color: Colors.black.withOpacity(0.9), + color: Colors.black.withValues(alpha: 0.9), dashPattern: const [12, 12], padding: const EdgeInsets.only(top: 20, bottom: 20, left: 20, right: 20), @@ -60,7 +60,7 @@ class _EmptyCardState extends State { child: Text( widget.text, style: TextStyle( - color: Colors.white.withOpacity(0.9), + color: Colors.white.withValues(alpha: 0.9), ), ), ), diff --git a/refilc_mobile_ui/lib/common/personality_card/personality_card.dart b/refilc_mobile_ui/lib/common/personality_card/personality_card.dart index 848748c..7f65fa8 100644 --- a/refilc_mobile_ui/lib/common/personality_card/personality_card.dart +++ b/refilc_mobile_ui/lib/common/personality_card/personality_card.dart @@ -301,7 +301,7 @@ class _PersonalityCardState extends State { style: TextStyle( fontSize: 16, height: 1.2, - color: Colors.white.withOpacity(0.8), + color: Colors.white.withValues(alpha: 0.8), ), ), const SizedBox(height: 25), @@ -354,7 +354,7 @@ class _PersonalityCardState extends State { borderRadius: const BorderRadius.all(Radius.circular(5)), boxShadow: [ BoxShadow( - color: Colors.black.withOpacity(0.08), + color: Colors.black.withValues(alpha: 0.08), offset: const Offset(0, 5), blurRadius: 20, spreadRadius: 10, @@ -362,7 +362,7 @@ class _PersonalityCardState extends State { ], ), child: DottedBorder( - color: Colors.black.withOpacity(0.9), + color: Colors.black.withValues(alpha: 0.9), dashPattern: const [12, 12], padding: const EdgeInsets.only(top: 20, bottom: 20, left: 20, right: 20), diff --git a/refilc_mobile_ui/lib/common/profile_image/profile_image.dart b/refilc_mobile_ui/lib/common/profile_image/profile_image.dart index 69abe4b..ab559ff 100644 --- a/refilc_mobile_ui/lib/common/profile_image/profile_image.dart +++ b/refilc_mobile_ui/lib/common/profile_image/profile_image.dart @@ -91,10 +91,10 @@ class _ProfileImageState extends State { clipBehavior: Clip.hardEdge, shape: const CircleBorder(), color: widget.name != null && widget.name! == 'Rendszerüzenet' - ? widget.backgroundColor?.withOpacity(0.8) ?? - AppColors.of(context).text.withOpacity(0.5) + ? widget.backgroundColor?.withValues(alpha: 0.8) ?? + AppColors.of(context).text.withValues(alpha: 0.5) : widget.backgroundColor ?? - AppColors.of(context).text.withOpacity(.15), + AppColors.of(context).text.withValues(alpha: .15), child: InkWell( onTap: widget.onTap, onDoubleTap: widget.onDoubleTap, @@ -114,7 +114,7 @@ class _ProfileImageState extends State { width: 15, height: 15, decoration: BoxDecoration( - color: color.withOpacity(.5), + color: color.withValues(alpha: .5), borderRadius: BorderRadius.circular(8.0), ), ) @@ -206,7 +206,7 @@ class _ProfileImageState extends State { color: profilePicture != null ? Colors.transparent : widget.backgroundColor ?? - AppColors.of(context).text.withOpacity(.15), + AppColors.of(context).text.withValues(alpha: .15), child: AnimatedContainer( duration: const Duration(milliseconds: 200), height: widget.radius * 2, diff --git a/refilc_mobile_ui/lib/common/progress_bar.dart b/refilc_mobile_ui/lib/common/progress_bar.dart index ed65a05..4ecd127 100644 --- a/refilc_mobile_ui/lib/common/progress_bar.dart +++ b/refilc_mobile_ui/lib/common/progress_bar.dart @@ -2,7 +2,10 @@ import 'package:flutter/material.dart'; class ProgressBar extends StatelessWidget { const ProgressBar( - {super.key, required this.value, this.backgroundColor, this.height = 8.0}); + {super.key, + required this.value, + this.backgroundColor, + this.height = 8.0}); final double value; final Color? backgroundColor; @@ -16,8 +19,8 @@ class ProgressBar extends StatelessWidget { Container( decoration: BoxDecoration( color: Theme.of(context).brightness == Brightness.light - ? Colors.black.withOpacity(0.1) - : Colors.white.withOpacity(0.1), + ? Colors.black.withValues(alpha: 0.1) + : Colors.white.withValues(alpha: 0.1), borderRadius: BorderRadius.circular(45.0), ), width: double.infinity, diff --git a/refilc_mobile_ui/lib/common/round_border_icon.dart b/refilc_mobile_ui/lib/common/round_border_icon.dart index 9a6e594..e801aa0 100644 --- a/refilc_mobile_ui/lib/common/round_border_icon.dart +++ b/refilc_mobile_ui/lib/common/round_border_icon.dart @@ -19,7 +19,7 @@ class RoundBorderIcon extends StatelessWidget { decoration: BoxDecoration( border: Border.all( color: color ?? - Theme.of(context).colorScheme.secondary.withOpacity(0.25), + Theme.of(context).colorScheme.secondary.withValues(alpha: 0.25), width: width), borderRadius: BorderRadius.circular(50.0), ), diff --git a/refilc_mobile_ui/lib/common/splitted_panel/splitted_panel.dart b/refilc_mobile_ui/lib/common/splitted_panel/splitted_panel.dart index 402e16f..4761ade 100644 --- a/refilc_mobile_ui/lib/common/splitted_panel/splitted_panel.dart +++ b/refilc_mobile_ui/lib/common/splitted_panel/splitted_panel.dart @@ -56,7 +56,7 @@ class SplittedPanel extends StatelessWidget { color: Theme.of(context) .colorScheme .secondary - .withOpacity(.25), + .withValues(alpha: .25), width: 1.0) : null, ), @@ -121,7 +121,7 @@ class SplittedPanelTitle extends StatelessWidget { child: DefaultTextStyle( style: Theme.of(context).textTheme.titleMedium!.copyWith( fontWeight: FontWeight.w600, - color: AppColors.of(context).text.withOpacity(0.65)), + color: AppColors.of(context).text.withValues(alpha: 0.65)), child: title, ), ); diff --git a/refilc_mobile_ui/lib/common/widgets/absence/absence_display.dart b/refilc_mobile_ui/lib/common/widgets/absence/absence_display.dart index 8e09aeb..9c45778 100644 --- a/refilc_mobile_ui/lib/common/widgets/absence/absence_display.dart +++ b/refilc_mobile_ui/lib/common/widgets/absence/absence_display.dart @@ -15,7 +15,7 @@ class AbsenceDisplay extends StatelessWidget { padding: const EdgeInsets.only(top: 5.0), // padding: const EdgeInsets.symmetric(vertical: 4.0, horizontal: 6.0), // decoration: BoxDecoration( - // color: Theme.of(context).scaffoldBackgroundColor.withOpacity(.2), + // color: Theme.of(context).scaffoldBackgroundColor.withValues(alpha: .2), // borderRadius: BorderRadius.circular(12.0), // ), child: Row(children: [ diff --git a/refilc_mobile_ui/lib/common/widgets/absence/absence_subject_tile.dart b/refilc_mobile_ui/lib/common/widgets/absence/absence_subject_tile.dart index fbe4f63..2363093 100644 --- a/refilc_mobile_ui/lib/common/widgets/absence/absence_subject_tile.dart +++ b/refilc_mobile_ui/lib/common/widgets/absence/absence_subject_tile.dart @@ -81,7 +81,7 @@ class AbsenceSubjectTile extends StatelessWidget { // fontFamily: "monospace", color: getColorByPercentage(percentage, context: context) - .withOpacity(0.8), + .withValues(alpha: 0.8), fontSize: 16.0, fontWeight: FontWeight.w500, ), @@ -109,5 +109,5 @@ Color getColorByPercentage(double percentage, {required BuildContext context}) { color = AppColors.of(context).yellow; } - return color.withOpacity(.8); + return color.withValues(alpha: .8); } diff --git a/refilc_mobile_ui/lib/common/widgets/absence/absence_tile.dart b/refilc_mobile_ui/lib/common/widgets/absence/absence_tile.dart index 8658052..de0b6f4 100644 --- a/refilc_mobile_ui/lib/common/widgets/absence/absence_tile.dart +++ b/refilc_mobile_ui/lib/common/widgets/absence/absence_tile.dart @@ -57,7 +57,7 @@ class AbsenceTile extends StatelessWidget { width: 39, decoration: BoxDecoration( shape: BoxShape.circle, - color: !group ? color.withOpacity(.25) : null, + color: !group ? color.withValues(alpha: .25) : null, ), child: Center( child: Icon(justificationIcon(absence.state), color: color)), diff --git a/refilc_mobile_ui/lib/common/widgets/absence/absence_view.dart b/refilc_mobile_ui/lib/common/widgets/absence/absence_view.dart index 979d492..1fcb511 100644 --- a/refilc_mobile_ui/lib/common/widgets/absence/absence_view.dart +++ b/refilc_mobile_ui/lib/common/widgets/absence/absence_view.dart @@ -51,7 +51,7 @@ class AbsenceView extends StatelessWidget { height: 44.0, decoration: BoxDecoration( shape: BoxShape.circle, - color: color.withOpacity(.25), + color: color.withValues(alpha: .25), ), child: Center( child: Icon( diff --git a/refilc_mobile_ui/lib/common/widgets/absence_group/absence_group_tile.dart b/refilc_mobile_ui/lib/common/widgets/absence_group/absence_group_tile.dart index 49dc65b..c9f9307 100644 --- a/refilc_mobile_ui/lib/common/widgets/absence_group/absence_group_tile.dart +++ b/refilc_mobile_ui/lib/common/widgets/absence_group/absence_group_tile.dart @@ -48,7 +48,7 @@ class AbsenceGroupTile extends StatelessWidget { height: 39.0, decoration: BoxDecoration( shape: BoxShape.circle, - color: color.withOpacity(.25), + color: color.withValues(alpha: .25), ), child: Center( child: Icon(AbsenceTile.justificationIcon(state), @@ -76,7 +76,9 @@ class AbsenceGroupTile extends StatelessWidget { .format(context, weekday: true), style: TextStyle( fontWeight: FontWeight.w500, - color: AppColors.of(context).text.withOpacity(0.8)), + color: AppColors.of(context) + .text + .withValues(alpha: 0.8)), ) : null, children: absences, diff --git a/refilc_mobile_ui/lib/common/widgets/ad/ad_tile.dart b/refilc_mobile_ui/lib/common/widgets/ad/ad_tile.dart index 2ae7e44..9d8dbb8 100644 --- a/refilc_mobile_ui/lib/common/widgets/ad/ad_tile.dart +++ b/refilc_mobile_ui/lib/common/widgets/ad/ad_tile.dart @@ -32,7 +32,7 @@ class AdTile extends StatelessWidget { style: TextStyle( fontSize: 14.5, fontWeight: FontWeight.w500, - color: AppColors.of(context).text.withOpacity(0.7), + color: AppColors.of(context).text.withValues(alpha: 0.7), ), ), ], diff --git a/refilc_mobile_ui/lib/common/widgets/card_handle.dart b/refilc_mobile_ui/lib/common/widgets/card_handle.dart index 9b6b754..35e2610 100644 --- a/refilc_mobile_ui/lib/common/widgets/card_handle.dart +++ b/refilc_mobile_ui/lib/common/widgets/card_handle.dart @@ -17,7 +17,7 @@ class CardHandle extends StatelessWidget { margin: const EdgeInsets.only(top: 12.0), decoration: BoxDecoration( borderRadius: BorderRadius.circular(45.0), - color: AppColors.of(context).text.withOpacity(0.10), + color: AppColors.of(context).text.withValues(alpha: 0.10), ), ), if (child != null) child!, diff --git a/refilc_mobile_ui/lib/common/widgets/cretification/certification_card.dart b/refilc_mobile_ui/lib/common/widgets/cretification/certification_card.dart index 6ce9ac3..75ac6f2 100644 --- a/refilc_mobile_ui/lib/common/widgets/cretification/certification_card.dart +++ b/refilc_mobile_ui/lib/common/widgets/cretification/certification_card.dart @@ -39,7 +39,7 @@ class CertificationCard extends StatelessWidget { decoration: BoxDecoration( borderRadius: BorderRadius.circular(12.0), gradient: LinearGradient( - colors: [color, color.withOpacity(.75)], + colors: [color, color.withValues(alpha: .75)], ), ), child: Material( @@ -65,7 +65,7 @@ class CertificationCard extends StatelessWidget { TextSpan( text: " • ${grades.length}", style: TextStyle( - color: textColor.withOpacity(.75), + color: textColor.withValues(alpha: .75), fontWeight: FontWeight.w600, fontSize: 16.0, ), diff --git a/refilc_mobile_ui/lib/common/widgets/cretification/certification_tile.dart b/refilc_mobile_ui/lib/common/widgets/cretification/certification_tile.dart index 5702fbc..1aacd91 100644 --- a/refilc_mobile_ui/lib/common/widgets/cretification/certification_tile.dart +++ b/refilc_mobile_ui/lib/common/widgets/cretification/certification_tile.dart @@ -66,7 +66,7 @@ class CertificationTile extends StatelessWidget { child: ListTile( tileColor: gradeColor( context: context, value: grade.value.value, nocolor: false) - .withOpacity(.1), + .withValues(alpha: .1), visualDensity: VisualDensity.compact, contentPadding: isSubjectView ? const EdgeInsets.only(left: 20.0, right: 12.0, bottom: 6.0) @@ -85,7 +85,7 @@ class CertificationTile extends StatelessWidget { SubjectIcon.resolveVariant( subject: grade.subject, context: context), size: 28.0, - color: AppColors.of(context).text.withOpacity(.75)), + color: AppColors.of(context).text.withValues(alpha: .75)), ), minLeadingWidth: isSubjectView ? 32.0 : 42.0, trailing: isSubjectView diff --git a/refilc_mobile_ui/lib/common/widgets/custom_segmented_control.dart b/refilc_mobile_ui/lib/common/widgets/custom_segmented_control.dart index 86d44f0..93f0887 100644 --- a/refilc_mobile_ui/lib/common/widgets/custom_segmented_control.dart +++ b/refilc_mobile_ui/lib/common/widgets/custom_segmented_control.dart @@ -34,7 +34,7 @@ class CustomSegmentedControl extends StatelessWidget { initialValue: value, children: finalChildren, decoration: BoxDecoration( - color: Theme.of(context).colorScheme.secondary.withOpacity(.069), + color: Theme.of(context).colorScheme.secondary.withValues(alpha: .069), borderRadius: BorderRadius.circular(12.0), ), thumbDecoration: BoxDecoration( @@ -42,7 +42,7 @@ class CustomSegmentedControl extends StatelessWidget { borderRadius: BorderRadius.circular(10.0), // boxShadow: [ // BoxShadow( - // color: Colors.black.withOpacity(.3), + // color: Colors.black.withValues(alpha: .3), // blurRadius: 4.0, // spreadRadius: 1.0, // offset: const Offset( @@ -66,7 +66,7 @@ class CustomSegmentedControl extends StatelessWidget { // endIndent: 2, // thickness: 2, decoration: BoxDecoration( - color: AppColors.of(context).text.withOpacity(0.2), + color: AppColors.of(context).text.withValues(alpha: 0.2), ), ), height: height, diff --git a/refilc_mobile_ui/lib/common/widgets/custom_switch.dart b/refilc_mobile_ui/lib/common/widgets/custom_switch.dart index 4f3f896..fee9ebb 100644 --- a/refilc_mobile_ui/lib/common/widgets/custom_switch.dart +++ b/refilc_mobile_ui/lib/common/widgets/custom_switch.dart @@ -28,7 +28,9 @@ class CustomSwitch extends StatelessWidget { borderRadius: const BorderRadius.all( Radius.circular(25.0), ), - color: value ? Theme.of(context).colorScheme.secondary : Theme.of(context).highlightColor, + color: value + ? Theme.of(context).colorScheme.secondary + : Theme.of(context).highlightColor, ), ), AnimatedAlign( @@ -44,7 +46,7 @@ class CustomSwitch extends StatelessWidget { color: Colors.white, boxShadow: [ BoxShadow( - color: Colors.black12.withOpacity(0.1), + color: Colors.black12.withValues(alpha: 0.1), spreadRadius: 0.5, blurRadius: 1, ) diff --git a/refilc_mobile_ui/lib/common/widgets/exam/exam_tile.dart b/refilc_mobile_ui/lib/common/widgets/exam/exam_tile.dart index 83d22f3..4d274dd 100644 --- a/refilc_mobile_ui/lib/common/widgets/exam/exam_tile.dart +++ b/refilc_mobile_ui/lib/common/widgets/exam/exam_tile.dart @@ -59,7 +59,7 @@ class ExamTile extends StatelessWidget { ? Icon( SubjectIcon.resolveVariant( context: context, subject: exam.subject), - color: AppColors.of(context).text.withOpacity(.5), + color: AppColors.of(context).text.withValues(alpha: .5), ) : null, minLeadingWidth: 0, diff --git a/refilc_mobile_ui/lib/common/widgets/exam/exam_view.dart b/refilc_mobile_ui/lib/common/widgets/exam/exam_view.dart index 1955770..9d56b8d 100644 --- a/refilc_mobile_ui/lib/common/widgets/exam/exam_view.dart +++ b/refilc_mobile_ui/lib/common/widgets/exam/exam_view.dart @@ -31,7 +31,7 @@ class ExamView extends StatelessWidget { SubjectIcon.resolveVariant( subject: exam.subject, context: context), size: 36.0, - color: AppColors.of(context).text.withOpacity(.75), + color: AppColors.of(context).text.withValues(alpha: .75), ), ), title: Text( diff --git a/refilc_mobile_ui/lib/common/widgets/exam/exam_viewable.dart b/refilc_mobile_ui/lib/common/widgets/exam/exam_viewable.dart index 129d8ae..c8c9419 100644 --- a/refilc_mobile_ui/lib/common/widgets/exam/exam_viewable.dart +++ b/refilc_mobile_ui/lib/common/widgets/exam/exam_viewable.dart @@ -122,7 +122,7 @@ class ExamPopup extends StatelessWidget { color: ColorsUtils() .fade(context, Theme.of(context).colorScheme.secondary, darkenAmount: 0.1, lightenAmount: 0.1) - .withOpacity(0.33), + .withValues(alpha: 0.33), width: MediaQuery.of(context).size.width, ), Container( @@ -135,10 +135,10 @@ class ExamPopup extends StatelessWidget { Theme.of(context).scaffoldBackgroundColor, Theme.of(context) .scaffoldBackgroundColor - .withOpacity(0.1), + .withValues(alpha: 0.1), Theme.of(context) .scaffoldBackgroundColor - .withOpacity(0.1), + .withValues(alpha: 0.1), Theme.of(context).scaffoldBackgroundColor, ], stops: const [0.1, 0.5, 0.7, 1.0], @@ -166,7 +166,7 @@ class ExamPopup extends StatelessWidget { .fade( context, Theme.of(context).colorScheme.secondary, darkenAmount: 0.1, lightenAmount: 0.1) - .withOpacity(0.33), + .withValues(alpha: 0.33), borderRadius: BorderRadius.circular( 2.0, ), @@ -186,7 +186,7 @@ class ExamPopup extends StatelessWidget { Theme.of(context).colorScheme.secondary, amount: 0.1, ) - .withOpacity(0.9), + .withValues(alpha: 0.9), width: 1.5, padding: 10.0, icon: Icon( @@ -198,7 +198,7 @@ class ExamPopup extends StatelessWidget { Theme.of(context).colorScheme.secondary, amount: 0.1, ) - .withOpacity(0.8), + .withValues(alpha: 0.8), ), ), ), @@ -236,7 +236,7 @@ class ExamPopup extends StatelessWidget { style: TextStyle( color: AppColors.of(context) .text - .withOpacity(0.9), + .withValues(alpha: 0.9), fontSize: 16.0, fontWeight: FontWeight.w600, ), @@ -298,7 +298,7 @@ class ExamPopup extends StatelessWidget { style: TextStyle( color: AppColors.of(context) .text - .withOpacity(0.9), + .withValues(alpha: 0.9), fontSize: 16.0, fontWeight: FontWeight.w600, fontStyle: ((lesson?.subject.isRenamed ?? @@ -315,8 +315,9 @@ class ExamPopup extends StatelessWidget { Text( '${DateFormat('MMM d, H:mm', I18n.locale.countryCode).format(lesson!.start).capital()} - ${DateFormat('H:mm').format(lesson!.end)}', style: TextStyle( - color: - AppColors.of(context).text.withOpacity(0.85), + color: AppColors.of(context) + .text + .withValues(alpha: 0.85), fontSize: 14.0, fontWeight: FontWeight.w500, ), @@ -359,7 +360,7 @@ class ExamPopup extends StatelessWidget { // 'view_subject'.i18n, // style: TextStyle( // color: - // AppColors.of(context).text.withOpacity(0.9), + // AppColors.of(context).text.withValues(alpha: 0.9), // fontSize: 18.0, // fontWeight: FontWeight.w500, // ), diff --git a/refilc_mobile_ui/lib/common/widgets/grade/new_grades.dart b/refilc_mobile_ui/lib/common/widgets/grade/new_grades.dart index 75df5a2..9128a9a 100644 --- a/refilc_mobile_ui/lib/common/widgets/grade/new_grades.dart +++ b/refilc_mobile_ui/lib/common/widgets/grade/new_grades.dart @@ -42,8 +42,10 @@ class NewGradesSurprise extends StatelessWidget { child: Container( decoration: BoxDecoration(boxShadow: [ BoxShadow( - color: - Theme.of(context).colorScheme.secondary.withOpacity(.5), + color: Theme.of(context) + .colorScheme + .secondary + .withValues(alpha: .5), blurRadius: 18.0, ) ]), @@ -59,7 +61,8 @@ class NewGradesSurprise extends StatelessWidget { width: 85, height: 15, decoration: BoxDecoration( - color: AppColors.of(context).text.withOpacity(.85), + color: + AppColors.of(context).text.withValues(alpha: .85), borderRadius: BorderRadius.circular(8.0), ), ), @@ -78,7 +81,8 @@ class NewGradesSurprise extends StatelessWidget { width: 125, height: 10, decoration: BoxDecoration( - color: AppColors.of(context).text.withOpacity(.45), + color: + AppColors.of(context).text.withValues(alpha: .45), borderRadius: BorderRadius.circular(8.0), ), ), @@ -97,7 +101,8 @@ class NewGradesSurprise extends StatelessWidget { width: 25, height: 25, decoration: BoxDecoration( - color: AppColors.of(context).text.withOpacity(.45), + color: + AppColors.of(context).text.withValues(alpha: .45), borderRadius: BorderRadius.circular(25.0), ), ), @@ -110,7 +115,9 @@ class NewGradesSurprise extends StatelessWidget { style: TextStyle( shadows: [ Shadow( - color: AppColors.of(context).text.withOpacity(.2), + color: AppColors.of(context) + .text + .withValues(alpha: .2), offset: const Offset(2, 2), ) ], @@ -119,7 +126,7 @@ class NewGradesSurprise extends StatelessWidget { text: "x", style: TextStyle( fontSize: 20.0, - color: AppColors.of(context).text.withOpacity(.5), + color: AppColors.of(context).text.withValues(alpha: .5), fontWeight: FontWeight.w800, ), ) @@ -127,7 +134,7 @@ class NewGradesSurprise extends StatelessWidget { style: TextStyle( fontWeight: FontWeight.w700, fontSize: 28.0, - color: AppColors.of(context).text.withOpacity(.75), + color: AppColors.of(context).text.withValues(alpha: .75), ), ), ), diff --git a/refilc_mobile_ui/lib/common/widgets/grade/surprise_grade.dart b/refilc_mobile_ui/lib/common/widgets/grade/surprise_grade.dart index 3873e23..0f18a9a 100644 --- a/refilc_mobile_ui/lib/common/widgets/grade/surprise_grade.dart +++ b/refilc_mobile_ui/lib/common/widgets/grade/surprise_grade.dart @@ -134,9 +134,12 @@ class _SurpriseGradeState extends State return FadeTransition( opacity: _revealAnimFade, child: Material( - color: Colors.black.withOpacity(.75), + color: Colors.black.withValues(alpha: .75), child: Container( - color: Theme.of(context).colorScheme.secondary.withOpacity(.05), + color: Theme.of(context) + .colorScheme + .secondary + .withValues(alpha: .05), child: Container( decoration: const BoxDecoration( gradient: RadialGradient( @@ -223,12 +226,13 @@ class _SurpriseGradeState extends State padding: const EdgeInsets.symmetric( horizontal: 32.0, vertical: 20.0), decoration: BoxDecoration( - color: Colors.white.withOpacity(.3), + color: Colors.white + .withValues(alpha: .3), borderRadius: BorderRadius.circular(24.0), border: Border.all( color: Colors.black - .withOpacity(.3), + .withValues(alpha: .3), width: 1.0), ), child: Row( @@ -264,7 +268,8 @@ class _SurpriseGradeState extends State .capital(), style: TextStyle( color: Colors.white - .withOpacity(.8), + .withValues( + alpha: .8), fontWeight: FontWeight.bold, fontSize: 24.0, @@ -285,7 +290,8 @@ class _SurpriseGradeState extends State "${widget.grade.value.weight}%", style: TextStyle( color: Colors.white - .withOpacity(.7), + .withValues( + alpha: .7), fontWeight: FontWeight.w600, fontSize: 20.0, @@ -326,7 +332,7 @@ class _SurpriseGradeState extends State child: Text( "open_subtitle".i18n, style: TextStyle( - color: Colors.white.withOpacity(.8), + color: Colors.white.withValues(alpha: .8), fontWeight: FontWeight.w600, fontSize: 24.0, ), @@ -383,7 +389,7 @@ class _SurpriseGradeState extends State context: context, value: widget.grade.value.value) - .withOpacity(.5), + .withValues(alpha: .5), blurRadius: 24.0, ), Shadow( @@ -391,7 +397,7 @@ class _SurpriseGradeState extends State context: context, value: widget.grade.value.value) - .withOpacity(.3), + .withValues(alpha: .3), offset: const Offset(-3, -3), ), ], diff --git a/refilc_mobile_ui/lib/common/widgets/homework/homework_tile.dart b/refilc_mobile_ui/lib/common/widgets/homework/homework_tile.dart index 8e8a7c2..0d731d0 100644 --- a/refilc_mobile_ui/lib/common/widgets/homework/homework_tile.dart +++ b/refilc_mobile_ui/lib/common/widgets/homework/homework_tile.dart @@ -38,7 +38,7 @@ class HomeworkTile extends StatelessWidget { child: censored ? Container( decoration: BoxDecoration( - color: AppColors.of(context).text.withOpacity(.55), + color: AppColors.of(context).text.withValues(alpha: .55), borderRadius: BorderRadius.circular(60.0), ), ) @@ -48,7 +48,7 @@ class HomeworkTile extends StatelessWidget { SubjectIcon.resolveVariant( subject: homework.subject, context: context), size: 28.0, - color: AppColors.of(context).text.withOpacity(.75), + color: AppColors.of(context).text.withValues(alpha: .75), ), ), ), @@ -59,7 +59,7 @@ class HomeworkTile extends StatelessWidget { width: 160, height: 15, decoration: BoxDecoration( - color: AppColors.of(context).text.withOpacity(.85), + color: AppColors.of(context).text.withValues(alpha: .85), borderRadius: BorderRadius.circular(8.0), ), ), @@ -83,7 +83,7 @@ class HomeworkTile extends StatelessWidget { width: 100, height: 10, decoration: BoxDecoration( - color: AppColors.of(context).text.withOpacity(.45), + color: AppColors.of(context).text.withValues(alpha: .45), borderRadius: BorderRadius.circular(8.0), ), ), @@ -100,13 +100,13 @@ class HomeworkTile extends StatelessWidget { width: 15, height: 15, decoration: BoxDecoration( - color: AppColors.of(context).text.withOpacity(.45), + color: AppColors.of(context).text.withValues(alpha: .45), borderRadius: BorderRadius.circular(8.0), ), ) : Icon( FeatherIcons.home, - color: AppColors.of(context).text.withOpacity(.75), + color: AppColors.of(context).text.withValues(alpha: .75), ), minLeadingWidth: 0, ), diff --git a/refilc_mobile_ui/lib/common/widgets/lesson/lesson_viewable.dart b/refilc_mobile_ui/lib/common/widgets/lesson/lesson_viewable.dart index 90a3402..a31106e 100644 --- a/refilc_mobile_ui/lib/common/widgets/lesson/lesson_viewable.dart +++ b/refilc_mobile_ui/lib/common/widgets/lesson/lesson_viewable.dart @@ -320,7 +320,7 @@ class TimetableLessonPopup extends StatelessWidget { color: ColorsUtils() .fade(context, Theme.of(context).colorScheme.secondary, darkenAmount: 0.1, lightenAmount: 0.1) - .withOpacity(0.33), + .withValues(alpha: 0.33), width: MediaQuery.of(context).size.width, ), Container( @@ -333,10 +333,10 @@ class TimetableLessonPopup extends StatelessWidget { Theme.of(context).scaffoldBackgroundColor, Theme.of(context) .scaffoldBackgroundColor - .withOpacity(0.1), + .withValues(alpha: 0.1), Theme.of(context) .scaffoldBackgroundColor - .withOpacity(0.1), + .withValues(alpha: 0.1), Theme.of(context).scaffoldBackgroundColor, ], stops: const [0.0, 0.3, 0.6, 0.95], @@ -373,7 +373,7 @@ class TimetableLessonPopup extends StatelessWidget { .fade(context, Theme.of(context).colorScheme.secondary, darkenAmount: 0.1, lightenAmount: 0.1) - .withOpacity(0.33), + .withValues(alpha: 0.33), borderRadius: BorderRadius.circular( 2.0, ), @@ -395,7 +395,7 @@ class TimetableLessonPopup extends StatelessWidget { Theme.of(context).colorScheme.secondary, amount: 0.1, ) - .withOpacity(0.9), + .withValues(alpha: 0.9), width: 1.5, padding: 10.0, icon: Icon( @@ -407,7 +407,7 @@ class TimetableLessonPopup extends StatelessWidget { Theme.of(context).colorScheme.secondary, amount: 0.1, ) - .withOpacity(0.8), + .withValues(alpha: 0.8), ), ), ), @@ -434,7 +434,7 @@ class TimetableLessonPopup extends StatelessWidget { style: TextStyle( color: AppColors.of(context) .text - .withOpacity(0.85), + .withValues(alpha: 0.85), fontSize: 14.0, fontWeight: FontWeight.w500, ), @@ -450,7 +450,7 @@ class TimetableLessonPopup extends StatelessWidget { color: Theme.of(context) .colorScheme .tertiary - .withOpacity(.15), + .withValues(alpha: .15), borderRadius: BorderRadius.circular(10.0), ), child: Text( @@ -463,7 +463,7 @@ class TimetableLessonPopup extends StatelessWidget { color: Theme.of(context) .colorScheme .secondary - .withOpacity(.9), + .withValues(alpha: .9), ), ), ), @@ -505,7 +505,9 @@ class TimetableLessonPopup extends StatelessWidget { : lesson.substituteTeacher!.name)) ?? '', style: TextStyle( - color: AppColors.of(context).text.withOpacity(0.9), + color: AppColors.of(context) + .text + .withValues(alpha: 0.9), fontSize: 14.0, fontWeight: FontWeight.w500, ), @@ -534,8 +536,9 @@ class TimetableLessonPopup extends StatelessWidget { Text( lesson.description, style: TextStyle( - color: - AppColors.of(context).text.withOpacity(0.9), + color: AppColors.of(context) + .text + .withValues(alpha: 0.9), fontSize: 14.0, fontWeight: FontWeight.w600, ), @@ -564,7 +567,9 @@ class TimetableLessonPopup extends StatelessWidget { Text( '${'year_index'.i18n}: ${lesson.lessonYearIndex ?? '?'}', style: TextStyle( - color: AppColors.of(context).text.withOpacity(0.9), + color: AppColors.of(context) + .text + .withValues(alpha: 0.9), fontSize: 14.0, fontWeight: FontWeight.w600, ), @@ -607,7 +612,7 @@ class TimetableLessonPopup extends StatelessWidget { style: TextStyle( color: AppColors.of(context) .text - .withOpacity(0.9), + .withValues(alpha: 0.9), fontSize: 16.0, fontWeight: FontWeight.w600, ), @@ -622,7 +627,7 @@ class TimetableLessonPopup extends StatelessWidget { style: TextStyle( color: AppColors.of(context) .text - .withOpacity(0.85), + .withValues(alpha: 0.85), fontSize: 14.0, fontWeight: FontWeight.w500, ), @@ -665,7 +670,7 @@ class TimetableLessonPopup extends StatelessWidget { // 'view_subject'.i18n, // style: TextStyle( // color: - // AppColors.of(context).text.withOpacity(0.9), + // AppColors.of(context).text.withValues(alpha: 0.9), // fontSize: 18.0, // fontWeight: FontWeight.w500, // ), diff --git a/refilc_mobile_ui/lib/common/widgets/message/message_view_tile.dart b/refilc_mobile_ui/lib/common/widgets/message/message_view_tile.dart index 8e80e33..2e510e0 100644 --- a/refilc_mobile_ui/lib/common/widgets/message/message_view_tile.dart +++ b/refilc_mobile_ui/lib/common/widgets/message/message_view_tile.dart @@ -91,7 +91,10 @@ class MessageViewTile extends StatelessWidget { decoration: BoxDecoration( borderRadius: BorderRadius.circular(16.0), border: Border.all( - color: Theme.of(context).colorScheme.secondary.withOpacity(.25), + color: Theme.of(context) + .colorScheme + .secondary + .withValues(alpha: .25), width: 1.0, ), ), @@ -122,7 +125,7 @@ class MessageViewTile extends StatelessWidget { .textTheme .bodySmall ?.color - ?.withOpacity(0.6), + ?.withValues(alpha: 0.6), ), overflow: TextOverflow.ellipsis, maxLines: 1, diff --git a/refilc_mobile_ui/lib/common/widgets/missed_exam/missed_exam_tile.dart b/refilc_mobile_ui/lib/common/widgets/missed_exam/missed_exam_tile.dart index 0de2530..b40d2ab 100644 --- a/refilc_mobile_ui/lib/common/widgets/missed_exam/missed_exam_tile.dart +++ b/refilc_mobile_ui/lib/common/widgets/missed_exam/missed_exam_tile.dart @@ -23,7 +23,7 @@ class MissedExamTile extends StatelessWidget { height: 36, child: Icon( FeatherIcons.slash, - color: AppColors.of(context).red.withOpacity(.75), + color: AppColors.of(context).red.withValues(alpha: .75), size: 28.0, )), title: Text("missed_exams" diff --git a/refilc_mobile_ui/lib/common/widgets/missed_exam/missed_exam_view.dart b/refilc_mobile_ui/lib/common/widgets/missed_exam/missed_exam_view.dart index 982a64a..fab515b 100644 --- a/refilc_mobile_ui/lib/common/widgets/missed_exam/missed_exam_view.dart +++ b/refilc_mobile_ui/lib/common/widgets/missed_exam/missed_exam_view.dart @@ -50,7 +50,7 @@ class MissedExamViewTile extends StatelessWidget { leading: Icon( SubjectIcon.resolveVariant( subject: lesson.subject, context: context), - color: AppColors.of(context).text.withOpacity(.8), + color: AppColors.of(context).text.withValues(alpha: .8), size: 32.0, ), title: Text( diff --git a/refilc_mobile_ui/lib/common/widgets/statistics_tile.dart b/refilc_mobile_ui/lib/common/widgets/statistics_tile.dart index 23afdce..2de6dad 100644 --- a/refilc_mobile_ui/lib/common/widgets/statistics_tile.dart +++ b/refilc_mobile_ui/lib/common/widgets/statistics_tile.dart @@ -81,13 +81,13 @@ class StatisticsTile extends StatelessWidget { decoration: BoxDecoration( color: fill ? (color ?? gradeColor(context: context, value: value)) - .withOpacity(.2) + .withValues(alpha: .2) : null, border: outline || fill ? Border.all( color: (color ?? gradeColor(context: context, value: value)) - .withOpacity(outline ? 1.0 : 0.0), + .withValues(alpha: outline ? 1.0 : 0.0), width: fill ? 5.0 : 5.0, ) : null, diff --git a/refilc_mobile_ui/lib/common/widgets/tick_tile.dart b/refilc_mobile_ui/lib/common/widgets/tick_tile.dart index 04e7a7f..dd5bcdd 100644 --- a/refilc_mobile_ui/lib/common/widgets/tick_tile.dart +++ b/refilc_mobile_ui/lib/common/widgets/tick_tile.dart @@ -81,7 +81,7 @@ class TickTileState extends State { fontSize: 15.5, decoration: isTicked ? TextDecoration.lineThrough : null, color: isTicked - ? AppColors.of(context).text.withOpacity(0.5) + ? AppColors.of(context).text.withValues(alpha: 0.5) : null, ), ), @@ -97,7 +97,7 @@ class TickTileState extends State { fontWeight: FontWeight.w500, fontSize: 12.0, color: isTicked - ? AppColors.of(context).text.withOpacity(0.5) + ? AppColors.of(context).text.withValues(alpha: 0.5) : null, ), ) diff --git a/refilc_mobile_ui/lib/common/widgets/update/updates_view.dart b/refilc_mobile_ui/lib/common/widgets/update/updates_view.dart index d2ce169..cc70b48 100644 --- a/refilc_mobile_ui/lib/common/widgets/update/updates_view.dart +++ b/refilc_mobile_ui/lib/common/widgets/update/updates_view.dart @@ -54,7 +54,8 @@ class UpdateViewState extends State { style: TextStyle( fontWeight: FontWeight.w600, fontSize: 16.0, - color: AppColors.of(context).text.withOpacity(0.6), + color: + AppColors.of(context).text.withValues(alpha: 0.6), ), ), ], diff --git a/refilc_mobile_ui/lib/pages/absences/absences_page.dart b/refilc_mobile_ui/lib/pages/absences/absences_page.dart index df77029..fc97881 100644 --- a/refilc_mobile_ui/lib/pages/absences/absences_page.dart +++ b/refilc_mobile_ui/lib/pages/absences/absences_page.dart @@ -643,7 +643,7 @@ class AbsencesPageState extends State fontWeight: FontWeight.w500, color: AppColors.of(context) .text - .withOpacity(0.8), + .withValues(alpha: 0.8), ), ), ], diff --git a/refilc_mobile_ui/lib/pages/grades/average_selector.dart b/refilc_mobile_ui/lib/pages/grades/average_selector.dart index 854a548..00d5f96 100644 --- a/refilc_mobile_ui/lib/pages/grades/average_selector.dart +++ b/refilc_mobile_ui/lib/pages/grades/average_selector.dart @@ -98,7 +98,7 @@ class AverageSelectorState extends State { avgDropItems[widget.value]!.i18n, style: Theme.of(context).textTheme.titleSmall!.copyWith( fontWeight: FontWeight.w600, - color: AppColors.of(context).text.withOpacity(0.65)), + color: AppColors.of(context).text.withValues(alpha: 0.65)), ), const SizedBox( width: 4, diff --git a/refilc_mobile_ui/lib/pages/grades/fail_warning.dart b/refilc_mobile_ui/lib/pages/grades/fail_warning.dart index c859c12..cd23e65 100644 --- a/refilc_mobile_ui/lib/pages/grades/fail_warning.dart +++ b/refilc_mobile_ui/lib/pages/grades/fail_warning.dart @@ -27,7 +27,7 @@ class FailWarning extends StatelessWidget { children: [ Icon( FeatherIcons.alertTriangle, - color: Colors.orange.withOpacity(.5), + color: Colors.orange.withValues(alpha: .5), size: 20.0, ), const SizedBox(width: 12.0), diff --git a/refilc_mobile_ui/lib/pages/grades/grade_subject_view.dart b/refilc_mobile_ui/lib/pages/grades/grade_subject_view.dart index 7583707..b9ed425 100644 --- a/refilc_mobile_ui/lib/pages/grades/grade_subject_view.dart +++ b/refilc_mobile_ui/lib/pages/grades/grade_subject_view.dart @@ -493,7 +493,7 @@ class _GradeSubjectViewState extends State color: Theme.of(context) .colorScheme .primary - .withOpacity(.15), + .withValues(alpha: .15), ), child: Icon( FeatherIcons.flag, diff --git a/refilc_mobile_ui/lib/pages/grades/graph.dart b/refilc_mobile_ui/lib/pages/grades/graph.dart index c8c382b..bd445a1 100644 --- a/refilc_mobile_ui/lib/pages/grades/graph.dart +++ b/refilc_mobile_ui/lib/pages/grades/graph.dart @@ -171,7 +171,7 @@ class GradeGraphState extends State { VerticalLine( x: x, strokeWidth: 3.0, - color: AppColors.of(context).red.withOpacity(.75), + color: AppColors.of(context).red.withValues(alpha: .75), label: VerticalLineLabel( labelResolver: (_) => " ${"mid".i18n} ​", // <- zwsp for padding show: true, @@ -196,7 +196,7 @@ class GradeGraphState extends State { settings.graphClassAvg) { extraLinesH.add(HorizontalLine( y: widget.classAvg!, - color: AppColors.of(context).text.withOpacity(.75), + color: AppColors.of(context).text.withValues(alpha: .75), )); } @@ -244,10 +244,10 @@ class GradeGraphState extends State { begin: Alignment.topCenter, end: Alignment.bottomCenter, colors: [ - averageColor.withOpacity(0.7), - averageColor.withOpacity(0.3), - averageColor.withOpacity(0.2), - averageColor.withOpacity(0.1), + averageColor.withValues(alpha: 0.7), + averageColor.withValues(alpha: 0.3), + averageColor.withValues(alpha: 0.2), + averageColor.withValues(alpha: 0.1), ], stops: const [0.1, 0.6, 0.8, 1], ), @@ -274,16 +274,16 @@ class GradeGraphState extends State { colors: [ AppColors.of(context) .text - .withOpacity(0.7), + .withValues(alpha: 0.7), AppColors.of(context) .text - .withOpacity(0.3), + .withValues(alpha: 0.3), AppColors.of(context) .text - .withOpacity(0.2), + .withValues(alpha: 0.2), AppColors.of(context) .text - .withOpacity(0.1), + .withValues(alpha: 0.1), ], stops: const [0.1, 0.6, 0.8, 1], ), @@ -300,11 +300,11 @@ class GradeGraphState extends State { horizontalInterval: 1, // checkToShowVerticalLine: (_) => false, // getDrawingHorizontalLine: (_) => FlLine( - // color: AppColors.of(context).text.withOpacity(.15), + // color: AppColors.of(context).text.withValues(alpha: .15), // strokeWidth: 2, // ), // getDrawingVerticalLine: (_) => FlLine( - // color: AppColors.of(context).text.withOpacity(.25), + // color: AppColors.of(context).text.withValues(alpha: .25), // strokeWidth: 2, // ), ), @@ -367,7 +367,7 @@ class GradeGraphState extends State { style: TextStyle( color: AppColors.of(context) .text - .withOpacity(.75), + .withValues(alpha: .75), fontWeight: FontWeight.bold, fontSize: 14.0, ), @@ -376,7 +376,7 @@ class GradeGraphState extends State { // getTextStyles: (context, value) => TextStyle( // color: AppColors.of(context) // .text - // .withOpacity(.75), + // .withValues(alpha: .75), // fontWeight: FontWeight.bold, // fontSize: 14.0, // ), diff --git a/refilc_mobile_ui/lib/pages/home/live_card/live_card.dart b/refilc_mobile_ui/lib/pages/home/live_card/live_card.dart index 6d8253d..f976049 100644 --- a/refilc_mobile_ui/lib/pages/home/live_card/live_card.dart +++ b/refilc_mobile_ui/lib/pages/home/live_card/live_card.dart @@ -114,7 +114,7 @@ class LiveCardStateA extends State { // 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( @@ -162,7 +162,7 @@ class LiveCardStateA extends State { // color: Theme.of(context) // .colorScheme // .secondary - // .withOpacity(.85), + // .withValues(alpha: .85), // fontStyle: liveCard.nextLesson!.subject.isRenamed && // settingsProvider.renamedSubjectsItalics // ? FontStyle.italic @@ -176,7 +176,7 @@ class LiveCardStateA extends State { // color: Theme.of(context) // .colorScheme // .secondary - // .withOpacity(.85), + // .withValues(alpha: .85), // ), // ), // TextSpan(text: "first_lesson_3".i18n), @@ -188,7 +188,7 @@ class LiveCardStateA extends State { // color: Theme.of(context) // .colorScheme // .secondary - // .withOpacity(.85), + // .withValues(alpha: .85), // ), // ), // TextSpan(text: "first_lesson_4".i18n), @@ -281,7 +281,7 @@ class LiveCardStateA extends State { color: Theme.of(context) .colorScheme .secondary - .withOpacity(.15), + .withValues(alpha: .15), borderRadius: BorderRadius.circular(10.0), ), child: Text( @@ -294,7 +294,7 @@ class LiveCardStateA extends State { color: Theme.of(context) .colorScheme .secondary - .withOpacity(.9), + .withValues(alpha: .9), ), ), ), @@ -469,7 +469,7 @@ class LiveCardStateA extends State { fontWeight: FontWeight.w500, color: AppColors.of(context) .text - .withOpacity(.75), + .withValues(alpha: .75), height: 1.1, ), ), @@ -547,7 +547,7 @@ class LiveCardStateA extends State { color: Theme.of(context) .colorScheme .tertiary - .withOpacity(.15), + .withValues(alpha: .15), borderRadius: BorderRadius.circular(10.0), ), @@ -561,7 +561,7 @@ class LiveCardStateA extends State { color: Theme.of(context) .colorScheme .secondary - .withOpacity(.9), + .withValues(alpha: .9), ), ), ), @@ -730,10 +730,11 @@ class LiveCardStateA extends State { fontSize: 16.5, color: AppColors.of(context) .text - .withOpacity(!liveCard - .nextLesson!.isEmpty - ? 1.0 - : 0.5), + .withValues( + alpha: !liveCard + .nextLesson!.isEmpty + ? 1.0 + : 0.5), fontStyle: liveCard.nextLesson! .subject.isRenamed && settingsProvider @@ -752,7 +753,7 @@ class LiveCardStateA extends State { height: 1.0, color: AppColors.of(context) .text - .withOpacity(.75), + .withValues(alpha: .75), ), maxLines: !(nextSubject == null && progressCurrent == null && @@ -830,7 +831,7 @@ class LiveCardStateA extends State { fontWeight: FontWeight.w500, color: AppColors.of(context) .text - .withOpacity(.9), + .withValues(alpha: .9), ), ), ], @@ -899,7 +900,7 @@ class LiveCardStateA extends State { fontWeight: FontWeight.w500, color: AppColors.of(context) .text - .withOpacity(.75), + .withValues(alpha: .75), height: 1.1, ), ), @@ -977,7 +978,7 @@ class LiveCardStateA extends State { color: Theme.of(context) .colorScheme .tertiary - .withOpacity(.15), + .withValues(alpha: .15), borderRadius: BorderRadius.circular(10.0), ), @@ -991,7 +992,7 @@ class LiveCardStateA extends State { color: Theme.of(context) .colorScheme .secondary - .withOpacity(.9), + .withValues(alpha: .9), ), ), ), diff --git a/refilc_mobile_ui/lib/pages/home/live_card/live_card_widget.dart b/refilc_mobile_ui/lib/pages/home/live_card/live_card_widget.dart index db17acf..34648b0 100644 --- a/refilc_mobile_ui/lib/pages/home/live_card/live_card_widget.dart +++ b/refilc_mobile_ui/lib/pages/home/live_card/live_card_widget.dart @@ -132,7 +132,7 @@ class _LiveCardWidgetState extends State { color: Theme.of(context) .colorScheme .secondary - .withOpacity(0.5), + .withValues(alpha: 0.5), borderRadius: const BorderRadius.all( Radius.circular(10), ), @@ -220,8 +220,9 @@ class _LiveCardWidgetState extends State { context) .colorScheme .secondary - .withOpacity( - .3), + .withValues( + alpha: + .3), borderRadius: BorderRadius .circular( @@ -267,7 +268,7 @@ class _LiveCardWidgetState extends State { size: 26.0, color: AppColors.of(context) .text - .withOpacity(.75), + .withValues(alpha: .75), ), ), ], @@ -283,7 +284,7 @@ class _LiveCardWidgetState extends State { height: 1.0, color: AppColors.of(context) .text - .withOpacity(.75), + .withValues(alpha: .75), ), maxLines: !(widget.nextSubject == null && @@ -341,7 +342,8 @@ class _LiveCardWidgetState extends State { color: Theme.of(context) .colorScheme .secondary - .withOpacity(.25), + .withValues( + alpha: .25), borderRadius: BorderRadius.circular( 4.0), @@ -356,7 +358,8 @@ class _LiveCardWidgetState extends State { color: Theme.of(context) .colorScheme .secondary - .withOpacity(.9), + .withValues( + alpha: .9), ), ), ), @@ -366,7 +369,7 @@ class _LiveCardWidgetState extends State { style: TextStyle( color: AppColors.of(context) .text - .withOpacity(.8), + .withValues(alpha: .8), fontWeight: FontWeight.w600, ), maxLines: 1, @@ -393,7 +396,7 @@ class _LiveCardWidgetState extends State { fontWeight: FontWeight.w500, color: AppColors.of(context) .text - .withOpacity(.75), + .withValues(alpha: .75), ), ), ), diff --git a/refilc_mobile_ui/lib/pages/home/live_card/segmented_countdown.dart b/refilc_mobile_ui/lib/pages/home/live_card/segmented_countdown.dart index 772e00d..dd80c7f 100644 --- a/refilc_mobile_ui/lib/pages/home/live_card/segmented_countdown.dart +++ b/refilc_mobile_ui/lib/pages/home/live_card/segmented_countdown.dart @@ -24,7 +24,8 @@ class SegmentedCountdownState extends State { children: [ Container( decoration: BoxDecoration( - color: Theme.of(context).colorScheme.secondary.withOpacity(0.05), + color: + Theme.of(context).colorScheme.secondary.withValues(alpha: 0.05), borderRadius: BorderRadius.circular(8.0), ), padding: const EdgeInsets.symmetric(vertical: 2.0), @@ -46,7 +47,7 @@ class SegmentedCountdownState extends State { style: TextStyle( fontSize: 16.0, fontWeight: FontWeight.w500, - color: AppColors.of(context).text.withOpacity(0.6), + color: AppColors.of(context).text.withValues(alpha: 0.6), ), ), const SizedBox( @@ -54,7 +55,8 @@ class SegmentedCountdownState extends State { ), Container( decoration: BoxDecoration( - color: Theme.of(context).colorScheme.secondary.withOpacity(0.05), + color: + Theme.of(context).colorScheme.secondary.withValues(alpha: 0.05), borderRadius: BorderRadius.circular(8.0), ), padding: const EdgeInsets.symmetric(vertical: 2.0), @@ -71,7 +73,10 @@ class SegmentedCountdownState extends State { if (diffMins.length == 2) Container( decoration: BoxDecoration( - color: Theme.of(context).colorScheme.secondary.withOpacity(0.05), + color: Theme.of(context) + .colorScheme + .secondary + .withValues(alpha: 0.05), borderRadius: BorderRadius.circular(8.0), ), padding: const EdgeInsets.symmetric(vertical: 2.0), @@ -94,7 +99,7 @@ class SegmentedCountdownState extends State { style: TextStyle( fontSize: 16.0, fontWeight: FontWeight.w500, - color: AppColors.of(context).text.withOpacity(0.6), + color: AppColors.of(context).text.withValues(alpha: 0.6), ), ), const SizedBox( @@ -102,7 +107,8 @@ class SegmentedCountdownState extends State { ), Container( decoration: BoxDecoration( - color: Theme.of(context).colorScheme.secondary.withOpacity(0.05), + color: + Theme.of(context).colorScheme.secondary.withValues(alpha: 0.05), borderRadius: BorderRadius.circular(8.0), ), padding: const EdgeInsets.symmetric(vertical: 2.0), @@ -119,7 +125,10 @@ class SegmentedCountdownState extends State { if (diffSecs.length == 2) Container( decoration: BoxDecoration( - color: Theme.of(context).colorScheme.secondary.withOpacity(0.05), + color: Theme.of(context) + .colorScheme + .secondary + .withValues(alpha: 0.05), borderRadius: BorderRadius.circular(8.0), ), padding: const EdgeInsets.symmetric(vertical: 2.0), @@ -142,7 +151,7 @@ class SegmentedCountdownState extends State { style: TextStyle( fontSize: 16.0, fontWeight: FontWeight.w500, - color: AppColors.of(context).text.withOpacity(0.6), + color: AppColors.of(context).text.withValues(alpha: 0.6), ), ), ], diff --git a/refilc_mobile_ui/lib/pages/home/particle.dart b/refilc_mobile_ui/lib/pages/home/particle.dart index 5c47a5d..729ba93 100644 --- a/refilc_mobile_ui/lib/pages/home/particle.dart +++ b/refilc_mobile_ui/lib/pages/home/particle.dart @@ -36,7 +36,8 @@ class FourRandomSlotParticle extends Particle { final double relativeDistanceToMiddle; - FourRandomSlotParticle({required this.children, this.relativeDistanceToMiddle = 2.0}); + FourRandomSlotParticle( + {required this.children, this.relativeDistanceToMiddle = 2.0}); @override void paint(Canvas canvas, Size size, double progress, int seed) { @@ -53,13 +54,17 @@ class FourRandomSlotParticle extends Particle { Offset sideToOffset(int side, Size size, Random random) { if (side == 0) { - return Offset(-random.nextDouble() * (size.width / 2), -random.nextDouble() * (size.height / 2)); + return Offset(-random.nextDouble() * (size.width / 2), + -random.nextDouble() * (size.height / 2)); } else if (side == 1) { - return Offset(random.nextDouble() * (size.width / 2), -random.nextDouble() * (size.height / 2)); + return Offset(random.nextDouble() * (size.width / 2), + -random.nextDouble() * (size.height / 2)); } else if (side == 2) { - return Offset(random.nextDouble() * (size.width / 2), random.nextDouble() * (size.height / 2)); + return Offset(random.nextDouble() * (size.width / 2), + random.nextDouble() * (size.height / 2)); } else if (side == 3) { - return Offset(-random.nextDouble() * (size.width / 2), random.nextDouble() * (size.height / 2)); + return Offset(-random.nextDouble() * (size.width / 2), + random.nextDouble() * (size.height / 2)); } else { throw Exception(); } @@ -148,9 +153,16 @@ class CircleMirror extends Particle { final int numberOfParticles; - CircleMirror.builder({required this.particleBuilder, required this.initialRotation, required this.numberOfParticles}); + CircleMirror.builder( + {required this.particleBuilder, + required this.initialRotation, + required this.numberOfParticles}); - CircleMirror({required Particle child, required this.initialRotation, required this.numberOfParticles}) : particleBuilder = ((index) => child); + CircleMirror( + {required Particle child, + required this.initialRotation, + required this.numberOfParticles}) + : particleBuilder = ((index) => child); @override void paint(Canvas canvas, Size size, double progress, seed) { @@ -177,9 +189,15 @@ class RectangleMirror extends Particle { final int numberOfParticles; - RectangleMirror.builder({required this.particleBuilder, required this.initialDistance, required this.numberOfParticles}); + RectangleMirror.builder( + {required this.particleBuilder, + required this.initialDistance, + required this.numberOfParticles}); - RectangleMirror({required Particle child, required this.initialDistance, required this.numberOfParticles}) + RectangleMirror( + {required Particle child, + required this.initialDistance, + required this.numberOfParticles}) : particleBuilder = ((index) => child); @override @@ -191,14 +209,17 @@ class RectangleMirror extends Particle { bool onHorizontalAxis = true; int side = 0; - assert((distanceBetweenParticles * numberOfParticles).round() == totalLength.round()); + assert((distanceBetweenParticles * numberOfParticles).round() == + totalLength.round()); canvas.translate(-size.width / 2, -size.height / 2); double currentDistance = initialDistance; for (int i = 0; i < numberOfParticles; i++) { while (true) { - if (onHorizontalAxis ? currentDistance > size.width : currentDistance > size.height) { + if (onHorizontalAxis + ? currentDistance > size.width + : currentDistance > size.height) { currentDistance -= onHorizontalAxis ? size.width : size.height; onHorizontalAxis = !onHorizontalAxis; side = (++side) % 4; @@ -215,7 +236,8 @@ class RectangleMirror extends Particle { }); } else if (side == 2) { assert(onHorizontalAxis); - moveTo(canvas, size, 2, size.width - currentDistance, size.height, () { + moveTo(canvas, size, 2, size.width - currentDistance, size.height, + () { particleBuilder(i).paint(canvas, size, progress, seed); }); } else if (side == 3) { @@ -233,7 +255,8 @@ class RectangleMirror extends Particle { canvas.restore(); } - void moveTo(Canvas canvas, Size size, int side, double x, double y, VoidCallback painter) { + void moveTo(Canvas canvas, Size size, int side, double x, double y, + VoidCallback painter) { canvas.save(); canvas.translate(x, y); canvas.rotate(-atan2(size.width / 2 - x, size.height / 2 - y)); @@ -261,7 +284,9 @@ class PositionedParticle extends Particle { /// Animates a childs position based on a Tween class AnimatedPositionedParticle extends Particle { - AnimatedPositionedParticle({required Offset begin, required Offset end, required this.child}) : offsetTween = Tween(begin: begin, end: end); + AnimatedPositionedParticle( + {required Offset begin, required Offset end, required this.child}) + : offsetTween = Tween(begin: begin, end: end); final Particle child; @@ -270,7 +295,8 @@ class AnimatedPositionedParticle extends Particle { @override void paint(Canvas canvas, Size size, double progress, seed) { canvas.save(); - canvas.translate(offsetTween.lerp(progress).dx, offsetTween.lerp(progress).dy); + canvas.translate( + offsetTween.lerp(progress).dx, offsetTween.lerp(progress).dy); child.paint(canvas, size, progress, seed); canvas.restore(); } @@ -335,7 +361,9 @@ class AnimatedRotationParticle extends Particle { final Tween rotation; - AnimatedRotationParticle({required this.child, required double begin, required double end}) : rotation = Tween(begin: begin, end: end); + AnimatedRotationParticle( + {required this.child, required double begin, required double end}) + : rotation = Tween(begin: begin, end: end); @override void paint(Canvas canvas, Size size, double progress, int seed) { @@ -362,7 +390,8 @@ class FadingRect extends Particle { @override void paint(Canvas canvas, Size size, double progress, seed) { - canvas.drawRect(Rect.fromLTWH(0.0, 0.0, width, height), Paint()..color = color.withOpacity(1 - progress)); + canvas.drawRect(Rect.fromLTWH(0.0, 0.0, width, height), + Paint()..color = color.withValues(alpha: 1 - progress)); } } @@ -375,7 +404,8 @@ class FadingCircle extends Particle { @override void paint(Canvas canvas, Size size, double progress, seed) { - canvas.drawCircle(Offset.zero, radius, Paint()..color = color.withOpacity(1 - progress)); + canvas.drawCircle(Offset.zero, radius, + Paint()..color = color.withValues(alpha: 1 - progress)); } } @@ -394,7 +424,11 @@ class FadingTriangle extends Particle { /// This is the factor of how much bigger then length than the width is final double heightToBaseFactor; - FadingTriangle({required this.variation, required this.color, required this.baseSize, required this.heightToBaseFactor}); + FadingTriangle( + {required this.variation, + required this.color, + required this.baseSize, + required this.heightToBaseFactor}); @override void paint(Canvas canvas, Size size, double progress, int seed) { @@ -403,7 +437,8 @@ class FadingTriangle extends Particle { path.lineTo(baseSize * variation, baseSize * heightToBaseFactor); path.lineTo(baseSize, 0.0); path.close(); - canvas.drawPath(path, Paint()..color = color.withOpacity(1 - progress)); + canvas.drawPath( + path, Paint()..color = color.withValues(alpha: 1 - progress)); } } @@ -418,7 +453,12 @@ class FadingSnake extends Particle { final Color color; - FadingSnake({required this.width, required this.segmentLength, required this.segments, required this.curvyness, required this.color}); + FadingSnake( + {required this.width, + required this.segmentLength, + required this.segments, + required this.curvyness, + required this.color}); @override void paint(Canvas canvas, Size size, double progress, int seed) { @@ -426,10 +466,12 @@ class FadingSnake extends Particle { canvas.rotate(pi / 6); Path path = Path(); for (int i = 0; i < segments; i++) { - path.quadraticBezierTo(curvyness * i, segmentLength * (i + 1), curvyness * (i + 1), segmentLength * (i + 1)); + path.quadraticBezierTo(curvyness * i, segmentLength * (i + 1), + curvyness * (i + 1), segmentLength * (i + 1)); } for (int i = segments - 1; i >= 0; i--) { - path.quadraticBezierTo(curvyness * (i + 1), segmentLength * i - curvyness, curvyness * i, segmentLength * i - curvyness); + path.quadraticBezierTo(curvyness * (i + 1), segmentLength * i - curvyness, + curvyness * i, segmentLength * i - curvyness); } path.close(); canvas.drawPath(path, Paint()..color = color); diff --git a/refilc_mobile_ui/lib/pages/messages/send_message/send_message.dart b/refilc_mobile_ui/lib/pages/messages/send_message/send_message.dart index e3dbe22..b1a2456 100644 --- a/refilc_mobile_ui/lib/pages/messages/send_message/send_message.dart +++ b/refilc_mobile_ui/lib/pages/messages/send_message/send_message.dart @@ -128,7 +128,8 @@ class SendMessageSheetState extends State { .join(), 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, diff --git a/refilc_mobile_ui/lib/pages/notes/submenu/add_note_screen.dart b/refilc_mobile_ui/lib/pages/notes/submenu/add_note_screen.dart index f4e3622..03b5640 100644 --- a/refilc_mobile_ui/lib/pages/notes/submenu/add_note_screen.dart +++ b/refilc_mobile_ui/lib/pages/notes/submenu/add_note_screen.dart @@ -57,7 +57,10 @@ class AddNoteScreenState extends State { decoration: BoxDecoration( border: Border( top: BorderSide( - color: Theme.of(context).colorScheme.secondary.withOpacity(0.1), + color: Theme.of(context) + .colorScheme + .secondary + .withValues(alpha: 0.1), width: 1.1, ), ), @@ -178,7 +181,10 @@ class AddNoteScreenState extends State { } }, child: Container( - color: Theme.of(context).colorScheme.secondary.withOpacity(0.2), + color: Theme.of(context) + .colorScheme + .secondary + .withValues(alpha: 0.2), child: Padding( padding: const EdgeInsets.all(8.0), child: Stack( @@ -196,8 +202,8 @@ class AddNoteScreenState extends State { 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: const Icon( FeatherIcons.check, diff --git a/refilc_mobile_ui/lib/pages/notes/submenu/note_view_screen.dart b/refilc_mobile_ui/lib/pages/notes/submenu/note_view_screen.dart index 6c53209..4db3733 100644 --- a/refilc_mobile_ui/lib/pages/notes/submenu/note_view_screen.dart +++ b/refilc_mobile_ui/lib/pages/notes/submenu/note_view_screen.dart @@ -55,8 +55,10 @@ class NoteViewScreenState extends State { AddNoteScreen(initialNote: widget.note))); }, child: Container( - color: - Theme.of(context).colorScheme.secondary.withOpacity(0.2), + color: Theme.of(context) + .colorScheme + .secondary + .withValues(alpha: 0.2), child: Padding( padding: const EdgeInsets.all(8.0), child: Stack( @@ -74,8 +76,8 @@ class NoteViewScreenState extends State { 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: const Icon( FeatherIcons.edit, @@ -105,7 +107,10 @@ class NoteViewScreenState extends State { Navigator.of(context).pop(); }, child: Container( - color: Theme.of(context).colorScheme.secondary.withOpacity(0.2), + color: Theme.of(context) + .colorScheme + .secondary + .withValues(alpha: 0.2), child: Padding( padding: const EdgeInsets.all(8.0), child: Stack( @@ -123,8 +128,8 @@ class NoteViewScreenState extends State { 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: const Icon( FeatherIcons.trash2, diff --git a/refilc_mobile_ui/lib/pages/notes/submenu/notes_screen.dart b/refilc_mobile_ui/lib/pages/notes/submenu/notes_screen.dart index df9b01b..222fedf 100644 --- a/refilc_mobile_ui/lib/pages/notes/submenu/notes_screen.dart +++ b/refilc_mobile_ui/lib/pages/notes/submenu/notes_screen.dart @@ -173,7 +173,10 @@ class NotesScreenState extends State { SoonAlert.show(context: context); }, child: Container( - color: Theme.of(context).colorScheme.secondary.withOpacity(0.2), + color: Theme.of(context) + .colorScheme + .secondary + .withValues(alpha: 0.2), child: Padding( padding: const EdgeInsets.all(8.0), child: Stack( @@ -191,8 +194,8 @@ class NotesScreenState extends State { 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: const Icon( FeatherIcons.search, @@ -225,7 +228,10 @@ class NotesScreenState extends State { builder: (context) => const AddNoteScreen())); }, child: Container( - color: Theme.of(context).colorScheme.secondary.withOpacity(0.2), + color: Theme.of(context) + .colorScheme + .secondary + .withValues(alpha: 0.2), child: Padding( padding: const EdgeInsets.all(8.0), child: Stack( @@ -243,8 +249,8 @@ class NotesScreenState extends State { 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: const Icon( FeatherIcons.plus, diff --git a/refilc_mobile_ui/lib/pages/timetable/day_title.dart b/refilc_mobile_ui/lib/pages/timetable/day_title.dart index f6dedb5..805ece1 100644 --- a/refilc_mobile_ui/lib/pages/timetable/day_title.dart +++ b/refilc_mobile_ui/lib/pages/timetable/day_title.dart @@ -63,14 +63,14 @@ class _DayTitleState extends State { textStyle: TextStyle( color: AppColors.of(context) .text - .withOpacity(opacity), + .withValues(alpha: opacity), fontSize: 32.0, fontWeight: FontWeight.bold), ) : TextStyle( color: AppColors.of(context) .text - .withOpacity(opacity), + .withValues(alpha: opacity), fontSize: 32.0, fontWeight: FontWeight.bold), ), diff --git a/refilc_mobile_ui/lib/pages/timetable/fs_timetable.dart b/refilc_mobile_ui/lib/pages/timetable/fs_timetable.dart index ad2f61a..9081ead 100644 --- a/refilc_mobile_ui/lib/pages/timetable/fs_timetable.dart +++ b/refilc_mobile_ui/lib/pages/timetable/fs_timetable.dart @@ -120,7 +120,7 @@ class _FSTimetableState extends State { if (lessons.isEmpty) continue; if (index == 0 && dayIndex >= 0) { - // if (index == 0 || dayIndex >=0) { + // if (index == 0 || dayIndex >=0) { columns.add( SizedBox( width: colw, @@ -157,13 +157,14 @@ class _FSTimetableState extends State { Icon( FeatherIcons.slash, size: 18.0, - color: AppColors.of(context).text.withOpacity(.3), + color: AppColors.of(context).text.withValues(alpha: .3), ), const SizedBox(width: 8.0), Text( "Lyukas óra", style: TextStyle( - color: AppColors.of(context).text.withOpacity(.3), + color: + AppColors.of(context).text.withValues(alpha: .3), ), ), ], @@ -205,7 +206,9 @@ class _FSTimetableState extends State { subject: lsn.subject, ), size: 18.0, - color: AppColors.of(context).text.withOpacity(.7), + color: AppColors.of(context) + .text + .withValues(alpha: .7), ), const SizedBox(width: 8.0), Expanded( @@ -231,7 +234,9 @@ class _FSTimetableState extends State { child: Text( lsn.room, style: TextStyle( - color: AppColors.of(context).text.withOpacity(.5), + color: AppColors.of(context) + .text + .withValues(alpha: .5), overflow: TextOverflow.ellipsis, ), ), @@ -251,4 +256,4 @@ class _FSTimetableState extends State { ), ); } -} \ No newline at end of file +} diff --git a/refilc_mobile_ui/lib/pages/timetable/timetable_page.dart b/refilc_mobile_ui/lib/pages/timetable/timetable_page.dart index 388a9ac..e2af597 100644 --- a/refilc_mobile_ui/lib/pages/timetable/timetable_page.dart +++ b/refilc_mobile_ui/lib/pages/timetable/timetable_page.dart @@ -585,7 +585,8 @@ class TimetablePageState extends State color: Theme.of(context) .colorScheme .secondary - .withOpacity(0.25), + .withValues( + alpha: 0.25), ), borderRadius: BorderRadius.circular( @@ -615,8 +616,9 @@ class TimetablePageState extends State color: AppColors.of( context) .text - .withOpacity( - 0.90), + .withValues( + alpha: + 0.90), ), child: Text( 'break'.i18n, @@ -661,8 +663,8 @@ class TimetablePageState extends State context) .colorScheme .secondary - .withOpacity( - .5), + .withValues( + alpha: .5), size: 10.0, ) ], @@ -775,11 +777,11 @@ class TimetablePageState extends State // Label labelPadding: EdgeInsets.zero, labelColor: - AppColors.of(context).text.withOpacity(0.9), + AppColors.of(context).text.withValues(alpha: 0.9), unselectedLabelColor: Theme.of(context) .colorScheme .secondary - .withOpacity(0.25) + .withValues(alpha: 0.25) .withAlpha(100), // Indicator indicatorSize: TabBarIndicatorSize.tab, @@ -791,15 +793,15 @@ class TimetablePageState extends State // border: Border.all( // color: AppColors.of(context) // .text - // .withOpacity(0.90)), + // .withValues(alpha: 0.90)), // color: Theme.of(context) // .colorScheme // .secondary - // .withOpacity(0.25), + // .withValues(alpha: 0.25), borderRadius: BorderRadius.circular(16.0), ), - overlayColor: WidgetStateProperty.all( - const Color(0x00000000)), + overlayColor: + WidgetStateProperty.all(const Color(0x00000000)), // Tabs padding: const EdgeInsets.symmetric( vertical: 6.0, horizontal: 24.0), @@ -823,7 +825,7 @@ class TimetablePageState extends State color: Theme.of(context) .colorScheme .secondary - .withOpacity(0.25) + .withValues(alpha: 0.25) .withAlpha(100)), ), Text( @@ -851,7 +853,7 @@ class TimetablePageState extends State color: Theme.of(context) .colorScheme .secondary - .withOpacity(0.25) + .withValues(alpha: 0.25) .withAlpha(100), ), ), diff --git a/refilc_mobile_ui/lib/plus/components/active_sponsor_card.dart b/refilc_mobile_ui/lib/plus/components/active_sponsor_card.dart index 72663df..466bd0e 100644 --- a/refilc_mobile_ui/lib/plus/components/active_sponsor_card.dart +++ b/refilc_mobile_ui/lib/plus/components/active_sponsor_card.dart @@ -78,7 +78,7 @@ class ActiveSponsorCard extends StatelessWidget { borderRadius: BorderRadius.circular(20.0), boxShadow: [ BoxShadow( - color: glow.withOpacity(.4), + color: glow.withValues(alpha: .4), blurRadius: 42.0, ), ], @@ -91,7 +91,7 @@ class ActiveSponsorCard extends StatelessWidget { RoundedRectangleBorder(borderRadius: BorderRadius.circular(14.0)), child: InkWell( borderRadius: BorderRadius.circular(14.0), - splashColor: glow.withOpacity(.2), + splashColor: glow.withValues(alpha: .2), onTap: () { Navigator.of(context, rootNavigator: true) .push(MaterialPageRoute(builder: (context) { diff --git a/refilc_mobile_ui/lib/plus/components/github_card.dart b/refilc_mobile_ui/lib/plus/components/github_card.dart index a6fce26..4455f9a 100644 --- a/refilc_mobile_ui/lib/plus/components/github_card.dart +++ b/refilc_mobile_ui/lib/plus/components/github_card.dart @@ -19,7 +19,9 @@ class GithubCard extends StatelessWidget { borderRadius: BorderRadius.circular(14.0), onTap: onPressed, child: Padding( - padding: const EdgeInsets.symmetric(horizontal: 16.0, vertical: 12.0).add(const EdgeInsets.only(top: 4.0)), + padding: + const EdgeInsets.symmetric(horizontal: 16.0, vertical: 12.0) + .add(const EdgeInsets.only(top: 4.0)), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ @@ -36,7 +38,7 @@ class GithubCard extends StatelessWidget { ), const SizedBox(height: 4.0), Chip( - backgroundColor: Colors.black.withOpacity(.5), + backgroundColor: Colors.black.withValues(alpha: .5), label: const Text( "Már támogatsz? Jelentkezz be!", style: TextStyle(color: Colors.white), diff --git a/refilc_mobile_ui/lib/plus/components/goal_card.dart b/refilc_mobile_ui/lib/plus/components/goal_card.dart index 2e64263..4d11378 100644 --- a/refilc_mobile_ui/lib/plus/components/goal_card.dart +++ b/refilc_mobile_ui/lib/plus/components/goal_card.dart @@ -30,7 +30,7 @@ class PremiumGoalCard extends StatelessWidget { Container( height: 12, decoration: BoxDecoration( - color: Colors.black.withOpacity(.2), + color: Colors.black.withValues(alpha: .2), borderRadius: BorderRadius.circular(45.0), ), ), @@ -59,7 +59,8 @@ class PremiumGoalCard extends StatelessWidget { imageFilter: ImageFilter.blur(sigmaX: 5, sigmaY: 5), child: Image.asset("assets/images/heart.png", - color: Colors.black.withOpacity(.3)), + color: + Colors.black.withValues(alpha: .3)), ), Image.asset("assets/images/heart.png"), ], diff --git a/refilc_mobile_ui/lib/plus/components/plan_card.dart b/refilc_mobile_ui/lib/plus/components/plan_card.dart index a672de0..c8ef04d 100644 --- a/refilc_mobile_ui/lib/plus/components/plan_card.dart +++ b/refilc_mobile_ui/lib/plus/components/plan_card.dart @@ -159,7 +159,7 @@ class PlusPlanCard extends StatelessWidget { ), shadowColor: Colors.transparent, surfaceTintColor: Colors.white, - color: Colors.white.withOpacity(0.9), + color: Colors.white.withValues(alpha: 0.9), child: Padding( padding: const EdgeInsets.only( top: 18.0, bottom: 16.0, left: 22.0, right: 18.0), @@ -237,7 +237,7 @@ class PlusPlanCard extends StatelessWidget { Text( description, style: TextStyle( - color: const Color(0xFF011234).withOpacity(0.6), + color: const Color(0xFF011234).withValues(alpha: 0.6), fontSize: 13.69, fontWeight: FontWeight.w500, ), diff --git a/refilc_mobile_ui/lib/plus/components/supporter_group_card.dart b/refilc_mobile_ui/lib/plus/components/supporter_group_card.dart index 70dd691..f0086af 100644 --- a/refilc_mobile_ui/lib/plus/components/supporter_group_card.dart +++ b/refilc_mobile_ui/lib/plus/components/supporter_group_card.dart @@ -27,7 +27,7 @@ class SupporterGroupCard extends StatelessWidget { boxShadow: [ if (glow != null) BoxShadow( - color: glow!.withOpacity(.2), + color: glow!.withValues(alpha: .2), blurRadius: 60.0, ), ], diff --git a/refilc_mobile_ui/lib/plus/plus_screen.dart b/refilc_mobile_ui/lib/plus/plus_screen.dart index e2db8b1..6201d4f 100644 --- a/refilc_mobile_ui/lib/plus/plus_screen.dart +++ b/refilc_mobile_ui/lib/plus/plus_screen.dart @@ -77,11 +77,11 @@ class PlusScreenState extends State { decoration: BoxDecoration( gradient: LinearGradient( colors: [ - const Color(0xffF4F9FF).withOpacity(0.30), - const Color(0xffF4F9FF).withOpacity(0.40), - const Color(0xffF4F9FF).withOpacity(0.50), - const Color(0xffF4F9FF).withOpacity(0.60), - const Color(0xffF4F9FF).withOpacity(0.70), + const Color(0xffF4F9FF).withValues(alpha: 0.30), + const Color(0xffF4F9FF).withValues(alpha: 0.40), + const Color(0xffF4F9FF).withValues(alpha: 0.50), + const Color(0xffF4F9FF).withValues(alpha: 0.60), + const Color(0xffF4F9FF).withValues(alpha: 0.70), ], begin: Alignment.topCenter, end: Alignment.bottomCenter, @@ -94,10 +94,10 @@ class PlusScreenState extends State { decoration: BoxDecoration( gradient: LinearGradient( colors: [ - const Color(0xffF4F9FF).withOpacity(0.0), - const Color(0xffF4F9FF).withOpacity(0.7), - const Color(0xffF4F9FF).withOpacity(0.8), - const Color(0xffF4F9FF).withOpacity(0.9), + const Color(0xffF4F9FF).withValues(alpha: 0.0), + const Color(0xffF4F9FF).withValues(alpha: 0.7), + const Color(0xffF4F9FF).withValues(alpha: 0.8), + const Color(0xffF4F9FF).withValues(alpha: 0.9), const Color(0xffF4F9FF), ], begin: Alignment.topCenter, @@ -155,7 +155,7 @@ class PlusScreenState extends State { style: TextStyle( fontSize: 14.4, color: const Color(0xFF0A1C41) - .withOpacity(0.5), + .withValues(alpha: 0.5), fontWeight: FontWeight.w600, ), ), @@ -182,7 +182,7 @@ class PlusScreenState extends State { '2', style: TextStyle( color: const Color(0xFF011234) - .withOpacity(0.5), + .withValues(alpha: 0.5), fontSize: 10.0, fontWeight: FontWeight.w500, ), @@ -194,7 +194,8 @@ class PlusScreenState extends State { ), ], style: TextStyle( - color: const Color(0xFF011234).withOpacity(0.6), + color: const Color(0xFF011234) + .withValues(alpha: 0.6), fontWeight: FontWeight.w500, ), ), @@ -300,7 +301,7 @@ class PlusScreenState extends State { decoration: BoxDecoration( borderRadius: BorderRadius.circular(16.0), border: Border.all( - color: Colors.black.withOpacity(0.2), + color: Colors.black.withValues(alpha: 0.2), ), ), child: SwitchListTile( @@ -329,7 +330,7 @@ class PlusScreenState extends State { decoration: BoxDecoration( borderRadius: BorderRadius.circular(16.0), border: Border.all( - color: Colors.black.withOpacity(0.2), + color: Colors.black.withValues(alpha: 0.2), ), ), child: ListTile( @@ -427,7 +428,7 @@ class PlusScreenState extends State { // decoration: BoxDecoration( // borderRadius: BorderRadius.circular(16.0), // border: Border.all( - // color: Colors.black.withOpacity(0.2), + // color: Colors.black.withValues(alpha: 0.2), // ), // ), // child: CheckboxListTile( @@ -462,7 +463,7 @@ class PlusScreenState extends State { // 'A szolgáltatási csomag kiválasztásával (megérintés) elfogadod a reFilc előfizetésekkel kapcsolatos Általános Szerződési Feltételeit (elérhető az alábbi link-en: filc.one/pay-terms), valamint Adatkezelési Tájékoztatónkat (elérhető az alábbi link-en: filc.one/pay-privacy).', // textAlign: TextAlign.justify, // style: - // TextStyle(color: Colors.black.withOpacity(0.9)), + // TextStyle(color: Colors.black.withValues(alpha: 0.9)), // ), // ), // faq section @@ -474,7 +475,8 @@ class PlusScreenState extends State { child: Text( 'faq'.i18n, style: TextStyle( - color: const Color(0xFF011234).withOpacity(0.6), + color: + const Color(0xFF011234).withValues(alpha: 0.6), fontWeight: FontWeight.w500, ), ), @@ -518,7 +520,7 @@ class PlusScreenState extends State { TextSpan( style: TextStyle( color: const Color(0xFF011234) - .withOpacity(0.6), + .withValues(alpha: 0.6), fontWeight: FontWeight.w500, ), children: [ @@ -532,7 +534,7 @@ class PlusScreenState extends State { '3', style: TextStyle( color: const Color(0xFF011234) - .withOpacity(0.5), + .withValues(alpha: 0.5), fontSize: 10.0, fontWeight: FontWeight.w500, ), @@ -587,8 +589,8 @@ class PlusScreenState extends State { Text( 'o_1'.i18n, style: TextStyle( - color: - const Color(0xFF011234).withOpacity(0.6), + color: const Color(0xFF011234) + .withValues(alpha: 0.6), fontWeight: FontWeight.w500, ), ), @@ -604,7 +606,8 @@ class PlusScreenState extends State { child: Text( 'desc'.i18n, style: TextStyle( - color: const Color(0xFF011234).withOpacity(0.6), + color: + const Color(0xFF011234).withValues(alpha: 0.6), fontWeight: FontWeight.w500, ), ), diff --git a/refilc_mobile_ui/lib/plus/supporters_screen.dart b/refilc_mobile_ui/lib/plus/supporters_screen.dart index 16b1210..d02613d 100644 --- a/refilc_mobile_ui/lib/plus/supporters_screen.dart +++ b/refilc_mobile_ui/lib/plus/supporters_screen.dart @@ -59,7 +59,9 @@ class SupportersScreen extends StatelessWidget { style: TextStyle( fontWeight: FontWeight.w500, fontSize: 20.0, - color: AppColors.of(context).text.withOpacity(.7)), + color: AppColors.of(context) + .text + .withValues(alpha: .7)), ), ), ), diff --git a/refilc_mobile_ui/lib/screens/error_report_screen.dart b/refilc_mobile_ui/lib/screens/error_report_screen.dart index 6313bd5..c703e1d 100644 --- a/refilc_mobile_ui/lib/screens/error_report_screen.dart +++ b/refilc_mobile_ui/lib/screens/error_report_screen.dart @@ -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 { ), ); } -} \ No newline at end of file +} diff --git a/refilc_mobile_ui/lib/screens/login/login_input.dart b/refilc_mobile_ui/lib/screens/login/login_input.dart index b1cfb37..b35ac5b 100644 --- a/refilc_mobile_ui/lib/screens/login/login_input.dart +++ b/refilc_mobile_ui/lib/screens/login/login_input.dart @@ -55,7 +55,7 @@ class _LoginInputState extends State { 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 { 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 { 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), ), ); } diff --git a/refilc_mobile_ui/lib/screens/login/school_input/school_input.dart b/refilc_mobile_ui/lib/screens/login/school_input/school_input.dart index bccf68c..1d20a01 100644 --- a/refilc_mobile_ui/lib/screens/login/school_input/school_input.dart +++ b/refilc_mobile_ui/lib/screens/login/school_input/school_input.dart @@ -88,7 +88,7 @@ class SchoolInputState extends State { 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( diff --git a/refilc_mobile_ui/lib/screens/navigation/navbar_item.dart b/refilc_mobile_ui/lib/screens/navigation/navbar_item.dart index aed418a..71841df 100644 --- a/refilc_mobile_ui/lib/screens/navigation/navbar_item.dart +++ b/refilc_mobile_ui/lib/screens/navigation/navbar_item.dart @@ -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, // ), diff --git a/refilc_mobile_ui/lib/screens/navigation/status_bar.dart b/refilc_mobile_ui/lib/screens/navigation/status_bar.dart index ea8c6f0..cead16c 100644 --- a/refilc_mobile_ui/lib/screens/navigation/status_bar.dart +++ b/refilc_mobile_ui/lib/screens/navigation/status_bar.dart @@ -59,8 +59,10 @@ class StatusBarState extends State { 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), ), ), diff --git a/refilc_mobile_ui/lib/screens/settings/accounts/account_tile.dart b/refilc_mobile_ui/lib/screens/settings/accounts/account_tile.dart index 16e5afa..1c8dbca 100644 --- a/refilc_mobile_ui/lib/screens/settings/accounts/account_tile.dart +++ b/refilc_mobile_ui/lib/screens/settings/accounts/account_tile.dart @@ -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, diff --git a/refilc_mobile_ui/lib/screens/settings/modify_subject_names.dart b/refilc_mobile_ui/lib/screens/settings/modify_subject_names.dart index 25e4e61..01413f3 100644 --- a/refilc_mobile_ui/lib/screens/settings/modify_subject_names.dart +++ b/refilc_mobile_ui/lib/screens/settings/modify_subject_names.dart @@ -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 { .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 { 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)), ), ); } diff --git a/refilc_mobile_ui/lib/screens/settings/notifications_screen.dart b/refilc_mobile_ui/lib/screens/settings/notifications_screen.dart index 06581b5..dec9ec6 100644 --- a/refilc_mobile_ui/lib/screens/settings/notifications_screen.dart +++ b/refilc_mobile_ui/lib/screens/settings/notifications_screen.dart @@ -43,12 +43,12 @@ // leading: Icon( // FeatherIcons.messageCircle, // 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, // ); @@ -105,14 +105,14 @@ // title: Text( // "grades".i18n, // style: TextStyle( -// color: AppColors.of(context).text.withOpacity( +// color: AppColors.of(context).text.withValues(alpha: // settings.notificationsGradesEnabled ? .95 : .25), // ), // ), // leading: Icon( // FeatherIcons.bookmark, // size: 22.0, -// color: AppColors.of(context).text.withOpacity( +// color: AppColors.of(context).text.withValues(alpha: // settings.notificationsGradesEnabled ? .95 : .25), // ), // trailing: Switch( @@ -144,14 +144,14 @@ // title: Text( // "absences".i18n, // style: TextStyle( -// color: AppColors.of(context).text.withOpacity( +// color: AppColors.of(context).text.withValues(alpha: // settings.notificationsAbsencesEnabled ? .95 : .25), // ), // ), // leading: Icon( // FeatherIcons.clock, // size: 22.0, -// color: AppColors.of(context).text.withOpacity( +// color: AppColors.of(context).text.withValues(alpha: // settings.notificationsAbsencesEnabled ? .95 : .25), // ), // trailing: Switch( @@ -183,14 +183,14 @@ // title: Text( // "messages".i18n, // style: TextStyle( -// color: AppColors.of(context).text.withOpacity( +// color: AppColors.of(context).text.withValues(alpha: // settings.notificationsMessagesEnabled ? .95 : .25), // ), // ), // leading: Icon( // FeatherIcons.messageSquare, // size: 22.0, -// color: AppColors.of(context).text.withOpacity( +// color: AppColors.of(context).text.withValues(alpha: // settings.notificationsMessagesEnabled ? .95 : .25), // ), // trailing: Switch( @@ -222,14 +222,14 @@ // title: Text( // "lessons".i18n, // style: TextStyle( -// color: AppColors.of(context).text.withOpacity( +// color: AppColors.of(context).text.withValues(alpha: // settings.notificationsLessonsEnabled ? .95 : .25), // ), // ), // leading: Icon( // FeatherIcons.bookmark, // size: 22.0, -// color: AppColors.of(context).text.withOpacity( +// color: AppColors.of(context).text.withValues(alpha: // settings.notificationsLessonsEnabled ? .95 : .25), // ), // trailing: Switch( @@ -259,7 +259,7 @@ // leading: Icon( // FeatherIcons.mail, // 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), diff --git a/refilc_mobile_ui/lib/screens/settings/settings_helper.dart b/refilc_mobile_ui/lib/screens/settings/settings_helper.dart index f24cb14..78be91b 100644 --- a/refilc_mobile_ui/lib/screens/settings/settings_helper.dart +++ b/refilc_mobile_ui/lib/screens/settings/settings_helper.dart @@ -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 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( diff --git a/refilc_mobile_ui/lib/screens/settings/settings_screen.dart b/refilc_mobile_ui/lib/screens/settings/settings_screen.dart index 4d8f263..520ae6d 100644 --- a/refilc_mobile_ui/lib/screens/settings/settings_screen.dart +++ b/refilc_mobile_ui/lib/screens/settings/settings_screen.dart @@ -326,7 +326,7 @@ class SettingsScreenState extends State // onPressed: () => // _showBottomSheet(user.getUser(user.id ?? "")), // icon: Icon(FeatherIcons.moreVertical, - // color: AppColors.of(context).text.withOpacity(0.8)), + // color: AppColors.of(context).text.withValues(alpha: 0.8)), // ), // const SizedBox( // width: 5, @@ -345,7 +345,7 @@ class SettingsScreenState extends State // ), // // _showBottomSheet(user.getUser(user.id ?? "")), // icon: Icon(FeatherIcons.fileText, - // color: AppColors.of(context).text.withOpacity(0.8)), + // color: AppColors.of(context).text.withValues(alpha: 0.8)), // ), ], ), @@ -358,7 +358,9 @@ class SettingsScreenState extends State Navigator.of(context).pop(); }, icon: Icon(FeatherIcons.x, - color: AppColors.of(context).text.withOpacity(0.8)), + color: AppColors.of(context) + .text + .withValues(alpha: 0.8)), ), const SizedBox( width: 5.0, @@ -424,7 +426,7 @@ class SettingsScreenState extends State leading: Icon( FeatherIcons.info, 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), bottom: Radius.circular(4.0)), @@ -443,7 +445,7 @@ class SettingsScreenState extends State leading: Icon( FeatherIcons.grid, 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(4.0), bottom: Radius.circular(4.0)), @@ -456,7 +458,7 @@ class SettingsScreenState extends State leading: Icon( FeatherIcons.edit3, 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(4.0), bottom: Radius.circular(4.0)), @@ -476,7 +478,7 @@ class SettingsScreenState extends State leading: Icon( FeatherIcons.users, 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(4.0), bottom: Radius.circular(4.0)), @@ -543,7 +545,7 @@ class SettingsScreenState extends State // width: 75.0, // decoration: BoxDecoration( // borderRadius: BorderRadius.circular(12.0), - // color: AppColors.of(context).text.withOpacity(.25), + // color: AppColors.of(context).text.withValues(alpha: .25), // ), // ), // ), @@ -781,14 +783,18 @@ class SettingsScreenState extends State title: Text( "grade_streak".i18n, style: TextStyle( - color: AppColors.of(context).text.withOpacity(0.95), + color: AppColors.of(context) + .text + .withValues(alpha: 0.95), fontWeight: FontWeight.w500, ), ), subtitle: Text( "grade_streak_subtitle".i18n, style: TextStyle( - color: AppColors.of(context).text.withOpacity(0.75), + color: AppColors.of(context) + .text + .withValues(alpha: 0.75), ), ), leading: Image.asset( @@ -802,7 +808,9 @@ class SettingsScreenState extends State trailing: Text( "${user.gradeStreak}", style: TextStyle( - color: AppColors.of(context).text.withOpacity(0.95), + color: AppColors.of(context) + .text + .withValues(alpha: 0.95), fontWeight: FontWeight.w500, fontSize: 18.0, ), @@ -842,7 +850,7 @@ class SettingsScreenState extends State // leading: Icon( // FeatherIcons.link, // size: 22.0, - // color: AppColors.of(context).text.withOpacity(0.95), + // color: AppColors.of(context).text.withValues(alpha: 0.95), // ), // trailing: GestureDetector( // onTap: () { @@ -869,7 +877,7 @@ class SettingsScreenState extends State // child: Icon( // FeatherIcons.helpCircle, // size: 20.0, - // color: AppColors.of(context).text.withOpacity(0.95), + // color: AppColors.of(context).text.withValues(alpha: 0.95), // ), // ), // borderRadius: const BorderRadius.vertical( @@ -930,7 +938,9 @@ class SettingsScreenState extends State 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, @@ -1023,7 +1033,7 @@ class SettingsScreenState extends State leading: Icon( Icons.qr_code, size: 22.0, - color: AppColors.of(context).text.withOpacity(0.95), + color: AppColors.of(context).text.withValues(alpha: 0.95), ), title: Text("qr_scanner".i18n), onPressed: () => Navigator.of(context).push( @@ -1040,7 +1050,7 @@ class SettingsScreenState extends State leading: Icon( FeatherIcons.mail, size: 22.0, - color: AppColors.of(context).text.withOpacity(0.95), + color: AppColors.of(context).text.withValues(alpha: 0.95), ), title: Text("news".i18n), onPressed: () => _openNews(context), @@ -1053,7 +1063,7 @@ class SettingsScreenState extends State leading: Icon( FeatherIcons.map, size: 22.0, - color: AppColors.of(context).text.withOpacity(0.95), + color: AppColors.of(context).text.withValues(alpha: 0.95), ), title: Text("stickermap".i18n), onPressed: () => launchUrl( @@ -1104,7 +1114,7 @@ class SettingsScreenState extends State leading: Icon( FeatherIcons.lock, size: 22.0, - color: AppColors.of(context).text.withOpacity(0.95), + color: AppColors.of(context).text.withValues(alpha: 0.95), ), title: Text("privacy".i18n), // onPressed: () => launchUrl( @@ -1120,7 +1130,7 @@ class SettingsScreenState extends State leading: Icon( FeatherIcons.atSign, size: 22.0, - color: AppColors.of(context).text.withOpacity(0.95), + color: AppColors.of(context).text.withValues(alpha: 0.95), ), title: const Text("Discord"), onPressed: () => launchUrl(Uri.parse("https://dc.refilc.hu"), @@ -1134,7 +1144,7 @@ class SettingsScreenState extends State leading: Icon( FeatherIcons.globe, size: 22.0, - color: AppColors.of(context).text.withOpacity(0.95), + color: AppColors.of(context).text.withValues(alpha: 0.95), ), title: const Text("www.refilc.hu"), onPressed: () => launchUrl(Uri.parse("https://www.refilc.hu"), @@ -1148,7 +1158,7 @@ class SettingsScreenState extends State leading: Icon( FeatherIcons.github, size: 22.0, - color: AppColors.of(context).text.withOpacity(0.95), + color: AppColors.of(context).text.withValues(alpha: 0.95), ), title: const Text("Github"), onPressed: () => launchUrl( @@ -1163,7 +1173,7 @@ class SettingsScreenState extends State leading: Icon( FeatherIcons.award, size: 22.0, - color: AppColors.of(context).text.withOpacity(0.95), + color: AppColors.of(context).text.withValues(alpha: 0.95), ), title: Text("licenses".i18n), onPressed: () => showLicensePage(context: context), @@ -1184,7 +1194,7 @@ class SettingsScreenState extends State borderRadius: BorderRadius.circular(12.0), boxShadow: [ BoxShadow( - color: Colors.black.withOpacity(0.2), + color: Colors.black.withValues(alpha: 0.2), blurRadius: 40.0, ) ], @@ -1204,24 +1214,23 @@ class SettingsScreenState extends State FeatherIcons.barChart2, size: 22.0, color: settings.analyticsEnabled - ? AppColors.of(context).text.withOpacity(0.95) - : AppColors.of(context).text.withOpacity(.25), + ? AppColors.of(context).text.withValues(alpha: 0.95) + : AppColors.of(context).text.withValues(alpha: .25), ), title: Text( "Analytics".i18n, style: TextStyle( fontWeight: FontWeight.w600, fontSize: 16.0, - color: AppColors.of(context).text.withOpacity( - settings.analyticsEnabled ? 1.0 : .5), + color: AppColors.of(context).text.withValues( + alpha: settings.analyticsEnabled ? 1.0 : .5), ), ), subtitle: Text( "Anonymous Usage Analytics".i18n, style: TextStyle( - color: AppColors.of(context) - .text - .withOpacity(settings.analyticsEnabled ? .5 : .2), + color: AppColors.of(context).text.withValues( + alpha: settings.analyticsEnabled ? .5 : .2), ), ), onChanged: (v) { @@ -1244,7 +1253,7 @@ class SettingsScreenState extends State leading: Icon( Icons.feedback_outlined, size: 22.0, - color: AppColors.of(context).text.withOpacity(0.95), + color: AppColors.of(context).text.withValues(alpha: 0.95), ), title: Text("feedback".i18n), onPressed: () => { @@ -1320,7 +1329,7 @@ class SettingsScreenState extends State leading: Icon( Icons.tune_outlined, size: 22.0, - color: AppColors.of(context).text.withOpacity(.95), + color: AppColors.of(context).text.withValues(alpha: .95), ), title: Text("exp_settings".i18n), onPressed: () => Clipboard.setData(ClipboardData( @@ -1338,7 +1347,7 @@ class SettingsScreenState extends State leading: Icon( FeatherIcons.copy, size: 22.0, - color: AppColors.of(context).text.withOpacity(.95), + color: AppColors.of(context).text.withValues(alpha: .95), ), title: Text("copy_jwt".i18n), onPressed: () => Clipboard.setData(ClipboardData( @@ -1355,7 +1364,8 @@ class SettingsScreenState extends State leading: Icon( FeatherIcons.key, size: 22.0, - color: AppColors.of(context).text.withOpacity(.95), + color: + AppColors.of(context).text.withValues(alpha: .95), ), title: const Text("Remove Premium"), onPressed: () { @@ -1387,7 +1397,7 @@ class SettingsScreenState extends State fontWeight: FontWeight.w600, color: AppColors.of(context) .text - .withOpacity(0.65)), + .withValues(alpha: 0.65)), child: Text("v${release.data!['version']}"), ); } else { @@ -1402,7 +1412,7 @@ class SettingsScreenState extends State fontWeight: FontWeight.w600, color: AppColors.of(context) .text - .withOpacity(0.65)), + .withValues(alpha: 0.65)), child: Text("v$envAppVer"), ); } diff --git a/refilc_mobile_ui/lib/screens/settings/submenu/cloud_sync_screen.dart b/refilc_mobile_ui/lib/screens/settings/submenu/cloud_sync_screen.dart index 9e7ea03..930cfba 100644 --- a/refilc_mobile_ui/lib/screens/settings/submenu/cloud_sync_screen.dart +++ b/refilc_mobile_ui/lib/screens/settings/submenu/cloud_sync_screen.dart @@ -35,12 +35,13 @@ class MenuCloudSyncSettings extends StatelessWidget { // ), title: Text( "cloud_sync".i18n, - style: TextStyle(color: AppColors.of(context).text.withOpacity(0.3)), + style: + TextStyle(color: AppColors.of(context).text.withValues(alpha: 0.3)), ), leading: Icon( FeatherIcons.uploadCloud, size: 22.0, - color: AppColors.of(context).text.withOpacity(0.25), + color: AppColors.of(context).text.withValues(alpha: 0.25), ), borderRadius: borderRadius, ); @@ -166,8 +167,9 @@ class CloudSyncSettingsScreenState extends State { 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( @@ -235,8 +237,9 @@ class CloudSyncSettingsScreenState extends State { 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( diff --git a/refilc_mobile_ui/lib/screens/settings/submenu/edit_subject.dart b/refilc_mobile_ui/lib/screens/settings/submenu/edit_subject.dart index a05cc77..9868086 100644 --- a/refilc_mobile_ui/lib/screens/settings/submenu/edit_subject.dart +++ b/refilc_mobile_ui/lib/screens/settings/submenu/edit_subject.dart @@ -111,7 +111,7 @@ class EditSubjectScreenState extends State { 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 { 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 { // 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 ?? diff --git a/refilc_mobile_ui/lib/screens/settings/submenu/extras_screen.dart b/refilc_mobile_ui/lib/screens/settings/submenu/extras_screen.dart index c347a75..fcbfe74 100644 --- a/refilc_mobile_ui/lib/screens/settings/submenu/extras_screen.dart +++ b/refilc_mobile_ui/lib/screens/settings/submenu/extras_screen.dart @@ -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 { 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 { diff --git a/refilc_mobile_ui/lib/screens/settings/submenu/general_screen.dart b/refilc_mobile_ui/lib/screens/settings/submenu/general_screen.dart index 4d5ff1b..507e7c8 100644 --- a/refilc_mobile_ui/lib/screens/settings/submenu/general_screen.dart +++ b/refilc_mobile_ui/lib/screens/settings/submenu/general_screen.dart @@ -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 { 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 { ? 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 { 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 { 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 { 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 { 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 { // 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 { 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 { ? 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 { 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), diff --git a/refilc_mobile_ui/lib/screens/settings/submenu/grade_colors.dart b/refilc_mobile_ui/lib/screens/settings/submenu/grade_colors.dart index ec98d95..feb374a 100644 --- a/refilc_mobile_ui/lib/screens/settings/submenu/grade_colors.dart +++ b/refilc_mobile_ui/lib/screens/settings/submenu/grade_colors.dart @@ -86,7 +86,7 @@ class GradeColorsSettingsScreenState extends State { 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 { : 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 { : 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 { : 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 { : 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 { : Theme.of(context) .colorScheme .secondary - .withOpacity(.2), + .withValues(alpha: .2), width: 1.0, ), borderRadius: BorderRadius.circular(50.0), diff --git a/refilc_mobile_ui/lib/screens/settings/submenu/paint_list.dart b/refilc_mobile_ui/lib/screens/settings/submenu/paint_list.dart index 171b6e6..1df4087 100644 --- a/refilc_mobile_ui/lib/screens/settings/submenu/paint_list.dart +++ b/refilc_mobile_ui/lib/screens/settings/submenu/paint_list.dart @@ -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 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 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 ? 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 ? 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 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 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 BoxShadow( color: AppColors.of(context) .text - .withOpacity(0.15), + .withValues(alpha: 0.15), offset: const Offset(1, 2), blurRadius: 3, ), diff --git a/refilc_mobile_ui/lib/screens/settings/submenu/personalize_screen.dart b/refilc_mobile_ui/lib/screens/settings/submenu/personalize_screen.dart index d8ea4d9..12493a2 100644 --- a/refilc_mobile_ui/lib/screens/settings/submenu/personalize_screen.dart +++ b/refilc_mobile_ui/lib/screens/settings/submenu/personalize_screen.dart @@ -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 : 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 : 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 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 // 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 // ? 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 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 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 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 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 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 // 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 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 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 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 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 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 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 style: TextStyle( color: AppColors.of(context) .text - .withOpacity(.95), + .withValues(alpha: .95), ), ), leading: Icon( @@ -863,7 +875,7 @@ class PersonalizeSettingsScreenState extends State 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 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 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 { diff --git a/refilc_mobile_ui/lib/screens/settings/theme_screen.dart b/refilc_mobile_ui/lib/screens/settings/theme_screen.dart index eb7ec85..9cc46e6 100644 --- a/refilc_mobile_ui/lib/screens/settings/theme_screen.dart +++ b/refilc_mobile_ui/lib/screens/settings/theme_screen.dart @@ -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, ] : [ diff --git a/refilc_mobile_ui/lib/screens/summary/pages/grades_page.dart b/refilc_mobile_ui/lib/screens/summary/pages/grades_page.dart index 28e16b6..74a5a34 100644 --- a/refilc_mobile_ui/lib/screens/summary/pages/grades_page.dart +++ b/refilc_mobile_ui/lib/screens/summary/pages/grades_page.dart @@ -112,7 +112,7 @@ class GradesBodyState extends State { 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 { 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 { 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), diff --git a/refilc_mobile_ui/lib/screens/summary/pages/lessons_page.dart b/refilc_mobile_ui/lib/screens/summary/pages/lessons_page.dart index 477fa1e..5381225 100644 --- a/refilc_mobile_ui/lib/screens/summary/pages/lessons_page.dart +++ b/refilc_mobile_ui/lib/screens/summary/pages/lessons_page.dart @@ -310,7 +310,7 @@ class LessonsBodyState extends State { style: TextStyle( fontSize: 18.0, height: 2.0, - color: Colors.white.withOpacity(0.5)), + color: Colors.white.withValues(alpha: 0.5)), ), ], ), diff --git a/refilc_mobile_ui/lib/screens/summary/pages/personality_page.dart b/refilc_mobile_ui/lib/screens/summary/pages/personality_page.dart index 29d7582..4f1727b 100644 --- a/refilc_mobile_ui/lib/screens/summary/pages/personality_page.dart +++ b/refilc_mobile_ui/lib/screens/summary/pages/personality_page.dart @@ -98,7 +98,7 @@ class PersonalityBodyState extends State { ), style: ButtonStyle( backgroundColor: WidgetStateProperty.all( - Colors.white.withOpacity(0.2)), + Colors.white.withValues(alpha: 0.2)), ), ), const SizedBox( @@ -115,7 +115,7 @@ class PersonalityBodyState extends State { ), style: ButtonStyle( backgroundColor: WidgetStateProperty.all( - Colors.white.withOpacity(0.2)), + Colors.white.withValues(alpha: 0.2)), ), ), ], diff --git a/refilc_mobile_ui/lib/screens/summary/pages/start_page.dart b/refilc_mobile_ui/lib/screens/summary/pages/start_page.dart index 38a728f..043451e 100644 --- a/refilc_mobile_ui/lib/screens/summary/pages/start_page.dart +++ b/refilc_mobile_ui/lib/screens/summary/pages/start_page.dart @@ -44,7 +44,7 @@ class StartBodyState extends State { 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 { style: TextStyle( fontWeight: FontWeight.w500, fontSize: 16.0, - color: Colors.white.withOpacity(0.7), + color: Colors.white.withValues(alpha: 0.7), ), ), ], diff --git a/refilc_mobile_ui/lib/screens/summary/summary_screen.dart b/refilc_mobile_ui/lib/screens/summary/summary_screen.dart index e7f198a..451a25d 100644 --- a/refilc_mobile_ui/lib/screens/summary/summary_screen.dart +++ b/refilc_mobile_ui/lib/screens/summary/summary_screen.dart @@ -196,7 +196,7 @@ class SummaryScreenState extends State 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(