Introduce FrostyColors ThemeExtension with 7 semantic color fields (highlightedMessage, emoteOnly, followersOnly, slowMode, subOnly, uniqueMode, overlayOnSurface) and brightness-aware light/dark variants. Replace hardcoded colors across 15 files: - Links use colorScheme.primary instead of Colors.blue - Mentions use colorScheme.error instead of Colors.red - First-time chatters share highlightedMessage (Twitch purple) - Chat mode indicators use frostyColors fields - Overlay text uses frostyColors.overlayOnSurface Remove Provider<FrostyThemes> pattern from main.dart, channel.dart, video_overlay.dart, and frosty_photo_view_dialog.dart. Replace manual onSurface.withValues(alpha: 0.6) with M3's built-in onSurfaceVariant for secondary text in section headers, chat modes, alerts, loading indicators, and input hints. Fix double-muted onSurfaceVariant.withValues(alpha: 0.6) in navigation icons and notification dismiss button. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
28 lines
722 B
Dart
28 lines
722 B
Dart
import 'package:flutter/material.dart';
|
|
|
|
class LoadingIndicator extends StatelessWidget {
|
|
final String? subtitle;
|
|
final double spacing;
|
|
|
|
const LoadingIndicator({super.key, this.subtitle, this.spacing = 8});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
if (subtitle == null) {
|
|
return const Center(child: CircularProgressIndicator.adaptive());
|
|
}
|
|
return Column(
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
children: [
|
|
const CircularProgressIndicator.adaptive(),
|
|
SizedBox(height: spacing),
|
|
Text(
|
|
subtitle!,
|
|
style: TextStyle(
|
|
color: Theme.of(context).colorScheme.onSurfaceVariant,
|
|
),
|
|
),
|
|
],
|
|
);
|
|
}
|
|
}
|