Provides a widget to display a tappable banner in the top left part of your app to show a dialog with the device information.
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.
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,
),
),
);
}
}