-
-
Notifications
You must be signed in to change notification settings - Fork 124
Open
Description
Describe the bug
I'm implementing bloc with beamer and i need a bloc to be available to multiple pages. I found the example with multiple beamers and relative beamers and I mange to implement something working, but when navigating to the
Beamer version: 1.7.0
Expected behavior
Back button to be shown.
Screenshots
If applicable, add screenshots to help explain your problem.
Smartphone (please complete the following information):
- Device: iphone 16 pro max simulator
MaterialApp.router(
routerDelegate: rootRouterDelegate,
routeInformationParser: BeamerParser(),
backButtonDispatcher: BeamerBackButtonDispatcher(delegate: rootRouterDelegate),
)
final _bookRouterDelegate = BeamerDelegate(
updateParent: false,
locationBuilder:
RoutesLocationBuilder(
routes: {
'/books/:bookId/details':
(context, state, _) => const LayoutWrapper(childWidget: BookDetailsScreen()),
'/books/:bookId/buy':
(context, state, _) => const LayoutWrapper(childWidget: BuyBookScreen()),
'/books/:bookId/reviews':
(context, state, _) =>
const LayoutWrapper(childWidget: ReviewsScreen()),
},
).call,
);
final rootRouterDelegate = BeamerDelegate(
notFoundRedirectNamed: '/',
locationBuilder:
RoutesLocationBuilder(
routes: {
'/':
(context, state, data) => const BeamPage(
key: ValueKey('home'),
title: 'Home',
child: LayoutWrapper(childWidget: HomeScreen()),
),
'/books/:bookId/*':
(context, state, _) => BeamPage(
key: const ValueKey('id/x'),
child: BlocProvider(
create: (_) => di<BookBloc>(),
child: Beamer(routerDelegate: _bookRouterDelegate),
),
),
},
).call,
);navigation to the route
onTap:
() => Beamer.of(context).beamToNamed('/books/someBookId/details', beamBackOnPop: true),Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels