|
|
|
|
@ -7,7 +7,6 @@ import 'package:fluffychat/pangea/common/widgets/url_image_widget.dart';
|
|
|
|
|
|
|
|
|
|
class ActivitySuggestionCard extends StatelessWidget {
|
|
|
|
|
final ActivityPlanModel activity;
|
|
|
|
|
final VoidCallback onPressed;
|
|
|
|
|
final double width;
|
|
|
|
|
final double height;
|
|
|
|
|
|
|
|
|
|
@ -18,7 +17,6 @@ class ActivitySuggestionCard extends StatelessWidget {
|
|
|
|
|
const ActivitySuggestionCard({
|
|
|
|
|
super.key,
|
|
|
|
|
required this.activity,
|
|
|
|
|
required this.onPressed,
|
|
|
|
|
required this.width,
|
|
|
|
|
required this.height,
|
|
|
|
|
this.fontSize,
|
|
|
|
|
@ -29,87 +27,81 @@ class ActivitySuggestionCard extends StatelessWidget {
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
final theme = Theme.of(context);
|
|
|
|
|
return MouseRegion(
|
|
|
|
|
cursor: SystemMouseCursors.click,
|
|
|
|
|
child: GestureDetector(
|
|
|
|
|
onTap: onPressed,
|
|
|
|
|
child: SizedBox(
|
|
|
|
|
height: height,
|
|
|
|
|
width: width,
|
|
|
|
|
child: ClipRRect(
|
|
|
|
|
borderRadius: BorderRadius.circular(12.0),
|
|
|
|
|
child: Container(
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
color: theme.colorScheme.surfaceContainer,
|
|
|
|
|
return SizedBox(
|
|
|
|
|
height: height,
|
|
|
|
|
width: width,
|
|
|
|
|
child: ClipRRect(
|
|
|
|
|
borderRadius: BorderRadius.circular(12.0),
|
|
|
|
|
child: Container(
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
color: theme.colorScheme.surfaceContainer,
|
|
|
|
|
),
|
|
|
|
|
child: Column(
|
|
|
|
|
mainAxisSize: MainAxisSize.min,
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
children: [
|
|
|
|
|
ImageByUrl(
|
|
|
|
|
imageUrl: activity.imageURL,
|
|
|
|
|
width: width,
|
|
|
|
|
borderRadius: const BorderRadius.all(Radius.zero),
|
|
|
|
|
replacement: SizedBox(height: width),
|
|
|
|
|
),
|
|
|
|
|
child: Column(
|
|
|
|
|
mainAxisSize: MainAxisSize.min,
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
children: [
|
|
|
|
|
ImageByUrl(
|
|
|
|
|
imageUrl: activity.imageURL,
|
|
|
|
|
width: width,
|
|
|
|
|
borderRadius: const BorderRadius.all(Radius.zero),
|
|
|
|
|
replacement: SizedBox(height: width),
|
|
|
|
|
),
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding: const EdgeInsets.all(4.0),
|
|
|
|
|
child: Column(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding: const EdgeInsets.all(4.0),
|
|
|
|
|
child: Column(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
Text(
|
|
|
|
|
activity.title,
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
fontSize: fontSize,
|
|
|
|
|
),
|
|
|
|
|
maxLines: 3,
|
|
|
|
|
overflow: TextOverflow.ellipsis,
|
|
|
|
|
),
|
|
|
|
|
Row(
|
|
|
|
|
mainAxisSize: MainAxisSize.min,
|
|
|
|
|
spacing: 8.0,
|
|
|
|
|
children: [
|
|
|
|
|
Text(
|
|
|
|
|
activity.title,
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
fontSize: fontSize,
|
|
|
|
|
if (activity.req.mode.isNotEmpty)
|
|
|
|
|
Padding(
|
|
|
|
|
padding: const EdgeInsets.all(4.0),
|
|
|
|
|
child: Text(
|
|
|
|
|
activity.req.mode,
|
|
|
|
|
style: fontSizeSmall != null
|
|
|
|
|
? TextStyle(fontSize: fontSizeSmall)
|
|
|
|
|
: theme.textTheme.labelSmall,
|
|
|
|
|
overflow: TextOverflow.ellipsis,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
maxLines: 3,
|
|
|
|
|
overflow: TextOverflow.ellipsis,
|
|
|
|
|
),
|
|
|
|
|
Row(
|
|
|
|
|
mainAxisSize: MainAxisSize.min,
|
|
|
|
|
spacing: 8.0,
|
|
|
|
|
children: [
|
|
|
|
|
if (activity.req.mode.isNotEmpty)
|
|
|
|
|
Padding(
|
|
|
|
|
padding: const EdgeInsets.all(4.0),
|
|
|
|
|
child: Text(
|
|
|
|
|
activity.req.mode,
|
|
|
|
|
style: fontSizeSmall != null
|
|
|
|
|
? TextStyle(fontSize: fontSizeSmall)
|
|
|
|
|
: theme.textTheme.labelSmall,
|
|
|
|
|
overflow: TextOverflow.ellipsis,
|
|
|
|
|
),
|
|
|
|
|
Padding(
|
|
|
|
|
padding: const EdgeInsets.all(4.0),
|
|
|
|
|
child: Row(
|
|
|
|
|
mainAxisSize: MainAxisSize.min,
|
|
|
|
|
spacing: 4.0,
|
|
|
|
|
children: [
|
|
|
|
|
Icon(
|
|
|
|
|
Icons.group_outlined,
|
|
|
|
|
size: iconSize ?? 12.0,
|
|
|
|
|
),
|
|
|
|
|
Padding(
|
|
|
|
|
padding: const EdgeInsets.all(4.0),
|
|
|
|
|
child: Row(
|
|
|
|
|
mainAxisSize: MainAxisSize.min,
|
|
|
|
|
spacing: 4.0,
|
|
|
|
|
children: [
|
|
|
|
|
Icon(
|
|
|
|
|
Icons.group_outlined,
|
|
|
|
|
size: iconSize ?? 12.0,
|
|
|
|
|
),
|
|
|
|
|
Text(
|
|
|
|
|
"${activity.req.numberOfParticipants}",
|
|
|
|
|
style: fontSizeSmall != null
|
|
|
|
|
? TextStyle(fontSize: fontSizeSmall)
|
|
|
|
|
: theme.textTheme.labelSmall,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
Text(
|
|
|
|
|
"${activity.req.numberOfParticipants}",
|
|
|
|
|
style: fontSizeSmall != null
|
|
|
|
|
? TextStyle(fontSize: fontSizeSmall)
|
|
|
|
|
: theme.textTheme.labelSmall,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
|