- Flavors
- Flavors in Dart
- Visually identifying each flavor
- Identifying device info with the Banner
- Flavors in Android
- Running flavors with the IDE
- Using flavor values
import 'package:go_flavor/src/go_flavor.dart';
void main() {
FlavorConfig(
flavor: Flavor.QA,
color: Colors.deepPurpleAccent,
values: FlavorValues(
data: "Any tye of data and use anywhere in the app using 'FlavorConfig.instance.values' (optional)", message: "This is a demo application to show in dialog(optional)"));
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'GoFlavor Demo',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: MyHomePage(title: 'Flutter Demo Home Page'),
);
}
}
class MyHomePage extends StatefulWidget {
MyHomePage({Key key, this.title}) : super(key: key);
final String title;
@override
_MyHomePageState createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
@override
Widget build(BuildContext context) {
return FlavorBanner(
child: Scaffold(
appBar: AppBar(
title: Text('page title'),
),
body: _body(),
),
);
}
}