Hi everyone I am new to flutter and trying to write OR in a horizontal line like shown in figure but I do not know how to do that, I have tried to google it but that did not helped me
example demonstration
Note: OR is in center
Hi everyone I am new to flutter and trying to write OR in a horizontal line like shown in figure but I do not know how to do that, I have tried to google it but that did not helped me
example demonstration
Note: OR is in center
Try below Code hope its help to you. You must use this(-- OR -- ) type of design Expanded or Flexible Widget
Go here For Expanded Widget and here for Flexible Widget
Padding(
padding: EdgeInsets.all(8.0),
child: Row(
children: [
Expanded(
child: Divider(
color: Colors.black,
thickness: 1,
),
),
Padding(
padding: const EdgeInsets.all(8.0),
child: Text('OR'),
),
Expanded(
child: Divider(
color: Colors.black,
thickness: 1,
),
),
],
),
),
Below is the solution using a row widget
Row(children: const [
Expanded(child: Divider(thickness: 1.5)),
Text("OR",
style: TextStyle(fontSize: 20, color: Colors.grey)),
Expanded(child: Divider(thickness: 1.5)),
]),
This is it when i tried to create Instagram login screen