mirror of
https://github.com/KRTirtho/spotube.git
synced 2025-09-13 16:05:18 +00:00
48 lines
1.6 KiB
Dart
48 lines
1.6 KiB
Dart
import 'package:flutter/material.dart' hide Image;
|
|
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
|
import 'package:platform_ui/platform_ui.dart';
|
|
import 'package:spotube/components/Library/UserAlbums.dart';
|
|
import 'package:spotube/components/Library/UserArtists.dart';
|
|
import 'package:spotube/components/Library/UserDownloads.dart';
|
|
import 'package:spotube/components/Library/UserLocalTracks.dart';
|
|
import 'package:spotube/components/Library/UserPlaylists.dart';
|
|
import 'package:spotube/components/Shared/AnonymousFallback.dart';
|
|
|
|
class UserLibrary extends ConsumerWidget {
|
|
const UserLibrary({Key? key}) : super(key: key);
|
|
@override
|
|
Widget build(BuildContext context, ref) {
|
|
return DefaultTabController(
|
|
length: 5,
|
|
child: SafeArea(
|
|
child: PlatformTabView(
|
|
androidIsScrollable: true,
|
|
placement: PlatformProperty.all(PlatformTabbarPlacement.top),
|
|
body: {
|
|
PlatformTab(
|
|
label: "Playlist",
|
|
icon: Container(),
|
|
): const AnonymousFallback(child: UserPlaylists()),
|
|
PlatformTab(
|
|
label: "Downloads",
|
|
icon: Container(),
|
|
): const UserDownloads(),
|
|
PlatformTab(
|
|
label: "Local",
|
|
icon: Container(),
|
|
): const UserLocalTracks(),
|
|
PlatformTab(
|
|
label: "Artists",
|
|
icon: Container(),
|
|
): const AnonymousFallback(child: UserArtists()),
|
|
PlatformTab(
|
|
label: "Album",
|
|
icon: Container(),
|
|
): const AnonymousFallback(child: UserAlbums()),
|
|
},
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|