Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import 'package:idea_tracker/model/idea.dart';
- class IdeaService {
- Future<List<Idea>> getIdeasTestingSuccess() async {
- await Future.delayed(
- Duration(milliseconds: 200)); // Simulate network call delay
- return [0, 1, 2, 3, 4, 5]
- .map(
- (e) => Idea(
- id: e.toString(),
- title: "Idea $e",
- description: "Description $e",
- createdAt: e,
- updatedAt: e,
- votes: [],
- ),
- )
- .toList();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement