manup 9.2.2 copy "manup: ^9.2.2" to clipboard
manup: ^9.2.2 copied to clipboard

Mandatory update for Flutter Apps that prompts or forces app update by querying a hosted JSON file.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:http/http.dart';
import 'package:manup/manup.dart';

// See /examples for more examples
Future<void> main() async {
  WidgetsFlutterBinding.ensureInitialized();

  runApp(const ExampleApp());
}

class ExampleApp extends StatelessWidget {
  const ExampleApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: ManUpWidget(
        // Alternatively, use [FireBaseRemoteConfigManUpService] or implement
        // your own [ManUpService]
        service: HttpManUpService('https://example.com/my_config.json',
            http: Client()),
        child: const Scaffold(body: Center(child: Text('My App'))),
        // Optionals
        onComplete: (_) {
          debugPrint('ManUp validation complete');
        },
        onError: (_) {
          debugPrint('ManUp validation error');
        },
        onStatusChanged: (status) {
          debugPrint('ManUp status is "$status"');
        },
        shouldShowAlert: () => true,
      ),
    );
  }
}
copied to clipboard
5
likes
150
points
283
downloads

Publisher

verified publishernextfaze.com

Weekly Downloads

2024.09.14 - 2025.03.29

Mandatory update for Flutter Apps that prompts or forces app update by querying a hosted JSON file.

Repository (GitHub)

Documentation

API reference

License

Apache-2.0 (license)

Dependencies

firebase_analytics, firebase_remote_config, flutter, http, meta, package_info_plus, path_provider, pub_semver, url_launcher

More

Packages that depend on manup