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,34 @@
|
||||
import 'package:drift/drift.dart' show Value;
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
|
||||
import 'app/router.dart';
|
||||
import 'database/database.dart';
|
||||
|
||||
void main() async {
|
||||
WidgetsFlutterBinding.ensureInitialized();
|
||||
|
||||
final db = SubtracksDatabase();
|
||||
await db
|
||||
.into(db.sources)
|
||||
.insertOnConflictUpdate(
|
||||
SourcesCompanion.insert(
|
||||
id: Value(1),
|
||||
name: 'test navidrome',
|
||||
),
|
||||
);
|
||||
await db
|
||||
.into(db.subsonicSettings)
|
||||
.insertOnConflictUpdate(
|
||||
SubsonicSettingsCompanion.insert(
|
||||
sourceId: Value(1),
|
||||
address: Uri.parse('http://10.0.2.2:4533'),
|
||||
username: 'admin',
|
||||
password: 'password',
|
||||
useTokenAuth: Value(true),
|
||||
),
|
||||
);
|
||||
|
||||
void main() {
|
||||
runApp(const MainApp());
|
||||
}
|
||||
|
||||
@@ -11,11 +37,13 @@ class MainApp extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return MaterialApp.router(
|
||||
themeMode: ThemeMode.dark,
|
||||
darkTheme: ThemeData.dark(useMaterial3: true),
|
||||
debugShowCheckedModeBanner: false,
|
||||
routerConfig: router,
|
||||
return ProviderScope(
|
||||
child: MaterialApp.router(
|
||||
themeMode: ThemeMode.dark,
|
||||
darkTheme: ThemeData.dark(useMaterial3: true),
|
||||
debugShowCheckedModeBanner: false,
|
||||
routerConfig: router,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user