updater 0.0.1 copy "updater: ^0.0.1" to clipboard
updater: ^0.0.1 copied to clipboard

outdated

A fluuter package to check for custom app update.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:updater/updater.dart';

void main() {
  runApp(AppMain());
}

class AppMain extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: "Test",
      home: MyApp(),
    );
  }
}

class MyApp extends StatefulWidget {
  const MyApp({Key? key}) : super(key: key);

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        body: Center(
          child: TextButton(
            onPressed: () {
              checkUpdate();
            },
            child: Text('Plugin example app'),
          ),
        ),
      ),
    );
  }

  checkUpdate() {
    Updater(
      context: context,
      url: 'https://codingwithmarsad.web.app/update.json',
      titleText: 'Stay with time',
      contentText:
          'Update your app to the latest version to enjoy new feature.',
      // allowSkip: false,
    ).check();
  }
}
39
likes
0
pub points
80%
popularity

Publisher

verified publishermarsad.dev

A fluuter package to check for custom app update.

License

unknown (license)

Dependencies

dio, flutter, http, open_file, package_info_plus, path_provider

More

Packages that depend on updater