stacked-example icon indicating copy to clipboard operation
stacked-example copied to clipboard

Errors when running part one

Open MRL-00 opened this issue 5 years ago • 3 comments

Currently getting errors when running this source code:

../../../AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/get-1.17.3/lib/src/snackbar/snack_route.dart:279:8: Error: The method 'SnackRoute.install' has more required arguments than those of overridden method 'OverlayRoute.install'. void install(OverlayEntry insertionPoint) { ^ /C:/src/flutter/packages/flutter/lib/src/widgets/routes.dart:46:8: Context: This is the overridden method ('install'). void install() { ^ ../../../AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/get-1.17.3/lib/src/routes/default_route.dart:242:9: Error: No named parameter with the name 'animation'. animation: animation, ^^^^^^^^^ /C:/src/flutter/packages/flutter/lib/src/cupertino/route.dart:542:3: Context: Found this candidate, but the arguments don't match. CupertinoFullscreenDialogTransition({ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ../../../AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/get-1.17.3/lib/src/snackbar/snack_route.dart:289:18: Error: Too many positional arguments: 0 allowed, but 1 found. Try removing the extra positional arguments. super.install(insertionPoint);

Any reason as to why this might be the case?

MRL-00 avatar Jul 27 '20 09:07 MRL-00

you probably have out of date packages - get is on version get: ^3.4.1, but your errors are related to a cached older version - can you try updating get in your pubspec, and then running "flutter pub cache repair"?

JayPerfetto avatar Jul 31 '20 15:07 JayPerfetto

Yes, that's definitely the problem. You need to do a flutter pub upgrade and then try again, if that doesn't work run the repair command above.

FilledStacks avatar Jul 31 '20 16:07 FilledStacks

having problem on: "onGenerateRoute: Router().onGenerateRoute"

class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { return MaterialApp( title: 'Flutter Demo', initialRoute: Routes.startupView, onGenerateRoute: Router().onGenerateRoute, navigatorKey: locator<NavigationService>().navigatorKey, ); } }

yaml: dependencies: flutter: sdk: flutter

The following adds the Cupertino Icons font to your application.

Use with the CupertinoIcons class for iOS style icons.

cupertino_icons: ^1.0.0 stacked: ^1.7.6 auto_route: stacked_services: injectable: get_it:

dev_dependencies: flutter_test: sdk: flutter

auto_route_generator: injectable_generator: build_runner:

7NT avatar Nov 12 '20 20:11 7NT