package Ġeu . bar on cel li . dk mp sample . shared . view model . screens . countries list Ċ Ċ import Ġeu . bar on cel li . dk mp sample . shared . datal ayer . functions . get Favorite Countries Map Ċ import Ġeu . bar on cel li . dk mp sample . shared . view model . Events ĊĊĊ Ċ / ******** ** ĠEVENT Ġfunctions , Ġcalled Ġdirectly Ġby Ġthe ĠUI Ġlayer Ġ********* */ Ċ Ċ fun ĠEvents . select Favorite ( country Name : ĠString ) Ġ= Ġscreen Coroutine Ġ{ ĊĠĠĠ Ġval Ġfavor ites Ġ= Ġdata Repository . get Favorite Countries Map ( also Toggle Country Ġ= Ġcountry Name ) ĊĠĠĠ Ġ// Ġupdate Ġstate Ġwith Ġnew Ġfavor ites Ġmap , Ġafter Ġto g gling Ġthe Ġvalue Ġfor Ġthe Ġspecified Ġcountry ĊĠĠĠ Ġstate Manager . update Screen ( Countries List State :: class ) Ġ{ ĊĠĠĠĠĠĠĠ Ġit . copy ( favorite Countries Ġ= Ġfavor ites ) ĊĠĠĠ Ġ} Ċ } Ċ