Skip to content

Muldec/flavor_banner

Repository files navigation

codecov

flavor_banner

Provides a widget to display a tappable banner in the top left part of your app to show a dialog with the device information.

Source

This code comes from Julien Bitencourt's article on Medium about flavors and his repo. The goal is to provide a widget that can be imported in any application rather than a boilerplate.

Getting Started

After importing this plugin to your project as usual, simply wrap your main widget with a FlavorBanner and provide it with a FlavorConfig.

void main() {
  return runApp(MyApp());
}
    
class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flavor Banner Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: FlavorBanner(
        child: MyHomePage(title: 'Flavor Banner Demo Home Page'),
        flavorConfig: FlavorConfig(
          flavor: Flavor.DEV,
          color: Colors.green,
        ),
      ),
    );
  }
}    

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages