Give running-turn spinners their own animation controller
Without one, CircularProgressIndicator looks its controller up on every frame, walking the widget tree for the ambient Theme (89 ms over a streamed reply at 4K). AppSpinner is the stock indicator with its own controller and the stock period. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -2,6 +2,7 @@ import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'chat_turn_chip.dart';
|
||||
import '../../../../ui/status/app_spinner.dart';
|
||||
|
||||
/// `Reasoning` / `Reasoning · N steps`.
|
||||
String chatReasoningLabel(int steps) =>
|
||||
@@ -80,10 +81,8 @@ class _ChatReasoningChipState extends State<ChatReasoningChip> {
|
||||
}
|
||||
}
|
||||
|
||||
Widget _spinner() => const SizedBox.square(
|
||||
dimension: 12,
|
||||
child: CircularProgressIndicator(strokeWidth: 2),
|
||||
);
|
||||
Widget _spinner() =>
|
||||
const SizedBox.square(dimension: 12, child: AppSpinner(strokeWidth: 2));
|
||||
|
||||
/// The steps an open sheet listens to. The turn can leave the tree while its
|
||||
/// sheet is still open (its row scrolled away or replaced), so the notifier is
|
||||
|
||||
Reference in New Issue
Block a user