Dman_14

Untitled

Jan 11th, 2021
543
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import 'package:idea_tracker/model/idea.dart';
  2.  
  3. class IdeaService {
  4.   Future<List<Idea>> getIdeasTestingSuccess() async {
  5.     await Future.delayed(
  6.         Duration(milliseconds: 200)); // Simulate network call delay
  7.  
  8.     return [0, 1, 2, 3, 4, 5]
  9.         .map(
  10.           (e) => Idea(
  11.             id: e.toString(),
  12.             title: "Idea $e",
  13.             description: "Description $e",
  14.             createdAt: e,
  15.             updatedAt: e,
  16.             votes: [],
  17.           ),
  18.         )
  19.         .toList();
  20.   }
  21. }
  22.  
RAW Paste Data