fix: various improvements to events list

This commit is contained in:
2023-02-09 20:03:16 -05:00
parent d0d881fbbe
commit 2052e618ac
4 changed files with 111 additions and 164 deletions

View File

@@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
import 'package:furman_now/src/services/events/event.dart';
import 'package:furman_now/src/utils/theme.dart';
import 'package:furman_now/src/widgets/events/event_modal.dart';
import 'package:furman_now/src/widgets/text_with_icon.dart';
import 'package:intl/intl.dart';
class EventCard extends StatelessWidget {
@@ -33,12 +34,6 @@ class EventCard extends StatelessWidget {
context,
event,
);
// showModalBottomSheet<void>(
// context: context,
// builder: (BuildContext context) {
// return EventModal(event: event);
// }
// );
},
child: Container(
decoration: const BoxDecoration(
@@ -53,8 +48,11 @@ class EventCard extends StatelessWidget {
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(eventHour, style: furmanTextStyle(const TextStyle(fontWeight: FontWeight.w700))),
Text(eventAmPm, style: Theme.of(context).textTheme.subtitle2),
Text(eventHour, style: furmanTextStyle(TextStyle(
color: Colors.grey[800],
fontWeight: FontWeight.w700
))),
Text(eventAmPm, style: Theme.of(context).textTheme.labelMedium),
],
),
),
@@ -69,35 +67,19 @@ class EventCard extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(event.title, style: furmanTextStyle(const TextStyle(fontWeight: FontWeight.w600))),
Text(event.title, style: Theme.of(context).textTheme.titleSmall),
const SizedBox(height: 6),
RichText(text: TextSpan(
style: Theme.of(context).textTheme.subtitle2,
children: [
WidgetSpan(
alignment: PlaceholderAlignment.middle,
child: Padding(
padding: const EdgeInsets.only(right: 5.0),
child: Icon(Icons.place_outlined, size: 20, color: Colors.grey[500])
),
),
TextSpan(text: event.location),
],
)),
TextWithIcon(
icon: Icons.place_outlined,
text: event.location,
size: TextWithIconSize.small,
),
const SizedBox(height: 2),
RichText(text: TextSpan(
style: Theme.of(context).textTheme.subtitle2,
children: [
WidgetSpan(
alignment: PlaceholderAlignment.middle,
child: Padding(
padding: const EdgeInsets.only(left: 1.0, right: 6.0),
child: Icon(Icons.sell_outlined, size: 18, color: Colors.grey[500])
),
),
TextSpan(text: event.category),
],
)),
TextWithIcon(
icon: Icons.sell_outlined,
text: event.category,
size: TextWithIconSize.small,
),
],
),
),