Angular Dart tutorial section 4 - 'Future not resolved' -


total newbie dart , angular. long-time sw developer lot of experience multiple languages , platforms.

i'm working through 'tour of heroes' tutorial, stumped in section 4., under heading 'the hero service returns future'.

thus far, i've gotten things work pretty well, when try mod code return future (per tutorial), error.

in hero_service.dart, this:

future<list<hero>> getheroes() async => mockheroes; 

and in app_component.dart, this:

  future<null> getheroes() async {      heroes = await _heroservice.getheroes();      } 

but, i'm getting error:

exception: 'package:tour_of_heroes/app_component.dart': malformed type: line              86 pos 3: cannot resolve class 'future' 'appcomponent'             future<null> getheroes() async {             ^ 

i've backed out , re-entered make sure i've entered correctly , still getting error.

i'm wondering if in core refactored , need import else or clean build (not sure how that...) fresh or what.

(btw: doing cl , vim. webstorm disaster...)

remember add import 'dart:async'; ? (the library future in.)


Comments

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -