September 2019
Beginner
512 pages
12h 52m
English
To turn the widget into a FormField widget, we start by creating a widget that extends the FormField class, which is a StatefulWidget with some Form facilities.
This time, let's start by checking out the new widget's associated State object. Let's do it by breaking it into parts:
// initial part of _VerificationCodeFormFieldState final TextEditingController _controller = TextEditingController(text: ""); @override void initState() { super.initState(); _controller.addListener(_controllerChanged); }
From the preceding code, you can check it has a single _controller field, which represents the controller used by the FormField widget. It must be in the State so it persists against layout changes. As you ...
Read now
Unlock full access