26 lines
907 B
Dart
26 lines
907 B
Dart
import 'package:flutter/cupertino.dart';
|
|
import 'package:flutter/material.dart';
|
|
|
|
/// The conversation bar's model and mode controls read as the bar's other
|
|
/// actions do: neutral, not tinted like a primary call to action.
|
|
///
|
|
/// Material: a [TextButton] style in the role the bar's icon buttons use
|
|
/// (`onSurfaceVariant`).
|
|
ButtonStyle chatBarTextButtonStyle(BuildContext context) =>
|
|
TextButton.styleFrom(
|
|
foregroundColor: Theme.of(context).colorScheme.onSurfaceVariant,
|
|
);
|
|
|
|
/// Cupertino: [content] (a [CupertinoButton]'s child) in the label colour
|
|
/// instead of the button's tint.
|
|
Widget chatBarCupertinoContent(BuildContext context, Widget content) {
|
|
final color = CupertinoColors.label.resolveFrom(context);
|
|
return IconTheme.merge(
|
|
data: IconThemeData(color: color),
|
|
child: DefaultTextStyle.merge(
|
|
style: TextStyle(color: color),
|
|
child: content,
|
|
),
|
|
);
|
|
}
|