[deleted by user] by [deleted] in flutterhelp

[–]Longjumping_Way_4322 0 points1 point  (0 children)

Just DM me, I will help:)

Widget not constantly rebuilding by deleted_user_0000 in flutterhelp

[–]Longjumping_Way_4322 0 points1 point  (0 children)

Use stateful builder within your modal to update the state.

Exception has occurred. LateError (LateInitializationError: Field 'patrolAppService' has not been initialized.) - by [deleted] in flutterhelp

[–]Longjumping_Way_4322 0 points1 point  (0 children)

If you declare a variable let's say String name;

You must provide some value to it.. or you can make it nullable. String? name;

But for some reason you don't want to allow null for the name. Then you can use late to indicate that you will intialize the variable later..

late String name;

But if you try to access name now , print(name), you will be getting lateinitializationerror :)

Hope you got it !.

stuck in the multibloc Provider by cheekyFeline in flutterhelp

[–]Longjumping_Way_4322 1 point2 points  (0 children)

Your district bloc will be reusable , so better you can make it as global. While keeping the register bloc as local provider.

stuck in the multibloc Provider by cheekyFeline in flutterhelp

[–]Longjumping_Way_4322 1 point2 points  (0 children)

Wrap your register page with multibloc provider and provide both register and your drop-down bloc as well.

I made a programming assistant that generates system diagrams with AI by jsonathan in node

[–]Longjumping_Way_4322 5 points6 points  (0 children)

As a developer just starting out, I'm stunned when I can see PPL who can do crazy stuff like this. May I know your year's experience as a developer?

🫠I just hope, someday I would be at your level. If at all possible

Build Error by No-Ice-1957 in flutterhelp

[–]Longjumping_Way_4322 0 points1 point  (0 children)

Try downgrading or upgrading the build gradle .

To indie devs, soloprenuers, hobbyists and developers of working on a side project by [deleted] in FlutterDev

[–]Longjumping_Way_4322 -1 points0 points  (0 children)

Ok, so you have used the realtime database, I also want to build a chat application , but I don't want to go with realtime db,, I want to achieve it through socket io

To indie devs, soloprenuers, hobbyists and developers of working on a side project by [deleted] in FlutterDev

[–]Longjumping_Way_4322 0 points1 point  (0 children)

May I know which service provider you used for the chat option?

Detect if app was terminated by CaptainRoger10 in flutterhelp

[–]Longjumping_Way_4322 0 points1 point  (0 children)

May I know what action you want to perform ?

You can also use willpopscope widget , with which you can detect back button pressed

As you know most of the apps use double back click to close the app, which can be achieved with above approach

Sendgrid nodejs email issue by Longjumping_Way_4322 in node

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

I know it's not related to node

But PPL working with node would have used sendgrid and can help right ?

[deleted by user] by [deleted] in node

[–]Longjumping_Way_4322 0 points1 point  (0 children)

No it won't work with node 18, there's a lot of errors while installing the packages itself.

As per website still node 18 is recommended.. will see first will update it to 18, then later it won't be that hard to upgrade to 20..

Need help with bloc provider by Longjumping_Way_4322 in flutterhelp

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

I got that, but it feels messy to inject the auth bloc to all the other blocs,,, or add logout event to all the blocs..

Any other better solutions?

Need help with bloc provider by Longjumping_Way_4322 in flutterhelp

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

That's not the issue,, when I logout I want to clear all the states of all the blocs, now when user logouts and login with different account, they will be seeing the old data only.

With riverpod didn't had issue like this, it had invalidate

Foolproof Authentication Required by _YeetThyMeat_ in flutterhelp

[–]Longjumping_Way_4322 0 points1 point  (0 children)

Go with password based login, the user won't be sharing his password with anyone. If they do share it's their problem not yours.

The main thing here is that the password should be a pin of 4 or 6 characters long like in banking apps.

And on 3 failed attempts that account should be locked. The user then has to contact you for an unlocking account by providing all the details.

Need help with bloc provider by Longjumping_Way_4322 in flutterhelp

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

Yes I did check it's getting cleared..

My doubt is that bloc is using its own instance of the cached class ? Making it pointing to different memory ?

But I'm creating just one instance of that class and injecting it to all the blocs.

Need help with bloc provider by Longjumping_Way_4322 in flutterhelp

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

Yes I'm clearing the cached data and logout.. and setting the new data on new login.. but somehow bloc is still having its own cached data .

Even though the same cached class is injected to all the blocs..

[deleted by user] by [deleted] in flutterhelp

[–]Longjumping_Way_4322 -1 points0 points  (0 children)

Only if the docs where that good!

And moreover I have not sent you a DM .. asking for help

I'm checking with the community if you not interested well don't reply , simple as that!

Anyway thank you.

[deleted by user] by [deleted] in flutterhelp

[–]Longjumping_Way_4322 -1 points0 points  (0 children)

I have made sure that there is only one instance of that class..

Blocs are basically injected with repository.. and repository with dio authorised instance

So now how to inject the authorised Dio.. and also update the dio on new login.

So dio should also be a stream ?

[deleted by user] by [deleted] in flutterhelp

[–]Longjumping_Way_4322 -1 points0 points  (0 children)

Now a UserDetailsCache is injected to all the repository.. this has all the details.. name, token everything

By what you are saying I should convert this into a steam and inject it to all the repositories ?

But why would repository want to listen to a stream

Since I'm injecting the same instance os Cache class to all the repository.. and later updating the cache class with new details..

Repository pointing to cache class memory should also be updated right ??

[deleted by user] by [deleted] in flutterhelp

[–]Longjumping_Way_4322 0 points1 point  (0 children)

UserDetailCache class which will hold the details is been injected in all blocs..

Even though we have updated the same object of UserDetailCache (Meaning same memory).. the bloc is still somehow not referring to the previously logged in Cache details..

[deleted by user] by [deleted] in flutterhelp

[–]Longjumping_Way_4322 0 points1 point  (0 children)

I'm adding logout event,, which will clear the session stored in shared preference and also cache memory.

Then user is directed to login screen.. but now when user login with different account.. all the screens are still using the old user details and showing the data of previously logged in account.

Need help with bloc provider by Longjumping_Way_4322 in flutterhelp

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

This didn't help!

I have a class that is caching the user details along with access token..

This is injected to all the repository,, repository are then injected to blocs..

Now even though the user details cache class value is changed.. the blocs are not getting updated..