App: add a selectable app design with a Terminal look
AppDesign builds each design's light and dark ThemeData with an AppDesignTokens extension (corner radius, flat surfaces, frame colour, ANSI accents, prompt glyph). Settings gains a Design picker stored per device; the theme hosts rebuild live. Terminal is monospace (bundled RobotoMono), near-black or paper, flat 1px frames with 3px corners, and draws the chat transcript as prompt lines, tool dot/result lines and bracketed follow-up lines. Default keeps its exact themes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import '../../../../ui/theme/app_design_tokens.dart';
|
||||
import 'package:flutter/rendering.dart';
|
||||
|
||||
import 'chat_transcript_selection.dart';
|
||||
@@ -521,6 +523,17 @@ class _ChatMarkdownViewState extends State<ChatMarkdownView> {
|
||||
/// heading never reads like a paragraph.
|
||||
TextStyle? _headingStyle(BuildContext context, int level) {
|
||||
final text = Theme.of(context).textTheme;
|
||||
// A terminal prints headings at the text's own size, in bold; the top
|
||||
// level takes the accent colour.
|
||||
if (AppDesignTokens.of(context).terminal) {
|
||||
return _roleStyle(
|
||||
context,
|
||||
text.bodyLarge?.copyWith(
|
||||
fontWeight: FontWeight.w700,
|
||||
color: level == 1 ? Theme.of(context).colorScheme.primary : null,
|
||||
),
|
||||
);
|
||||
}
|
||||
final role = switch (level) {
|
||||
1 => text.headlineSmall,
|
||||
2 => text.titleLarge,
|
||||
|
||||
Reference in New Issue
Block a user