fixed weird warnings

This commit is contained in:
Kima
2023-12-09 16:52:52 +01:00
parent 646948012d
commit 5079e0cb29
24 changed files with 58 additions and 51 deletions

View File

@@ -1,7 +1,7 @@
import 'package:flutter/material.dart';
class ActionButton extends StatelessWidget {
const ActionButton({Key? key, required this.label, this.activeColor, this.onTap}) : super(key: key);
const ActionButton({super.key, required this.label, this.activeColor, this.onTap});
final Color? activeColor;
final void Function()? onTap;

View File

@@ -4,8 +4,7 @@ import 'package:flutter/material.dart';
import 'package:i18n_extension/i18n_widget.dart';
class AverageDisplay extends StatelessWidget {
const AverageDisplay({Key? key, this.average = 0.0, this.border = false})
: super(key: key);
const AverageDisplay({super.key, this.average = 0.0, this.border = false});
final double average;
final bool border;

View File

@@ -2,7 +2,7 @@ import 'package:filcnaplo/theme/colors/colors.dart';
import 'package:flutter/material.dart';
class BetaChip extends StatelessWidget {
const BetaChip({Key? key, this.disabled = false}) : super(key: key);
const BetaChip({super.key, this.disabled = false});
final bool disabled;
@@ -12,6 +12,12 @@ class BetaChip extends StatelessWidget {
height: 25,
child: AnimatedContainer(
duration: const Duration(milliseconds: 200),
decoration: BoxDecoration(
color: !disabled
? Theme.of(context).colorScheme.secondary
: AppColors.of(context).text.withOpacity(.25),
borderRadius: BorderRadius.circular(40),
),
child: Padding(
padding: const EdgeInsets.only(left: 8, right: 8),
child: Center(
@@ -29,12 +35,6 @@ class BetaChip extends StatelessWidget {
),
),
),
decoration: BoxDecoration(
color: !disabled
? Theme.of(context).colorScheme.secondary
: AppColors.of(context).text.withOpacity(.25),
borderRadius: BorderRadius.circular(40),
),
),
);
}

View File

@@ -2,7 +2,7 @@ import 'package:filcnaplo/theme/colors/colors.dart';
import 'package:flutter/material.dart';
class BottomCard extends StatelessWidget {
const BottomCard({Key? key, this.child}) : super(key: key);
const BottomCard({super.key, this.child});
final Widget? child;

View File

@@ -2,7 +2,7 @@ import 'package:filcnaplo_mobile_ui/common/bottom_sheet_menu/rounded_bottom_shee
import 'package:flutter/material.dart';
class BottomSheetMenu extends StatelessWidget {
const BottomSheetMenu({Key? key, this.items = const []}) : super(key: key);
const BottomSheetMenu({super.key, this.items = const []});
final List<Widget> items;

View File

@@ -2,7 +2,7 @@ import 'package:filcnaplo_mobile_ui/common/panel/panel_button.dart';
import 'package:flutter/material.dart';
class BottomSheetMenuItem extends StatelessWidget {
const BottomSheetMenuItem({Key? key, required this.onPressed, required this.title, this.icon}) : super(key: key);
const BottomSheetMenuItem({super.key, required this.onPressed, required this.title, this.icon});
final void Function()? onPressed;
final Widget? title;

View File

@@ -10,6 +10,7 @@ SnackBar CustomSnackBar({
Duration? duration,
}) {
// backgroundColor > Brightness > Theme Background
// ignore: no_leading_underscores_for_local_identifiers
Color _backgroundColor = backgroundColor ?? (AppColors.fromBrightness(brightness ?? Theme.of(context).brightness).highlight);
Color textColor = AppColors.fromBrightness(brightness ?? Theme.of(context).brightness).text;

View File

@@ -1,3 +1,5 @@
// ignore_for_file: use_build_context_synchronously
import 'package:filcnaplo/models/settings.dart';
import 'package:filcnaplo/theme/colors/colors.dart';
import 'package:filcnaplo_kreta_api/models/grade.dart';

View File

@@ -8,7 +8,7 @@ import 'package:flutter_custom_tabs/flutter_custom_tabs.dart';
import 'package:flutter_linkify/flutter_linkify.dart';
class NoteView extends StatelessWidget {
const NoteView(this.note, {Key? key}) : super(key: key);
const NoteView(this.note, {super.key});
final Note note;

View File

@@ -4,7 +4,7 @@ import 'package:filcnaplo_mobile_ui/common/widgets/note/note_view.dart';
import 'package:flutter/material.dart';
class NoteViewable extends StatelessWidget {
const NoteViewable(this.note, {Key? key}) : super(key: key);
const NoteViewable(this.note, {super.key});
final Note note;