simple_remote_config 1.0.3 copy "simple_remote_config: ^1.0.3" to clipboard
simple_remote_config: ^1.0.3 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.get<int>("maxQuota");
  print("maxQuota: $maxQuota");

  final enableLog = remoteConfig.get<bool>("enableLog");

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

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

  final currentVersion = remoteConfig.get<String>("currentVersion");

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

Publisher

unverified uploader

Weekly Downloads

2024.07.04 - 2025.01.16

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

License

unknown (license)

Dependencies

http

More

Packages that depend on simple_remote_config