Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compile error #29

Closed
jlubeck opened this issue Apr 3, 2020 · 14 comments
Closed

Compile error #29

jlubeck opened this issue Apr 3, 2020 · 14 comments

Comments

@jlubeck
Copy link

jlubeck commented Apr 3, 2020

using get: ^1.11.6

As soon as I include import 'package:get/get.dart'; on my main.dart file

I get this error during compile:

Compiler message:
../../../.pub-cache/hosted/pub.dartlang.org/get-1.11.6/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) {
       ^
../../../flutter/packages/flutter/lib/src/widgets/routes.dart:40:8: Context: This is the overridden method ('install').
  void install() {
       ^
../../../.pub-cache/hosted/pub.dartlang.org/get-1.11.6/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);
                 ^

This is my main.dart

import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:rpm/models/state.dart';
import 'package:provider/provider.dart';
import 'routes.dart';

void main() => runApp(ChangeNotifierProvider(
      create: (context) => StateModel(),
      child: MyApp(),
    ));

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      initialRoute: '/',
      routes: routes,
    );
  }
}

@jlubeck
Copy link
Author

jlubeck commented Apr 3, 2020

Thought you might be interested in this as well:

[✓] Flutter (Channel beta, v1.15.17, on Mac OS X 10.15.4 19E266, locale en-US)
    • Flutter version 1.15.17 
    • Framework revision 2294d75bfa (4 weeks ago), 2020-03-07 00:28:38 +0900
    • Engine revision 5aff311948
    • Dart version 2.8.0 (build 2.8.0-dev.12.0 9983424a3c)

@jonataslaw
Copy link
Owner

Thought you might be interested in this as well:

[✓] Flutter (Channel beta, v1.15.17, on Mac OS X 10.15.4 19E266, locale en-US)
    • Flutter version 1.15.17 
    • Framework revision 2294d75bfa (4 weeks ago), 2020-03-07 00:28:38 +0900
    • Engine revision 5aff311948
    • Dart version 2.8.0 (build 2.8.0-dev.12.0 9983424a3c)

Simply use this version of the plugin:

get: ^1.14.0-dev

@jlubeck
Copy link
Author

jlubeck commented Apr 3, 2020

Ok, now I'm getting a different error:

Compiler message:
../../../.pub-cache/hosted/pub.dartlang.org/get-1.14.0-dev/lib/src/routes/default_route.dart:239:9: Error: No named parameter with the name 'primaryRouteAnimation'.
        primaryRouteAnimation: animation,
        ^^^^^^^^^^^^^^^^^^^^^
../../../flutter/packages/flutter/lib/src/cupertino/route.dart:425:3: Context: Found this candidate, but the arguments don't match.
  CupertinoFullscreenDialogTransition({
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Compiler message:
../../../.pub-cache/hosted/pub.dartlang.org/get-1.14.0-dev/lib/src/routes/default_route.dart:239:9: Error: No named parameter with the name 'primaryRouteAnimation'.
        primaryRouteAnimation: animation,
        ^^^^^^^^^^^^^^^^^^^^^
../../../flutter/packages/flutter/lib/src/cupertino/route.dart:425:3: Context: Found this candidate, but the arguments don't match.
  CupertinoFullscreenDialogTransition({
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Target kernel_snapshot failed: Exception: Errors during snapshot creation: null
Failed to build bundle.

@jonataslaw
Copy link
Owner

Ok, now I'm getting a different error:

Compiler message:
../../../.pub-cache/hosted/pub.dartlang.org/get-1.14.0-dev/lib/src/routes/default_route.dart:239:9: Error: No named parameter with the name 'primaryRouteAnimation'.
        primaryRouteAnimation: animation,
        ^^^^^^^^^^^^^^^^^^^^^
../../../flutter/packages/flutter/lib/src/cupertino/route.dart:425:3: Context: Found this candidate, but the arguments don't match.
  CupertinoFullscreenDialogTransition({
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Compiler message:
../../../.pub-cache/hosted/pub.dartlang.org/get-1.14.0-dev/lib/src/routes/default_route.dart:239:9: Error: No named parameter with the name 'primaryRouteAnimation'.
        primaryRouteAnimation: animation,
        ^^^^^^^^^^^^^^^^^^^^^
../../../flutter/packages/flutter/lib/src/cupertino/route.dart:425:3: Context: Found this candidate, but the arguments don't match.
  CupertinoFullscreenDialogTransition({
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Target kernel_snapshot failed: Exception: Errors during snapshot creation: null
Failed to build bundle.

Sorry, my mistake, the beta version is:
get: ^1.13.1-dev

I will add this to the Readme

@jlubeck
Copy link
Author

jlubeck commented Apr 3, 2020

I don't know if it is possible but maybe you could call it 1.13.1-beta?

@jonataslaw
Copy link
Owner

I don't know if it is possible but maybe you could call it 1.13.1-beta?

This version belonged to the dev branch, Flutter made the same version of the dev branch as beta, so the version name is "dev".
But I will organize this, add the 3 branchs to pub.dev soon.

@jlubeck
Copy link
Author

jlubeck commented Apr 3, 2020

So, it looks like ^1.13.1-dev is still downloading ^1.14.0-dev

@jlubeck
Copy link
Author

jlubeck commented Apr 3, 2020

@jonataslaw
Copy link
Owner

https://www.loom.com/share/041102cb7d9a4829baa5c2f0ee4dfd75

Thanks for this video, it shouldn't happen, it's a problem on the Flutter side, but in order to prevent you and other people from going through this situation, I'm sending a beta version to pub.dev right now.
Within a few minutes I will give you the exact version number.

@jlubeck
Copy link
Author

jlubeck commented Apr 3, 2020

You are awesome. I hope your package works for my use case. I plan on using it inside a TabController (fixed navigation bar and internal pages in each section).
Do you think that would be an issue?

@jonataslaw
Copy link
Owner

Try now:
get: 1.13.3-beta
The beta version is now available.
There is no way you can do what you want with Get right now.

It looks like you intend to use NestedNavigators.
This is not yet fully recommended, and can cause problems with MemoryLeak.
There is no way to implement this without creating a new navigation GlobalKey, and they are expensive.
I have resisted adding this to Get, because I always valued performance, the initial idea of ​​this lib was due to an application with 2 million downloads in each store that was crashing when users navigated many routes using standard navigation. I discovered the problem, offered a PR in the framework, and added the solution to Get. Today this problem is fixed in Dev (beta and stable are still affected by the problem using Navigator.push without Get), but after several feature request requests, I will add that.
Keep in mind that you must not allow the user to navigate dozens of routes within each stack. You will have multiple stacks of routes in memory, and this is a problem depending on the type of application you have.
In version 2.0 I intend to use GetObserver to save the state and position of each route, to simulate nestedNavigators, this can be an ideal performance solution, but it requires the implementation of its own storage system and deep modifications, and I am waiting for decisions about the new declarative navigation of Flutter that is in internal tests go off the record to see if I can do something under it.

Anyway, I will add, probably today, I already have the lib code open, this will only take a few minutes for this feature, but I will make it clear that it is something that should only be used in specific cases, and it can be very bad for performance depending on how it is done.

@jlubeck
Copy link
Author

jlubeck commented Apr 3, 2020

I see... Tab navigation is a very popular navigation paradigm though. I'm surprised it is not more heavily supported in flutter and other navigation systems I've been trying.

@jlubeck
Copy link
Author

jlubeck commented Apr 3, 2020

Ok, that new beta package worked! Closing this one and looking forward to the nested navigators! Thanks a lot for your quick replies. Highly appreciated!

@jlubeck jlubeck closed this as completed Apr 3, 2020
@jlubeck
Copy link
Author

jlubeck commented Apr 15, 2020

Anyway, I will add, probably today, I already have the lib code open, this will only take a few minutes for this feature, but I will make it clear that it is something that should only be used in specific cases, and it can be very bad for performance depending on how it is done.

Hey @jonataslaw were you able to take a look at this? I would't be asking if you didn't already mentioned you were probably adding it that day 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants