2016-05-13 13:32:54 -07:00
|
|
|
// #docregion
|
|
|
|
import 'package:http/browser_client.dart';
|
2016-02-10 17:27:14 -02:00
|
|
|
import 'package:http_in_memory_web_api/http_in_memory_web_api.dart';
|
|
|
|
|
2016-05-13 13:32:54 -07:00
|
|
|
CreateDb createDb = () => {
|
2016-02-10 17:27:14 -02:00
|
|
|
'heroes': [
|
|
|
|
{"id": "1", "name": "Windstorm"},
|
|
|
|
{"id": "2", "name": "Bombasto"},
|
|
|
|
{"id": "3", "name": "Magneta"},
|
|
|
|
{"id": "4", "name": "Tornado"}
|
|
|
|
]
|
|
|
|
};
|
2016-05-13 13:32:54 -07:00
|
|
|
|
|
|
|
BrowserClient HttpClientBackendServiceFactory() =>
|
|
|
|
new HttpClientInMemoryBackendService(createDb);
|