import 'package:flutter/rendering.dart'; import 'package:flutter/widgets.dart'; /// Keeps a text field inside the transcript from scrolling the transcript to /// "reveal" its caret on every keystroke. /// /// An editable field asks every scrollable above it to show its caret after /// each edit. The transcript's split, bottom-following viewport answers that /// with a jump and then follows its newest row back, so a question card's /// answer box made the whole conversation shake while typing. The card is on /// screen while the operator types in it, so the request stops here. class ChatNoReveal extends SingleChildRenderObjectWidget { const ChatNoReveal({super.key, super.child}); @override RenderObject createRenderObject(BuildContext context) => _RenderNoReveal(); } class _RenderNoReveal extends RenderProxyBox { @override void showOnScreen({ RenderObject? descendant, Rect? rect, Duration duration = Duration.zero, Curve curve = Curves.ease, }) {} }