jonataslaw / getx

Open screens/snackbars/dialogs/bottomSheets without context, manage states and inject dependencies easily with Get.
MIT License
10.27k stars 1.61k forks source link

Samples Repo #249

Open stefandevo opened 4 years ago

stefandevo commented 4 years ago

Would it be a good idea to have a Get(X) samples repository for flows like I reported? Seeing full sample code always is a good starting point for using a library.

Nipodemos commented 4 years ago

i agree. Since i didn't understand very well the concepts of bindings and dependency injection, i had trouble in understand. However, by simply reading issues people post here and seeing so many little pieces of code helped me a lot to understand, now it is way clearer.

But what examples would be good? Maybe an app that consumes an API, and other app that use some king of persistent sotrage, like Hive or SharedPreferences

But before doing this, we must wait to see how GetX will be in 3.0, so we can make examples accordingly

jonataslaw commented 4 years ago

I really need to do this!

CHR15TOV commented 4 years ago

There is friction in the community about the validity of using GetX. The reality is does it work as expected or are there any hidden issues? Being FREE and open sourced has it's benefits and drawbacks.

By using the GetX package you should know exactly what you are getting from day 1.

Why not have a GetX repository for common, real-world, functional use cases and complete app examples ?

The problem for newcomers is knowing which method will work as expected. It's far easier to search for code snippets and integrate them into your development than to learn and write them from scratch.

Each method can be explained in detail with screenshots to demonstrate exactly what's going on and comparative code through using other methods so that the benefits of GetX are evident.

Take a 'better by design' approach so that once a preferred method is defined it can be refined and completely integrated into an existing framework at any time in the future. This way user will know that it works straight away and that it can only GetX better as the method becomes the de-facto way of implementing the use case. Then it will only become necessary to re-invent the wheel if there is a genuine requirement or operational efficiency.

RodBr commented 4 years ago

@jonataslaw, happy to help where I can

ghenry commented 4 years ago

I'd love one for initing FCM and Flutter local messages in a bigger MVC app like the current example arch.

ghenry commented 4 years ago

i agree. Since i didn't understand very well the concepts of bindings and dependency injection, i had trouble in understand. However, by simply reading issues people post here and seeing so many little pieces of code helped me a lot to understand, now it is way clearer.

But what examples would be good? Maybe an app that consumes an API, and other app that use some king of persistent sotrage, like Hive or SharedPreferences

But before doing this, we must wait to see how GetX will be in 3.0, so we can make examples accordingly

Maybe it's easier if you've come from BLoC, which I was just about to start to learn as it's in the Manning Flutter book, but came here from Dark Themes Medium post.

ghenry commented 4 years ago

Something that has no statefulwidget at all that also maintains state of bottomnavigationbar too. I want to try and get rid of statefulwidget in my app.

joanofdart commented 4 years ago

I said something like that in gitter... the lack of documentation and samples is pretty huge. :/

CHR15TOV commented 4 years ago

What is needed is something like this https://proandroiddev.com/flutter-passwordless-authentication-a-guide-for-phone-email-login-6759252f4e and https://github.com/hajola/passwordless_flutter THEN refactor using GetX to show the benefits. The example is a well structured, real-world use case has interaction with Firebase, snackbar, Get.to, obx, .value, the only deprecation I've found so far is in an inherited widget. You may be able to see additional functionality within GetX that I'm not aware of that can also be showcased.

joanofdart commented 4 years ago

+1 to @CHR15TOV 's comment

loicgeek commented 4 years ago

A todo app with firebase authentication https://github.com/loicgeek/todo_getx , @jonataslaw if you can check if it is the right way

stefandevo commented 4 years ago

@jonataslaw Hi, did you get my private message on gmail about Slack? I used email address that's on pub.dev (maybe wrong?)

n8crwlr commented 3 years ago

I would love to get short samples, better sorted. But to write real-world-apps is wasting time. Instead, better sort the docs.

fredgrott commented 3 years ago

If someone mirrored the flutter samples in a meaningful way, say:

-getx_bolierplate how to wire it up for app exceptions, logging, zones -getx_platform_design all the platform aware both Material and Cupertino

then say some demo apps showing HTTP, persistence etc

As it so happens I have to do this type of pattern demo code for a book series I am writing.

What will aid me in pushing it out is info on how the null-safety of get_test is progressing.

Where might the updated info on that reside at?

I Will open an issue when I have the code finished and the companion site up to give out the URL and info as I am convinced that the get plugin approach to reactive is the right way to teach flutter and so I am focusing my dev book series around it.

Thanks to all the plugin contributors as this plugin is very useful!

And Hello from the United States.

Peace and happy hacking and app designing

EmadBeltaje commented 1 year ago

GetX template https://github.com/EmadBeltaje/flutter_getx_template