Skip to content
Snippets Groups Projects
Commit 9bd7070a authored by Theo Wiese's avatar Theo Wiese
Browse files

Fix linting issues

parent a9ec2426
No related branches found
No related tags found
No related merge requests found
...@@ -25,9 +25,8 @@ class _ClassListItemState extends State<ClassListItem> { ...@@ -25,9 +25,8 @@ class _ClassListItemState extends State<ClassListItem> {
widget.appContext.profile.value!.selectedClasses; widget.appContext.profile.value!.selectedClasses;
bool get isSelected => selectedClasses.contains(widget.cls.id); bool get isSelected => selectedClasses.contains(widget.cls.id);
List<Lecture>? get lectures => widget.appContext.lectures == null List<Lecture>? get lectures =>
? null widget.appContext.lectures?.where(isRelevantLecture).toList();
: widget.appContext.lectures!.where(isRelevantLecture).toList();
bool isRelevantLecture(Lecture lecture) { bool isRelevantLecture(Lecture lecture) {
return lecture.code.startsWith(widget.cls.code); return lecture.code.startsWith(widget.cls.code);
......
...@@ -16,10 +16,10 @@ class LessonChip extends StatelessWidget { ...@@ -16,10 +16,10 @@ class LessonChip extends StatelessWidget {
return pressable ? theme.primaryColor : theme.iconTheme.color!; return pressable ? theme.primaryColor : theme.iconTheme.color!;
} }
static MaterialStateColor getTextColor(BuildContext context) => static WidgetStateColor getTextColor(BuildContext context) =>
MaterialStateColor.resolveWith((states) => getTextColorOfState( WidgetStateColor.resolveWith((states) => getTextColorOfState(
context, context,
pressable: !states.contains(MaterialState.disabled), pressable: !states.contains(WidgetState.disabled),
)); ));
@override @override
......
...@@ -18,7 +18,7 @@ class PeriodBackground extends StatelessWidget { ...@@ -18,7 +18,7 @@ class PeriodBackground extends StatelessWidget {
offset: Offset(0, start * LessonWidget.zoom), offset: Offset(0, start * LessonWidget.zoom),
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Theme.of(context).colorScheme.surfaceVariant, color: Theme.of(context).colorScheme.surfaceContainerHighest,
), ),
height: (end - start) * LessonWidget.zoom, height: (end - start) * LessonWidget.zoom,
), ),
......
...@@ -16,7 +16,7 @@ class _ToolbarState extends State<Toolbar> { ...@@ -16,7 +16,7 @@ class _ToolbarState extends State<Toolbar> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Container(
color: Theme.of(context).colorScheme.background, color: Theme.of(context).colorScheme.surface,
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
......
...@@ -10,7 +10,7 @@ mixin UntisMixin { ...@@ -10,7 +10,7 @@ mixin UntisMixin {
String toString() => name; String toString() => name;
@override @override
bool operator ==(dynamic other) { bool operator ==(Object other) {
if (other is! UntisElement) return false; if (other is! UntisElement) return false;
return other.hashCode == hashCode; return other.hashCode == hashCode;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment