dart_gsheet_remote_config 1.2.1+3 copy "dart_gsheet_remote_config: ^1.2.1+3" to clipboard
dart_gsheet_remote_config: ^1.2.1+3 copied to clipboard

A package that allows you to use Google Sheets as a remote config for changing your Dart/Flutter app's behaviors, settings,.. without updating.

example/lib/example.dart

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

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

  await remoteConfig.initilize(
      id: "1qEskeRwdtAfnewig-slspPHKafDKV0JMexXdDWgCCeQ");

  final testValue = remoteConfig.getDouble("test");
  print("test: $testValue");

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

  print("themeMode: $themeMode");

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

  print("enableAds: $enableAds");

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

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

  print("currentVersion: $currentVersion");

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

Publisher

unverified uploader

Weekly Downloads

A package that allows you to use Google Sheets as a remote config for changing your Dart/Flutter app's behaviors, settings,.. without updating.

Repository (GitHub)
View/report issues

Topics

#remote #config

Documentation

API reference

License

MIT (license)

Dependencies

http

More

Packages that depend on dart_gsheet_remote_config