version_tracking 1.0.1+1

VersionTracking for Flutter #

pub package

Introduction #

This is pretty much as copy/paste job from the Xamarin folks with a few adjustments to make things work for Flutter.

Documentation #

Usage #

The Xamarin.Essentials VersionTracking requires calling Track() each time the application runs, in the Flutter version, calling the constructor from accomplishes the same thing.

void main() {
    SharedPreferences.getInstance().then((sharedPreferences) {
        PackageInfo.fromPlatform().then((packageInfo) {
                versionTracking: VersionTracking.from(
                    sharedPreferences: sharedPreferences,
                    packageInfo: packageInfo

class MyApp extends StatelessWidget {

    final VersionTracking versionTracking;

Features and bugs #

Please file feature requests and bugs at the issue tracker.

1.0.0 #

  • Initial version, created by Stagehand

1.0.1 #

  • Changed VersionTracking.from constructor argument names.


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();

    versionTracking: VersionTracking.from(sharedPreferences: preferences, packageInfo: info),

class MyApp extends StatelessWidget {

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

  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
      home: Scaffold(
        body: Center(
          child: Column(
            children: <Widget>[

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  version_tracking: ^1.0.1+1

2. Install it

You can install packages from the command line:

with Flutter:

$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:version_tracking/version_tracking.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Feb 25, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.1
  • pana: 0.13.5
  • Flutter: 1.12.13+hotfix.7

Health suggestions

Fix lib/version_tracking.dart. (-4.89 points)

Analysis of lib/version_tracking.dart reported 10 hints, including:

line 30 col 74: Avoid empty statements.

line 125 col 49: Avoid using braces in interpolation when not needed.

line 126 col 49: Avoid using braces in interpolation when not needed.

line 127 col 49: Avoid using braces in interpolation when not needed.

line 129 col 49: Avoid using braces in interpolation when not needed.

Maintenance suggestions

The package description is too short. (-13 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.28.0 <3.0.0
flutter 0.0.0
package_info ^0.4.0+5 0.4.0+14
shared_preferences ^0.5.3+4 0.5.6+2
Transitive dependencies
collection 1.14.11 1.14.12
flutter_web_plugins 0.0.0
meta 1.1.8
shared_preferences_macos 0.0.1+6
shared_preferences_platform_interface 1.0.3
shared_preferences_web 0.1.2+4
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
test any