super_material 0.0.3 copy "super_material: ^0.0.3" to clipboard
super_material: ^0.0.3 copied to clipboard

Allows easy switching between multiple designs at runtime. Material and cupertino are currently supported.

example/lib/main.dart

import 'package:super_material/super_material_overlay.dart';
import 'package:example/super_material.dart';
import 'package:example/super_material_overlay.dart';

void main() {
  runApp(ExampleApp.getApp, const SuperController());
}

class ExampleApp extends SuperApp {
  ExampleApp({Key? key}) : super(key: key);

  static ExampleApp getApp() => ExampleApp();

  @override
  Widget build(BuildContext context) => MaterialApp(
        theme: ThemeData(),
        home: const MainPage(),
        debugShowCheckedModeBanner: false,
      );
}

class MainPage extends StatelessWidget {
  const MainPage({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) => Scaffold(
        body: ListView(
          children: <ListTile>[
            ListTile(
              title: const Text('Switch to material'),
              subtitle: const Text('Tap to switch ...'),
              onTap: () => SuperInstance.restartApp(SuperMaterialMode.material),
            ),
            ListTile(
              title: const Text('Switch to cupertino'),
              subtitle: const Text('Tap to switch ...'),
              onTap: () =>
                  SuperInstance.restartApp(SuperMaterialMode.cupertino),
            ),
            ListTile(
              title: const Text('SuperMaterial components'),
              subtitle: const Text('Tap to see example ...'),
              onTap: () => Navigator.push(
                context,
                MaterialPageRoute<SuperMaterialExample>(
                  builder: (BuildContext context) =>
                      const SuperMaterialExample(),
                ),
              ),
            ),
            ListTile(
              title: const Text('SuperMaterial overlay components'),
              subtitle: const Text('Tap to see example ...'),
              onTap: () => Navigator.push(
                context,
                MaterialPageRoute<SuperMaterialOverlayExample>(
                  builder: (BuildContext context) =>
                      const SuperMaterialOverlayExample(),
                ),
              ),
            ),
          ],
        ),
      );
}
3
likes
90
pub points
0%
popularity

Publisher

unverified uploader

Allows easy switching between multiple designs at runtime. Material and cupertino are currently supported.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

flutter

More

Packages that depend on super_material