In this video you can learn how to apply the same decoration to multiple widgets at once. But also with different elements used in that same decoration.

This is possible thanks to the .copyWith() method.

I’m going to give 3 different TextFields the same decoration, but then I give each of them their own unique Icons and hintTexts.

The goal of this is simply to be a more organized programmer, because when you have a bigger project organization will be your biggest friend.

Also, it will save you some work because you can apply the whole decoration in fewer lines of code. I mean, who wants to write a bunch of lines of code just to decorate some widgets??

00:00 - Intro
00:32 - Decorating The First TextField
00:55 - Creating A Variable For The Decoration
01:08 - Applying The Decoration Variable
01:28 - Applying Unique Decoration Details
02:34 - Exporting The Decoration To Different File
02:58 - Adding An Email Keyboard Type
03:32 - Flutter Mentor Out

#flutter #widgets #decoration

Credits:

OUTRO SONG:
Mitsubachi by Smith The Mister https://smiththemister.bandcamp.com
Smith The Mister https://bit.ly/Smith-The-Mister-YT
Free Download / Stream: http://bit.ly/mitsubachi
Music promoted by Audio Library https://youtu.be/0IgndUb1YQI

Keywords:
Flutter, flutter tutorial, android studio, english, american accent, subtitles, closed captions, tutorial closed captions, flutter tutorial closed captions, flutter tutorial for beginners, flutter widgets, native english flutter tutorial,Dart tutorial,Dart language tutorial,Dart lang,Dart language,Dart, one decoration for multiple widgets, how to use the copyWith method flutter

#flutter #widgets #decoration

Applying Same Decoration To Multiple Widgets (.copyWith) - Flutter
1.45 GEEK