import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:pipelines_app/features/chat/ui/transcript/chat_markdown_view.dart'; const _style = String.fromEnvironment( 'CHAT_MARKDOWN_PROBE_STYLE', defaultValue: 'material', ); const _sample = ''' # Heading one ## Heading two ### Heading three #### Heading four ##### Heading five ###### Heading six A paragraph with **bold**, *italic*, `inline code`, and snake_case_name staying plain. > quoted line one > quoted line two - bullet one - bullet two 1. first item 2. second item | Name | Value | | --- | --- | | alpha | 1 | | beta | 2 | ```dart const answer = 42; keep spaces ``` --- [Open docs](https://example.com/docs) and [unsafe](javascript:alert) stay safe. Bare https://example.com/auto link. literal html and ~~strikethrough~~ stay text. '''; /// One assistant markdown sample for the Material and Cupertino dark captures. void main() { final content = ListView( padding: const EdgeInsets.all(16), children: const [ChatMarkdownView(text: _sample)], ); if (_style == 'cupertino') { runApp( CupertinoApp( theme: const CupertinoThemeData(brightness: Brightness.dark), home: CupertinoPageScaffold(child: SafeArea(child: content)), ), ); return; } runApp( MaterialApp( theme: ThemeData( brightness: Brightness.dark, platform: TargetPlatform.android, ), home: Scaffold(body: SafeArea(child: content)), ), ); }