Skip to content

Commit

Permalink
Services Card (#1299)
Browse files Browse the repository at this point in the history
  • Loading branch information
thePeras authored Oct 23, 2024
2 parents eea2696 + 57e3f3e commit a0ceb98
Showing 1 changed file with 55 additions and 0 deletions.
55 changes: 55 additions & 0 deletions packages/uni_ui/lib/service_card.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
import 'package:flutter/material.dart';
import 'package:phosphor_flutter/phosphor_flutter.dart';
import 'package:uni_ui/generic_card.dart';

class ServiceCard extends StatelessWidget {
const ServiceCard({
super.key,
required this.name,
required this.openingHours,
});

final String name;
final List<String> openingHours;

@override
Widget build(BuildContext context) {
return GenericCard(
key: key,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
Text(
name,
overflow: TextOverflow.ellipsis,
style: Theme.of(context).textTheme.headlineMedium!,
),
],
),
const SizedBox(height: 5),
Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
PhosphorIcon(
PhosphorIcons.clock(PhosphorIconsStyle.duotone),
color: Theme.of(context).textTheme.bodyMedium!.color,
size: 20,
),
const SizedBox(width: 5),
Column(
children: openingHours.map((hour) {
return Text(
hour,
style: Theme.of(context).textTheme.bodySmall,
);
}).toList(),
)
],
),
],
),
);
}
}

0 comments on commit a0ceb98

Please sign in to comment.