mirror of
https://github.com/KRTirtho/spotube.git
synced 2025-09-13 16:05:18 +00:00

* feat: add connect server support * feat: add ability discover and connect to same network Spotube(s) and sync queue * feat(connect): add player controls, shuffle, loop, progress bar and queue support * feat: make control page adaptive * feat: add volume control support * cd: upgrade macos runner version * chore: upgrade inappwebview version to 6 * feat: customized devices button * feat: add user icon next to devices button * feat: add play in remote device support * feat: show alert when new client connects * fix: ignore the device itself from broadcast list * fix: volume control not working * feat: add ability to select current device's output speaker
50 lines
1.8 KiB
Dart
50 lines
1.8 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:flutter_desktop_tools/flutter_desktop_tools.dart';
|
|
import 'package:flutter_hooks/flutter_hooks.dart';
|
|
import 'package:gap/gap.dart';
|
|
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
|
import 'package:spotube/collections/spotube_icons.dart';
|
|
import 'package:spotube/components/connect/connect_device.dart';
|
|
import 'package:spotube/components/home/sections/featured.dart';
|
|
import 'package:spotube/components/home/sections/friends.dart';
|
|
import 'package:spotube/components/home/sections/genres.dart';
|
|
import 'package:spotube/components/home/sections/made_for_user.dart';
|
|
import 'package:spotube/components/home/sections/new_releases.dart';
|
|
import 'package:spotube/components/shared/page_window_title_bar.dart';
|
|
|
|
class HomePage extends HookConsumerWidget {
|
|
const HomePage({super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context, ref) {
|
|
final controller = useScrollController();
|
|
|
|
return SafeArea(
|
|
bottom: false,
|
|
child: Scaffold(
|
|
body: CustomScrollView(
|
|
controller: controller,
|
|
slivers: [
|
|
PageWindowTitleBar.sliver(
|
|
pinned: DesktopTools.platform.isDesktop,
|
|
actions: [
|
|
const ConnectDeviceButton(),
|
|
const Gap(10),
|
|
IconButton.filledTonal(
|
|
icon: const Icon(SpotubeIcons.user),
|
|
onPressed: () {},
|
|
),
|
|
const Gap(10),
|
|
],
|
|
),
|
|
const HomeGenresSection(),
|
|
const SliverToBoxAdapter(child: HomeFeaturedSection()),
|
|
const HomePageFriendsSection(),
|
|
const SliverToBoxAdapter(child: HomeNewReleasesSection()),
|
|
const SliverSafeArea(sliver: HomeMadeForUserSection()),
|
|
],
|
|
),
|
|
));
|
|
}
|
|
}
|