Exploring Container Widget | Flutter

Publié le: 03 mars 2021
sur la chaîne: Rashid Wassan
179
3

Hi guys, in this video I've talked about Flutter's Container widget in beginner friendly way.
Sorry for keystroke sounds.

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.


Please do let me know if you have any suggestions for upcoming videos. Thank you!

Flutter Container cheat sheet Medium article:
  / container  


Sur cette page du site, vous pouvez voir la vidéo en ligne Exploring Container Widget | Flutter durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur Rashid Wassan 03 mars 2021, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 179 fois et il a aimé 3 téléspectateurs. Bon visionnage!