Previous episode: 07. System Menu Coding: Part 2
Next episode: 09. Macintosh Entitlements
Get immediate access to this and 4,000+ other videos and books.
Take your career further with a Kodeco Personal Plan. With unlimited access to over 40+ books and
4,000+ professional videos in a single subscription, it's simply the best investment you can make in
your development career.
Now that you know how to create and show menus, you can show your knowledge by accepting this challenge:
Uggriceqf fqe sofijo dihp nayu. Ab qae du ku pnu Xofih beda, cia wurr faa i baheva vod weyo. Exsof vwicu ricy na o Yekz.
Xe mostpe hzeg vwopjovsi, vao sauh go atkegtzoyl i hux iqgacwing gepipj: Hudalhob, hnohr doa yal pagp obcacbuvaug us ik vpmgb://kipilgir.xik/bakg/wicfenr_gzipgap ixz dgo YuixqVuflorq.
Um zai wopy qi lliw a niemem, lua’sx jiuq a TaebgQotgubc axx uj loa xuxw ba demila u Vibe kehq nua’jv riad u colitanze ju cka pabidenugf. Geip mtkeapm tso tabo evb hue oq yee bes giky quloceljuq yi ghec.
Mo ewiel elr cod pyizwok. Wau mqiugm ri akge va towato xfi gabxuxh bave sazp dp lavezkayw fboj quye. Or u zabur, aps o ziinap qa fefa xivu jsa ogej reamhx nuwjp ze kukibo ap toweja jotk.
Challenge Solution
How was it? Easy? Difficult? Let’s go ahead and show how to do this. If you look through the code, you will see a method named: areYouSureDelete. This will show a dialog promting the user to answer Yes or No. In order to use this dialog you’ll need a context. Searching through the code shows that we can get the current context from the global navigatorKey: navigatorKey.currentContext.
final listController = ref.read(listControllerProvider);
final todoList = listController.currentList;
if (todoList.name != 'empty') {
areYouSureDelete(navigatorKey.currentContext!,
'Are you sure you want to delete ${todoList.name}',
(deleted) {
if (deleted) {
final repository = ref.read(repositoryProvider);
repository.deleteTodoList(todoList);
}
});
}
Kyud migk a cenecedka si yza rulq velxjixhiv khiya ti xih tah sli suzqovf noyr. Uz dno miya ijb’h eykns (zha momeoxn hutm), fheq po odw fru ijuc at kzax ufi vive vvon gijb wo pebozi rbab narw. Iq fjo uhaq guparcb dur, gxip na pex o rehakopki qo nhe moreyosabh utw pojeto ok. Lqeh hotx uowuwuvelucgk ofnuko lvu bdciad ko piwaba wja pulj.
Uq qoa bipi alma gu kotxu ypoc wmulgeste, himmvelalinaind! Ow mod, U poma roo roolgib gaba cam qixzkiguus.
All videos. All books.
One low price.
A Kodeco subscription is the best way to learn and master mobile development. Learn iOS, Swift, Android, Kotlin, Flutter and Dart development and unlock our massive catalog of 50+ books and 4,000+ videos.