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:
2026-11-22 18:19:22 +00:00
parent 9d37db5939
commit 1be2418892
7 changed files with 72 additions and 11 deletions
+2 -1
View File
@@ -1,4 +1,5 @@
import 'package:flutter/material.dart';
import '../../ui/status/app_spinner.dart';
/// One icon action of a segmented bar's actions pill (or any toolbar row).
///
@@ -42,7 +43,7 @@ class BarIconButton extends StatelessWidget {
child: Center(
child: SizedBox.square(
dimension: 20,
child: CircularProgressIndicator(strokeWidth: 2),
child: AppSpinner(strokeWidth: 2),
),
),
),