Home > Enterprise >  How to have text between a top border line in flutter
How to have text between a top border line in flutter

Time:08-16

How can I do something like this with flutter

Screenshot

CodePudding user response:

You can use a row with expanded and a text between them

Row(
 children: [
 Expanded(
   child : Container(
     height: 2,
     color: Colors.black
   )
 ),
 Text('some text here'),
 Expanded(
   child : Container(
     height: 2,
     color: Colors.black
   )
 ),
]
)

CodePudding user response:

Use Row, Flexible, Divider and Text widgets to implement this

Row(
  children: [
    Flexible(child : Divider(color: Colors.black, thickness: 0.5,)),
    Text(' Or Continue with '),
    Flexible(child : Divider(color: Colors.black, thickness: 0.5,)),
  ]
),
  • Related