I’m working on a Flutter project and need guidance on coding a UI that includes a divider with a button situated between the divider. Could someone provide a code example or share insights on the best approach to achieve this layout in Flutter?
/// DIVIDER
// Todo: Button along with Divider
const Divider(
height: 16,
thickness: 2,
color: Color(0xffeaecf0),
),
2
Answers
That’s what the
Stack
widget is for: to stack widgets on top of each other.You can play around with the parameters of the
Positioned
to get your desired output:You can use the
Stack
widget for that!The output will be something like this: