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

Added Get #644

Merged
merged 2 commits into from
May 4, 2020
Merged

Added Get #644

merged 2 commits into from
May 4, 2020

Conversation

jonataslaw
Copy link
Contributor

Navigate between screens, display snackbars, dialogs and bottomSheets, from anywhere in your code without context with Get.

You've read How to contribute right ? yes

So tell me more about your awesome contribution and add the badge to your repo after it's accepted :D ok

Awesome Flutter
<a href="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/Solido/awesome-flutter">
   <img alt="Awesome Flutter" src="https://img.shields.io/badge/Awesome-Flutter-blue.svg?longCache=true&style=flat-square" />
</a>

Navigate between screens, display snackbars, dialogs and bottomSheets, from anywhere in your code without context with Get.
Copy link
Collaborator

@renancaraujo renancaraujo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking great!

Thanks for that.

@renancaraujo
Copy link
Collaborator

renancaraujo commented Mar 22, 2020

@Solido Look at this package: https://pub.dev/packages/get

@Solido
Copy link
Owner

Solido commented Mar 22, 2020

Hi ! thx for protecting us from cliche code ;)
No idea if this lib is great or not. I mean the expressivity it better than flutter but what's going on behing.
Looks like a singleton with a mutable context that always point to the current context.
@rodydavis can you help ?

@rodydavis
Copy link
Contributor

rodydavis commented Mar 22, 2020

Btw this may cause issues for flutter web:

    return Platform.isIOS
        ? key.currentState.push(GetCupertino(
            opaque: rebuildRoutes ?? true,
            page: page,
            transition: transition ?? Transition.cupertino,
            duration: duration))
        : key.currentState.push(GetRoute(
            opaque: rebuildRoutes ?? false,
            page: page,
            transition: transition ?? Transition.fade,
            duration: duration));
  }

I’m of two minds about his package. I think it is a great fix for the short term, but could cause problems with apps as it is harder to predict when navigation happen. Which is fine, but something to be aware of. But I also like the flexibility and the ability to control navigation from a bloc for example.

That being said this will all be resolved when the new navigator lands and is a new declarative api yo navigation instead of imperative:

flutter/flutter#45938

Really love the package though. Side note is the name is confusing, it immediately made me think of get_it and not a navigation style package.

@jonataslaw
Copy link
Contributor Author

Btw isso pode causar problemas para flutter web:

    retornar  Platform .isIOS
         ? key.currentState. push ( GetCupertino (
            opaco : rebuildRoutes ??  verdade ,
            página : página,
            transição : transição ??  Transição .cupertino,
            duration : duration))
         : key.currentState. push ( GetRoute (
            opaco : rebuildRoutes ??  falsa ,
            página : página,
            transição : transição ??  Transition .fade,
            duration : duration));
  }

Eu tenho duas idéias sobre o pacote dele. Eu acho que é uma ótima solução para o curto prazo, mas pode causar problemas com os aplicativos, pois é mais difícil prever quando a navegação acontece. O que é bom, mas algo para estar ciente. Mas também gosto da flexibilidade e da capacidade de controlar a navegação de um bloco, por exemplo.

Dito isto, tudo será resolvido quando o novo navegador chegar e é uma nova navegação declarativa da API em vez de imperativa:

vibração / vibração # 45938

Realmente amo o pacote embora. Nota lateral: o nome é confuso, imediatamente me fez pensar em get_it e não em um pacote de estilo de navegação.

Thanks for remembering that, I inserted this code in the dev / master branch of Get and forgot about Flutter web and desktop.

I'm looking forward to the new Flutter navigation, the idea of ​​the lib was to get rid of a materialApp reconstruction bug that destroyed the performance of my biggest app, but it seems that Godebauer already fixed it in the master, if there was no regression in PR his. However, snackbars are still boring with standard navigation.
I have a service that depends on the connection, and it is necessary to notify the user immediately if the connection goes down regardless of the screen the user is on. At first, I found it strange that this was practically impossible with Flutter, since it would be necessary to link a scaffold key on each screen, while with Get I can listen to events and fire snack bars when they happen. Apple disapproved of an application of mine for the use of the snackbar (and I agree that the snackbar of the material does not follow the human guidelines, every floating overlay has to be blurred) and I inserted this customization of the snackbar to get rid of it, and it worked.
When the new Flutter navigation comes out, it will be great, but I will continue with the development of the package.
And I agree that a lot of people can confuse it with get_it, but don't judge me, I've been a web developer for 10 years, when it comes to "routes", "get" is the first word that comes to mind.

@Solido Solido added the Observation Test of time label Mar 24, 2020
@jonataslaw
Copy link
Contributor Author

Hi, due to bugs in the named FlutterWeb routes of the Dev/Master version (sending an empty path in onGenerateRoute on initialRoute), I had to rebuild Get with a MaterialApp wrapper to handle named routes and more other resources before arriving at MaterialApp, as a temporary hotfix for this, as some of the library's customers are using Flutter web in production. I took advantage that it was a break update, added a new state manager similar to the provider's Consumer, but that does not use changeNotifier (which is terrible for performance) and that uses very little memory. I believe that the plugin has turned into a microframework, and is having a great acceptance in the community (only this week it has increased +80 stars), for being highly stable, and providing resources in an unclopped way, facilitating unit tests with Flutter.
I also created a video compressor for Flutter, because it was missing (there was only one plugin on pub.dev for that, which doesn't work anymore and the last update was 2 years ago, in addition to using ffmpeg which has problems with patents in commercial applications).
And I would like to add that to the solid, which seems to me a library indexer so that people can find resources and content about Flutter more quickly.
Should I create another branch to add the video compression plugin, delete this pull and add both to a new PR, or update this PR and create a new pull? With that description, it looks like Get only manages routes, when in fact, it decouples essential APIs from the Framework allowing you to check things like "is there an open snackbar or bottomsheet?" using a Get.isSnackbarOpen bool, and provides high-level APIs not present in Flutter (you have no way of knowing if there is an open bottomsheet using Flutter without this library, for example, or using dynamic routes in the web language, which no plugin does, fluro / modular, for example, promises this, but delivers a syntax totally different from the ?=&= used in a url).
What do I do?

@Solido
Copy link
Owner

Solido commented May 4, 2020

Hi ! yes one PR per resource please !

@Solido Solido merged commit 407dbe9 into Solido:master May 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Observation Test of time
Projects
None yet
4 participants