mirror of
https://github.com/gabehf/Fladder.git
synced 2026-03-08 23:18:16 -07:00
26 lines
791 B
Dart
26 lines
791 B
Dart
import 'package:flutter/material.dart';
|
|
import 'package:flutter_riverpod/flutter_riverpod.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 TextButton(
|
|
onPressed: onPressed,
|
|
style: TextButton.styleFrom(
|
|
backgroundColor: Theme.of(context).colorScheme.surface.withOpacity(0.75),
|
|
shape: RoundedRectangleBorder(
|
|
borderRadius: BorderRadius.circular(10),
|
|
side: BorderSide.none,
|
|
),
|
|
),
|
|
child: Text(
|
|
label,
|
|
style: Theme.of(context).textTheme.bodyMedium?.copyWith(fontWeight: FontWeight.w600),
|
|
),
|
|
);
|
|
}
|
|
}
|