configwire_flutter 0.1.2 copy "configwire_flutter: ^0.1.2" to clipboard
configwire_flutter: ^0.1.2 copied to clipboard

Flutter companion for the ConfigWire client with SharedPreferences cache and device targeting.

example/lib/main.dart

/// ConfigWire Flutter Example
///
/// Demonstrates:
///   • ConfigWireFlutter.createConfigWire — one-call setup with
///     SharedPreferences cache and automatic device targeting.
///   • Feature flags gating real UI: [AppConfig.welcomeFlag] and
///     [AppConfig.newCheckoutFlag].
///   • connectRealtime / disconnectRealtime for live config pushes.
///   • onUpdate stream rebuilding the UI without a manual fetch.
///   • trackExposure called exactly where the flag value drives behavior.
///   • A debug panel showing fetch status, version, etag, and targeting.
///
/// Quick-start (replace the placeholder values):
///   flutter run
///
/// To point at a real ConfigWire server, edit [AppConfig].
library;

import 'package:flutter/material.dart';

import 'cw_theme.dart';
import 'init_gate.dart';

void main() {
  runApp(const ConfigWireExampleApp());
}

/// App root: admin-themed shell around the [ConfigWireInitGate].
class ConfigWireExampleApp extends StatelessWidget {
  const ConfigWireExampleApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'ConfigWire Flutter Example',
      debugShowCheckedModeBanner: false,
      themeMode: ThemeMode.dark,
      darkTheme: cwTheme(),
      home: const ConfigWireInitGate(),
    );
  }
}
0
likes
0
points
568
downloads

Documentation

Documentation

Publisher

verified publisherconfigwire.com

Weekly Downloads

Flutter companion for the ConfigWire client with SharedPreferences cache and device targeting.

Repository (GitHub)
View/report issues

Topics

#remote-config #feature-flags #configuration

License

unknown (license)

Dependencies

configwire, flutter, package_info_plus, package_info_plus_platform_interface, shared_preferences

More

Packages that depend on configwire_flutter