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

Not floating in flutter 3.3 #12

Open
RasulM97 opened this issue Sep 30, 2022 · 7 comments
Open

Not floating in flutter 3.3 #12

RasulM97 opened this issue Sep 30, 2022 · 7 comments

Comments

@RasulM97
Copy link

I'm using your package for flutter 3.3 with dart 2.18.1, and it has a background above of all screens, then it is not float, actually.
Please update your beautiful package.
Best regards.

@Naseeb-Nex
Copy link

I also have this problem.

The floating is not working need to transparent the background color transparent I think when using the margin.

1667025316098

@buraktabn
Copy link
Contributor

Did you try setting the extendBody to ture in Scaffold?

Scaffold(
  extendBody: true,
  ...
)

@RasulM97
Copy link
Author

RasulM97 commented Nov 12, 2022

Did you try setting the extendBody to ture in Scaffold?

Scaffold(
  extendBody: true,
  ...
)

Yes I did, and I used its background color to transparency, but it didn't work.

@buraktabn
Copy link
Contributor

That's weird. I suspect there's something else going on. The example below is working as expected. Can you compare it with your code, maybe you're missing something.

[✓] Flutter (Channel stable, 3.3.4, on Ubuntu 22.04.1 LTS 5.15.0-52-generic, locale en_CA.UTF-8)
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
[✓] Chrome - develop for the web
[✓] Linux toolchain - develop for Linux desktop
[✓] Android Studio (version 2021.3)
[✓] IntelliJ IDEA Community Edition (version 2022.2)
[✓] Connected device (2 available)
[✓] HTTP Host Availability

• No issues found!
Scaffold(
  extendBody: true,
  bottomNavigationBar: const MyBottomNavigationBar(),
  body: child,
);
class MyBottomNavigationBar extends StatelessWidget {
  const MyBottomNavigationBar({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    final tabsRouter = AutoTabsRouter.of(context);

    return ConstrainedBox(
      constraints: const BoxConstraints(maxWidth: 350, maxHeight: 104),
      child: DotNavigationBar(
        margin: const EdgeInsets.only(left: 10, right: 10),
        paddingR: const EdgeInsets.only(bottom: 16, top: 16),
        marginR: EdgeInsets.fromLTRB(50, 16, 50, MediaQuery.of(context).viewPadding.bottom == 0 ? 16 : 0),
        currentIndex: tabsRouter.activeIndex,
        dotIndicatorColor: Colors.transparent,
        backgroundColor: const Color(0xFF101113).withOpacity(.99),
        unselectedItemColor: const Color(0xff49576C),
        // enableFloatingNavBar: false,
        enablePaddingAnimation: false,
        // enableMagnification: true,
        // iconSize: 20,
        borderRadius: 28,
        onTap: tabsRouter.setActiveIndex,
        boxShadow: [
          BoxShadow(
            color: const Color(0xFF101113).withOpacity(0.6),
            blurRadius: 30,
            spreadRadius: 10,
            offset: const Offset(0, 30),
          )
        ],
        items: [
          /// Home
          DotNavigationBarItem(
            icon: const FaIcon(FontAwesomeIcons.house, size: 16),
            selectedColor: primary,
          ),
          DotNavigationBarItem(
            icon: const FaIcon(FontAwesomeIcons.globe, size: 16),
            selectedColor: primary,
          ),
          DotNavigationBarItem(
            icon: const FaIcon(FontAwesomeIcons.users, size: 16),
            selectedColor: primary,
          ),
          DotNavigationBarItem(
            icon: const FaIcon(FontAwesomeIcons.user, size: 16),
            selectedColor: primary,
          ),
        ],
      ),
    );
  }
}

@BrunoJurkovic
Copy link

image

@buraktabn

I am having this issue as well, on version 3.3.10.

The screenshot above is from your example. Could you please look into it, spent an hour but can't find the issue causing this.

Thanks.

@BrunoJurkovic
Copy link

Seems like flutter clean fixed this. Very weird behavior.

@DenizUlucan
Copy link

If you are using safearea widget you can try to remove it

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

5 participants