static_sharedpreferences 1.3.5

  • Readme
  • Changelog
  • Installing
  • 70

static_sharedpreferences #

A Flutter package which uses the shared_preferences plugin from flutter.dev in a static way. This depends on the shared_preferences: ^0.5.7+2 plugin from flutter.dev.

Getting Started #

You just have to put SP.initialize(); in your main:

  void main() {
    WidgetsFlutterBinding.ensureInitialized();
  
    SP.initialize();
  }

and now you can get started.

1.3.5 #

  • Fixed a bug in [onFirstTimeLaunched]

1.3.4 #

  • Included a value for [firstTimeLaunchedKey]

1.3.3 #

  • Fixed a Bug where you could not initialize SP if you depended on a package which also uses SP.

1.3.2 #

  • changed shared_preferences: 0.5.7+3 to shared_preferences: ^0.5.7+3

1.3.1 #

  • Updated dependencies

1.3.0 #

  • Added onFirstTimeLaunched Function

1.2.1 #

  • Changed onSharedPreferencesIsNull and a few docs a bit.

1.2.0 #

  • Fixed bugs. This is a stable version.

1.1.4 #

  • Fixed execute method.

1.1.3 #

  • Added execute method.

1.0.3 #

  • Added more debug info.

1.0.2 #

  • Added a static bool to check if SP is has successfully initialized.

1.0.1 #

  • Changed onSharedPreferencesIsNull default value.

1.0.0 #

  • First release.

Use this package as a library

1. Depend on it

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


dependencies:
  static_sharedpreferences: ^1.3.5

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:static_sharedpreferences/static_sharedpreferences.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
44
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
90
Overall:
Weighted score of the above. [more]
70
Learn more about scoring.

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

  • Dart: 2.8.4
  • pana: 0.13.14
  • Flutter: 1.17.5

Analysis suggestions

Package does not support Flutter platform android

Because:

  • package:static_sharedpreferences/static_sharedpreferences.dart that imports:
  • package:shared_preferences/shared_preferences.dart that imports:
  • package:shared_preferences_linux/shared_preferences_linux.dart that declares support for platforms: linux

Package does not support Flutter platform ios

Because:

  • package:static_sharedpreferences/static_sharedpreferences.dart that imports:
  • package:shared_preferences/shared_preferences.dart that imports:
  • package:shared_preferences_linux/shared_preferences_linux.dart that declares support for platforms: linux

Package does not support Flutter platform macos

Because:

  • package:static_sharedpreferences/static_sharedpreferences.dart that imports:
  • package:shared_preferences/shared_preferences.dart that imports:
  • package:shared_preferences_linux/shared_preferences_linux.dart that declares support for platforms: linux

Package does not support Flutter platform web

Because:

  • package:static_sharedpreferences/static_sharedpreferences.dart that imports:
  • package:shared_preferences/shared_preferences.dart that imports:
  • package:shared_preferences_linux/shared_preferences_linux.dart that declares support for platforms: linux

Package does not support Flutter platform windows

Because:

  • package:static_sharedpreferences/static_sharedpreferences.dart that imports:
  • package:shared_preferences/shared_preferences.dart that declares support for platforms: android, ios, linux, macos, web

Package not compatible with SDK dart

Because:

  • static_sharedpreferences that is a package requiring null.

Maintenance suggestions

Maintain an example. (-10 points)

Create a short demo in the example/ directory to show how to use this package.

Common filename patterns include main.dart, example.dart, and static_sharedpreferences.dart. Packages with multiple examples should provide example/README.md.

For more information see the pub package layout conventions.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
flutter 0.0.0
shared_preferences ^0.5.7+3 0.5.8
Transitive dependencies
collection 1.14.12 1.14.13
file 5.2.1
flutter_web_plugins 0.0.0
intl 0.16.1
meta 1.1.8 1.2.1
path 1.7.0
path_provider_linux 0.0.1+2
path_provider_platform_interface 1.0.2
platform 2.2.1
plugin_platform_interface 1.0.2
process 3.0.13
shared_preferences_linux 0.0.2+1
shared_preferences_macos 0.0.1+10
shared_preferences_platform_interface 1.0.4
shared_preferences_web 0.1.2+7
sky_engine 0.0.99
typed_data 1.1.6 1.2.0
vector_math 2.0.8 2.1.0-nullsafety
xdg_directories 0.1.0
Dev dependencies
flutter_test