| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- import 'package:flutter/material.dart';
- import 'color_schemes.g.dart';
- void main() {
- runApp(const MyApp());
- }
- class MyApp extends StatelessWidget {
- const MyApp({Key? key}) : super(key: key);
- // This widget is the root of your application.
- @override
- Widget build(BuildContext context) {
- return MaterialApp(
- theme: ThemeData(useMaterial3: true, colorScheme: lightColorScheme),
- darkTheme: ThemeData(useMaterial3: true, colorScheme: darkColorScheme),
- home: const Home(),
- );
- }
- }
- class Home extends StatelessWidget {
- const Home({Key? key}) : super(key: key);
- // This widget is the root of your application.
- @override
- Widget build(BuildContext context) {
- return Scaffold(
- appBar: AppBar(
- elevation: 2,
- title: Text("Material Theme Builder"),
- ),
- body: Center(
- child: Column(
- mainAxisAlignment: MainAxisAlignment.center,
- children: [
- const Text(
- 'Update with your UI',
- ),
- ],
- ),
- ),
- floatingActionButton:
- FloatingActionButton(onPressed: () => {}, tooltip: 'Increment'));
- }
- }
|