flutter_app_version_checker 0.0.1 flutter_app_version_checker: ^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
import 'dart:developer';
import 'package:flutter_app_version_checker/app_version_checker.dart';
import 'package:flutter/material.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 _checker = AppVersionChecker(appId: "com.localiragps.app");
@override
void initState() {
super.initState();
checkVersion();
}
void checkVersion() async {
_checker.checkUpdate().then((value) {
log(value.toString());
});
}
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(
title: const Text('APP Version Checker'),
),
body: const Center(
child: Text('Current Version'),
),
),
);
}
}