Future<bool> write(String key, Map<String, dynamic> value) => _preferences.setString(key, jsonEncode(value));