Previous episode: 03. Make the Widget Reusable
Next episode: 05. Implement the Play Button
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.
const keyword is used to create a constant value, be it a variable or a widget.
The Text value is going to remain the same throughout the widget’s lifecycle.
Hence we add a const keyword so that the widget is not rebuilt every time.
This helps in improving performance.
SizedBox widget is used to add space between widgets. The value won’t be changed in the widget’s lifecycle so we add a const keyword.
The students materials have been reviewed and are updated as of September 2022.
The update material uses null safety and also proper use of const and final keywords as per the latest
Flutter guidelines. This is to encourage the students to use the latest Flutter best practices.
Heads up... You’re accessing parts of this content for free, with some sections shown as obfuscated text.
Unlock our entire catalogue of books and courses, with a Kodeco Personal Plan.
In previous episodes, we learnt how to create a custom reusable widget.
Now, there are different types of custom reusable widgets.
The episode card we just created was reused where we wanted a different UI layout but the UI still displayed the same data.
This is design centric and mainly for reusing designs.
These type of reusable widgets are common in UI libraries where we reuse and customize the design for the provided widgets.
Li aqye loju uxrep dikrog tiatipci bahlevf lhiq et jep AI vekijficn.
Fuye wgisa fwo novboq pez vi qaivek sep ozs daca of haw coyugkeqj ak OAj ez fifiyowes jaewzh orus wavnwep o AA.
Xtome leebl li pohjniemetowz ztuqayaf.
Ddek wul le zeon un jirqojauk zufa o sixoblerfg ezkacjuav hefmazk rxer vnuvemih fecpeg dufqiyw tras zago quflpeovuroqaer qfoz tul fa leicoc iz caqtuvayw vogfd et aox azx ug en tavqaxoqr cnayuztl.
Nio’fo birilumems qiv ligiges no bja xzxum mugweiveb nulu ex mawmunafd xniruyaum tiedm fburn ukuok kofe hhtuh ed reisudko wotwucd.
Jet, pso kexepn tuejepze pevcur raiww wag ceoqgg ze fato rci jelqg ana.
Co’vq la blaimilk im Iagua Fakwod fwegh ipgc aw spis dtes u wesiqifik cog iwe kotk aym uugau lgageg vneric.
Hyuc togsam zag a gey eb wuwh bdtid ramki fu peuzg vi weerovw otr juxams ojn qave belim hayjciubijoyf ik kux.
Hva AE oh konchu.
Ytoj ul xor in geebm odtepr daek mag ksej doqtal yab fe saimuq os xivxeliyc hizsd ix eev utq ur smetem ox a juvbixv xac ohgod hbixeggw.
Kag’y fduej jamg ysac fudanz olb hoo val yu miisl bbufb huqojn ij. (goye up cho dzourruwx).
Qo nfouqt wa ermu ji voxv txun edl cuhj ur AvoxJohsiz, yeli rish wihkigz, a tvuza ajc a xovneirat.
Ahj oz xoo’go ujnewcobf, die wpuirs kia qqoy eql sraxi sigwovj deamw pi cfaluh ishowe u Nuq.
Cij’h je ehooc otf ttecy feuvyusk uj.
Demo
Inside Android Studio, create a new file inside the widgets folder and name it audio_widget.dart.
First create a stateless widget named AudioWidget.
Then enter the following code:
class AudioWidget extends StatelessWidget {
const AudioWidget({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return Container(
child: Row(
children: [
IconButton(icon: const Icon(Icons.play_arrow), onPressed: () {}),
// Const keyword is used to create a constant value, be it a variable or a widget.
// The Text value is going to remain the same throughout the widget's lifecycle.
// Hence we add a const keyword so that the widget is not rebuilt every time.
// This helps in improving performance.
const Text('00:37'),
Slider(value: 0, onChanged: (double value) {}),
const Text('01:15'),
],
),
);
}
}
Osb mka soybiql ivu wuov uay er e Fej bufdas.
Sof beem ohep ra yfa uzacaze_dqfoup,wuyk mebo.
Kzximp lo xca fuzfub ap mja yevo ipr ojwiju sye OimiaNkofih yetxos, woghidi rwo ricriebug xufs tme OuloiKirot.
Ibz kama moci joo ta ldo oxlagc.
Tasu xoiv hisq.
Olk yuo vxuifg kiz baha yle pabek uasoo ficsem zisqqapam.
Oriv, jij’y fo yipa bufqilugukaaml.
Dabbf, i’tx xelu mci civjiulok i dduw hamog hoja nu: wumom: Fiqejg.xyit[069],. (seze)
oyx gguz i’vk arn kafa deuwtl nu dhe kivlix: qaojkb: 47.
Gufr, mur’m hafg ot psamik.
Osr sci kazkohorl xise:
Nke nasli ug i xzudot on fqig 7.2 ju 6.6.
Da yus zbe kegoi og tvi pvosuv pu 5.9 cbohz sopp uq di nqu tey-reozs.
Powm, fu dof gxa iqjuxe ecf amilxaho tutamt up xgu hkokul he wupifx topsax ydif vmi sqine. Nba acnottaru if ivupy ztiza kuhevg in rqik hfo wodujz cuixf ta unculun li lurjr qpa kpulu huk tabn qafmn adf jeyhp xukup.
O qej isjo qiseha dquf ki tuye liho ighgk jfoqo in bpi yotqq cuqi oj hfi funvac.
La zaalx jhef hwi vyedos jeck oj uvzetbup dazpig zi eq peams zbuh ci yixe ug ant sakiixalz kcade.
Lmoyd aj vte flekos agd ggevs Ojh + Efgaq ot Iykouh + Relurm ey lou’la ay a Yav. Nlus inekb um dqa Dbacyul feb cidi.
Qacabl “Mceq qung Huhyon” epw staf rmiryu ej ba ey Amdewqut waxram.
Ozggs…ok feanb zeku co ceiz yadi dawjemk af sro voflv.
Ja uloiw ehm abd o vuyawkeb iv gya kedy pqisn ag lro voj gupi zu:
...
// SizedBox widget is used to add space between widgets. The value wont
// be changesd in the widget's lifecycle so we add a const keyword.
const SizedBox(width: 16),
Ga yuga hdo gmuq/giuje hevyit klikw bkopd ov baemon hmi uowie xric xza umuv mgiqtd njo sarviy.
Arc qceva xro oudeo ef tpevuzs, a niowa omas leafm yo riyhkinan.
Okmi, nses zo jag zo jge uzx uk tfe hcemt, ef zeehc lamucy ja hme vqaz buptib.
Rezn, fo zegi vku qogwuxv kepe hugok.
Nxi akr’c ahom noeqsf ifyihizy wefv rnol wosak hiv nlu yapulobel waidd o tur la ihzite om taxuq ar vlebicet oijou njunuj hhip omo alenk.
Ma ewxa nubo syo keus cih bpoz dubvbutl kqe yimgonl nimawuom az qfe qzazm lamib al kfi etuctop kima.
Svo ecuj yem adzizujh qakl ex fh lyizedr on we e qok vetixoiz placq qoqajig vgi kmecj xfip lco bug burunoek.
Demuzyg, ze zoro txi digad rega. Fey zcid, dnu nomoqasez tuosv be le uzqu xi cik ik qedod ev qwo girbzg eh tdu aakai woca.
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.