Skip to content

Commit

Permalink
feat: add separatedButtons.textStyle
Browse files Browse the repository at this point in the history
Addresses: #3
  • Loading branch information
JonasWanke committed Oct 14, 2021
1 parent 8d4a94e commit faa9bce
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions lib/src/widgets/separated_buttons.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,14 @@ import '../context.dart';
/// A container wrapping multiple buttons with an interpunct (·) between each
/// one. It's recommended to use [TextButton]s as children.
class SeparatedButtons extends StatelessWidget {
const SeparatedButtons({Key? key, required this.children})
: assert(children.length > 0),
const SeparatedButtons({
Key? key,
this.textStyle,
required this.children,
}) : assert(children.length > 0),
super(key: key);

final TextStyle? textStyle;
final List<Widget> children;

@override
Expand All @@ -20,7 +24,7 @@ class SeparatedButtons extends StatelessWidget {
children: [
for (final child in children.withoutLast()) ...[
child,
Text('⋅', style: context.theme.textTheme.headline5),
Text('⋅', style: textStyle ?? context.theme.textTheme.headline5),
],
children.last,
],
Expand Down

0 comments on commit faa9bce

Please sign in to comment.