flutter_material_showcase 3.0.0 copy "flutter_material_showcase: ^3.0.0" to clipboard
flutter_material_showcase: ^3.0.0 copied to clipboard

Material Design components showcase for Flutter apps. Use this package to check your ThemeData against most Material widgets.

example/lib/main.dart

import 'package:example/widgets/custom_widget.dart';
import 'package:flutter/material.dart';
import 'package:flutter_material_showcase/components/showcase_section.dart';
import 'package:flutter_material_showcase/flutter_material_showcase.dart';

void main() => runApp(MyApp());

class MyApp extends StatefulWidget {
  // This widget is the root of your application.
  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  Brightness brightness = Brightness.light;

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        brightness: brightness,
        primarySwatch: Colors.blue,
      ),
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Material Design Showcase'),
          actions: <Widget>[
            IconButton(
              icon: Icon(
                brightness == Brightness.light
                    ? Icons.wb_sunny
                    : Icons.brightness_2,
              ),
              onPressed: () {
                switch (brightness) {
                  case Brightness.dark:
                    setState(() {
                      brightness = Brightness.light;
                    });
                    break;
                  case Brightness.light:
                    setState(() {
                      brightness = Brightness.dark;
                    });
                    break;
                }
              },
            ),
          ],
        ),
        body: const MaterialShowcase(
          customSections: [
            MaterialShowcaseSection(
              title: 'Custom Widget Section 1',
              child: CustomWidget(),
            ),
          ],
        ),
      ),
    );
  }
}
8
likes
160
points
40
downloads

Publisher

verified publisherbeltran.work

Weekly Downloads

Material Design components showcase for Flutter apps. Use this package to check your ThemeData against most Material widgets.

Repository (GitHub)
View/report issues

Documentation

API reference

Funding

Consider supporting this project:

github.com

License

MIT (license)

Dependencies

flutter

More

Packages that depend on flutter_material_showcase