Files
SpotiFLAC-Mobile/lib/widgets/app_loading_indicator.dart
T
zarzet 37e21b5712 feat(branding): rename app and native backend to Mornye
Rename the Dart package, Android and iOS identifiers, Rust crates, native libraries, and Discord plugin. Preserve legacy data readers and compatibility aliases.

Update localized branding, documentation, artwork, build tooling, and release artifacts. Route Telegram release notifications to @mornyeupdates and link @mornyecommunity.
2026-10-20 12:00:44 +07:00

52 lines
1.4 KiB
Dart

import 'package:flutter/material.dart';
import 'package:material_3_expressive/material_3_expressive.dart';
import 'package:mornye/theme/material_expressive.dart';
import 'package:mornye/theme/mornye_theme.dart';
/// Indeterminate loading only. Downloads/analysis keep their real progress.
class AppLoadingIndicator extends StatelessWidget {
const AppLoadingIndicator({
super.key,
this.size = 32,
this.color,
this.semanticLabel,
this.strokeWidth = 3,
});
final double size;
final Color? color;
final String? semanticLabel;
/// Stroke of the Mornye circular indicator.
final double strokeWidth;
@override
Widget build(BuildContext context) {
final animate =
!MediaQuery.disableAnimationsOf(context) &&
TickerMode.valuesOf(context).enabled;
return SizedBox.square(
dimension: size,
child: !context.isMornye
? MaterialExpressiveScope(
child: FittedBox(
child: M3ELoadingIndicator(
size: 48,
color: color,
rotationTurns: animate ? null : 0,
semanticLabel: semanticLabel,
),
),
)
: TickerMode(
enabled: animate,
child: CircularProgressIndicator(
color: color,
strokeWidth: strokeWidth,
semanticsLabel: semanticLabel,
),
),
);
}
}