Carry the chat colour in the thread bar instead of a page wash
Tint the bar's glass pieces with the chat shade over the raised surface (0.16 light and dark, then the 0.82 glass opacity) and draw its labels in the seeded scheme's onPrimaryContainer; Cupertino takes it as the bar's primary colour. Inactive split panes keep half the tint. Remove ChatColorWash. The composer focus ring is the seeded primary at full opacity, 2 px, with no glow. Contrast test asserts AA for every palette colour on both hosts in light and dark.
This commit is contained in:
@@ -350,15 +350,20 @@ mixin _ChatScreenWorkspace on State<ChatScreen> {
|
||||
),
|
||||
),
|
||||
),
|
||||
child: DetailPane(
|
||||
key: ValueKey('chat-pane-detail-${pane.id}'),
|
||||
destination: AppDestination.chat,
|
||||
implyBack: false,
|
||||
builder: (context) => _thread(
|
||||
pane.sessionId,
|
||||
_back,
|
||||
pane: pane,
|
||||
paneContext: context,
|
||||
// Every pane's bar carries its own chat's colour; beside the
|
||||
// active pane the others fade theirs.
|
||||
child: ChatPaneActivity(
|
||||
inactive: _workspace.paneCount > 1 && !active,
|
||||
child: DetailPane(
|
||||
key: ValueKey('chat-pane-detail-${pane.id}'),
|
||||
destination: AppDestination.chat,
|
||||
implyBack: false,
|
||||
builder: (context) => _thread(
|
||||
pane.sessionId,
|
||||
_back,
|
||||
pane: pane,
|
||||
paneContext: context,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
@@ -1,20 +1,27 @@
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'chat_bar_tint.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.
|
||||
/// actions do: neutral, not tinted like a primary call to action. In a
|
||||
/// coloured chat's bar they take its foreground ([ChatBarTintScope]) instead.
|
||||
///
|
||||
/// 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,
|
||||
foregroundColor:
|
||||
ChatBarTintScope.foregroundOf(context) ??
|
||||
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);
|
||||
final color =
|
||||
ChatBarTintScope.foregroundOf(context) ??
|
||||
CupertinoColors.label.resolveFrom(context);
|
||||
return IconTheme.merge(
|
||||
data: IconThemeData(color: color),
|
||||
child: DefaultTextStyle.merge(
|
||||
|
||||
@@ -0,0 +1,153 @@
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import '../../../ui/adaptive/glass_pill.dart';
|
||||
import '../ui/sessions/chat_adaptive.dart';
|
||||
import '../ui/sessions/chat_color_palette.dart';
|
||||
|
||||
/// How strongly the chat's shade colours the bar's glass pieces over the
|
||||
/// host's raised surface, on a light and on a dark page. The dark value stays
|
||||
/// at the low end so a warm hue (amber) keeps its own colour over the dark
|
||||
/// grey instead of turning olive.
|
||||
const double chatBarTintLight = 0.16;
|
||||
const double chatBarTintDark = 0.16;
|
||||
|
||||
/// The share of the tint an inactive split pane's bar keeps.
|
||||
const double chatBarInactiveFade = 0.5;
|
||||
|
||||
/// A Material tonal scheme seeded from [shade] in the page's brightness: its
|
||||
/// `onPrimaryContainer` labels the tinted bar and its `primary` (tone 40 on
|
||||
/// light, 80 on dark) draws the composer's focus ring.
|
||||
ColorScheme chatSeededScheme(Color shade, {required bool dark}) =>
|
||||
ColorScheme.fromSeed(
|
||||
seedColor: shade,
|
||||
brightness: dark ? Brightness.dark : Brightness.light,
|
||||
);
|
||||
|
||||
/// A coloured chat's bar: the glass pieces' [fill] (translucent as every
|
||||
/// glass piece is, unless solid) and the [foreground] its labels, icons and
|
||||
/// controls draw in.
|
||||
@immutable
|
||||
class ChatBarTint {
|
||||
const ChatBarTint({required this.fill, required this.foreground});
|
||||
|
||||
/// The bar's colours for [shade] over the host's [raised] surface. An
|
||||
/// [inactive] split pane keeps [chatBarInactiveFade] of the tint; [solid]
|
||||
/// (the system's high-contrast setting) leaves the fill opaque, as the
|
||||
/// glass does then.
|
||||
factory ChatBarTint.from({
|
||||
required Color shade,
|
||||
required Color raised,
|
||||
required bool dark,
|
||||
bool inactive = false,
|
||||
bool solid = false,
|
||||
}) {
|
||||
final strength =
|
||||
(dark ? chatBarTintDark : chatBarTintLight) *
|
||||
(inactive ? chatBarInactiveFade : 1);
|
||||
final opaque = Color.alphaBlend(shade.withValues(alpha: strength), raised);
|
||||
return ChatBarTint(
|
||||
fill: solid ? opaque : opaque.withValues(alpha: GlassPill.fillOpacity),
|
||||
foreground: chatSeededScheme(shade, dark: dark).onPrimaryContainer,
|
||||
);
|
||||
}
|
||||
|
||||
final Color fill;
|
||||
final Color foreground;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) =>
|
||||
other is ChatBarTint &&
|
||||
other.fill == fill &&
|
||||
other.foreground == foreground;
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(fill, foreground);
|
||||
}
|
||||
|
||||
/// The bar tint for the chat colour [name] on this host, or null for a chat
|
||||
/// with no colour (its bar stays neutral). Reads [ChatPaneActivity].
|
||||
ChatBarTint? chatBarTintOf(BuildContext context, String? name) {
|
||||
final shade = chatColorShade(context, name);
|
||||
if (shade == null) return null;
|
||||
final cupertino = chatControlsStyleOf(context) == ChatControlsStyle.cupertino;
|
||||
return ChatBarTint.from(
|
||||
shade: shade,
|
||||
raised: cupertino
|
||||
? CupertinoColors.systemGrey5.resolveFrom(context)
|
||||
: Theme.of(context).colorScheme.surfaceContainerHigh,
|
||||
dark: chatColorDarkSurface(context),
|
||||
inactive: ChatPaneActivity.inactiveOf(context),
|
||||
solid: MediaQuery.maybeHighContrastOf(context) ?? false,
|
||||
);
|
||||
}
|
||||
|
||||
/// The composer's focus ring: the seeded scheme's `primary` for a coloured
|
||||
/// chat, else the host's primary colour; always drawn at full opacity.
|
||||
Color chatFocusRingColor(BuildContext context, String? name) {
|
||||
final shade = chatColorShade(context, name);
|
||||
if (shade != null) {
|
||||
return chatSeededScheme(shade, dark: chatColorDarkSurface(context)).primary;
|
||||
}
|
||||
return chatControlsStyleOf(context) == ChatControlsStyle.cupertino
|
||||
? CupertinoTheme.of(context).primaryColor
|
||||
: Theme.of(context).colorScheme.primary;
|
||||
}
|
||||
|
||||
/// Marks a split pane that is not the active one, so its bar fades its tint.
|
||||
class ChatPaneActivity extends InheritedWidget {
|
||||
const ChatPaneActivity({
|
||||
super.key,
|
||||
required this.inactive,
|
||||
required super.child,
|
||||
});
|
||||
|
||||
final bool inactive;
|
||||
|
||||
static bool inactiveOf(BuildContext context) =>
|
||||
context.dependOnInheritedWidgetOfExactType<ChatPaneActivity>()?.inactive ??
|
||||
false;
|
||||
|
||||
@override
|
||||
bool updateShouldNotify(ChatPaneActivity oldWidget) =>
|
||||
inactive != oldWidget.inactive;
|
||||
}
|
||||
|
||||
/// Gives the bar's controls the tint's foreground: Material icon buttons
|
||||
/// through the ambient icon colour, Cupertino buttons (Back, Files, More)
|
||||
/// through the theme's primary colour, their native tint, and the chat's own
|
||||
/// bar controls through [foregroundOf].
|
||||
class ChatBarTintScope extends InheritedWidget {
|
||||
ChatBarTintScope({
|
||||
super.key,
|
||||
required this.tint,
|
||||
required bool cupertino,
|
||||
required Widget child,
|
||||
}) : super(
|
||||
child: Builder(
|
||||
builder: (context) => cupertino
|
||||
? CupertinoTheme(
|
||||
data: CupertinoTheme.of(
|
||||
context,
|
||||
).copyWith(primaryColor: tint.foreground),
|
||||
child: child,
|
||||
)
|
||||
: IconTheme.merge(
|
||||
data: IconThemeData(color: tint.foreground),
|
||||
child: child,
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
final ChatBarTint tint;
|
||||
|
||||
/// The tinted bar's foreground around [context], or null in a neutral bar.
|
||||
static Color? foregroundOf(BuildContext context) => context
|
||||
.dependOnInheritedWidgetOfExactType<ChatBarTintScope>()
|
||||
?.tint
|
||||
.foreground;
|
||||
|
||||
@override
|
||||
bool updateShouldNotify(ChatBarTintScope oldWidget) =>
|
||||
tint != oldWidget.tint;
|
||||
}
|
||||
@@ -1,78 +0,0 @@
|
||||
import 'package:flutter/widgets.dart';
|
||||
|
||||
import '../../../core/api_gateway.dart';
|
||||
import '../../../ui/adaptive/segmented_bar_overlay.dart';
|
||||
import '../domain/chat_colors.dart';
|
||||
import '../ui/sessions/chat_color_palette.dart';
|
||||
|
||||
/// The open chat's colour as a faint wash over the top of the page: full
|
||||
/// strength at the top edge of the bar, fading out a little below it, so even
|
||||
/// without the list beside it the chat carries a gentle reminder of which one
|
||||
/// it is. Nothing is drawn for a chat with no colour, and it takes no taps.
|
||||
///
|
||||
/// The bar's scrim is opaque at its top edge, so a wash only behind the
|
||||
/// transcript would start below the bar. The wash is one gradient drawn in two
|
||||
/// parts: [ChatColorWash.bar] over the scrim (the bar's backdrop) and
|
||||
/// [ChatColorWash.belowBar] under the transcript, so text below the bar keeps
|
||||
/// its contrast.
|
||||
class ChatColorWash extends StatelessWidget {
|
||||
/// The part inside the bar, filling it as its backdrop.
|
||||
const ChatColorWash.bar({super.key, required this.session}) : _bar = true;
|
||||
|
||||
/// The part below the bar, in a [Stack] under the transcript: it starts at
|
||||
/// the bar's height, which arrives as the top padding.
|
||||
const ChatColorWash.belowBar({super.key, required this.session})
|
||||
: _bar = false;
|
||||
|
||||
final JsonMap? session;
|
||||
final bool _bar;
|
||||
|
||||
/// How far past the bar's bottom edge the wash fades out.
|
||||
static const double fadeBelowBar = 96;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final color = chatColorShade(context, chatSessionColor(session));
|
||||
if (color == null) return const SizedBox.shrink();
|
||||
final strength = chatColorDarkSurface(context) ? 0.24 : 0.2;
|
||||
// The wash's alpha falls linearly from [strength] at the top to zero at
|
||||
// the bar's height plus [fadeBelowBar]; each part draws its own stretch.
|
||||
Widget wash(double barHeight, double from, double to) {
|
||||
final total = barHeight + fadeBelowBar;
|
||||
double alpha(double y) => strength * (1 - y / total);
|
||||
return IgnorePointer(
|
||||
child: DecoratedBox(
|
||||
key: Key(_bar ? 'chat-color-wash' : 'chat-color-wash-below'),
|
||||
decoration: BoxDecoration(
|
||||
gradient: LinearGradient(
|
||||
begin: Alignment.topCenter,
|
||||
end: Alignment.bottomCenter,
|
||||
colors: [
|
||||
color.withValues(alpha: alpha(from)),
|
||||
color.withValues(alpha: alpha(to)),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
if (_bar) {
|
||||
return LayoutBuilder(
|
||||
builder: (context, constraints) {
|
||||
final height = constraints.maxHeight;
|
||||
return wash(height, 0, height);
|
||||
},
|
||||
);
|
||||
}
|
||||
final top = MediaQuery.paddingOf(context).top;
|
||||
final barHeight = top + SegmentedBarOverlay.reservedHeightOf(context);
|
||||
return Positioned(
|
||||
top: top,
|
||||
left: 0,
|
||||
right: 0,
|
||||
height: fadeBelowBar,
|
||||
child: wash(barHeight, barHeight, barHeight + fadeBelowBar),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -30,8 +30,8 @@ import '../../../ui/adaptive/pop_entrance.dart';
|
||||
import 'chat_reading_width.dart';
|
||||
import 'composer_focus_request.dart';
|
||||
import 'composer_focus_restore.dart';
|
||||
import 'chat_bar_tint.dart';
|
||||
import 'composer_focus_ring.dart';
|
||||
import '../ui/sessions/chat_color_palette.dart';
|
||||
import '../shell/chat_shell_command.dart';
|
||||
import '../shell/chat_shell_mode_indicator.dart';
|
||||
|
||||
@@ -964,11 +964,11 @@ class _ChatComposerBarState extends State<ChatComposerBar> {
|
||||
/// The field and its controls in one frosted-glass surface floating over
|
||||
/// the transcript, so the composer reads as a single input rather than a
|
||||
/// row of separate controls, and the conversation shows through it. While
|
||||
/// the field has focus the pill's edge takes the chat's accent.
|
||||
/// the field has focus a ring in the chat's colour runs along its edge.
|
||||
Widget _pill(BuildContext context, bool cupertino, Widget child) =>
|
||||
ComposerFocusRing(
|
||||
focus: _focus,
|
||||
accent: _accent(context, cupertino),
|
||||
accent: chatFocusRingColor(context, widget.chatColor),
|
||||
shape: _pillShape,
|
||||
child: GlassPill(
|
||||
key: const Key('chat-composer-pill'),
|
||||
@@ -983,13 +983,6 @@ class _ChatComposerBarState extends State<ChatComposerBar> {
|
||||
),
|
||||
);
|
||||
|
||||
/// The chat's accent: its own colour's shade for this host and brightness,
|
||||
/// else the host's primary colour.
|
||||
Color _accent(BuildContext context, bool cupertino) =>
|
||||
chatColorShade(context, widget.chatColor) ??
|
||||
(cupertino
|
||||
? CupertinoTheme.of(context).primaryColor
|
||||
: Theme.of(context).colorScheme.primary);
|
||||
|
||||
/// The attach control: a host button that opens the picker, disabled when the
|
||||
/// host has no picker or one prompt is already awaiting its reply.
|
||||
|
||||
@@ -5,6 +5,7 @@ import 'package:flutter/material.dart';
|
||||
import '../../../ui/adaptive/segmented_bar.dart';
|
||||
import '../../../ui/adaptive/segmented_bar_overflow.dart';
|
||||
import '../ui/sessions/chat_adaptive.dart';
|
||||
import 'chat_bar_tint.dart';
|
||||
|
||||
/// The open conversation's bar: the app's [SegmentedBar] above the
|
||||
/// transcript.
|
||||
@@ -15,6 +16,11 @@ import '../ui/sessions/chat_adaptive.dart';
|
||||
/// then the Files action and a native More menu in a separate island.
|
||||
/// Narrow panes keep the model/mode selectors as compact icons in the same row;
|
||||
/// their semantic labels and native pickers continue to expose the values.
|
||||
///
|
||||
/// A chat with a [chatColor] carries it in the bar: each glass piece is
|
||||
/// filled with its shade over the raised surface and its labels and icons
|
||||
/// take the colour's foreground ([chatBarTintOf]), faded in an inactive split
|
||||
/// pane. A chat with none keeps the neutral bar.
|
||||
class ChatThreadHeader extends StatelessWidget {
|
||||
const ChatThreadHeader({
|
||||
super.key,
|
||||
@@ -26,7 +32,7 @@ class ChatThreadHeader extends StatelessWidget {
|
||||
this.controls = const [],
|
||||
this.actions = const [],
|
||||
this.moreActions = const [],
|
||||
this.backdrop,
|
||||
this.chatColor,
|
||||
this.identity,
|
||||
this.identityHeroTag,
|
||||
});
|
||||
@@ -46,8 +52,8 @@ class ChatThreadHeader extends StatelessWidget {
|
||||
final List<Widget> actions;
|
||||
final List<Widget> moreActions;
|
||||
|
||||
/// Painted over the bar's scrim, under its pieces (the chat's colour).
|
||||
final Widget? backdrop;
|
||||
/// The chat's colour name, or null for none.
|
||||
final String? chatColor;
|
||||
|
||||
/// The chat identity carried from the mobile session row into this header.
|
||||
final Widget? identity;
|
||||
@@ -57,6 +63,7 @@ class ChatThreadHeader extends StatelessWidget {
|
||||
Widget build(BuildContext context) {
|
||||
final cupertino =
|
||||
chatControlsStyleOf(context) == ChatControlsStyle.cupertino;
|
||||
final tint = chatBarTintOf(context, chatColor);
|
||||
return LayoutBuilder(
|
||||
builder: (context, constraints) {
|
||||
final textScale = MediaQuery.textScalerOf(context).scale(14) / 14;
|
||||
@@ -67,8 +74,10 @@ class ChatThreadHeader extends StatelessWidget {
|
||||
(MediaQuery.maybeDisableAnimationsOf(context) ?? false)
|
||||
? identity
|
||||
: Hero(tag: identityHeroTag!, child: identity!);
|
||||
final bar = SegmentedBar(
|
||||
final Widget bar = SegmentedBar(
|
||||
cupertino: cupertino,
|
||||
pillColor: tint?.fill,
|
||||
foregroundColor: tint?.foreground,
|
||||
automaticallyImplyLeading: false,
|
||||
// The platform's own Back, so it reads and behaves as every other
|
||||
// page's Back; its key stays for finders.
|
||||
@@ -118,13 +127,19 @@ class ChatThreadHeader extends StatelessWidget {
|
||||
),
|
||||
],
|
||||
bottomPadding: compact ? 8 : 16,
|
||||
backdrop: backdrop,
|
||||
);
|
||||
return ColoredBox(
|
||||
color: cupertino
|
||||
? CupertinoTheme.of(context).scaffoldBackgroundColor
|
||||
: Theme.of(context).colorScheme.surface,
|
||||
child: bar,
|
||||
child: tint == null
|
||||
? bar
|
||||
: ChatBarTintScope(
|
||||
key: const Key('chat-bar-tint'),
|
||||
tint: tint,
|
||||
cupertino: cupertino,
|
||||
child: bar,
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
|
||||
@@ -37,7 +37,6 @@ import 'chat_account_usage_section.dart';
|
||||
import 'chat_export_controller.dart';
|
||||
import 'chat_session_section.dart';
|
||||
import 'chat_background_tasks.dart';
|
||||
import 'chat_color_wash.dart';
|
||||
import 'chat_command_actions.dart';
|
||||
import 'chat_composer_bar.dart';
|
||||
import 'chat_composer_controller.dart';
|
||||
@@ -1180,9 +1179,6 @@ class _ChatThreadViewState extends State<ChatThreadView> {
|
||||
_rowWidgets.prune();
|
||||
final stack = Stack(
|
||||
children: [
|
||||
// Behind everything: the chat's colour below the bar
|
||||
// (the bar draws its own part over its scrim).
|
||||
ChatColorWash.belowBar(session: widget.session),
|
||||
// At rest the first item starts below the floating bar;
|
||||
// the viewport itself ends above the composer.
|
||||
// Bottom-anchored at the split row, the newest rows are
|
||||
@@ -1389,8 +1385,7 @@ class _ChatThreadViewState extends State<ChatThreadView> {
|
||||
.lastWhere((part) => part.isNotEmpty, orElse: () => '');
|
||||
return ChatThreadHeader(
|
||||
key: const Key('chat-thread-header'),
|
||||
// The chat's colour from the bar's top edge, over its scrim.
|
||||
backdrop: ChatColorWash.bar(session: session),
|
||||
chatColor: chatSessionColor(session),
|
||||
title: widget.title.trim(),
|
||||
folder: folder,
|
||||
identity:
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
import 'package:flutter/widgets.dart';
|
||||
|
||||
/// The composer's focus indication: a thin ring in the chat's accent colour
|
||||
/// along the pill's edge and a soft glow of the same colour outside it, so
|
||||
/// a focused field shows as such without relying on its caret alone. Both
|
||||
/// fade in and out with focus; at rest unfocused nothing visible is drawn.
|
||||
/// The composer's focus indication: a solid ring in the chat's accent colour
|
||||
/// along the pill's edge, so a focused field shows as such without relying
|
||||
/// on its caret alone. It fades in and out with focus; at rest unfocused
|
||||
/// nothing visible is drawn.
|
||||
///
|
||||
/// The accent is the chat's own colour (its highlight in the list) when it
|
||||
/// has one, else the host's primary colour, never the pill's background: the
|
||||
/// ring is translucent so the same tint stays subtle on a light and a dark
|
||||
/// pill.
|
||||
/// The accent is the focus colour of the chat's own colour (the `primary`
|
||||
/// of a scheme seeded from it, `chatFocusRingColor`) when it has one, else
|
||||
/// the host's primary colour. It is drawn at full opacity, so it keeps 3:1
|
||||
/// against the page for every chat colour in light and dark.
|
||||
class ComposerFocusRing extends StatelessWidget {
|
||||
const ComposerFocusRing({
|
||||
super.key,
|
||||
@@ -21,7 +21,7 @@ class ComposerFocusRing extends StatelessWidget {
|
||||
/// The field's focus node; the ring follows its [FocusNode.hasFocus].
|
||||
final FocusNode focus;
|
||||
|
||||
/// The chat's accent, at full opacity; the ring and glow fade it.
|
||||
/// The ring's colour while focused.
|
||||
final Color accent;
|
||||
|
||||
/// The pill's shape, so the ring hugs its edge.
|
||||
@@ -32,17 +32,7 @@ class ComposerFocusRing extends StatelessWidget {
|
||||
static const Duration duration = Duration(milliseconds: 160);
|
||||
|
||||
/// The ring's stroke, drawn just inside the pill's edge over its hairline.
|
||||
static const double ringWidth = 1.5;
|
||||
|
||||
/// The accent's opacity in the ring while focused.
|
||||
static const double ringOpacity = 0.6;
|
||||
|
||||
/// The accent's opacity in the glow while focused.
|
||||
static const double glowOpacity = 0.18;
|
||||
|
||||
/// The glow's blur radius; it spreads [glowSpread] past the pill first.
|
||||
static const double glowBlur = 12;
|
||||
static const double glowSpread = 1;
|
||||
static const double ringWidth = 2;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) => ListenableBuilder(
|
||||
@@ -50,27 +40,17 @@ class ComposerFocusRing extends StatelessWidget {
|
||||
child: child,
|
||||
builder: (context, child) {
|
||||
final focused = focus.hasFocus;
|
||||
// Both decorations keep the same shape, shadow and stroke while only
|
||||
// their colours change, so the container lerps them into one fade.
|
||||
// The decoration keeps the same shape and stroke while only its colour
|
||||
// changes, so the container lerps it into one fade.
|
||||
return AnimatedContainer(
|
||||
key: const Key('chat-composer-focus-ring'),
|
||||
duration: duration,
|
||||
curve: Curves.easeOutCubic,
|
||||
decoration: ShapeDecoration(
|
||||
shape: shape,
|
||||
shadows: [
|
||||
BoxShadow(
|
||||
color: accent.withValues(alpha: focused ? glowOpacity : 0),
|
||||
blurRadius: glowBlur,
|
||||
spreadRadius: glowSpread,
|
||||
),
|
||||
],
|
||||
),
|
||||
// Over the child: the pill's fill would otherwise cover the ring.
|
||||
foregroundDecoration: ShapeDecoration(
|
||||
shape: shape.copyWith(
|
||||
side: BorderSide(
|
||||
color: accent.withValues(alpha: focused ? ringOpacity : 0),
|
||||
color: accent.withValues(alpha: focused ? 1 : 0),
|
||||
width: ringWidth,
|
||||
),
|
||||
),
|
||||
|
||||
@@ -22,6 +22,7 @@ import '../../core/servers/server_scope.dart';
|
||||
import 'workspace/chat_workspace_binding.dart';
|
||||
import 'workspace/chat_workspace_snapshot.dart';
|
||||
import 'workspace/chat_workspace_store.dart';
|
||||
import 'conversation/chat_bar_tint.dart';
|
||||
import 'conversation/chat_efforts.dart';
|
||||
import 'conversation/chat_models.dart';
|
||||
import 'conversation/chat_pane_picker.dart';
|
||||
|
||||
Reference in New Issue
Block a user