Flutter Widgets Part 3
Posted By : Lucky Mehndiratta | 07-Dec-2020
10 Mins Flutter Widget!!!....(PART - III)
When we used the Row & Column in our UI design then we need to give equal or random space between the children of the Row & Column widgets. to fulfill the UI design requirement we can use the Spacer widget with its properties like as flex & we can customize these properties as per our requirement.
In case you missed part two, Flutter Widget Part 2
Sometime we can't know how we place the Widget on the screen and how to cover up the blank space present on the screen. Placeholder is the best way to tackle this situation and use the Placeholder properties as per the requirement. its provide height, width e.t.c
In the mobile application development Text Widget is the most important part to show the text to users with different font, color & size but what we do when we need to show some word will be different from other text. RichText gives this feature to us & by using this we can play with the text shown to the user by giving some words with different colors, font, and size.
If you want some overlap widget then you use the Stack widget which takes all the widgets as the list of widgets and overlaps all the widgets to one on another. Stack also provides the fit properties which we use to resize the list of widgets as per our requirement.
Need to show the list of widgets in horizontal & vertical directions then try Listview Widgets. Provide a list of the widgets and set the scrolling direction property of the Listview you can see all these widgets in the list with scrolling on the screen & if you want bottom-up Listview just set the reverse property to true and if you can't want to scroll the listview just set the physics property of the Listview.
Sometimes the list of widgets gets some design so you can do it by using other widgets but ListTile is a good way to design this because it provides properties like leading trailing icon, title, subtitle, and most important click event.
You want the to user can select the text shown on the screen try SelectableText. SelectableText is like Text widgets. You can set the color of the cursor and other properties & action of the SelectableText. SelectableText also provides the onTap to capture the click event.
Need space between the widget to give a better look Try Padding widget. Padding widget gives space around the widget like a top, bottom, left, right. if you want to give only one side space around the widget you can also achieve this by using the Padding Widget padding property.
You need to be shown on and off from the list of the widgets then Try CheckboxListTile. CheckboxListTile used with the list of items select and give a good design to this tile as per your Ui design and the user can see the checkbox on the list and by tapping on the tile user can select the item or deselect the item shown in the list.
You want to show some popUp to give specific information to the user then use the ShowAboutDialog widget. ShowAboutDialog widget takes the context on which the dialog will be shown to the user and children to customize the dialog box as per your choice.
Thank you for reading...
Our Flutter app development services ensure that your app performs seamlessly across multiple platforms with minimal downtime or latency. We critically analyze your project requirements to formulate effective mobile app development strategies for better user engagement and interactivity.