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

A lightweight flutter plugin to check if your app is up-to-date on Google Play Store or Apple App Store

example/lib/main.dart

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

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

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

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

class _MyAppState extends State<MyApp> {
  final _youtubeChecker = AppVersionUpdater(
    appId: "com.vanced.android.youtube",
    androidStore: AndroidStore.apkPure,
  );
  final _snapChatChecker = AppVersionUpdater(appId: "com.snapchat.android");
  String? snapValue;
  String? youtubeValue;

  @override
  void initState() {
    super.initState();
    checkVersion();
  }

  void checkVersion() async {
    await Future.wait([
      _snapChatChecker
          .checkUpdate()
          .then((value) => snapValue = value.toString()),
      _youtubeChecker
          .checkUpdate()
          .then((value) => youtubeValue = value.toString()),
    ]);

    setState(() {});
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('APP Version Checker'),
        ),
        body: Padding(
          padding: const EdgeInsets.all(12.0),
          child: ListView(
            children: [
              const SizedBox(height: 25.0),
              const Text(
                "Facebook: (playstore)",
                style: TextStyle(fontWeight: FontWeight.bold),
              ),
              const SizedBox(height: 10.0),
              Text(
                snapValue ?? 'Loading ...',
              ),
              const SizedBox(height: 50.0),
              const Text(
                "Youtube Vanced (apkPure):",
                style: TextStyle(fontWeight: FontWeight.bold),
              ),
              const SizedBox(height: 10.0),
              Text(
                youtubeValue ?? "loading ...",
              ),
            ],
          ),
        ),
      ),
    );
  }
}
1
likes
140
points
22
downloads

Publisher

unverified uploader

Weekly Downloads

A lightweight flutter plugin to check if your app is up-to-date on Google Play Store or Apple App Store

Repository (GitHub)
View/report issues

Documentation

Documentation
API reference

License

MIT (license)

Dependencies

flutter, http, package_info_plus

More

Packages that depend on flutter_app_version_updater