Use fluent icons
This commit is contained in:
@ -1,10 +1,11 @@
|
||||
// ignore_for_file: avoid_print
|
||||
|
||||
import 'package:fluent_ui/fluent_ui.dart' as fluent;
|
||||
import 'package:fluentui_system_icons/fluentui_system_icons.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:music_web_player/ui/music_player.dart';
|
||||
import 'package:music_web_player/api.dart';
|
||||
import 'package:music_web_player/config.dart';
|
||||
import 'package:music_web_player/ui/music_player.dart';
|
||||
|
||||
void main() {
|
||||
loadConfig();
|
||||
@ -24,7 +25,10 @@ class PlayerApp extends StatelessWidget {
|
||||
primarySwatch: Colors.green,
|
||||
brightness: Brightness.dark,
|
||||
),
|
||||
home: const AppHome(),
|
||||
home: fluent.FluentTheme(
|
||||
child: const AppHome(),
|
||||
data: fluent.ThemeData(),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -68,11 +72,15 @@ class _AppHomeState extends State<AppHome> {
|
||||
child: IntrinsicHeight(
|
||||
child: Column(
|
||||
children: [
|
||||
const Icon(FluentIcons.warning_24_regular, size: 50),
|
||||
const Icon(
|
||||
FluentIcons.warning_24_regular,
|
||||
size: 50,
|
||||
color: Colors.white,
|
||||
),
|
||||
const SizedBox(height: 50),
|
||||
const Text("Failed to load musics list!"),
|
||||
const SizedBox(height: 50),
|
||||
ElevatedButton(
|
||||
fluent.FilledButton(
|
||||
onPressed: load,
|
||||
child: Text("Try again".toUpperCase()),
|
||||
),
|
||||
@ -82,7 +90,7 @@ class _AppHomeState extends State<AppHome> {
|
||||
}
|
||||
|
||||
if (musics == null) {
|
||||
return const Center(child: CircularProgressIndicator());
|
||||
return const Center(child: fluent.ProgressRing());
|
||||
}
|
||||
|
||||
if (musics!.isEmpty) {
|
||||
|
Reference in New Issue
Block a user