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

Debug console shows this message "ensureControlAlpha: for ITYPE_NAVIGATION_BAR" when GNav does not show? #83

Open
Mleendox opened this issue Nov 13, 2022 · 1 comment

Comments

@Mleendox
Copy link

Mleendox commented Nov 13, 2022

So in my app, I have the GNav bar to navigate between some pages. I use Firebase Auth to sign in users. Right after a user signs in, the app navigates to the main page where the GNav is.

class MainPage extends StatefulWidget
{
  const MainPage({Key? key}) : super(key: key);

  @override
  State<MainPage> createState() => _MainPageState();
}

class _MainPageState extends State<MainPage>
{
  final _utils = Utils();
  int _gNavBarIndex = 0;
  final _listPages = [const HomePage(), const Rides(), const ProfilePage()];

  @override
  Widget build(BuildContext context)
  {
    return Scaffold(
      backgroundColor: Colors.blueGrey[100],
      body: _listPages[_gNavBarIndex],
      bottomNavigationBar: Container(
        decoration: BoxDecoration(
          color: _utils.darkBlueGrey,
          borderRadius: BorderRadius.circular(16)
        ),
        child:  Padding(
          padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 10),
          child: GNav(
            backgroundColor: _utils.darkBlueGrey!,
            color: Colors.tealAccent,
            activeColor: _utils.titleTextColor,
            tabBackgroundColor: Colors.white.withOpacity(0.5),
            gap: 10,
            padding: const EdgeInsets.all(8.0),
            selectedIndex: _gNavBarIndex,
            onTabChange: (index) {
              setState(() => _gNavBarIndex = index);
            },
            tabs: const [
              GButton(
                icon: Icons.home,
                text: 'Home',
              ),
              GButton(
                icon: Icons.car_crash_outlined,
                text: 'Rides',
              ),
              GButton(
                icon: Icons.person,
                text: 'Profile',
              )
            ],
          ),
        ),
      ),
    );
  }
}

so from here, the user can now see the HomePage, one of the tabs of the GNav bar. But each time a user logs out and laogs back in, the GNav bar does not appear when they log back in. The debug console shows this message, "ensureControlAlpha: for ITYPE_NAVIGATION_BAR" and I have searched for it and there aren't any information about this message. As a user, I have to close the app and relaunch it, then the GNav bar appears again. Does anyone know how I can fix this issue?

@sooxt98
Copy link
Owner

sooxt98 commented Nov 13, 2022

Looks like some sort of Android related issue,
perhaps take a look at this https://stackoverflow.com/questions/73513952/errors-while-accessing-camera-in-flutter

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

2 participants