Flutter MobX, a  reactive state management | Pair programming with author of MobX package

Flutter MobX, a reactive state management | Pair programming with author of MobX package

Majid Hajian

2 года назад

1,545 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

Dev Life
Dev Life - 16.09.2023 02:57

This was a very good video, learned a lot about MobX. Regarding the BuildContext issue, would using a callback work? I'm thinking if you created a property on the store i.e. 

class AuthStore {
Function navigateToMenuCallback;
}

Then on the page you would have a local function which gets assigned to navigateToMenuCallback. 

Widget build(BuildContext context) {
store.navigateToMenuCallback = () {
//navigation logic using build context goes here; context gets captured as part of closure
}

return Column(
//rest of page code
);
}

Then later on in an action or reaction you just call navigateToMenuCallback() when appropriate. Just off the top of my head but worth a shot.

Ответить
Mehul
Mehul - 08.01.2023 10:31

Very nice video.
It was lil bit inconvenient since the phone screen was overlapped by the faces of you guys.

Ответить
Md. Siam
Md. Siam - 19.06.2022 03:06

What is the name of that font & theme Majid???

Ответить
Wezone
Wezone - 31.01.2022 21:52

What about getX?

Ответить