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

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

example/README.md

Example #

class ManUpExample extends StatefulWidget {
  ManUpExample({Key key}) : super(key: key);

  @override
  _ManUpExampleState createState() => _ManUpExampleState();
}

class _ManUpExampleState extends State<ManUpExample>
    with ManUpDelegate, ManUpDelegateMixin, DialogMixin {
  ManUpService service;
  @override
  void initState() {
    super.initState();
    service = ManUpService("https://example.com/manup.json",
        http: http.Client(), os: Platform.operatingSystem);
    service.delegate = this;
    service.validate();
  }

  @override
  Widget build(BuildContext context) {
    return Container();
  }

  @override
  void manUpStatusChanged(ManUpStatus status) {
    // handle status or show default dialog
    showManUpDialog(status, service.getMessage(forStatus: status),
        service.configData.updateUrl);
  }

  @override
  void dispose() {
    service?.close();
    super.dispose();
  }
}
copied to clipboard
5
likes
0
points
348
downloads

Publisher

verified publishernextfaze.com

Weekly Downloads

2024.09.20 - 2025.04.04

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

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

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

More

Packages that depend on manup