check_app_version 1.0.1+1 copy "check_app_version: ^1.0.1+1" to clipboard
check_app_version: ^1.0.1+1 copied to clipboard

The plugin verifies that the version of the installed app is the most up-to-date, if not, it invites the user to update.

example/lib/main.dart

import 'package:check_app_version/show_custom_dialog.dart';
import 'package:check_app_version/show_dialog.dart';
import 'package:flutter/material.dart';

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

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Check App Version',
      debugShowCheckedModeBanner: false,
      theme: ThemeData(
        primarySwatch: Colors.blue,
        visualDensity: VisualDensity.standard,
      ),
      home: MyHomePage(title: 'Check App Version'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  MyHomePage({required this.title});

  final String title;

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

class _MyHomePageState extends State<MyHomePage> {
  @override
  void initState() {
    super.initState();
    _init();
  }

  _init() async {
    ShowDialog(
      context: context,
      jsonUrl: 'https://besimsoft.com/example.json',
      updateButtonColor: Colors.blue,
      cupertinoDialog: true,
      onPressDecline: () => Navigator.of(context).pop(),
      onPressConfirm: () => Navigator.of(context).pop(),
    ).checkVersion();
  }

  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title),
      ),
      body: Center(),
    );
  }
}
7
likes
120
pub points
69%
popularity

Publisher

verified publisherenzodesimone.dev

The plugin verifies that the version of the installed app is the most up-to-date, if not, it invites the user to update.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

flutter, http, package_info_plus

More

Packages that depend on check_app_version