Overlay not centered in the floatingActionButton
Macacoazul01 opened this issue · comments
I'm having this bug that the overlay isn't centered on my floatingActionButton
inside the bottom bar:
lib version: onboarding_overlay: ^2.3.5
I don't know if this is fixed on the 3.0 pre-release (do you have any estimate when it will be released?)
sample code:
center.zip
Same behavior with the pre-release
I don't know if it's something related to this package or where animated_bottom_navigation_bar renders the fab as the margin parameter helps with this.
using margin: EdgeInsets.fromLTRB(10, 10, 15, 15),
both on pre-release and 2.3.5:
The problem is that you are scaling the Fab.
You can try wrapping the transform widget with focus and attach the focus node to that, instead of the Fab.
Like this
floatingActionButton: Focus(
focusNode: focus[0],
child: Transform.scale(
scale: 1.1,
child: FloatingActionButton(
elevation: 10,
onPressed: () {
print('object');
},
backgroundColor: Colors.blue,
child: Center(
child: Icon(
Icons.add,
color: Colors.white,
size: 30,
),
),
),
),
),