Use fluent icons

This commit is contained in:
Pierre HUBERT 2022-03-24 09:30:08 +01:00
parent 6a79a90e56
commit d9497d50c6
3 changed files with 43 additions and 6 deletions

View File

@ -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) {

View File

@ -106,6 +106,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "6.1.2"
fluent_ui:
dependency: "direct main"
description:
name: fluent_ui
url: "https://pub.dartlang.org"
source: hosted
version: "3.9.1"
fluentui_system_icons:
dependency: "direct main"
description:
@ -158,6 +165,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "4.0.0"
intl:
dependency: transitive
description:
name: intl
url: "https://pub.dartlang.org"
source: hosted
version: "0.17.0"
lints:
dependency: transitive
description:
@ -277,6 +291,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "4.2.4"
recase:
dependency: transitive
description:
name: recase
url: "https://pub.dartlang.org"
source: hosted
version: "4.0.0"
rxdart:
dependency: transitive
description:
@ -284,6 +305,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "0.27.3"
scroll_pos:
dependency: transitive
description:
name: scroll_pos
url: "https://pub.dartlang.org"
source: hosted
version: "0.3.0"
sky_engine:
dependency: transitive
description: flutter

View File

@ -38,7 +38,8 @@ dependencies:
# HTTP client
dio: ^4.0.4
# Fluent icons
# Fluent ui
fluent_ui: ^3.9.1
fluentui_system_icons: ^1.1.162
# Image processing