43 lines
1.2 KiB
Dart
43 lines
1.2 KiB
Dart
import 'dart:io';
|
|
|
|
import 'package:dynamic_color/dynamic_color.dart';
|
|
import 'package:flutter/cupertino.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:logger/logger.dart';
|
|
import 'package:prasule/util/color_schemes.g.dart';
|
|
import 'package:prasule/views/home.dart';
|
|
|
|
void main() {
|
|
runApp(const MyApp());
|
|
}
|
|
|
|
final logger = Logger();
|
|
|
|
class MyApp extends StatelessWidget {
|
|
const MyApp({super.key});
|
|
|
|
// This widget is the root of your application.
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return (Platform.isAndroid)
|
|
? DynamicColorBuilder(
|
|
builder: (light, dark) => MaterialApp(
|
|
title: 'Prašule',
|
|
theme: ThemeData(
|
|
colorScheme: light ?? lightColorScheme,
|
|
useMaterial3: true,
|
|
),
|
|
darkTheme: ThemeData(
|
|
useMaterial3: true, colorScheme: dark ?? darkColorScheme),
|
|
home: const HomeView(),
|
|
),
|
|
)
|
|
: Theme(
|
|
data: ThemeData(useMaterial3: true, colorScheme: lightColorScheme),
|
|
child: const CupertinoApp(
|
|
title: 'Prašule',
|
|
home: HomeView(),
|
|
),
|
|
);
|
|
}
|
|
}
|