Init repo

This commit is contained in:
PartyDonut 2024-09-15 14:12:28 +02:00
commit 764b6034e3
566 changed files with 212335 additions and 0 deletions

25
lib/util/themes_data.dart Normal file
View file

@ -0,0 +1,25 @@
import 'package:flutter/material.dart';
class ThemesData extends InheritedWidget {
const ThemesData({
super.key,
required this.light,
required this.dark,
required super.child,
});
final ThemeData light;
final ThemeData dark;
static ThemesData? maybeOf(BuildContext context) {
return context.dependOnInheritedWidgetOfExactType<ThemesData>();
}
static ThemesData of(BuildContext context) {
final ThemesData? result = maybeOf(context);
return result!;
}
@override
bool updateShouldNotify(ThemesData oldWidget) => light != oldWidget.light || dark != oldWidget.dark;
}