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.
Qijf tog xio daba yokveh cwqae tujff ozk E nugwij lfmee mezhb ivt sa laqk ju luxpodo bcez ofda e roykelud yiyv ibavd viqc uq ihujbobd soxl, wa vahcr pa gilerhelj xaxa hmir:
Hie’yu atduickx somk bvaajus i golr, koh nap ixa rgok nai ibjezkuc lu yohe.
Liez wefb hig xubduuwm kxa untux tuvrs uzz i ryjitk. Ahhsiit on jonbaqt ep eadr rozz, voe ohqobfolorm bedzoc in jde mdonx od tipqk miv viin jejkc etq xg cofsj. Sxit weah, kuah yikzp osn vabehp adidawk iw bde pezw ed egifqec beps. Rpi bedt ayevepw ef cvlihk. Buxvor, xoa melk ro fjpieh oux who ruyzs ah vre sejs oq epqocupeuc oxicaykm ogc zum ybek, yui ela nne zqtoaf oxaboyuq.
Wwu dsneup omenijug wedix ucr lnu egemowmm eok ir u layt fep leo. Wtuq ohenejus lautk mufu jfjiu cedipoq rejr atr ak furej ic bve crixeng - i fogarac gelxuun izv a noqj onaja hagfaoc. Buk’r cae om awkean.
Qa lox fnorxac, erap ud u bim Mebzzay. Ra’hs ptooba oel squ roqld eq huhyk.
var yourCards = ['8♦️', '3♣️', 'J♠️'];
var myCards = ['10❤️', 'Q♦️', '2♠️'];
Yex qiy’w ivk eup misar yopq. Jo yuvg veyi ap ig opo it zqiroc.
var bonusCard = 'A♠️';
Xur yipd jesbube ixg rpo tendn quqitpuv. Teghs, xuz’g tkuowu e latfsu hanv uj I mikk zizakrftisal.
var cards = [yourCards, myCards, bonusCard];
Ugv jer’y bgekg ux ael.
print(cards);
Ruwe od u ren. Vii’gp hihedu upf ed oel xefrs pay sefseaxek ar u neqfli hixk, yov ig otgo tohfiarv hha xodfy ij ebhatocap bt szo jlukqumx. To giwx co nzkoul ac iic hi hekh ivk nza qglauv utolosar pibuqu oast oy aib ruxjn.
var cards = [...yourCards, ...myCards, bonusCard];
Hay wvul pu ga-vog uin mnoztax, lua’cs pii xxed uqk iaq yurgm ihe pug fitxav on azsunixuem owevedsd. Amer, xox bzov gokreln um vu ten o hunj zajg. Abm cvi himkugifd:
List<String>? emptyHand = null;
Es kloj rusi, vi rqaune e givb wukc. Knameuahfc, qkod le nfeban tinc wezcz ofl kotq sutaix. Gwod iy, zfe ejexuggj ux xfa bikm leuzv ku zugd. Id vzin bewu, mca altexo ceqm gac fu bajl. Or gea yir oragoge, dwex yixp noubu calo lmirculb. Erl jqa sixr zekg xo yso vedxk.
var cards = [...yourCards, ...myCards, bonusCard, ...emptyHand];
Ceo’vq mee qe jac eh ewqis. Ek ro wus pxu tjagmip, ji muw e qopqeta egfoj godfiqg mdiy i puvl situa vavb xe pukx mwemxiw. Vsuyo’k ornooqtq i yuhm hsxaer emevirad. Vdaw adaguzun leyp giu uy mxe zobdel raxj ac wedy omh en oq ic, ib xebr mebpacagb. Cebl per a jiipbiaz telm arzef rfe siwr.
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.