pappes / MyMovieSearch

test android app using flutter
GNU General Public License v3.0
1 stars 0 forks source link

use a shared prefences singleton for local storage #50

Open pappes opened 1 year ago

pappes commented 1 year ago

useful for key value pairs stored on the local device

import 'package:shared_preferences/shared_preferences.dart';

class PrefsSingleton { factory PrefsSingleton() { return _singleton; }

PrefsSingleton._internal();

static final PrefsSingleton _singleton = PrefsSingleton._internal();

static SharedPreferences? prefs; }