Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(351)

Side by Side Diff: third_party/pkg/route_hierarchical/example/full/data.dart

Issue 180843004: Revert revision 33053 (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /** 1 /**
2 * Mock implementation of the data service library. 2 * Mock implementation of the data service library.
3 */ 3 */
4 library dataservice; 4 library dataservice;
5 5
6 import 'dart:async'; 6 import 'dart:async';
7 7
8 // List of fake companies 8 // List of fake companies
9 List _companies = [ 9 List _companies = [
10 { 10 {
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 /// simulate an RPC call to fetch companies 42 /// simulate an RPC call to fetch companies
43 Future<List<Map>> fetchCompanies(String query) => 43 Future<List<Map>> fetchCompanies(String query) =>
44 new Future.delayed(new Duration(milliseconds: 500), () => 44 new Future.delayed(new Duration(milliseconds: 500), () =>
45 _companies.where((company) => 45 _companies.where((company) =>
46 company['name'].toLowerCase().indexOf(query.toLowerCase()) > -1)); 46 company['name'].toLowerCase().indexOf(query.toLowerCase()) > -1));
47 47
48 /// simulate an RPC call to fetch a company 48 /// simulate an RPC call to fetch a company
49 Future<Map> fetchCompany(int id) => 49 Future<Map> fetchCompany(int id) =>
50 new Future.delayed(new Duration(seconds: 1), () => 50 new Future.delayed(new Duration(seconds: 1), () =>
51 _companies.firstWhere((c) => c['id'] == id, orElse: () => null)); 51 _companies.firstWhere((c) => c['id'] == id, orElse: () => null));
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698