couver_ui 0.0.6 couver_ui: ^0.0.6 copied to clipboard
UI Library for couver
example/lib/main.dart
import 'package:example/routes.dart';
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatefulWidget {
const MyApp({super.key});
@override
State<MyApp> createState() => MyAppState();
static MyAppState of(BuildContext context) =>
context.findAncestorStateOfType<MyAppState>()!;
}
class MyAppState extends State<MyApp> {
ThemeMode themeMode = ThemeMode.system;
void changeTheme(ThemeMode themeMode) {
setState(() {
this.themeMode = themeMode;
});
}
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Couver UI Demo',
theme: ThemeData(),
darkTheme: ThemeData.dark(),
themeMode: themeMode,
initialRoute: "/",
routes: AppRoutes.routes,
);
}
}