Fladder/lib/screens/shared/media/components/chip_button.dart
PartyDonut d2138da785
feature: Details screen rework (#190)
Co-authored-by: PartyDonut <PartyDonut@users.noreply.github.com>
2024-12-27 15:21:47 +01:00

30 lines
868 B
Dart

import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:fladder/screens/shared/flat_button.dart';
class ChipButton extends ConsumerWidget {
final String label;
final Function()? onPressed;
const ChipButton({required this.label, this.onPressed, super.key});
@override
Widget build(BuildContext context, WidgetRef ref) {
return Card(
color: Theme.of(context).colorScheme.onSurface.withOpacity(0.15),
shadowColor: Colors.transparent,
child: FlatButton(
onTap: onPressed,
// ),
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 6, vertical: 4),
child: Text(
label,
style: Theme.of(context).textTheme.bodyMedium?.copyWith(fontWeight: FontWeight.w600),
),
),
),
);
}
}