Reputation: 1
I installed flutter with package, vs code and android studio in my computer and still the first code in flutter doesn't work.There are about 18 error and some of them about package.What can i do
'_RouterState' is from 'package:flutter/src/widgets/router.dart' ('/C:/src/flutter/flutter/packages/flutter/lib/src/widgets/router.dart'). package:flutter/…/widgets/router.dart:1 Try correcting the name to the name of an existing getter, or defining a getter or field named 'widget'. widget.routeInformationProvider?.addListener(_handleRouteInformationProviderNotification); ^^^^^^ /C:/src/flutter/flutter/packages/flutter/lib/src/widgets/router.dart:600:56: Error: The getter 'widget' isn't defined for the class '_RouterState'.
Upvotes: 0
Views: 51
Reputation: 864
You just need to run flutter pub get
on your project! I'm not sure about Android Studio, but the pubspec.yaml
file is the one where this is configured.
Upvotes: 0