Adding an attribute to skip the margin offset for the fab#27
Adding an attribute to skip the margin offset for the fab#27ericmartineau wants to merge 17 commits intomarianocordoba:masterfrom
Conversation
|
Hi @ericmartineau. Thank you for your PR! |
MrCsabaToth
left a comment
There was a problem hiding this comment.
I'm not the author but I think these should be discussed before any merging.
| {Key key, | ||
| this.alignment = Alignment.bottomRight, | ||
| this.buttonKey, | ||
| this.alignment = Alignment.bottomCenter, |
There was a problem hiding this comment.
We shouldn't change the default alignment, that would break existing app UXs
| // textDirection: textDirection ?? Directionality.of(context), | ||
| // fit: fit, | ||
| // overflow: overflow, | ||
| // ); |
| import 'package:flutter/rendering.dart'; | ||
|
|
||
| /// Passes all events to all children of the stack. The FAB was having issues | ||
| /// where the padding on the button was blocking the circular items on the edge |
There was a problem hiding this comment.
If this is for #14 then it's not the right fix.
|
|
||
| // FAB | ||
| Container( | ||
| margin: widget.fabMargin, |
There was a problem hiding this comment.
I think this might be faulty here? The Container's margin is removed earlier along with the compensatory translation for that margin. If we add a margin here then it margins the button like originally it wasn't intended to. Correct me if I'm wrong. I find it very good idea to simplify the widget stack by removing the original margin and the translation.
|
It'd be so great if we could just ditch the and just start the build return with the |
# Conflicts: # pubspec.lock
In my case, I was positioning the FAB using a stack (I'm using ios scaffold widgets).
The margin offsets were causing my button to float slightly to the left and downward. This attribute allows for removing the margin offset transformation.