mirror of
https://github.com/austinried/subtracks.git
synced 2026-02-10 15:02:42 +01:00
display albums from db
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:material_symbols_icons/symbols.dart';
|
||||
|
||||
import '../lists/albums_grid.dart';
|
||||
import '../state/services.dart';
|
||||
import '../util/custom_scroll_fix.dart';
|
||||
|
||||
class LibraryScreen extends StatefulWidget {
|
||||
@@ -126,13 +128,18 @@ class _LibraryScreenState extends State<LibraryScreen>
|
||||
)
|
||||
.toList(),
|
||||
),
|
||||
IconButton(
|
||||
onPressed: () {
|
||||
context.push('/settings');
|
||||
},
|
||||
icon: Icon(
|
||||
Symbols.settings_rounded,
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
SyncButton(),
|
||||
IconButton(
|
||||
onPressed: () {
|
||||
context.push('/settings');
|
||||
},
|
||||
icon: Icon(
|
||||
Symbols.settings_rounded,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -209,3 +216,19 @@ class _NewWidgetState extends State<NewWidget>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class SyncButton extends HookConsumerWidget {
|
||||
const SyncButton({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
final syncService = ref.watch(syncServiceProvider);
|
||||
|
||||
return IconButton(
|
||||
icon: Icon(Symbols.sync_rounded),
|
||||
onPressed: () {
|
||||
syncService.sync();
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user