yield :adds a value to the output stream of the surrounding async function* . It's like return , but doesn't terminate the function (زي ريتيرن بس بتيجي مع ستريم عشان مابتوقفش الفانكشن)
-Event Handler- on<>(event, emit){}
cubit: cubit. Function(); == bloc: bloc. Add(Event());
أما تيجي تتعامل مع حاجة لوكال فالكيوبت/بلوك ومع جلوبال في نفس الوقت (local before global)
ترتيبهم باللي بيشتغل الأول:
onError, onEvent, (Local before Global then next) onTransition, onChange,
Note: onError
and onChange
work the exact same way for both Bloc
and Cubit
instances.
blocObserver: تراقب ستيتس الابلكيشن كله (بيشتغل معاها onChange and onTransition)
onTransition (مع البلوك بس) (بيحددلك كمان الإيفنت اللي انت فيه)