Some times we may required to add vertical line inside our UI, How do we add vertical divider inside other widget. By using VerticalDivider widget we can add vertical divider in between widgets. VerticalDivider(), Constructor Properties: When we add verticaldivider inside row widget it will not show. We can overcome not showing verticaldivider issue by Example with IntrinsicHeight Example with VerticalDivider
VerticalDivider({
Key? key,
this.width,
this.thickness,
this.indent,
this.endIndent,
this.color,
})
color: Set the divider color
thickness: Set the Thikness for the divider
indent: set the Space at the top of the divider
endIndent: Set the space at the bottom of the divider
IntrinsicHeight(
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Icon(Icons.menu,color: AppColors.technoBlack,),
SizedBox(width: 5.w,),
Expanded(child: TextField(
style: TextStyle(fontSize: 16.sp,color: AppColors.technoBlack,fontWeight: FontWeight.w300),
decoration: InputDecoration(
hintText: "Your Current Location",
focusedBorder: InputBorder.none,
),)),
SizedBox(width: 5.w,),
VerticalDivider(color: AppColors.technoBlack,thickness: 2),
SizedBox(width: 5.w,),
Icon(Icons.filter_tilt_shift,color: AppColors.technoBlack,),
],),
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Icon(Icons.menu,color: AppColors.technoBlack,),
SizedBox(width: 5.w,),
Expanded(child: TextField(
style: TextStyle(fontSize: 16.sp,color: AppColors.technoBlack,fontWeight: FontWeight.w300),
decoration: InputDecoration(
hintText: "Your Current Location",
focusedBorder: InputBorder.none,
),)),
SizedBox(width: 5.w,),
SizedBox(child: VerticalDivider(color: AppColors.technoBlack,thickness: 2,),height: 30,),
SizedBox(width: 5.w,),
Icon(Icons.filter_tilt_shift,color: AppColors.technoBlack,),
],),
How to change package name in flutter?
Fix Flutter Null Safety Issue with RRutors
How to convert a String value to double in flutter?
How to remove debug banner in flutter?
How to display snackbar infinite duration in a flutter application
Flutter - Vertical Divider - How to add Vertical Divider?
How to create Gradient background for AppBar in Flutter
Can we use Container color and decoration properties at once?
Fix Scaffold.of() Called Without Scaffold Exception - RRutors
How to place a listview inside a SingleChildScrollView but prevent them from scrolling separately?
How to make a widget Center vertically inside a SingleChildScrollView
How does Flutter load images?
How do we save the data in browser's cookies using the Flutter web?
How to deactivate back button in flutter?
How to copy text from Text Widget flutter?
How can i use hexadecimal color code in Flutter?
OS Error: A required privilege is not held by the client errno = 1314
How to set the TextFormField/TextField border color
How do i make CachedNetwork image as rounded circle in flutter?
How do I supply/set an initial value to a text field in Flutter ?
How do i change the OutlineInputBorder color?
How to change the application launcher icon on Flutter?
How to make shadow for Container widget Flutter?
How do I open a web browser (URL) from my Flutter code?
What corresponds to Intent in Flutter?
Fix Navigator Context Issue in Flutter with RRutors
How to remove Yellow lines under Text Widgets in Flutter?
How to check the given value is a number or not in dart?
How do i make TextButton full width in flutter?
How do i make circular icon Inside Button ?
How to create Toast in Flutter?
Fix Flutter Bottom Overflowed Error in Your App - RRutors
How to find the Screen orientation in flutter
How to handle the code after showDialog is dismissed in Flutter?
Fix MediaQuery.of() Error in Flutter with RRutors Guide
How to navigate to new screen without back screen
How can i get document id in Flutter Firestore?
How to Close Flutter application Programmatically?
Vertical Divider is Not Showing in my Flutter Application
Flutter Questions and Answers