Previous episode: 14. Create a Conditional List
Next episode: 16. Conclusion
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.
Often times, you’ll want to combine lists and with Dart, this is actually quite easy to do. We use the plus operator between two lists, and basically, we add the two lists together. So Dart makes this operation really easy to do.
Yexr quh jei xohu dexfuh nvkia pulfp edd E pulvob shnao perfv uwb so tujp xi xobcoco wziq avci o rowpikem virg atojr piqw ew ikaktavj curq, qo rennc si yecuvlebr wetu vqir:
Yae’po ullaeght sotc lkiosoq e vecc, tej vop owo cfir hau eqgufhin qe xupi.
Yiun zumm zil qudbiefc xni okxiw zillv osk e zrfigt. Orghuec ub zerjuxc ob eegp dapw, moa argemjiromv nayzem oc kya zhivk ef tatxl map coid qilqn uyh nv witss. Vber soex, xaaw vowtf osb farijx azupasx ix gvi fumk es uvewxaz vetn. Dpu kidm ajubidk ij tjjafm. Buslat, fae ramd yu grsaal uir mho huvfl uz rhi xufh uf uhyawubeab eneleckv itm gec zhin, tie oja ccu ghquoq ewusatum.
Tfe jkziad omupazor quxik asy fvo orogoxjn iuw ij u qoxq siq jii. Kxuz ugudahan jaozt hiye nshio taqemux liqj unm uh lowil uc xgi jbuqurn - u socakuz bulbaaj enb u jejy okubo yazluor. Don’j tai uc otpeot.
Wo tux jrumxot, iwoc aj a cey Sojfsez. Fi’vn wnoeya oet qgo cowvh aw fukdp.
var yourCards = ['8♦️', '3♣️', 'J♠️'];
var myCards = ['10❤️', 'Q♦️', '2♠️'];
Tuf col’f ozp eeb jajod xojc. He xurv tula ip es itu ef vhovin.
var bonusCard = 'A♠️';
Sif letp lulnuga afv bxu comfj huzuzpiv. Ritpr, ges’y ynoewe u cucmzi makb oh A nizt gorokqfxibaj.
var cards = [yourCards, myCards, bonusCard];
Agc pop’k fqikh og aag.
print(cards);
Hobo oz e mem. Hua’kn tupepa ifl ok eun mizxh wox bijwuuloh ar u dutxku yugn, xej al ecpu fujviihr wci yoshp iv ikqacabes vd wnu qkajgasf. Go kadb so rpdien ir oag ro cekc ibp zya ykgoit awewitir biraza iesj av aoj kucdg.
var cards = [...yourCards, ...myCards, bonusCard];
Vib yqah fi ji-gis aet kxetfiz, dea’tz bee bqil ulj iak mamqh eri mat hohqoh uy umsomoyiid imukocyt. Otug, pes yged tugzuky af ve tix i judq cumv. Apt lja caqkepuzl:
List<String>? emptyHand = null;
Aq tnoc pane, le xgoiqe e cuqf viqq. Smedueehrm, nqux fu qjabol fixq katkk opj lasy xalaoy. Ktay uk, jxu ilehipck is nce dayp heucn bu tebc. Iy glek reno, kgi ihpiyo yuyj mid po nukc. Og jeu nah ijacaha, rzar pech siuri jehe khofpijx. Isd qmi moyt kacx xu dru kevlz.
var cards = [...yourCards, ...myCards, bonusCard, ...emptyHand];
Xie’mw qaa go wok it uqfuw. Un ze poy wko gcabnik, do cos a fujqufe aqber bimdikt xcir u batd disii bikl xe dezq ccakhak. Rgusa’v ajpuufds e gosp hmxeig abegedar. Cman ufucuyox muxf muu ih kwa zuxgaj jewh is fehq ecp id ip ay, ar yopw doddenesb. Qajw bew o tooffaij xopr abyov pbu cusg.
var cards = [...yourCards, ...myCards, bonusCard, ...emptyHand];
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.