diff --git a/public/docs/_examples/toh-6/dart/lib/in_memory_data_service.dart b/public/docs/_examples/toh-6/dart/lib/in_memory_data_service.dart index 5be0f9e8c4..2472a4f4a5 100644 --- a/public/docs/_examples/toh-6/dart/lib/in_memory_data_service.dart +++ b/public/docs/_examples/toh-6/dart/lib/in_memory_data_service.dart @@ -25,7 +25,7 @@ class InMemoryDataService extends MockClient { ]; static final List _heroesDb = _initialHeroes.map((json) => new Hero.fromJson(json)).toList(); - static int _nextId = _heroesDb.map((hero) => hero.id).reduce(max) + 1; + static int _nextId = _heroesDb.map((hero) => hero.id).fold(0, max) + 1; static Future _handler(Request request) async { var data;