main.g.dart 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. import 'package:flutter/material.dart';
  2. import 'color_schemes.g.dart';
  3. void main() {
  4. runApp(const MyApp());
  5. }
  6. class MyApp extends StatelessWidget {
  7. const MyApp({Key? key}) : super(key: key);
  8. // This widget is the root of your application.
  9. @override
  10. Widget build(BuildContext context) {
  11. return MaterialApp(
  12. theme: ThemeData(useMaterial3: true, colorScheme: lightColorScheme),
  13. darkTheme: ThemeData(useMaterial3: true, colorScheme: darkColorScheme),
  14. home: const Home(),
  15. );
  16. }
  17. }
  18. class Home extends StatelessWidget {
  19. const Home({Key? key}) : super(key: key);
  20. // This widget is the root of your application.
  21. @override
  22. Widget build(BuildContext context) {
  23. return Scaffold(
  24. appBar: AppBar(
  25. elevation: 2,
  26. title: Text("Material Theme Builder"),
  27. ),
  28. body: Center(
  29. child: Column(
  30. mainAxisAlignment: MainAxisAlignment.center,
  31. children: [
  32. const Text(
  33. 'Update with your UI',
  34. ),
  35. ],
  36. ),
  37. ),
  38. floatingActionButton:
  39. FloatingActionButton(onPressed: () => {}, tooltip: 'Increment'));
  40. }
  41. }