52 lines
1.4 KiB
Dart
52 lines
1.4 KiB
Dart
import "package:bus_running_record/models/channels/base_channel.dart";
|
|
import "package:shadcn_flutter/shadcn_flutter.dart";
|
|
|
|
class ChannelHeader extends StatelessWidget {
|
|
const ChannelHeader({required this.channel, super.key});
|
|
|
|
final BaseChannel channel;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
|
|
double topPadding = MediaQuery.of(context).padding.top;
|
|
|
|
return Column(
|
|
children: [
|
|
|
|
Gap(topPadding),
|
|
|
|
SizedBox(
|
|
height: 40,
|
|
child: Column(
|
|
children: [
|
|
Expanded(
|
|
child: Align(
|
|
alignment: Alignment.centerLeft,
|
|
child: Padding(
|
|
padding: const EdgeInsets.symmetric(horizontal: 16),
|
|
child: Row(
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
mainAxisSize: MainAxisSize.min,
|
|
children: [
|
|
Icon(
|
|
LucideIcons.hash,
|
|
).iconSmall,
|
|
Gap(4),
|
|
Text(channel.slug).textSmall,
|
|
Icon(LucideIcons.dot).iconMutedForeground,
|
|
Text(channel.description),
|
|
|
|
],
|
|
),
|
|
),
|
|
),
|
|
),
|
|
const Divider(),
|
|
],
|
|
),
|
|
),
|
|
],
|
|
);
|
|
}
|
|
}
|