I am new in flutter and trying to achieve this task by Row() but not able to complete it.
CodePudding user response:
This can be achieved by using a Stack
widget. The Stack
widget basically places all its children
over each other.
The code can look something like this:
Stack(
children: [
Divider(),
Container(
color: Colors.white,
child: Text('or sign in with'),
),
],
);
CodePudding user response:
You can use a row
and Expanded
around the Divider
s to avoid overflowing.
Row(
children: [
Expanded(child: Divider()),
Text('Some Text'),
Expanded(child: Divider()),
],
);