dynamic_config_generator 0.4.0 copy "dynamic_config_generator: ^0.4.0" to clipboard
dynamic_config_generator: ^0.4.0 copied to clipboard

Dynamically generate config for a build variant using a json file

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:example/build_config.g.dart';

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

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Dynamic Config Generator Demo',
      theme: ThemeData(
        primarySwatch: Colors.pink,
      ),
      home: MyHomePage(title: 'Dynamic Config Generator Demo'),
    );
  }
}

class MyHomePage extends StatelessWidget {
  MyHomePage({required this.title});

  final String title;

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(title),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            Text("is_release = ${BuildConfig.isRelease}"),
            SizedBox(height: 20),
            Text("api_key = ${BuildConfig.apiKey}"),
          ],
        ),
      ),
    );
  }
}
4
likes
150
points
398
downloads

Publisher

unverified uploader

Weekly Downloads

Dynamically generate config for a build variant using a json file

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

build

More

Packages that depend on dynamic_config_generator