mirror of
https://github.com/Dr-Blank/Vaani.git
synced 2025-12-09 12:39:29 +00:00
Refactor chapter seeking logic in AudiobookPlayerSeekChapterButton
This commit is contained in:
parent
9dcfbee201
commit
4a430209af
5 changed files with 13 additions and 21 deletions
|
|
@ -1,10 +1,9 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
import 'package:whispering_pages/features/item_viewer/view/library_item_page.dart';
|
||||
import 'package:whispering_pages/features/onboarding/view/onboarding_single_page.dart';
|
||||
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/features/onboarding/view/onboarding_single_page.dart';
|
||||
|
||||
import 'scaffold_with_nav_bar.dart';
|
||||
import 'transitions/slide.dart';
|
||||
|
|
@ -21,6 +20,7 @@ class MyAppRouter {
|
|||
const MyAppRouter();
|
||||
|
||||
GoRouter get config => GoRouter(
|
||||
initialLocation: Routes.home.path,
|
||||
routes: [
|
||||
// sign in page
|
||||
GoRoute(
|
||||
|
|
@ -47,20 +47,11 @@ class MyAppRouter {
|
|||
navigatorKey: _sectionHomeNavigatorKey,
|
||||
routes: <RouteBase>[
|
||||
GoRoute(
|
||||
path: '/',
|
||||
name: Routes.home,
|
||||
path: Routes.home.path,
|
||||
name: Routes.home.name,
|
||||
// builder: (context, state) => const HomePage(),
|
||||
pageBuilder: defaultPageBuilder(const HomePage()),
|
||||
),
|
||||
// /library/:libraryId
|
||||
GoRoute(
|
||||
path: Routes.library.path,
|
||||
name: Routes.library.name,
|
||||
builder: (context, state) => LibraryPage(
|
||||
libraryId:
|
||||
state.pathParameters[Routes.library.pathParamName]!,
|
||||
),
|
||||
),
|
||||
GoRoute(
|
||||
path: Routes.libraryItem.path,
|
||||
name: Routes.libraryItem.name,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue