Horizontal divider with text in the middle in Flutter?

前端 未结 6 1670
不思量自难忘°
不思量自难忘° 2021-02-01 03:13

Is there a built in widget in Flutter to create a divider with text in the middle? Any guide on how to do it? Like this: (the \"OR\" text in the middle of horizontal line)

6条回答
  •  故里飘歌
    2021-02-01 03:55

    You can try to use the Row widget.

    Row(
        children: [
            Expanded(
                child: Divider()
            ),       
    
            Text("OR"),        
    
            Expanded(
                child: Divider()
            ),
        ]
    )
    

提交回复
热议问题