moon_design 1.0.4 copy "moon_design: ^1.0.4" to clipboard
moon_design: ^1.0.4 copied to clipboard

unlisted

Moon Design System for Flutter. A set of coherent, themable, and extensible widgets following the Moon Design System.

example/lib/main.dart

import 'package:example/src/storybook/storybook.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_web_plugins/url_strategy.dart';
import 'package:moon_design/moon_design.dart';

void main() async {
  usePathUrlStrategy();

  WidgetsFlutterBinding.ensureInitialized();

  await SystemChrome.setPreferredOrientations(
    [DeviceOrientation.portraitUp],
  );

  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  bool get _isInStorybookMode => true;

  @override
  Widget build(BuildContext context) {
    return _isInStorybookMode
        ? const StorybookPage()
        : MaterialApp(
            theme: ThemeData.light().copyWith(
              extensions: <ThemeExtension<dynamic>>[
                MoonTheme(tokens: MoonTokens.light),
              ],
            ),
            darkTheme: ThemeData.dark().copyWith(
              extensions: <ThemeExtension<dynamic>>[
                MoonTheme(tokens: MoonTokens.dark),
              ],
            ),
            home: Scaffold(
              body: Center(
                child: Text(
                  "Moon Design for Flutter",
                  style: TextStyle(
                    fontSize: MediaQuery.of(context).size.width > 800 ? 72 : 32,
                  ),
                ),
              ),
            ),
          );
  }
}
64
likes
0
points
1.22k
downloads

Publisher

verified publisheryolo.com

Weekly Downloads

Moon Design System for Flutter. A set of coherent, themable, and extensible widgets following the Moon Design System.

Homepage
Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, moon_icons, moon_tokens

More

Packages that depend on moon_design