mirror of
https://github.com/Dr-Blank/Vaani.git
synced 2025-12-06 02:59:28 +00:00
feat: Add miniplayer
This commit is contained in:
parent
610d9a2aa0
commit
7f5309d10a
25 changed files with 355 additions and 29 deletions
|
|
@ -4,7 +4,7 @@ import 'package:whispering_pages/pages/app_settings.dart';
|
|||
import 'package:whispering_pages/pages/home_page.dart';
|
||||
import 'package:whispering_pages/features/item_viewer/view/library_item_page.dart';
|
||||
import 'package:whispering_pages/pages/library_page.dart';
|
||||
import 'package:whispering_pages/pages/onboarding/onboarding_single_page.dart';
|
||||
import 'package:whispering_pages/features/onboarding/view/onboarding_single_page.dart';
|
||||
|
||||
import 'scaffold_with_nav_bar.dart';
|
||||
import 'transitions/slide.dart';
|
||||
|
|
@ -28,6 +28,7 @@ class MyAppRouter {
|
|||
name: Routes.onboarding.name,
|
||||
builder: (context, state) => const OnboardingSinglePage(),
|
||||
),
|
||||
// The main app shell
|
||||
StatefulShellRoute.indexedStack(
|
||||
builder: (
|
||||
BuildContext context,
|
||||
|
|
|
|||
|
|
@ -1,9 +1,11 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:whispering_pages/features/player/view/audioobok_player.dart';
|
||||
|
||||
/// Builds the "shell" for the app by building a Scaffold with a
|
||||
/// BottomNavigationBar, where [child] is placed in the body of the Scaffold.
|
||||
class ScaffoldWithNavBar extends StatelessWidget {
|
||||
class ScaffoldWithNavBar extends HookConsumerWidget {
|
||||
/// Constructs an [ScaffoldWithNavBar].
|
||||
const ScaffoldWithNavBar({
|
||||
required this.navigationShell,
|
||||
|
|
@ -14,9 +16,14 @@ class ScaffoldWithNavBar extends StatelessWidget {
|
|||
final StatefulNavigationShell navigationShell;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
return Scaffold(
|
||||
body: navigationShell,
|
||||
body: Stack(
|
||||
children: [
|
||||
navigationShell,
|
||||
const AudiobookPlayer(),
|
||||
],
|
||||
),
|
||||
bottomNavigationBar: BottomNavigationBar(
|
||||
elevation: 0.0,
|
||||
landscapeLayout: BottomNavigationBarLandscapeLayout.centered,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue