Text and Container Widgets in flutter/flutter widgets part-1

Published: 09 September 2022
on channel: CODING IS LIFE
62
0

#flutter #text #container #fluttertutorialforbeginners #flutterflow
#flutterdevelopment #flutterwidgets #tutorialpart1
#codingislife
Subscribe

Text:-

A run of text with a single style.

The Text widget displays a string of text with single style. The string might break across multiple lines or might all be displayed on the same line depending on the layout constraints.

The style argument is optional. When omitted, the text will use the style from the closest enclosing DefaultTextStyle. If the given style's TextStyle.inherit property is true (the default), the given style will be merged with the closest enclosing DefaultTextStyle. This merging behavior is useful, for example, to make the text bold while using the default font family and size.


Container:-

A convenience widget that combines common painting, positioning, and sizing widgets.

A container first surrounds the child with padding (inflated by any borders present in the decoration) and then applies additional constraints to the padded extent (incorporating the width and height as constraints, if either is non-null). The container is then surrounded by additional empty space described from the margin.

During painting, the container first applies the given transform, then paints the decoration to fill the padded extent, then it paints the child, and finally paints the foregroundDecoration, also filling the padded extent.

Containers with no children try to be as big as possible unless the incoming constraints are unbounded, in which case they try to be as small as possible. Containers with children size themselves to their children. The width, height, and constraints arguments to the constructor override this.

By default, containers return false for all hit tests. If the color property is specified, the hit testing is handled by ColoredBox, which always returns true. If the decoration or foregroundDecoration properties are specified, hit testing is handled by Decoration.hitTest.


Watch video Text and Container Widgets in flutter/flutter widgets part-1 online, duration hours minute second in high quality that is uploaded to the channel CODING IS LIFE 09 September 2022. Share the link to the video on social media so that your subscribers and friends will also watch this video. This video clip has been viewed 62 times and liked it 0 visitors.