mirror of
https://github.com/zarzet/SpotiFLAC-Mobile.git
synced 2026-09-30 13:19:44 +02:00
feat(material): adopt expressive controls across the app
This commit is contained in:
1 parent
a9ed5a19cd
commit
d390a214c3
23 files changed
+988
-138
No files matched your search
@@ -0,0 +1,37 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:material_3_expressive/material_3_expressive.dart';
|
||||
import 'package:spotiflac_android/theme/material_expressive.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,
|
||||
});
|
||||
|
||||
final double size;
|
||||
final Color? color;
|
||||
final String? semanticLabel;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) => SizedBox.square(
|
||||
dimension: size,
|
||||
child: materialExpressiveEnabled(context)
|
||||
? MaterialExpressiveScope(
|
||||
child: FittedBox(
|
||||
child: M3ELoadingIndicator(
|
||||
size: 48,
|
||||
color: color,
|
||||
semanticLabel: semanticLabel,
|
||||
),
|
||||
),
|
||||
)
|
||||
: CircularProgressIndicator(
|
||||
color: color,
|
||||
strokeWidth: 3,
|
||||
semanticsLabel: semanticLabel,
|
||||
),
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user