Skip to content

Instantly share code, notes, and snippets.

@AmineLAHRIM
Created January 18, 2021 14:01
Show Gist options
  • Save AmineLAHRIM/b01e69805a0a373b0bc2ea3dea9fb57d to your computer and use it in GitHub Desktop.
Save AmineLAHRIM/b01e69805a0a373b0bc2ea3dea9fb57d to your computer and use it in GitHub Desktop.
@override
Future<bool> cacheAll(List<Event> events) async {
// TODO: implement cacheAll
var jsonData= events.map((v) => v.toJson()).toList();
return sharedPreferences.setString(
LIST_EVENTS,
json.encode(jsonData),
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment