import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:pipelines_app/features/chat/ui/transcript/chat_turn_activity_view.dart'; const _style = String.fromEnvironment('PROBE_STYLE', defaultValue: 'material'); /// Visual check for the streaming activity line: the pending dots beside /// "Responding Ns" at a few text sizes, in light and dark. void main() { Widget line(double scale) => MediaQuery.withClampedTextScaling( minScaleFactor: scale, maxScaleFactor: scale, child: const Padding( padding: EdgeInsets.all(8), child: ChatTurnActivityView( parts: [ {'type': 'text', 'text': 'Partial answer'}, ], streaming: true, ), ), ); final body = ListView(children: [line(1), line(1.5), line(2)]); runApp( _style == 'cupertino' ? CupertinoApp( theme: const CupertinoThemeData(brightness: Brightness.dark), home: CupertinoPageScaffold(child: SafeArea(child: body)), ) : MaterialApp( theme: ThemeData(brightness: Brightness.dark), home: Scaffold(body: SafeArea(child: body)), ), ); }