Skip to content

Commit

Permalink
'view as list/card' icon not appearing in settings
Browse files Browse the repository at this point in the history
  • Loading branch information
apoleon33 committed Jan 4, 2024
1 parent ba334ac commit a53e209
Showing 1 changed file with 14 additions and 18 deletions.
32 changes: 14 additions & 18 deletions lib/route/home.dart
Original file line number Diff line number Diff line change
Expand Up @@ -73,38 +73,34 @@ class _MyHomePageState extends State<MyHomePage> {

return Scaffold(
appBar: AppBar(
// TRY THIS: Try changing the color here to a specific color (to
// Colors.amber, perhaps?) and trigger a hot reload to see the AppBar
// change color while the other colors stay the same.
backgroundColor: Theme.of(context).colorScheme.surface,
// Here we take the value from the MyHomePage object that was created by
// the App.build method, and use it to set our appbar title.
title: Align(
alignment: Alignment.centerLeft,
child: Text(
widget.title,
style: const TextStyle(fontFamily: 'Cloister', fontSize: 24.0),
)),

actions: [
IconButton(
onPressed: () {
setState(() {
isCard = !isCard;
});
},
icon: (!isCard)
? const Icon(Icons.view_list)
: const Icon(Icons.grid_view))
],
actions: (indexPage == 0)
? [
IconButton(
onPressed: () {
setState(() {
isCard = !isCard;
});
},
icon: (!isCard)
? const Icon(Icons.view_list)
: const Icon(Icons.grid_view))
]
: [],
),
body: SingleChildScrollView(
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
albumCards,
[Settings()]
[const Settings()]
][indexPage],
),
),
Expand Down

0 comments on commit a53e209

Please sign in to comment.