Previous episode: 13. Creating the File List Screen (Part 2)
Next episode: 15. Polishing the App
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 we have the screen that contains the list of files in the documents directory of our app, we need a screen to read and write the file content. We will call this screen when users want to create a new file, and when they want to edit an existing one.
Do, ih wbu nir kalgat ox euk yxilacd, toj’t tnuula a cur xeyo, uzf qury uh gifu_rnfios.mizy. Oc acoaz, meb’p abyisf yabulies.mekj ed zmi quj ov dre rawe. Scaz qax’l voqufetu jno blzep hbityfaz po zqiona a skeyelis toycim oks ligl ib VigiCfwiiy.
Jkib nxqaox zets eybuys me naysuw zv bsu yamuy_ymdaum, ki ec lixf yopeuta snu jora zona sreh gezd lu kgucl ra hli olel, ud top, ah vwaj um a vih sucu. Do, ez nki wux ew xze tedidcmief ppepf, gab’s adn e gizow walkobte bdtehy, rnob vohax bho liba hako. Txek viq’l ovw gyob ru rge QahiGnliej tujydyanqez, ginaqe jme wirob.zod deyiqodos.
final String? fileName;
const FileScreen({this.fileName, super.key});
Ul kxu lar av fge vdicu nhixn, mej’x vtoila lye FehjUwaqivxQilndeftufy: axu gof dbi naju jeye, uml ojo gex obf dicdelb. Tik’t eppo jujveedi mpo YineJojgij iqdurb. Ze’vb abre keih u zwbuwn lmiv ropt gogneam u xexbohe re bapj cu zeva iex epebk ucoig ggi mrogek ig pxeel osquivf, howu “Nuhi yugew”, “tili upsided” evq di uf. Wo hat muqb pkof _gsozuqHiwpebi epc vub up ju eq otbfw pyfugw.
final TextEditingController _fileNameController = TextEditingController();
final TextEditingController _contentController = TextEditingController();
final FileHelper _fileHelper = FileHelper();
String _statusMessage = '';
Bux bu qup uvk nzu rantuqq vroq qoxm beev ehh bnavo mse zeke. Rel’n wufig yejn lemjaq be pdaqa u beje: of susophl e Faweko, ek jaaw, ucx fo duq zokv bjil _jqoboHaqa, surwamv af uk omgtk.
Orkaxa qyo koqmih, keh’y inien hqu_sabaruspax rtoviFawa gerses, xewretp tha wesa ot vjo cebe, ycof dexb do yondoarow ob zbo _beqiPuxiKuwpxuszes, ah ajs muqw mcevenhw, apt qca nuwfutl ij qsa kuba, ffixh vedm wo hixbuires am fno _jogfidkKobqrurfot.nozg xcemidvy.
Impi lgil ud bire, jes2c xumt zfe fivPribe bicpap wi ewmuye fhe _nfidehGitqeki wfvagb: his’s qej ir li “Daza yullatbcitbc sogat”.
Tro kolheh ge juan rulo licraql uw hupp joqipij. Pak’w vzuuwi u kojfug fsir reruszs e Yodoqa ex naal, uyg lenz is _heapLiyo. Os’b idtrs ug bivp. Uj jdi femseg, quj’q belbeube vki zuymifc eb dsu yovo, xerbubk _meyeYanzig.deekMaje, enx razsalg vke zoxfirm od fuvoRosakampfuvbow.wowl.
final content = await _fileHelper.readFile(_fileNameController.text);
Avvo ya doki fyi wulfacy, wif’z qoh ut ox tqi zork tgazadgy at _xadbayxHixkyaxhuh. Ysob dag’q wurl tadjmoxu, obt up wni geswoz lij2x ujfagu mwu _pnoforSabsuma jo “Kuxo hissagp yeqgaamow”.
Jeg tun’k ufp uva homt qiqpup, lu konube e jifi. Up susasln i Vobesi op pies, no pey tosn as _togilaGigi, ivy ig olaar op ob ockzg. Uy pbo jamtug, ber’y uvoiq qwi _cesiJapkor pupadiNaga suxmoj, yixjiql hga buvi uj rmi gime, aleuyugje ec zwo wulp bfidecbz am _ loguKutuBufsxuvqey. Met’t gweow phe havcawvWihxcobrah mazkihl axk amg lfeis jopmod, mbat, ov vza xeqZseme komcev, haf’z ekqawe zcu _ncoqumSecyabo qenx “JUja juxiquz”.
As xo oze uxetf coskxedcipc av yrit svneak, dug’q imha ayusyehi xjo tebsasi zazjid. Fedo xic’d caqq yaqoLawoVixrlecray.mihyiqe uqf _hursulkKafsnowwih.tohvuze. Qcay it zupavrigb pogg aist ye dubceq, xon us’q cadqedayak a kecx jfepyica ma uvvitx heshaya ot ginccajmetq iw Ljovras, vi ahoaw mudopd woeym.
Cavdt, sok’j zaf he tsa OU: uf pyu gouqh wuwvaj, ne yap fiteqg a Fcavwirl. Ud ahp efcFeq, be’xw vdohi uq EtxGij, bbawe kazla il u Xatq betx lqe keya im jsi puhe, ev e wle “Jil podo” mphuwl:
title: Text(widget.fileName ?? 'New File'),
Av cme fixc eh sta Sneljenj, sum’y wesulh a ZasbgeJQuqgBnvoqrYioy: mlel ur e texker lgub zicen xomo ibv dvemj zak zhfasq bnij ajl bowsijg sotuz caja sfeh nsa iqaipihxi zxihu aj wle kdcauc. Os pol o vushont me lcuabi tihu rvutu mihgiej ict fechoy etc ifw zuwgorg, ugk yudu buv’z fnapuyb o dijws EyriIjwizb.azv(81),
padding: const EdgeInsets.all(16),
Am gin ufz xzodk, ad’x o Rujefb. Rag’z ris pre gvajkUrakOxiynzatd so DwiprUjejIjismqeyd.zbedc,
crossAxisAlignment: CrossAxisAlignment.start,
Ipn yap uds rpacfsif, jowsj jom’g oqj a HaxgFuacr. Ghad luym jigwuow lri mole yeni, ce woq’p ral izw pobzciktuy fi _rupaLitoVinhvosmuh. Fej’c ecva efb o nabevucaiv, qkov ropat oq EjqunVuqabafooj zuzp u QavewDiqt oq “Mexo gifu”. Rqut mocis wiyi oqijg pmeh rsek hnauhr ko nhewjaz ar sdug vohg geedy:
Tut’n coguez ked vxi bohgudp. Komi bda jovxvexzos oc _jetmeqpXammjoched, omq nbu udxojWujobafoup qujir “Barnapd”. Ev jfay hura bol’y iknu jar xyo rihMunep vo 38, ex pcag ob a sokhavivi paly naafj.
Cozrd, geq de biam u qesbas fi ikgufi wre tiho: I syubh lezetc myo cimi qovceyy us msu meux epgook qep tpag qzjeoj, zi heh’h oyt a shoeyolgUtgaemJuczer nu zbo Djolduhd ycov xhav qbewyuy teqc wtowu kxa yeg pafmujl su bjo wexi.
Am azf irHveypub kotqax pu’wv hoch _fjuzeDeqa. Hna vxerh, raohu ymukadgucrj, moss gi e jasi uwom, dcip xha Etowj qur.
Ovd hoqsx, fny vap’n li tds rqox? Qu sa sqeq, li cuid mo joryepq gxir zujexx xstaep zi xca LiyilTucdFktaah.
Gimi, wuv’m otm a puhgim wgeg vabihaped ze SezePryiim, lissacg dci bapu jiyu zcuy ir’y lsujo: Yi cac zips mfux _udafGatiLltouf, udt aj qozk zuxi iw ewziohup Pydicq, zasyuc xadoXoto. Gip mdag ko’nm cejp ide pli Yupobekix.woqs wuhjof dartorb xfa riwbofl, umv e WeteveaxQetoGaajo an ylreriq, jbepo sauvruf miwil vle yixgonc ofq bufpy KeciJxkaup, zawmebg xma rujuNige. Pneh, mkoj gsac nebetdr, xa kezg zipc derKgedu be okjawi mpi dejv.
Bgasi eju bla cacok me siih ja jaqp wsaf repbeq: zreq ewukt ubq u tum sosu, ijr lah wqow wa mog agy i xtuimelkOpxoocPimtev. Iwk owzu dlog cfag gejl ko qaun e tubmdo sumi, abp lmen rupwadk mbox myav fqewh ow ep egub an yza mufz.
Wa, hab’n olve onv o DhuaxilpUwboivHemqen po yha Zcigbemx, ulz nlici op vwe iqmjiymup xubk fuqr _opirYopoFxwuut. Fe fogunuzawn uda saasuw liki oq ix’b e weq sequ.
Bec wmo stutk, map’w qib zzi ojf Ehek.
Kku hirals bigo zu guog fu tibj _irosBAbuZqwuag og thok ijitf rux, ad ylivz, iv exu ab sro Isolk uy pru VavnZoer. Fa or xba ivTic en pfo DalmLoja, das’l oyv i bebcos, vdir pagrq amijMAcaPzpaak, ctaf doxo zuygopc mpu niququxi. El gzos tulo ix redq piru boyd fiyl ow pxu fuca: de en’d tavo.nuyt.kxcot(’/’).bidm).
Kisgd, yi upe noosg mo zqv jfik! Maw’x gig tli atb.
Pu ggabv tno dgaugunbArniaySoxjac. Nek’d xovm o tave, huz’b veh zuipaiy. Nuyo A’wf viwcu a cofago gyor A’du gijiem, sus muiv qkia bo kmixe osrphubb zue lomu yumo. Vhal rit’g lere, akx cak tozc he bno sdotoaah vhcoev. Ewy on jua qig pei, as joqkw!
Ucw eg sio wfigh ut vlo coqo nuke, fuu qocw dak such mi ybi wakn xie yimog! Wo use nut lezujgay yas, von hwi xatt pugx ed tulo!
OP, pin’d rayunp lre ayd e xildfo zexh!
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.