avatar_glow icon indicating copy to clipboard operation
avatar_glow copied to clipboard

Using on floatingActionButton

Open pishguy opened this issue 5 years ago • 6 comments

how can i avoid resize floatingActionButton when thats child of avatar_grow? thats cause of make the larger margin

ScreenShot

Scaffold(
  key: _scaffoldKey,
  primary: true,
  resizeToAvoidBottomPadding: false,
  appBar: ApplicationToolbar(title: title),
  floatingActionButton: AvatarGlow(
    startDelay: Duration(milliseconds: 1000),
    glowColor: Colors.blue,
    endRadius: 90.0,
    duration: Duration(milliseconds: 2000),
    repeat: true,
    showTwoGlows: true,
    repeatPauseDuration: Duration(milliseconds: 100),
    child: Builder(
        builder: (context) => FloatingActionButton(
              child: Icon(Icons.add),
              onPressed: () {
                _settingModalBottomSheet(context);
              },
            )),
  ),
  floatingActionButtonLocation:
      FloatingActionButtonLocation.centerDocked,
  bottomNavigationBar: AppBottomNavigationBar(),
  drawer: AppDrawer(),
  body: _fragments[_currentIndex],
),

how can we using feature like with z-index to avoid resize?

pishguy avatar May 28 '19 05:05 pishguy

Hi @MahdiPishguy sorry for late response. Indeed thats a good issue. Actually the glow's container is taking extra space thats why the notch appears too large. Right now i cant think of a solution for this. Do you have any approach to achieve this?

apgapg avatar Jul 23 '19 05:07 apgapg

@xsahil03x Any solution for this?

apgapg avatar Jul 23 '19 05:07 apgapg

@xsahil03x hi, i can't find any solution and i have this problem yet

pishguy avatar Jul 23 '19 06:07 pishguy

I guess you have to make use of overlays here which is a little tricky. We cant use this package directly here. We'll have to copy its code and use it in overlays

On Tue, 23 Jul, 2019, 11:59 Mahdi Pishguy, [email protected] wrote:

@xsahil03x https://github.com/xsahil03x hi, i can't find any solution and i have this problem yet

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/apgapg/avatar_glow/issues/4?email_source=notifications&email_token=ADJ6PL6QKB2COWXATBA7SQLQA2QMZA5CNFSM4HP7ZKU2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD2SCANY#issuecomment-514072631, or mute the thread https://github.com/notifications/unsubscribe-auth/ADJ6PLY6PC2KHOKLNKVBXKTQA2QMZANCNFSM4HP7ZKUQ .

apgapg avatar Jul 23 '19 07:07 apgapg

@gildurao Any solution for this issue? I can't find a way out

apgapg avatar Jul 23 '19 10:07 apgapg

I found a workaround for my use case: Positioning the button absolutely would be a option for people that dont need to embeed him in the bottom bar: https://stackoverflow.com/questions/49566752/flutter-position-fixed-equivalent

JosipDomazetDev avatar May 11 '22 14:05 JosipDomazetDev

I made a fork that should solve this issue. I'll clean it up and add a PR

bradintheusa avatar Jul 10 '23 18:07 bradintheusa

I made a fork that should solve this issue. I'll clean it up and add a PR

can you share your solution? thank.

minhx3 avatar Jul 12 '23 09:07 minhx3

Here: https://github.com/bradintheusa/avatar_glow_plus

I plan to merge it back in. The change is basically just this one line

return UnconstrainedBox(

but it has some debug noise which is unfortunate.

bradintheusa avatar Jul 12 '23 18:07 bradintheusa

@bradintheusa can you also share a small screenshot or video of this looks?

xsahil03x avatar Jul 12 '23 18:07 xsahil03x

There's an example in that repo. It's not specifically a floatingActionButton but I think the concept means it will work

bradintheusa avatar Jul 12 '23 18:07 bradintheusa