simple_remote_config 2.0.0 copy "simple_remote_config: ^2.0.0" to clipboard
simple_remote_config: ^2.0.0 copied to clipboard

A simple plugin for helping you to change your application's behaviors, settings,.. without updating the application via network JSON.

example/lib/example.dart

import 'package:simple_remote_config/simple_remote_config.dart';
import 'package:version/version.dart';

Future<void> main() async {
  final remoteConfig = SimpleRemoteConfig();

  const configUrl = "https://dungngminh.github.io/remote_config/test.json";

  await remoteConfig.initilize(configUrl: configUrl);

  final maxQuota = remoteConfig.getInt("maxQuota");
  print("maxQuota: $maxQuota");

  final enableLog = remoteConfig.getBool("enableLog");

  if (enableLog ?? false) {
    print("Log is enabled");
  }

  final inAppVersion = Version.parse("1.0.0");

  final currentVersion = remoteConfig.getString("currentVersion");

  if (currentVersion != null && inAppVersion < Version.parse(currentVersion)) {
    print("Please update your app");
  } else {
    print("You are using the latest version");
  }
}
3
likes
160
points
205
downloads

Publisher

unverified uploader

Weekly Downloads

A simple plugin for helping you to change your application's behaviors, settings,.. without updating the application via network JSON.

Repository (GitHub)
View/report issues

Topics

#remote #config

Documentation

API reference

License

MIT (license)

Dependencies

http

More

Packages that depend on simple_remote_config