feat : Change second row on right column to stacked in the bottom + Tap options
This commit is contained in:
@@ -19,13 +19,16 @@ class HomeView extends StackedView<HomeViewModel> {
|
||||
body: ListView.builder(
|
||||
itemCount: viewModel.events.length,
|
||||
itemBuilder: (context, index) {
|
||||
return Container(
|
||||
margin: const EdgeInsets.all(8),
|
||||
decoration: BoxDecoration(
|
||||
color: Theme.of(context).colorScheme.primary,
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
),
|
||||
child:
|
||||
return InkWell(
|
||||
onTap: () => viewModel.onEventTap(index),
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
child: Container(
|
||||
margin: const EdgeInsets.all(8),
|
||||
decoration: BoxDecoration(
|
||||
color: Theme.of(context).colorScheme.primary,
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
),
|
||||
child:
|
||||
IntrinsicHeight(
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
@@ -56,7 +59,8 @@ class HomeView extends StackedView<HomeViewModel> {
|
||||
margin: const EdgeInsets.all(8),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
|
||||
children: [
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
@@ -79,15 +83,24 @@ class HomeView extends StackedView<HomeViewModel> {
|
||||
],
|
||||
),
|
||||
IconButton(
|
||||
icon: const Icon(Icons.favorite_border),
|
||||
icon: Icon(
|
||||
viewModel.events[index].isFavorite
|
||||
? Icons.favorite
|
||||
: Icons.favorite_border,
|
||||
color: viewModel.events[index].isFavorite
|
||||
? Colors.red
|
||||
: null,
|
||||
),
|
||||
iconSize: 35,
|
||||
onPressed: () {
|
||||
// Handle more options
|
||||
viewModel.toggleFavorite(index);
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
crossAxisAlignment: CrossAxisAlignment.end,
|
||||
children: [
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
@@ -104,13 +117,13 @@ class HomeView extends StackedView<HomeViewModel> {
|
||||
),
|
||||
IconButton(
|
||||
icon: const Icon(Icons.place),
|
||||
iconSize: 35,
|
||||
onPressed: () {
|
||||
// Handle favorite action
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -118,6 +131,7 @@ class HomeView extends StackedView<HomeViewModel> {
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user