Skip to content

Commit

Permalink
added disable pointer and removed text in attendees
Browse files Browse the repository at this point in the history
  • Loading branch information
jomazao committed Mar 12, 2024
1 parent 281c943 commit ef24532
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 42 deletions.
83 changes: 42 additions & 41 deletions lib/src/ui/screens/event_detail_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ class EventDetailScreen extends StatelessWidget {
iconAsset: AppAssets.location,
title:
'+${event.attendeesCount} Asistirán',
subTitle: event.locationDetails,
subTitle: '',
isBigScreen: bigScreen,
onTap: () {},
isIcon: true,
Expand Down Expand Up @@ -304,7 +304,7 @@ class EventDetailItem extends StatelessWidget {
final String subTitle;
final bool isBigScreen;
final VoidCallback onTap;
final bool isIcon;
final bool isIcon; // todo(davila): do not use this

const EventDetailItem({
super.key,
Expand All @@ -321,50 +321,51 @@ class EventDetailItem extends StatelessWidget {
return MouseRegion(
cursor: SystemMouseCursors.click,
child: GestureDetector(
onTap: onTap,
child: Row(
children: [
Container(
padding: const EdgeInsets.all(10),
margin: const EdgeInsets.only(
right: 10,
top: 10,
bottom: 10,
),
child: isIcon
? const Icon(
Icons.people_outline_rounded,
size: 30.0,
color: Color.fromRGBO(86, 105, 255, 1),
)
: Image.asset(
iconAsset,
height: 30,
width: 30,
),
),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
onTap: onTap,
child: Row(
children: [
Text(
title,
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: isBigScreen ? 22 : 14,
overflow: TextOverflow.ellipsis,
Container(
padding: const EdgeInsets.all(10),
margin: const EdgeInsets.only(
right: 10,
top: 10,
bottom: 10,
),
child: isIcon
? const Icon(
Icons
.people_outline_rounded, // todo(davila): change this logic
size: 30.0,
color: Color.fromRGBO(86, 105, 255, 1),
)
: Image.asset(
iconAsset,
height: 30,
width: 30,
),
),
Text(
subTitle,
style: TextStyle(
fontSize: isBigScreen ? 16 : 10,
overflow: TextOverflow.ellipsis,
),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
title,
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: isBigScreen ? 22 : 14,
overflow: TextOverflow.ellipsis,
),
),
Text(
subTitle,
style: TextStyle(
fontSize: isBigScreen ? 16 : 10,
overflow: TextOverflow.ellipsis,
),
),
],
),
],
),
],
),
));
));
}
}
3 changes: 2 additions & 1 deletion lib/src/ui/widgets/event_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ class EventWidget extends StatelessWidget {
final notifier = context.watch<EventNotifier>();
final event = notifier.event;
return MouseRegion(
cursor: SystemMouseCursors.click,
cursor:
isDisabled ? SystemMouseCursors.forbidden : SystemMouseCursors.click,
child: GestureDetector(
onTap: () {
!isDisabled ? context.push(Routes.eventDetails, extra: event) : null;
Expand Down

0 comments on commit ef24532

Please sign in to comment.