September 2019
Beginner
512 pages
12h 52m
English
The first step to make our app interactive is to change FavorsPage to be a StatefulWidget:
class FavorsPage extends StatefulWidget { FavorsPage({ Key key, }) : super(key: key); @override State<StatefulWidget> createState() => FavorsPageState();}
The first thing we change is the ancestor of FavorsPage, and now its only job is to return a FavorsPageState instance in the createState() method:
class FavorsPageState extends State<FavorsPage> { // using mock values from mock_favors dart file for now List<Favor> pendingAnswerFavors; List<Favor> acceptedFavors; List<Favor> completedFavors; List<Favor> refusedFavors; @override void initState() { super.initState(); pendingAnswerFavors = List(); acceptedFavors = List(); ...Read now
Unlock full access