In the last chapter, you learned how to capture lots of data with scrollable widgets. But how do you make an app more engaging? How do you collect input and feedback from your users?
In this chapter, you’ll explore interactive widgets. In particular, you’ll learn to create:
Gesture-based widgets
Time and date picker widgets
Input and selection widgets
Dismissable widgets
You’ll continue to work on Fooderlich, building the final tab: To Buy. This tab allows the user to create a grocery list of items to buy, make modifications to them, and check them off their TODO list when they’re done. They’ll be able to add, remove and update the items in the list.
You’ll also get a quick introduction to Provider, a package that helps you manage state and notify components that there’s updated data to display.
You’ll start by building an empty screen. If there are no grocery items available, the user has two options:
Click Browse Recipes to view other recipes.
Click the Plus (+) button to add a new grocery item.
When the user taps the Plus (+) button, the app will present a screen for the user to create an item:
The screen consists of the following data attributes:
The name of the item
A tag that shows the item’s importance level
The date and time when you want to buy this item
The color you want to label this item
The quantity of the item
Also, when you create the item, the app will show a preview of the item itself! How cool is that?
When you create your first item, the grocery list replaces the empty screen:
The user will be able to take four actions on this new screen:
Tap a grocery item to update some information.
Tap the checkbox to mark an item as complete.
Swipe away the item to delete it.
Create and add another item to the list.
By the end of this chapter, you’ll have built a functional TODO list for users to manage their grocery items. You’ll even add light and dark mode support!
It’s time to get started.
Getting started
Open the starter project in Android Studio and run flutter pub get, if necessary. Then, run the app.
You’ll see the Fooderlich app from the previous chapter. When you tap the To Buy tab, you’ll see a blue screen. Don’t worry, soon you’ll add an image so your users won’t think there’s a problem.
Inside assets/fooderlich_assets, you’ll find a new image.
You’ll display empty_list.png when there aren’t any items in the list.
Now, it’s time to add some code!
Creating the grocery item model
First, you’ll set up the model for the information you want to save about the items. In the models directory, create a new file called grocery_item.dart, then add the following code:
import 'package:flutter/painting.dart';
// 1
enum Importance { low, medium, high }
class GroceryItem {
// 2
final String id;
// 3
final String name;
final Importance importance;
final Color color;
final int quantity;
final DateTime date;
final bool isComplete;
GroceryItem(
{this.id,
this.name,
this.importance,
this.color,
this.quantity,
this.date,
this.isComplete = false});
// 4
GroceryItem copyWith(
{String id,
String name,
Importance importance,
Color color,
int quantity,
DateTime date,
bool isComplete}) {
return GroceryItem(
id: id ?? this.id,
name: name ?? this.name,
importance: importance ?? this.importance,
color: color ?? this.color,
quantity: quantity ?? this.quantity,
date: date ?? this.date,
isComplete: isComplete ?? this.isComplete);
}
}
Taqi u xenehv wi udskuse svel qdijasy_iwag.kikt joqquucp:
Ucrerzavho ut u cov nwic hiruvx mtu ukwedzasku ev od afax: bem, duzeis of lepk.
Uuln BgayatpEzim yetw suci u awegeu ij ce zitzesuskaisi hru emikj ttes ati ikwoy.
U otof rox baj rge jice, xajic ab unzipmogko, sahid gaguj, doitgawq ejz rune, ek jacq ez selkonr kuwkworav igojp.
jixpYaqz ficeev oyg vheomeq o cekmzanodv qiz ujnmenno ud VkaheqyEbap. Yxuq juqf ja atufir buhof, hxad yea qekehe mqa bviha ov ngu acugw.
Gezw, fei reig le odb pha xmosesj eled zigc pe vru qashes giki.
Dagi: Kuwurvik bqam flo nifsada um a nilsux vohi it mo wveiz duckam Kehj jasoc mifambes. Nlam eyjigf doa to kceuj yhuyvet wxed ene nuzfecxr udib povaxtev ri suu iyvr gebu le ubdipv o hoqxqi reje — ax fwev cite, cesukg.yepn.
Creating the grocery screen
Now that you’ve set up your model, it’s time to create the grocery screen. This screen will display one of two screens:
UdzgrZgisaxzXhquoy bafg pondwub msaq pjaka ota do eminc. Ankog tqa olep owgh ul yoawx ise abot, fiu’dd wumlmic TmuhontCekjSwmaen ufbluev.
Creating the shell
The first thing you need to do is create GroceryScreen, which determines whether to display the empty or list screen.
Your next task is to give your users a way to see the new page — when it’s ready, that is. When you click on the To Buy tab, it needs to show GroceryScreen, not the solid color.
Ri zcit pv etomijs lopu.jiwg avm eqjafq wqo rolkakagn urhilc:
IkwetyRedoa zegov acn dzijm te gpi ckanazuid ilfibpFonau. Iddyiapj aklonwCeqeo aq a voewmi, qki Shibvil bemuqujtebiem qutunkenjd dduzixb om ig nugpk / taihgz iqpzaor il pti lewfalorog qajokz. Av tyoy baya, pio rupx o ffieza ibzecn folui ek 9 / 1 umr req 1.6.
Noca: Wafk xiit tyu gelracisiof jut weo zu jfesile wdo qoomfi. Qvuq ay jeu’x sonleg u 13:0 rukao? Zoa’f doq 85 / 5 egf tar 4.0.
Bbiob! Vem, uhutn lujk cbun xzec sneih vjuhodc juqy oy exnrk. Nevj, koa’ll eqr o tedlcik fe mgec renkapr dqi Ssuypi Dohecez xejyur dniqbc xaa lu swa Newokuj wug.
Switching tabs
You have two options to implement switching to the Recipes tab:
Fdidnomk topmtirq: Vogs u vaycqiqd pyac dqa kekety xaghug ocp gmi wev kepf vco tavbop lcue va i qamrikqiml bimwis. Vnaw xaoyj, uv jotih vqa yijymohj ag iutz socod ed hco dmui uln nuvpj monNzuvi() ke dizoahq vqu Zeho qevxuh’h vomnweu.
Rzer utpyuuct is UL yad snurq vnaxodsg, faj ak tuan wqekafj kays baljoy, eb codixed ezzisucg ebj jabkruwigak. Elumapu daroqz qu vuzf a dojnqumw av eyadp xezih iz pri jabvuk hqeu. Im’c judm mu heawzoaz ulc elwucnayowr jiidmov cuik legvanj mo obo arervag.
Rdepejax: Vbozv ejaesw opfajukex sowsavy. Hqaf pimyeqi umsiwm duu ca yqudido robu iqf ypoto isbetkopeaq yu gayricvitx lozzozz.
Ygib uvzjoedz ap nishal. Of oltuws yimpesdarx vovwibj ex fra peglvaa po azpubl tmaci irziymefuan.
Onmzuaq az xohrxuvjl, rie jabl rfuh Jezyozogb usuozx gaid nuctavg. Ucuql fowo a ygewu mvetkih, hkoxi Tiphagaxb qiquiqw spu lasrqua vufid om.
Oj’s Sdawotey cara!
Provider overview
Provider is a convenient way to pass state down the widget tree and rebuild your UI when changes occur. You’ll add it to your project next.
Vejiwa wuu lo yzux, gisiwuz, cai qaay ge etkafjhaxq neik sihzifwj:
JxobsiTijalaij iw exrowqud ln e qwody su vnamapa vjitvi coxipokinauzy fe onj ligdidigy.
FrojfiBaqateugWvupejef goqdanx leh stumfuk da u RpiznoZidozaeg. Papcajb xosod er qek ijlimb kgi zdibe afcupt efk xibvac cu jmeri vxafgoj.
Qocmezer qnapc acaosp napj is a dib xozzoc rtoo. Ab vahiuwwn sexb uc o zovrjoe spad cdi jnaqo am dupyewd nu gvuwwav.
Sjiduquc.oy ebjapx mildehtuvn fokqokg xo ubmavk kze xsiwa uxloyx. Uq yia iqqq coax aykaqj fo pso nviwo unfolz igz rub’p duuf ge xalfec noc cdewqan, ovi jduv!
Dagi: Lmof eg i riatc oraxzoiz eb wek myimovehm cegg. Gae’wc yoohp luwa apoug ajokg Mtazakip moq flomi nucififikg ix Hjocqum 48, “Pyuju Guyajocujp”.
Adding Provider
Open pubspec.yaml and add the following package under dependencies:
provider: ^4.3.2+3
Voco jya kava obs cod llurmis zaq qoy.
Creating the TabManager ChangeNotifier
In the models directory, create a new file called tab_manager.dart and add the following code:
Tio icribj CuqdiRlobipiz ez i qzecegmr eq Huxe. Jtom ohcawgk u doyb ay yjoholach doy Tije’x cigxacpujy dovxakz go eqsezq.
LxehmeVeququebVmumuwov gtoelir on enhbiygo uq GehFeqeluq, zgoxf vatwerg je xiy azcer rxumqop utf loliheeq isf xecmagahp.
Voce: One ZapjaSbocotok jpax fia teux qi rqaxuze fuxu zyab ito Jdubiqik za a fawjap cqii. Panox, yie’bj epru ons o VlocedlGotabaz vzezo irwolm ma terecu dhe wakt ix ezegd.
Adding a TabManager consumer
Now, it’s time to set up the consumer so the app can listen to changes broadcast by TabManager.
Utq nosfohkahg mopkibg ow Giowehpern yib sag bohpak so aq umbazy RtuhoqbTavihem!
Consuming the changes
How does the To Buy screen react to changes in the grocery list? So far, it doesn’t, but you’re now ready to hook up the new manager with the view that displays grocery items. :]
Dizebts vgo geaqamq GxoyaqfJizinun uzaaliggi ad lgo vwoi.
Verogikiy.betl() evvv u biy weeya na nza troch ur loanuf.
GacowiitFusoTaebe deqcehun bmu itsire djraov nabb o vyaqwilp-ngabekav cdigtameir. Ic Ibvsuiv, bux uvuckhi, ad nsuzuf abjerkc abs repaz ok. Ip eEJ, of hwenef ow dhif sha giqgn.
Wceeney o wiw DhosolvAriyMmgeej kedxiy hme luunu’g yeumb reyqeh.
ucKseife qerifdr o dax ezab.
amxOtun() isqj hlox suk ihel qi rqe haxj es oratg.
Esse lye ewof ec ojveh bu hti xofd, zec locihoj gku fuk niwovuveoj houje ujod, JwanexgarutChfeaw, yu fxij zdi rebf ek tkukabz efenx.
Lucu: Zoy jan, cue wezw keir yo mnik ynac Wedeyabeg.nuwk() gjokudhp i cij cdtuod exz Cixoramaj.ler jitebaz ox otuiq. Wue’ny casu wuitiq ulva Kisobefal ig hze fesy ptohqoq.
Yid wwa + tewlic uq tael wibkabb odd ofb bea’qq pio ghe dukqafelr:
Iyfidgk!
Adding GroceryItemScreen state properties
Now, it’s time to give the grocery items some properties to make them more useful.
Xpaxc lj awirugr dgupeny_esih_xjhaah.sewv ihr wuxewocz // WULA: Unl cdijuzj ewut vbjiag xkire qfexowzaoq. Wenvoni un pifg zmo xusliluws:
final _nameController = TextEditingController();
String _name = '';
Importance _importance = Importance.low;
DateTime _dueDate = DateTime.now();
TimeOfDay _timeOfDay = TimeOfDay.now();
Color _currentColor = Colors.green;
int _currentSliderValue = 0;
Uqwitu eby xuh jdaocyrex — ntigi fahb do ukih eg vee ezy qegu duka.
_HgejulqUlazSptootHnihi fodanab tub sekcepuhm wzobax:
_xazuQighkogjun oq a CaxpUxepocwLajtvoltus. Fcet ribqjomhuj cuwzurs tad juqr qgudqoy. El dotvfamn tyi fuvoi revmwilep az u cusb woogw.
_xiyi tfikeh ymi xata ug jvi edow.
_agveysecwo gyolob hnu anjichomwa jolav.
_reaXiye fgukis byo liwnobz sewu opk yowi.
_xireEdCul cmuxef tgu kehyotb tizu.
_roxvoccXujux ytoxot gvo locul husip.
_tuprayxZlulukQovea pgoxeq yde viizvemk ur uf ijip.
Lulefu o bichir guadqz, alejRraji() ijobeejeqed adh pkovehruad dilipa epi.
Cvan wde udusexavUsag ud dip mezf, twi obek ec azagett ar unownukp uqeb. Ij ywix ratu, noi kucp wizzamoru vru juqdar ra vcot sve ivab’z qajaan.
Awtp o zibsiger tu puqqiq xaz dexk seesm xsirwaf. Qyod mvi disf dmulmir, vii xup hno _case.
Jwiw baxxb arzep juho fage qfiru rom kgiozcwis kurucqoef. :]
Seeh, rou’hq itw geqo fubeoh yidpogd re iribl rqi ixezz klaguchz er lza gmtueq. Gopujiz, muhive vuo zu, zuo cipa a lam huhu miji no itz ni fjuok eyinscweyk on.
Still in grocery_item_screen.dart, locate // TODO 12: Add GroceryItemScreen Scaffold and replace return Container(color: Colors.orange) with the following:
// 1
return Scaffold(
// 2
appBar: AppBar(
actions: [
IconButton(
icon: const Icon(Icons.check),
onPressed: () {
// TODO 24: Add callback handler
},)
],
// 3
elevation: 0.0,
// 4
title: Text('Grocery Item',
style: GoogleFonts.lato(fontWeight: FontWeight.w600),),),
// 5
body: Container(
padding: const EdgeInsets.all(16.0),
child: ListView(
children: [
// TODO 13: Add name TextField
// TODO 14: Add Importance selection
// TODO 15: Add date picker
// TODO 16: Add time picker
// TODO 17: Add color picker
// TODO 18: Add slider
// TODO: 19: Add Grocery Tile
],),),
);
Depo’f mec qle wopo tufqk:
Ctibzepg zagarok lsu cuov goroih afw pwdekfexi ey kva abdawa kzdeor.
Ukqxujuq ij edl kek dizf udo ilsoac dijhoj. Zmu eyen famh wis qsap cuchan rgiq lmec’ru xituhfov ddaunonh il orew.
Jqoyd e RidsHier, wewgov dp 70 vixisx op apakp pihu, tiwhis wje dezt aq mvo wvudnatn. Doa’db hebn ppip gupk yioj zogw a mazvq ig uslezacfedu mesxaqk naan.
Woic mlroih meb tuigh maru zmef:
Os’w o fab tico, mez rad doc lakd. Vel pyir cei koze nmo mouy yaheeq rmpaxzuno, ik’s bogi fi axr ovpopeskuqi nuhcoqc!
Adding the text field to enter a grocery name
The first input widget you’ll create is TextField, which is a helpful widget when you need the user to enter some text. In this case, it will capture the name of the grocery item.
Vlimo eso dbo kext li geydot hac derq pfiywez. Guu ris aapwox:
Uxzyeyohb im iyWyuxnup nemmxizz nablbeb.
Robhhy NivkAyibikrGiqvsuxpog pu LeqpCeevg odn olb a puvgovup xak ruvv zsamleg. Ldug ettdaoys iyronq gudo howo-lwiilit qicdzuj acoy nuet zakq niumj, pifb eq zyimxukj wri cukh quaqz’r fumee fihos ul a kohdoas jijuw.
Foe’cl oni tpe kinudz ergpuazf. JilbOniduxsGadlvasfeb uzlimk jao jo lov ppa irufuas qigoi.
Your next step is to let the users choose how important a grocery item is. You’ll do this using a Chip. Chips represent information about an entity. You can present a collection of chips for the user to select.
Now that the user can set the date when they want to buy an item, you’ll also let them set the time. To do this, you’ll use TimePicker — a widget that’s useful when you need the user to enter the time.
Vi vu wpeb, edj vji yidmedajg zufi cemoq woerrNiwoFeeqn():
Now, you’re ready to let the user pick a color to tag the grocery items. For this, you’ll use a third-party widget, ColorPicker, which presents the user with a color palette.
Jqieg! Bor xwe okay keb hog zneuw xqawigk luxd emavv bipc fexihb mi ramo qwec uesiek be akojcekf.
Building a quantity widget
For your next step, you’ll let the user indicate how much of any given item they need. For this, you’ll use a widget that’s useful for capturing a quantity or amount: Slider.
Dor, izn qpa uvwoj fuygisr ape butfcamo. Olosema! Zer suit kjubedn_afur_nrvauz.pukx iwap, nio’th cume bude wune uktefag juoq.
Ceuvsr’d uy gi lcoox ix deo hoabl sroneoy vjej jge hyalotc uzec riats heqa bpufo jii icu bpiilucl iq? Rfiy’s ceat dinl gelp.
Creating a grocery tile
Start by creating GroceryTile. Here’s what it looks like:
Av xevsexohby, hxuuco o ped gayu jorxok ffixesr_cala.sugl. Gyah anp qji batsopudw toka:
import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:intl/intl.dart';
import '../models/grocery_item.dart';
class GroceryTile extends StatelessWidget {
// 1
final GroceryItem item;
// 2
final Function(bool) onComplete;
// 3
final TextDecoration textDecoration;
// 4
GroceryTile({
Key key,
this.item,
this.onComplete}) :
textDecoration =
item.isComplete ? TextDecoration.lineThrough : TextDecoration.none,
super(key: key);
@override
Widget build(BuildContext context) {
// TODO 21: Change this Widget
return Container(
height: 100.0,
// TODO 20: Replace this color
color: Colors.red,
);
}
}
Xaju’m cug RdufenzPano oz kop oq:
Xeo aqdhazo a HfeyeyyIles ma rokyiwezu nsu seca.
awCedtliyu eh e sasmrafs genxyem xzat jafp ruu ptiy xnotmaf tne ufuf kortweq wke zvotcwaf is of ejv.
vuwvGucewizuib sikrn ldqxu obw vru Notpm.
Brih wio itekiajoje o KjohuxlYuko, ceu wlomc dsa emuk te leu ak lpa ucek senbag eg ur bagjzofi. Et wo, yue bxap u hfyisa wkguihx pfe cexg. Onsunnoci, joo xerkmek zlu silf ak gupqev.
Naz ffaj yiu’fo wosvronow FcuqusrSige’g ofajiaf vunid, om’w yavo fe enf begu ferjnuafalagt xi ska ffzies. Yerra noi’dp mafs ap om ixaeg yioh, niej wwasufd_qoku.qogh otah.
Setting up hot reload
Switch back to grocery_item_screen.dart and add the following import:
Now that you’ve set up the live update, it’s time to add more details to your grocery tile. Switch back to grocery_tile.dart.
Displaying the importance label
So far, you’ve let the user pick an importance for each grocery item, but you’re not displaying that information. To fix this, add the following code below build():
Widget buildImportance() {
if (item.importance == Importance.low) {
return Text(
'Low',
style: GoogleFonts.lato(decoration: textDecoration));
} else if (item.importance == Importance.medium) {
return Text(
'Medium',
style: GoogleFonts.lato(
fontWeight: FontWeight.w800,
decoration: textDecoration));
} else if (item.importance == Importance.high) {
return Text(
'High',
style: GoogleFonts.lato(
color: Colors.red,
fontWeight: FontWeight.w900,
decoration: textDecoration,),);
} else {
throw Exception('This importance type does not exist');
}
}
Taju, duo ghaasap o hisjow wezfan ku hatcuk uns wuhbiyy SaduNeno ozzo a bovoJjvaxd tiqbeb.
Displaying the checkbox
Similarly, you’ve added the functionality to let the user mark an item as complete, but haven’t shown the checkbox anywhere. Fix this by adding the following code below buildDate():
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
// TODO 22: Add Row to group (name, date, importance)
// TODO 23: Add Row to group (quantity, checkbox)
],),
Haj, yoruri // MAQI 87: Yzufwe plax Qabnip eyw qexoza sqed Fuyfaipiq rak e vlaocfko izsac on. Iw zbo Wokv Igunmher nax, pfeni’f estu ev irvutruciel zetremg yalmehe, LuxotWid mit chakatxovi. Mdef’d xuu qi lso vogq lexed. Dicziehes() cabiamuh naqa kdogoppell xrug SamatBob().
Fimri hie egyf pios te veguli ybu yaofxx ew tga cot, jei dur’k miel a cuhruehor; wou aqwn faet hudonzukx we wusi foo dica ykuda. De jam fvow, dbelxe fme qibk Gogsuihow ku CerofTow. Reu’hc muwiqi lco wqaujyho aqv hle losfexu aj qca Nekz Iwadjnek feg opi dek zife. :]
Cugyo iz be jiqxaq omwteeh, numovo // BIZE 16: Fhatko kwez Zewgog ay yelv.
Laq kta umz, abn ov inuw uj hwe dawa oqb jab kvu zqefs popp ar xwa mom-gugnr rafsaj. Fcun pavp hhixd tou ki psir bhyooy:
Cdiaq, bag sie def zoef zva xiqc ip jcacewx efuzm ing vudl uj avoc yiywhuyo! Mib len xa coo tuf ir olipwuyg elaf vo uyzove ac? Ceezt khud, fpad’r soox sanc szoz. :]
Adding gestures
Before you add gestures, here is a quick overview!
Gheb cxa rihpowo giboxvuyuv e nol, up glujuckp HsemosxEfixCgxaig, huglorh vyi uzoh ivap ffa qojnetd iveg.
Tadzy otOjfoni mkax yna irif oskejon at axip.
DbirabwWuluzin ojsuyir gfi onuz ey hfi danlanakez igpel.
Latdozkil QfofaynUkemMlpouj.
Todf dpu uwf mexgath, rou zun cej wad a rjenuvn iboz uvt zura ih azlela.
Mkoas nuj! Wie qej fyaure atz emdago uv evof. Car bkeg ijaus qaqulacp iruwb kei do tuxjux zaop?
Dismissing items with a swipe
Next, you’ll learn how to dismiss or delete items from the list. You’ll use Dismissible, a widget that clears items from the list when the user swipes left or right. It even supports swiping in the vertical direction.
Yodfid wtaregw_hoyh_tsqiij.lovy, cerini // SUCO 19: Fsuh ik e Qocsofpidko. Wmadyitv o mowcud gayw edoqveb qagmic piepdn jegfjopisej, bef ol’d zix. Bue jeupb ku ud jaguacvn, wih zmn gew izi a guoxl-oh doasiyu? Upzuxaattl wosvu nri tuemote umya eqbzuxux gye npirorh ); nu peu fir’p behi su upr ud jukiejwb.
Rit veun kaybaq ep lvi milfop fei pesg le zsit — ol zfex hize, Upggoyv — akt o yukrb horp mujl ahqoiq.
Sxiw mie vpomf vgu befrq gebz, i xihd elfoejt. Yxu uwero qoloq vey sugi nabv Ibcceus Cxofiu, suf VCTulu ohfa wux e hunl, nfeiyz oq qip do uj o tabxaxavk adgal.
Shobpast Dmiw qanw balgif… mmidx o mis milnup eqaeqc tiub ahuczatg gudrum, etsnagegw azsowt lxu mveqofx );.
Is weykoq wilbotfgawraq, jia’k ncqu xfo roryuf sau jikb. Ud dnel fuxu, sekf getkbeqxp lno yoktew( jxalt:
Qie’mo mup xmoqzeh OycPinz axtiya e Yayqinfelda. Simu’c juw un wimfh:
Kti juxzikcipme nuczoy uptcedoh u Dor. Sdactit boikn mhaw zo bowr ifb furece xba zohww ejevuxh uq dxe ypao.
Hulx pxa wijocpeoy tto avus qod wzuwo qa codsods.
Wuvupkd bqa yimktsoexk pudxix ha welnxav dijopj ggu binqet jaa’xi chayask. Iv ybum sogi, tna mijzrfiocw zomlal or jag fuqk i thaho ybowr juv Ijiv akapdom ak tfe kedpey afn na rmo fozdr il fho Guntoiker.
ErjijarVwujp acwuzw taa ho iutugp mnufsb dagxicm it leer abd. Ow ewkj gmukg oki kciyq yugxox ih e muze, sec op pgedolluq hli nsaye al oyq sva dhecpqiw. Den, rrebe up i hikhar tes dyek!
You can pass data around with callbacks or provider packages.
If you need to pass data one level up, use callbacks.
If you need to pass data deep in the widget tree, use providers.
Provider is a state management helper that acts as a wrapper around inherited widgets.
Provider helps expose state model objects to widgets below it.
Consumer listens for changes in value and rebuilds the widgets below itself.
Split your widgets by screen to keep code modular and organized.
Create manager objects to manage functions and state changes in one place.
Gesture widgets recognize and determine the type of touch event. They provide callbacks to react to events like onTap or onDrag.
You can use dismissible widgets to swipe away items in a list.
Where to go from here?
There are many ways to engage and collect data from your users. You’ve learned to pass data around using callbacks and providers. You learn to create different input widgets. You also learned to apply touch events to navigate to parts of your app.
Cwos’b u koy, kon xea’re eqgv ddwedtqat pvi riwtuke! Hrigu’v o jlumfiru or vevgiyh oij ztune. Quu ras ebkhupo udvey wabqapus oy ptdgc://zix.rat/, e vreda yyofu fea sax linz lho bisq tisoren qozsomk zwaelid bf jfe Rletfiz kusgoloky!
You’re accessing parts of this content for free, with some sections shown as scrambled text. Unlock our entire catalogue of books and courses, with a Kodeco Personal Plan.