2022-01-02 21:49:37 -05:00
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
|
|
|
|
|
class LoadingIndicator extends StatelessWidget {
|
2022-06-28 10:32:16 -04:00
|
|
|
final String? subtitle;
|
2022-01-02 21:49:37 -05:00
|
|
|
final double spacing;
|
|
|
|
|
|
2023-10-28 18:13:23 -04:00
|
|
|
const LoadingIndicator({super.key, this.subtitle, this.spacing = 8});
|
2022-01-02 21:49:37 -05:00
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
2022-01-24 17:27:42 -05:00
|
|
|
if (subtitle == null) {
|
|
|
|
|
return const Center(child: CircularProgressIndicator.adaptive());
|
|
|
|
|
}
|
2022-06-28 10:32:16 -04:00
|
|
|
return Column(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
|
children: [
|
|
|
|
|
const CircularProgressIndicator.adaptive(),
|
|
|
|
|
SizedBox(height: spacing),
|
|
|
|
|
Text(
|
2022-01-24 17:27:42 -05:00
|
|
|
subtitle!,
|
2024-09-06 21:43:27 -07:00
|
|
|
style: TextStyle(
|
add FrostyColors ThemeExtension, align hardcoded colors with M3 roles
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>
2026-03-01 19:01:44 -08:00
|
|
|
color: Theme.of(context).colorScheme.onSurfaceVariant,
|
2022-06-28 10:32:16 -04:00
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
2022-01-02 21:49:37 -05:00
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|