load method
Load the last saved preferences (until ignore
is true
).
Implementation
@override
Future<DevicePreviewData?> load() async {
final shared = await SharedPreferences.getInstance();
final json = shared.getString(preferenceKey);
if (json == null || json.isEmpty) return null;
return DevicePreviewData.fromJson(jsonDecode(json));
}