RhythmBox/lib/screens/library/view.dart

37 lines
979 B
Dart
Raw Normal View History

2024-08-29 08:42:48 +00:00
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:rhythm_box/providers/auth.dart';
import 'package:rhythm_box/widgets/no_login_fallback.dart';
import 'package:rhythm_box/widgets/playlist/user_playlist_list.dart';
class LibraryScreen extends StatefulWidget {
const LibraryScreen({super.key});
@override
State<LibraryScreen> createState() => _LibraryScreenState();
}
class _LibraryScreenState extends State<LibraryScreen> {
late final AuthenticationProvider _authenticate = Get.find();
@override
Widget build(BuildContext context) {
return Material(
color: Theme.of(context).colorScheme.surface,
child: SafeArea(
child: Obx(() {
if (_authenticate.auth.value == null) {
return const NoLoginFallback();
}
return const Column(
children: [
Expanded(child: UserPlaylistList()),
],
);
}),
),
);
}
}