LanarsInc / animated-bottom-navigation-bar-flutter

AnimatedBottomNavigationBar is a customizable widget inspired by
https://dribbble.com/shots/7134849-Simple-Tab-Bar-Animation
Other
369 stars 108 forks source link

using safe area and extend body causes color issue #52

Closed Bimbum1337 closed 1 year ago

Bimbum1337 commented 1 year ago

Hello, I'm trying to turn this into transparent image

I know that I have to extend the body to get it working, but the issue is am using safe area at the body, but seems that it doesn't work unless I remove the safearea widget

body: SafeArea(
              child: snapshot.data ?? _viewModel.mainScreenWidgets[0],
            ),
MarkoshYevhenii commented 1 year ago

@Bimbum1337 Try setting the maintainBottomViewPadding parameter to true for the SafeArea widget. SafeArea( maintainBottomViewPadding: true, child: ____ , )

jonatandorozco commented 1 year ago

I'm not using SafeArea component and the background issue persists

baptistesx commented 1 year ago

Hey,

i'm currently facing the same issue. How to set this white part transparent?

I tried your solution: Scaffold > body > SafeArea > maintainBottomViewPadding: true

but it's not working :s

vizhan-lanars commented 1 year ago

@MarkoshYevhenii

BohdanPlastun commented 1 year ago

Make sure that you use
extendBody: true , maintainBottomViewPadding: true,

Scaffold(
      extendBody: true,
      body: SafeArea(
        maintainBottomViewPadding: true,
        child: Container(),
      ),
      floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked,
      floatingActionButton: FloatingActionButton(),
      bottomNavigationBar: AnimatedBottomNavigationBar(),
    );
BohdanPlastun commented 1 year ago

@baptistesx, @jonatandorozco, @Bimbum1337

baptistesx commented 1 year ago

Awesome, it works thanks a lot !