Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AutoLeadingButton Shows Unwanted Back Button Instead of Drawer Icon #2065

Open
ebsangam opened this issue Sep 27, 2024 · 0 comments
Open

AutoLeadingButton Shows Unwanted Back Button Instead of Drawer Icon #2065

ebsangam opened this issue Sep 27, 2024 · 0 comments

Comments

@ebsangam
Copy link

ebsangam commented Sep 27, 2024

I am using AutoLeadingButton() in my app and it displays drawer in the home page for the first time. But when ever material app rebuilds (it rebuild when updating theme or locale) app bar shows back button in the home page instead of drawer icon. When not using AutoLeadingButton() the problem does not appear.

Here is my router:

import 'package:auto_route/auto_route.dart';
import 'package:injectable/injectable.dart';

import 'router.gr.dart';

@singleton
@AutoRouterConfig(replaceInRouteName: 'Page,Route')
class AppRouter extends RootStackRouter {
  @override
  RouteType get defaultRouteType =>
      const RouteType.adaptive(); //.cupertino, .adaptive ..etc

  @override
  List<AutoRoute> get routes => <AutoRoute>[
        // Splash
        AutoRoute(
          page: HomeEmptyRoute.page,
          children: [
            AutoRoute(
              page: FeedEmptyRoute.page,
              initial: true,
              children: [
                AutoRoute(
                  initial: true,
                  page: FeedListingRoute.page,
                ),
                AutoRoute(
                  page: FeedDetailsRoute.page,
                ),
              ],
            ),
            AutoRoute(
              page: CommentsRoute.page,
              fullscreenDialog: true,
              // transitionsBuilder: TransitionsBuilders.slideBottom,
            ),
          ],
        ),
      ];
}

Drawer is in FeedListingRoute.
auto_route version: 9.2.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant