version_tracking 1.0.1+1

Flutter Android iOS

Xamarin.Essentials VersionTracking for Flutter.

example/main.dart

import 'package:flutter/material.dart';
import 'package:package_info/package_info.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:version_tracking/version_tracking.dart';

void main() async {

  var preferences = await SharedPreferences.getInstance();
  var info = await PackageInfo.fromPlatform();

  runApp(MyApp(
    versionTracking: VersionTracking.from(sharedPreferences: preferences, packageInfo: info),
  ));
} 

class MyApp extends StatelessWidget {

  const MyApp({this.versionTracking});
  
  final VersionTracking versionTracking;

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: Scaffold(
        body: Center(
          child: Column(
            children: <Widget>[
              Text(versionTracking.toString())
            ],
          )
        )
      ),
    );
  }
}
1
likes
75
pub points
41%
popularity

Publisher

jamiewest.dev

Xamarin.Essentials VersionTracking for Flutter.

Homepage

Documentation

API reference

License

MIT (LICENSE)

Dependencies

flutter, package_info, shared_preferences

More

Packages that depend on version_tracking