mirror of
https://github.com/flutter/samples.git
synced 2026-05-19 05:18:30 +00:00
Beta (#1234)
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user