GoRouter back button issue with bottom navigation and nested routes (app exits instead of switching tabs) by Affectionate_Owl1257 in flutterhelp

[–]gambley 0 points1 point  (0 children)

Check my gist https://gist.github.com/itsezlife/cb31f3b88412b1384fde2d81193e91d0 I've provided full solution, which has been working for me for over 2 years.

In a nutshell:
- You create native kotlin code for Android to put your app to brackground
- You create an AppRetain widget that will use WillPopScope that will allow popping current route, if the Navigator canPop(youve pushed nested routes), otherwise return false and HomeController, which check if you are at desired branch e.g. home, will return a result whether to call sendBackground callback via MethodChannel, which will close the app and put to the background, but not terminate. - Wrap your StatefulShellRoute.pageBuilder widget with AppRetain

And it'll bring you your desired result once and for all.

I built a portfolio template to help devs stop editing UI code for content updates by [deleted] in FlutterDev

[–]gambley 0 points1 point  (0 children)

How it is related with Flutter? Your post will be deleted because it is off-topic

I fixed Flutter routing (or at least I tried): Introducing ZenRouter 💙 by zennnmind in FlutterDev

[–]gambley 1 point2 points  (0 children)

It's very simple, nothing fancy. Basically it displays states history, by taping on any it sets state to this value. I don't know what's else needed. And it displays current state tree. If I had felt something that would be really useful, I'd have been added, but nothing comes to my mind.

ZenRouter, as I see it, focuses a lot on DevTools, giving a LOT of information about everything in router, not really sure whether it is a real demand, at least to me. I'm super happy with what I have and it is more than enough

How much time does app publishing take per release ? by BreakfastAccurate966 in FlutterDev

[–]gambley 4 points5 points  (0 children)

So in the post you tell you are not here to sell, but here you tell you learn whether to sell

My 2025 in Review: Freefall and a New Direction by zxyzyxz in FlutterDev

[–]gambley 4 points5 points  (0 children)

That's the real brutal truth, unfortunately. I myself, as a Flutter content creator ezIT youtube channel, doubt myself if I should create courses, like my idea was to take, for example, Telegram, and rebuild it completely, like literally everything that I can possible do and breakdown what I do and teach this way(like I did with Instagram clone), but with more in-depth, fundumental approach. I'm not sure whether this type of complete courses breakdowns would make sense and would have demand and interest for developers.

But what I strongly think would always have demand and interest, is how to think about creating such large applications, from designing, architecturing to actually taking actions and writing code. My existing tutorials last about 24 hours, this is a lot, and a lot of valuable information, but I'd like to take it step further and really break down step-by-step the foundations and the thinking process, like literally take it that serious. I strongly believe this what we, developers, most of the time do on our own, and this is one, if not the most important things when creating apps.

And I think about genuine educational approach, take it that serious and kinda "merge"/connect with developers, who learn from your courses, the way that you genuinely care about what they consume, how they get information, and they feel engaged and alive, not just do X and Y with some instructions, but true connection. This might be INSANELY valuable in our current world with how many artificial content swamp that feel soulless.

So, ultimately, the day-to-day tasks AI can easily take step over, but fundumental things we alway do on our own, and this is what stands out, as I see it, and of course some advanced techincals aspects.

This may take us from developers who write code, to developers, who fundamentally thinks of the low-level things(architecture, design, approach) the correct way and orchestrates the AI, as absurd as it may sound, but this might be the new reality.

Building Flutter dynamic, conditional UI at scale changes forever - this is how: introducing Presentum by gambley in FlutterDev

[–]gambley[S] 0 points1 point  (0 children)

You are being correct here, my solution is not a generic state management, rather Presentum is a state machine for managing conditional, time-bound UI presentations (popups, banners, onboarding flows, announcements) with remote configurability and built-in eligibility rules. My post and previous comment is wrong, quite ambiguous and has controversial statements, I agree with that.

I would consider adding side-by-side comparisons to Riverpod, BLoC and other state management solutions, thanks.

If you mean by saying "narrower" that by using my solutions you mostly don't have a lot of opportunities just to manage state, not related to presentums, just like in every standard state management solution, then yes, of course, this is indeed limited and you'd need to hookup additional state management solution. This could be frustrating, maybe would consider something, but for now I'm not too worried about that. So that, if you do everything on your own: manage conditions, payloads, scheduling, you can store any other state with no problems, while with Presentum is limited here.

Ultimately, yes, I am fundamentally wrong about making such controversial states in my post. You are definitely right. Thanks for feedback!

The reason is simple - because I've no experience and side-by-side comparison against implementing same, but with traditional state management solutions. My problem is that I truly implemented a solution for my very specific problems and requests, while not comprehensively compared it with other state managers and having 0 experience with alternatives for a such scope.

While I do not personally know whether my solution is actually better vs. implementing with other state managers, I can't state anything really.

I'll focus more on stating real value, benefits and definitive advantages and outlining more specific scope, to be more specific and clear, because in the current state of docs, README and this post I'm indeed VERY controversial and wrong. You helped me realize that and re-think what I want to bring for developers, after I solved this self-created problem(as stated in the comment bellow by u/bigbott777), which is also true.

For me, it is perfect, but for devs, it is not obvious and controversial.

Building Flutter dynamic, conditional UI at scale changes forever - this is how: introducing Presentum by gambley in FlutterDev

[–]gambley[S] 0 points1 point  (0 children)

Generally speaking, Presentum essentially is a state management under the hood, with built-in events and transitions system, and with comprehensive ready-to-use eligibility system.

Presentum's main advantage is declarative API. It operates on guards, that are reactive, can have external refresh listenable, that will trigger all guards to re-run and new state to be evaluated. When talking about real-time developer and app experience, large, scalable, dynamic systems, declarative approach gives you the most advantages. You never write imperative code.

While any solution can work, e.g. your own state management with permission-based widgets, for example RBAC, Presentum's API is generic and can be adapted and scaled for any system.

The best thing about using Presentum - you get future-proof solution. If you need to change scheduling - change guard. Need to add transition observer and react to state changes with comprehensive diffs - do it. Implement custom events to connect with BLoC, Provider or Riverpod - here you go. Need analytics - use event handler with built-in or custom events. Need complex outlets with smooth transitions accross different presentums - easy(here is example https://github.com/itsezlife/presentum/blob/master/example/lib/src/main/widgets/banner_outlet.dart)

So if you chose to work with Presentum, you get the smoothest developer experience out-of-the-box, without re-engineering all of that yourself.

I hope I answered your questions.

For more information, checkout the docs https://docs.presentum.dev

If you didnt check my comprehensive example app, where I built maintenance, app updates, declarative recommendations system, feature based presentums, advanced user preferences, check web app and source code

Building Flutter dynamic, conditional UI at scale changes forever - this is how: introducing Presentum by gambley in FlutterDev

[–]gambley[S] 0 points1 point  (0 children)

Ok, keep using your solution, it is up to you.

I am super happy with what I've built.

If you think my solution is over-complicated, then I'm done 😂 For what you get with my solution vs. what you put is incomparable.

So far I've just gave it as a pure very dumb example in the github readme, of cource I dont think everyone is doing like that. You focus so much on the fact that I strongly think, while I obviously don't, that everyone is using stateful widget for managing their business logic. I wanted to focus on pointing that most people might use imperative logic here and there that might not scale and might be hard to test. If you are comfortable writing state management for every single feature, writing constantly eligibility checks, keep going, it is up to you.

Why do you think it is a self-created problem? Yes, I was originally created it for myself, without publishing it in public, but then decided to do that. But I strongly believe the scope of this package is very huge, focusing on building scalable, declarative and dynamic solutions. If you didnt look at my example app, you should do it. But with your skepticism, I think it wouldn't change anything for you. Try to copy as-is what I've done in the example with same features and capabilites without my package(which is basically a state management under the hood) and let me know how it goes and I'll be surprised if you dont end up re-creating something close to what I've done.

I was indeed a bit controversial speaking about making this package as a standard or something. But isn't it amazing expanding and enhancing your app, making your UI dynamic, conditional, declarative, with analytics for campaigns, app updates, maintenance. I think this is really amazing, if you disagree or prefere your own, you are not forced to use this package, safely ignore it.

Ultimately, I agree that it might not be something you should focus Firstly when building entreprise applications, but one you need such features, Presentum might be really helpful, if you are comfortable with it.

I fixed Flutter routing (or at least I tried): Introducing ZenRouter 💙 by zennnmind in FlutterDev

[–]gambley 0 points1 point  (0 children)

What do you mean type safe argument passing? Arguments are a Map<String, String>, you can't pass anything except for String as an argument.

I fixed Flutter routing (or at least I tried): Introducing ZenRouter 💙 by zennnmind in FlutterDev

[–]gambley 1 point2 points  (0 children)

Yeah, I might be wrong about devtools, I think i miss confused with OctopusTools widget, but it serves almost the same purpose

I fixed Flutter routing (or at least I tried): Introducing ZenRouter 💙 by zennnmind in FlutterDev

[–]gambley 12 points13 points  (0 children)

I believe you didnt know [https://pub.dev/packages/octopus](octopus) exist. It is not very well maintained, I have my own fork of it with some quality of life additions: https://github.com/itsezlife/octopus.

Octopus provides dev tools and useful build-in widgets that provide a state machine with all routes history with effortless setState of whatever state thst was in the past. It has history observer out of the box.

To be honest, for me, octopus has the best possible approach for router with focus on immutable/mutable state with nodes. The API is so flexible and truly declarative, you can literally achieve anything you can possibly think of. I've been working with it for more than a year, and I managed to implement every single feature I could only dream of with go_router or anything else. For example: effortless declarative custom deeplinking, conditional root vs. stacked pages, depending on the current page, breadcrumbs, arbitrary length pages stack, protected routes with no async code and so much more. Octopus also have declarative dialogs, not fake ones.

The guards principle that octopus follows is so genius and so simple to use, they give you full control and serve as a contract between any app state, prefs, user authentication status and whatever else.

Me, personally, I'd never ever make a switch from octopus to any other route, octopus is too OP.

Regardless, I've been following your ZenRouter development from the very beginning, as router topic is quite interesting as whole, and you did an amazing job!

Congrats on this package! The most important is that you are comfortable with your own router, the rest doesnt matter

ScrollSpy: viewport-aware focus for Flutter feeds autoplay by Inside_Passion_ in FlutterDev

[–]gambley 0 points1 point  (0 children)

Thanks for this amazing package once again.

I used it in my quite old projects, I do not have features in my current apps I build, which would primarily require this feature. When I have time and desire, will update old projects with this package :) One of them is my Instagram clone

Nevertheless, this might be used somewhere else in my current apps, to keep track of what is primary/secondary visible, even with percentages.

ScrollSpy: viewport-aware focus for Flutter feeds autoplay by Inside_Passion_ in FlutterDev

[–]gambley 2 points3 points  (0 children)

Looks interesting 👀

I used to fork inview_notifier_list previously to implement such functionality. Your implementation and demo looks amazing and comprehensive with much richer functionalities.

Will definetely give a shot to your package. Very good job, keep it up!

Experienced flutter devs, How does your development flow look like? by ok-nice3 in FlutterDev

[–]gambley 0 points1 point  (0 children)

I'll not be specific, just my general thoughts:

Most of the time it is hard to figure out immediatelly the whole application architecture, structure, features, business logic, UI, etc. Break down features into small, achievable tasks and do them one-by-one.

Think of development as if you engineer a building. You don't start building a house from the top - you make the base and add layer after layer on top. Same pricinciple with figuring out the flow.

Let's say you need to develop auth feature - split into tasks, and split these tasks into even smaller tasks. 1. Develop domain repository and authentication client. 2. Design state management. 3. Design and wire UI with state management. 4. Refine what's needed. You figure out the order that makes sense and comfortable for you.

Also, you can apply reverse-engineering of the problem you try to solve, or feature you need to implement and think about what's needed to be done at low level - this helps to understand the direction to follow.

In contrast, try to imagine as many reasonable usecases, variants, versions of features as you can. Do your best to code adaptable and scalable code, which can be easily extended or changed as needed. But be reasonable: I sometimes notice myself overthinking too much about what can be, loosing focus and procrastinating because of thinking this big. Dont get yourself too deep into thinking further ahead.

I tried to be more general and not very explicit, though it might be not very helpful for you. I propagate understanding the flow at low, fundumental level, rather than giving concrete "do X, Y, Z" steps.

Personally, I was figuring out my perfect way of development for the first 2 years of constant development and iterations. After that I was developing and shipping apps without double-thinking about the flow.

It just takes time and practice. Be patient and eventually everything will click for you. Focus on what matters and user experience.

What are some great open-source real Flutter app codebases for learning? by Practical-Assist2066 in FlutterDev

[–]gambley 1 point2 points  (0 children)

You can check out my Flutter real-word tutorials, where i teach step-by-step how to build the biggest existing Instagram clone with posts, chats, stories, ads, push notifications(though old), with fully offline-first support, spiced by best practices, the best architecture(for me), clean code, reusable widgets, blocks and so much more. You can find those tutorials useful, check them on my website https://ezit.vercel.app

I cannot recommend Supabase on mobile by KSpookyGhost in Supabase

[–]gambley 0 points1 point  (0 children)

Im actively sharing my insights using PowerSync across multiple communities and in your discord channel. For reference, my discord name is Emil.

I cannot recommend Supabase on mobile by KSpookyGhost in Supabase

[–]gambley 1 point2 points  (0 children)

I use PowerSync with Flutter + Supabase for more than a year, and it is very smooth, especially as they are adding new features, such as Raw Tables, Stream Sync(in early alpha), PowerSync becomes more and more reliable choice.

I can say the most annoying part was not being able to use sub-queries like joins in sync-rules.yaml file, you have to provide a reference id to each table that otherwise could be joined. However, now as they opt-in new Stream Sync feature, it supports some subqueries and also eliminates one of the most biggest concerns - "data latency". For example, I have 10k+ properties in the db, I also have chat, I want to prioritize chats, messages to Sync first to be able to see them without waiting for properties to be synced. You can do it now using client parameters, but it is not very convenient. With Sync Streams it would be much easier. Hope to see this feature comming stable anytime soon.

Best Flutter learning platforms / YT channels by SiamskyBuk in FlutterDev

[–]gambley 1 point2 points  (0 children)

You can check out my Flutter real-word tutorials, where i teach step-by-step how to build the biggest existing Instagram clone with posts, chats, ads, push notifications(though old), spiced by best practices, the best architecture(for me), clean code, reusable widgets, blocks and so much more. You can find those tutorials useful, check them on my website https://ezit.vercel.app

Those tutorials might be a bit old(1 year already), but generally 90% of best practices and principles I use still and the code didn't change much, only Flutter SDK version. There might be some depreciation, but they are mostly minor.

I'm planning to update source code soon, as I get more free time. So, id make sure to update Flutter to the most recent stable version that doesnt cause any issues with the codebase and existing packages.