1
0
mirror of https://github.com/flutter/samples.git synced 2026-05-19 05:18:30 +00:00
This commit is contained in:
Brett Morgan
2022-05-11 12:48:11 -07:00
committed by GitHub
parent fb00d0a102
commit ccd68f34e2
242 changed files with 1719 additions and 1430 deletions

View File

@@ -13,10 +13,10 @@ class PlaceList extends StatefulWidget {
const PlaceList({Key? key}) : super(key: key);
@override
PlaceListState createState() => PlaceListState();
State<PlaceList> createState() => _PlaceListState();
}
class PlaceListState extends State<PlaceList> {
class _PlaceListState extends State<PlaceList> {
final ScrollController _scrollController = ScrollController();
@override
@@ -77,16 +77,16 @@ class _CategoryButton extends StatelessWidget {
@override
Widget build(BuildContext context) {
late String _buttonText;
late String buttonText;
switch (category) {
case PlaceCategory.favorite:
_buttonText = 'Favorites';
buttonText = 'Favorites';
break;
case PlaceCategory.visited:
_buttonText = 'Visited';
buttonText = 'Visited';
break;
case PlaceCategory.wantToGo:
_buttonText = 'Want To Go';
buttonText = 'Want To Go';
}
return Container(
@@ -102,7 +102,7 @@ class _CategoryButton extends StatelessWidget {
height: 50.0,
child: TextButton(
child: Text(
_buttonText,
buttonText,
style: TextStyle(
fontSize: selected ? 20.0 : 18.0,
color: selected ? Colors.blue : Colors.black87,