Every Flutter Widget Explained!

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] the about dialogue widget inside the center of the application we will have an elevated button this one will have a child text show about dialogue the unpress will need to trigger the show dialogue this one take the context and a builder the Builder will return the about dialogue for this wiget inside we have the application icon the application legales the name the application version and the children for this example I will have a text widget inside the children and with this you have created an about dialogue widget you can see that you have access to view licenses and this will display all the licenses for your application this widget is usually used to display all the information of your app the about list style widget inside the center of the application I will have an about listy inside you can have an icon you can have the application icon the application legales the application name the application version and a list of widget called it about bu children for this example I will just have a simple text widget and with this you have a list style within your app that work like the about dialogue you can also see the license inside this one this can be used to show the information about your application the absorb pointer widget inside the stack widget we will have two sized box the the first one will have a width of 200 and a height of 100 the child will be a simple elevated button you can see on the screen that the button is clickable this one will have a width of 100 and height of 200 the child will also be an elevated button but with a different color you can see that this button is also clickable we will wrap this elevated button with the absorb pointer widget and this will now absorb the click and the button is no more clickable but the absorb pointer will work only on this elevated button the other one will still work the alert dialogue widget inside the center of our application we will have an elevated button this one will have a text show alert dialogue and when we press on it we will show a dialogue this will take the context and a builder the Builder will return the widget alert dialogue inside you can have the actions which in this example we will use a text button with the unpress navigator.of context. poop and a CH saying close you can also have a title inside the alert dialogue we will say flutter map the content padding will be a Ed and sets. all 20 and the content will be a text this is the aler dialogue with all this you have generate this button and you you have this pop up when you click on it this is the title this is the content and this is the actions the Align widget inside the center of the app we have a container widget this one will have a height of 120 and a width of double. infinity the color will be blue gray inside this one we have the child align and the argument alignment will be alignment. top right the widget takes a child and this one we will use the simple flutter logo with this you can see that the flutter logo is now aligned on the top right of the container you can change the alignment for bottom left by example and you will see that the flutter logo is now on the bottom left the animated align widget first we will need to create a Boolean selected set as false inside the app we will have a gesture detector and this one will have a a non-ap function that set State the selected to the invert of the selected again this one is the Boolean the child will be a center with a container inside the width will be double. Infinity the height will be 250 and the color will be blue gray the child of the container will be the animated align for the alignment we will say if it's selected then the alignment will be top right and otherwise it will be bottom left the duration of this animation will be one second you can also have a curve this one will use the curves do fast out slow in the child of the animated align will be the flutter logo with the size 50 and now every time we press on the gesture detector the flutter logo will go from one corner to the other and the purpose of the animated align is to animate the transition between the alignment of the widget the animated Builder widget for this example Le we will need to import the dart math and we will need to add the width thicker provider State mixing I will show you when we will use this one with this we can create an animation controller called it controller this one is an animation controller the duration will be 10 second and to complete this one we need also the vsync this this one is available only because we use the width thicker provider State mixing so make sure that you have this one we also want to make sure that when the animation finish after 10 second that we repeat the animation as usual when we use a controller we need also to dispose the controller so we will use controller. dispose inside the center widget we will use the child animated Builder the animation will be the controller that we have created and the child will be a flutter logo with the size 100 the widget need also to have a builder with the context and the child we can now return the transform. rotate for this we will need inside the angle and the angle will be the controller. value * 2 * math * pi and we have access to the number Pi because we have in Port the dart math finally we have the child which is this one this code will generate a flutter logo that will rotate forever but instead of the rotate you can use also the scale and the translate in this example we have only used the rotate the animated container let's start this one by adding a Boolean selected set as false the gesture detector will have the untap and the child Center the untap will set State and reverse the value of the selected again the selected is the Boolean that we have set at the beginning in the center we will have a child animated container for the width if the selected is true it will be 200 otherwise it will be 100 the height will have the same logic if it's selected then it will be 100 otherwise it will be 200 the color of the animated container will be blue gray if the selected is true otherwise the color will be white now for the alignment we will say if the selected is true then the alignment will be Center otherwise the alignment will be top Center the duration of this animated container will be 2 second we can also have a curve which will be fast out slow in the child of the animated container will be a flutter logo with the size 75 and you can see that when I press on the gesture detector all the characteristics of the animated container will be animated the width the height the color and the alignment of the child this widget is very simple to implement the animated cross fade widget we start by creating a bully set as true inside the column we will have multiple children the first one will be a sized box with a height of 100 under we will have a text button this one will have the unpress that set State the Boolean to the invert of the Boolean and the child of the text button will be a text saying switch this will be used to trigger the animated Crossfade Widget the third widget inside the column will be the animated cross fade the first thing we need to add is the first child which will be an image the second child will be another different image and then you can use the Crossfade state if the Boolean is true then we will say Crossfade state. show first this will show the first child otherwise Crossfade state do show second this one will show the second child the duration of this animation will be 1 second with all this when you press on the switch button this will animate a fade transition between the two widget or two widget is only two image but you can do this with any widget the animated default textile widget we start by creating a Boolean called it first this one will be set as true we have also a double font size which will be 60 and a color that will be blue inside a column we will have multiple children the first one will be a sized box with the height 120 the will be an animated default text stle this one will take a duration which will be 300 millisecond the style will be a text style the font size will be the font size variable the color will be the color variable and the font weight will be bold this animated default text stle will have a child which will be a text saying flutter to trigger the animation we will create the text button widget in the column the unpress will be used to set State inside we have the font size if the variable Boolean first is true it will be 90 otherwise it will be 60 the color will be the same logic if first is true then the color will be blue otherwise red and then we will reverse the value of the first Boolean the child of the text button will be a Simple Text switch and now every time that you press on the switch this will trigger the animated default text stle and you can see that the size of the text is animated the color also the animated icon the first thing we will do is add the WID taker provider State mix in right after the extend State I will tell you why we need this later next we need to create a Boolean is play that we will set as false when we start and a late animation controller which we call controller with this we can create the init State and inside we will say that the controller is equal to an animation controller the duration will be 1 second and then we use the vsync this and we need the WID ticker provider because otherwise the vsync disc will not work I will put back the WID thicker provider and then we will work on the dispose method inside this one we will just need to dispose the controller when we don't use it anymore now it's time to work on the UI in the center widget we will use a gesture detector the argument on top will trigger a if else condition if the is playay is equal to false then we will say that the controller do forward and we will set the isplay as true otherwise we will say the controller. reverse and the isplay will be equal to false forward mean that we will have the next icon and reverse mean that we will have the previous icon the child of the gesture detector will be the animated icon inside we have the icon animated icon do play pause this is the first icon and this is the second one the progress will be a controller this is an animated controller and we will set the size at 100 if you restart the application you will have a play pause button that is animated this is called the animated icon the animated list widget we start by creating a list of items and then we will create also a key that is a global key this will be used for the animated list widget we need to create a function to add items inside the list first we will say items. insert we will insert at the index zero and we will add a string item with the number of the last item by example it would be item one item two item three and because we don't use the set state but we add items inside the same state we will use the key that we have created do current state and we will insert an item inside we will add the new item in the index zero and the duration will be 1 second we need to create another function for remove the item for this we use the same logic the key. current state. remove item but in this one you can see that we need first the index and then a builder so we will remove the index that we have received from the argument and we will create a builder the Builder will return a size transition and the size transition is just used to make make the item go smaller and smaller until it disappear the size Factor will be the animation that we receive from the builder then we have a child which will be a card we will add a margin inside this card a color red and the child will be a list style in the list style we will have the text deleted and the style will be a fun size of 24 if you go over remove item you will see that you need also a duration we will say that the duration is 300 M millisecond because we remove it from the current state we need to remove it from the list also so we will say items that remove at index now we are ready to build the UI so inside a column we will have our children the first one will be a size at box of height 10 we will have an icon button when we press on it this will add an item and the icon will be icon add under we will have an expended widget and inside we have the animated list this one will have the key that we have created earlier inside we have the initialized item count we will start at zero the padding will be a ENT sets. all 10 and we have the item Builder you can see that this one need the context the int and the animation so we will have the context index and animation we will return again the size transition this time we will use it to make the item go bigger and bigger until it have its final form we will use a unique key for all of these size transition we will have a size factor that is the animation that we receive from the animated Builder the child will be a card inside we have the margin 10 the color or range accent the child will be a list sty the title will be a text and inside we have the index of the list of items this will be by example item one item two item three the style will be a fun size of 20 for in the trailing we have an icon button the icon will be delete and when we press on it this will trigger the remove item with the current index with all this when we press on the icon button this will add an item and you can see that with the size transition the item is going bigger and bigger until it have its final form and if you click on delete the item this will remove the item in 300 millisecond this is how you create an animated list with flutter the animated model barrier first thing we need is the import Dart asnc and then after the extend State we will use the WID single ticker provider State mixing I will tell you why we need this later for this we need to set up multiple variable the first one is a Boolean is pressed set as false next we have a widget animated model barrier an animation controller an animation color call it the color animation and with this we can use use the override in it state to initialize everything first we need a variable that is a color twin this one will begin with the color orange accent with opacity 0.5 and we'll end with the color blue gray with the opacity 0.5 with this we can say that the animation controller is equal to an animation controller with the vsync this and this is why we need the width single ticker provider State mix in otherwise the this will not be available we need also a duration of 3 second for this example with the animation controller we can create a color animation this one is from the color twin. animate and inside we just put the animation controller that we have just created the last step is to create the animated model barrier this one is an animated model barrier inside we have the color which is the color animation that we have just created and a Dem missible that we will set at as true with all this we can start creating a widget for the UI you can see that we have a center a padding a column and inside the column we have multiple widgets the first one will be a sized box with a height 100 and 250 with a stack widget inside in the stack widget we will have the alignment Direction Center and a children the first one will be an elevated button the style will be color orange and the child will be a t X pressed now we need the unpress and for the unpress we will set State and say that the is pressed is equal to through this is a variable that we have created at the beginning after the set State we will see that the animation controller reset and then we will use the same animation controller to forward the animation and the last step is to use a future. delay with a duration of 3 second and after the 3 second this will set State and say that the is pressed is now equal to false so what will happen is this will tell that the button has been pressed will not be accessible until the 3 second has finished and then the is pressed will be false and the button will be available once again but we still need to add the animated model barrier and for this inside the stack widget we will say if is pressed then we will show the animated model barer widget that we have created at the beginning now if if you reset the application and you press on the button you will see an animated model barrier going over the button for 3 second and the button will not be clickable until the model barrier has vanished the animated opacity widget you need to create a double opacity level that we will start by setting up at 1.0 inside a center and a column widget we will add the first widget which is the animated opacity this one will have the opacity of the opacity level that we have just created the duration of the animation will be 2 second the child will be a flutter logo with the size 50 and under this widget we will have the elevated button the child is a text saying fade logo and when we press on this we will set State and we will say that if the opacity level is currently zero then it will be one and otherwise it will be zero and with all this you can animate the opacity of the flutter logo you can see that it take two second to vanish completely in the screen the animated padding first thing we need is a double padding value which we call at zero when we start this one is just the value of the padding that will be used inside the animated padding widget in the column with multiple widget we will have the first widget that is an elevated button the style will be a color or range accent the child will be a text change padding and when we press on it this will set State and change the value of the padding value if the padding value is currently equal to zero then it will be 100 otherwise it will be zero this line of code will just alternate between zero and 100 for the padding value under the elevated button we will have a text saying padding is equal to the padding value under we have the animated padding that use the padding Ed and sets. all with the pad value variable the duration is 2 second we can add a curve animation this one will be the is in out but you can use any curve the child is a container and the width is the media query. of context. size. width which is the width of the screen the height will be the height of the screen divided by four the color is orang accent and every time you press on the change padding this will set the padding as zero or 100 and you can see that the animation of the padding is done automatically by flutter with the animated padding Widget the animated physical model step number one is to add a Boolean is flat set as true then inside the center and a column we have multiple Widget the first one is the animated physical model and you can see that this requir the child the color the duration and multiple other arguments the first one we will add is the duration of 500 millisecond then we will have a curve fast out slow in but you can change the curve if you want the elevation will be if it's flat then it will be zero and otherwise it will be six the shape will be a box shape. rectangle but you can put Circle if you want the shadow color will be a colors black the color of the widget will be white the child will be a sized box with the height and the width of 120 the child is a simple icon with the Android outlined icon under this widget we will have a sized box with the height 20 and an elevated button with the child text click and a unpressed function that will trigger a set State and say that the is flat Boolean is equal to the reverse of the is flat so if it's true then it will be false if it's false then it will be true and with all this you have created an animated physical model you can see that every time I click on the button this create a shadow animation for the sized box the animated positioned widget we create a Boolean selected set as false to start then inside a sized box we will Define the width and the height which is 200 and 350 the child will be a stack widget with multiple widgets inside the first one is the animated position head the width will be if it's currently selected then it's 200 otherwise it would be 50 and we will do the same thing for the right and the top if it's selected then it's a value otherwise it's another value the duration of the animation will be 2 second the Curve will be fast out slow in and the child will be a gesture detector when we tap on it this will set State and say that the selected is equal to the reverse of the selected if it's currently through then it will be false and if it's false then it will be true the child of the gesture detector is a simple container with a box decoration orang range and the Border radius circular 25 and every time you press on the container this will animate the width the height the top of the animated positioned so the position of the widget will be animated the animated rotation the first thing we need is a double call turns and we will set this one as zero next inside a center column we will add the widget back in with the edent sets. all 50 the child will be the animated rotation the turns argument will be the turns that we have declared earlier the duration will be 1 second and the child will be a flutter logo with the size 100 under the padding in the column we will have an elevated button this one will have a child text rotate logo and the style will be colors. arange accent finally we have the unpress and when we click on it this will trigger the set State and we'll say that the turns is equal to + one4 with all this when you press on the rotate logo button this will rotate the flutter logo one quarter and you can do it multiple time this is to create an animation for the rotation of any widget the animated size widget we start with a double size which we set as 300 then inside a gesture detector we will have the untap and this will trigger a set state which will say that the size if it's currently equal to 300 then now it will be 100 otherwise it will be 300 this will just alternate the size between 300 and 100 the child of the gesture detector will be a container this container will be white the child is the animated size widget inside we have a curve ease in but you can use any curve the D ation will be 1 second and the child will be a simple flutter logo with the current size and like this you can animate the size of any widget every time you click the gesture detector the size will alternate between 100 and 300 the animated switcher we will create a int called it count that we will start at zero in a center and a column we will have the first widget call it the animated switcher this one will have a duration of 500 millisecond the child will be a simple text with the value count inside and the style will be the fun size at 40 under we will have an elevated button the child will be a text add and when we press on it this will set State and add the count plus one with this when you press on the elevated button you can see that nothing special happened and this is because you will need to add the key inside the text widget you can see that we have add the value key and inside we have the count and we need the key to track how the animated switcher will work and you can see now that every time we press on the add button there is a fade animation between each numbers and if you want to have a different animation for the animated switcher you can add the transition Builder this have the child in an animation inside you can return by example the scale transition the scale will be the animation that we receive and the child will be the sh that we have like this every time we press on the button there is a scale transition instead of the fade animation and this was the animated switcher Widget the app bar widget inside the scaffold we have an argument app bar and inside we can have the abar widget first we will have a title and this will create the abar you can also put the center title as true to put the title in the middle and the argument action is to have multiple icons on the right side in the list of widget I will have an icon button with the icon notification the background color can be set for orang accent by example you can also edit the leading icon this one will be an icon button and the icon will be menu if you want to have rounded corner for the app bar you can also have the shape which we use the rounded rectangle border inside we have the Border radius circular 25 for the bottom left and the bottom right and you can see that we have a na bar with flutter the aspect ratio widget first we will start with a container with the color or range accent the alignment will be Center the width will be infinite and the height will be 150 this is what we have inside the child of the container we will have our aspect ratio the aspect ratio argument will be 16 by 9 this is the same as television and computer ratio inside we will have the child container the color will be blue gray and this is what we have you can see that this is the size of a computer now let's change the height for 300 and you can see that you still have the aspect ratio 16 by9 and this is only possible by using the aspect ratio Widget the auto complete first we create a list of string which we call the list items this will just be a list of multiple fruits Apple ban melan inside the build we will return the auto complete and inside we can say that this will be strings the option Builder will have inside the text editing value this is what we enter inside the text this is the input of the user if the text editing value. text is equal to nothing then we will return an empty list of iterable string otherwise we will return the list of item under certain condition for each item this is what we will do we will return the item if it contains the text editing value. text which is the input of the user dot to lowercase in other words if the user have writeen a this will return the apple and the banana you can also have a unselected this mean when the user click on a certain item for now we will just print the item was selected and you can see that when I go inside the app and I write a I will have the suggestion for Apple because we have the A and banana because we have a a if I write P this will only suggest me apple and this was how to use the auto complete the backdrop filter we start by adding the import. UI because you will need this to use the backdrop filter next inside the stack widget we will have a list of Widget the first one will be a text saying zero and this will be replicate 10,000 times the the style will be a textile with the color green under this widget we will have a center the child will be a clip wreck and in this one we have the backdrop filter we need to say image filter. blur give a sigma X and a sigma y this is to know the direction of the blur the child of the blackdrop filter will be a container the alignment will be Center the width and the height will be 250 and the child will be a text saying blur in the background you have the green text and over you have the blur container that use the backdrop filter the banner widget we will start by creating a little UI that will use the banner widget this UI will be a container blue gray with a padding we will have a column with multiple Widget the first one will be an image Network under we have a sized box of height 10 a row that will have a text flutter course and an elevated button that will have a text get now so this is our widget and now we will use the banner widget for this we will go on the container and we will wrap the container with the clip wreck after we will wrap again the container but with the banner widget this time you can add any message this one will be 25% off by example the location will be the banner location the top end and the color will be red and this is how you create a banner with flutter keep in mind that you can put the banner location in any Corners Baseline widget in a center we will create a container that have the width and a height of 200 the color will be orange and the childart will be the Baseline widget for this we will create the Baseline argument at zero we will create a text Baseline alphabetics and the child will be a flutter logo and you can see that even if the Baseline is nested inside the container you can see that the flutter logo is over the Baseline of the container and if you change the Baseline for 50 you will see that the flutter logo is now inside the container the block semantics to see how this work we will need to add under the material app the show semantic debugger through by doing this you will see that the application will look like this after what we will need to do is create a Boolean is show that we will set as false inside the UI we will have a column this column will have inside the outlined button this will have a child text click and a function on press that will set State and say that the is show is equal to true and now you will see the button with the blue semantics under the outlining button we will say if is show is true then we will show a card this one will have the color or range and the child will be a sized box with the width 200 the child will be a column and inside this column we will have a text this is a card and a text button and when we press on it this will will set State and Trigger the is show is now equal to false if I click on the button this will open the sized box with the text button inside it's not time to use the block semantics so we will find the card and we will wrap this with the block semantics the argument blocking will either be true or false now you can see that if I press on the button this will trigger the block semantic of the sized box and will hide the semantic of the outlined button I will go back inside the material app and remove the show semantics debugger the application look like this you can click on the button and in real life you will still see the outlined button but the semantics over it will not be accessible some people will use a voice assistance to explain what happened on the screen and the semantics can be used to tell the user what is on the screen right now so this widget can be very useful for people that use a voice voice over to understand what happened on the screen the bottom navigation bar at the start we will create a current index that we will set as zero and we will create a list of widget which we will call Buddy this will be a list of multiple icon the home the menu and the person this will be used in the body of the scaffold so let's do this right now in the scaffold we have the body we will create a center widget inside we have the child which is the body we will show the icon of the current index now it's time to create the bottom navigation bar widget this one will required the current index we have created this variable earlier when we press on an icon from the bottom navigation bar this is what will happen we will have the information of the new index we will set State and then we will say that the current index is equal to the new index that we have received from the untap the items from the bottom navigation bar will be a list of of bottom navigation bar item you need to create a label for this one we will say home we will create two other bottom navigation bar item this one with the menu and this one with the profile and with all this you can see that you have a bottom navigation bar with flutter and every time you change the icon the icon in the body will change also the bottom sheet in a center widget we will create an elevated button this one will have a text model bottom sheet and when we press on it this will trigger the show model bottom sheet you will need the context inside and a builder the Builder will have also the context and this will return a sized box by example but it can be any widget we will set the height at 400 inside we will have a center widget with a child elevated button this one will have the text close and when we press on it this will trigger the Navigator pop context in other words this one will be used to close the bottom sheet and when you press on the model bottom sheet you will see that the sheet is coming from the bottom inside your app and you can also close it and the animation is all done for you the Builder widget inside the body of the scaffold we will create a custom widget and this custom widget will return a text widget inside we will have the text text with team and what we want is the style to be team.of context. text te. display large but you can that we have a problem we don't have access to the context we could either pass the context inside my widget but we could also use the Builder widget so we will wrap the text widget with the builder widget and you can see that the Builder use the Builder argument this will give us access to the context and we return our text widget and now we have access to the context and we can see our text with the text tee display large in other other words the Builder will give you access to a new context the card widget inside the center of the app the child will be the card widget you can change the elevation of the card and the color if you need the child will be a padding the padding will be all in set 15 and the child will be a column with the main access size minimum the list of children will be the sized bux he8 a text this is a flut card and a simple text button with the X press and the orang thing is what we call the card it's like the container widget but you have an elevation and rounded Corners the center widget inside the column we will create the main AIS alignment do Center the children will be a simple container the color will be orang accent and the child will be a center widget with the text flutter map and you can see that the text is currently in the center of the orang container but if you didn't know you can add also an argument height Factor inside the center and this will multiply the current height of the widget by the number you have in the height Factor keep in mind that this is only possible because we have a column widget if the container had a defined height this height Factor will not work the checkbox widget first we need to create a Boolean is checked set as false in the center widget we will have a child checkbox this one will have the value is checked which is the Boolean you can also change the active color we will say orang accent and when you press on the checkbox this will trigger the unchanged with a new value and you just have to set State and say that is checked is equal to the new Boolean value like this you have a checkbox widget but you can also add the threee state as through and this will allow the checkbox to have the null value so this is checked this is null and this is unchecked the checkbox listy first thing we need is a Boolean is checked set as false in the center widget we will have the checkbox list St you will need to have a title this one will be a text checkbox list style the value will be the is check head from the Boolean that we have created earlier you will need the unchanged argument and this will give you the new value of the checkbox inside you will say set State and the is checked will now be equal to the new value you can change the active color I will put arrange accent the check color will be white and if you press on the button you will see it's white and with the orange accent background you have also the argument tile color which will be black 12 a subtitle text this is a subtitle and if you want you can switch the location of the checkbox by using the control Affinity listal control Affinity do leading the argument tristate through will allow you to have the checked null or unchecked this was the checkbox list style the chip widget inside the center widget we will have the chip widget you can have the label which will will use a text widget this is a flutter chip and the undeleted function for now we will just debug print and say do something and now you will have a chip widget with a delete button keep in mind that you can put anything that you want inside the undeleted function the choice chip Widget the first thing we need is to create a Boolean is selected set as false in the center widget we will have a choice chip widget this one will have a label text Choice chip the selected will be the is selected Boolean we have created the selected color will be a color orang accent the unselected will give us a new state which is a new Boolean and say that is selected is now equal to the new Boolean like this you have created a choice chip that can change color when you click on it the circle Avatar widget in a center we will create the circle Avatar inside we will have the background color which we will say orang accent you can have the radius 55 if you want to change the size and I will add a background image which is an net image from my assets and this will create a circle around your image if you need you can also have a child inside the circle Avatar this will be a text saying hi and this is how to use the circle Avatar with flutter the circular progress indicator inside the center widget we will create a circular progress indicator and this is what we have on the screen but you can also change the color for orange accent the background color for blue gray and if you want to Define how many arange there is inside the circular progress indicator you can use the value 50 by example so half of the circular progress indicator will be orang with this you can create your own load animation the the clip ofal widget we will start with a center widget and have the clip ofal inside the child will be a simple container the width and the height will be 80 and we will put the color as orange with this you can see that you have a circle instead of a square container but you can also edit the shape of this circle by using a custom Clipper so you will use the Clipper argument and create a custom clip this one will be a class custom clip with the extend custom Clipper wct you will need to create an override get clip and by example you can return the wct do from left top withd height in this example the width will be minus5 and the height will be the same height you will also need to override the should Rec clip and for this one we will return false because we remove 15 from the size of the WID this should if we restart create a shrink Circle this was the C clip ofal the clip Pat widget we will return in the build the clip Pat Widget the child will be a container the width double. Infinity the height 300 and the color will be a dark blue this is what you have on the screen right now now for the clip Pat we will create a Clipper we will call this one my Clipper for this you will need to create a class my Clipper that extend the custom Clipper path you will need two override inside this one the first one is the pat get clip and the second one is The Shield reclip that we will set as return false and with this you will have create a wave in the background of your application if you want to know how to generate a custom get clip like this you can click the video on the top corner of this one I will explain you how to create custom get clip the clip wreck widget in the center I will create a container that have the width and the height of 3,000 the color will be orang range accent and this will cover the entire screen next we will wrap the container with the clip wrecked and we will create a Clipper my Clipper let's create the class my Clipper with the custom Clipper we need the first override get clip this one will return direct Dot from left top width height and this is the value inside we will also create the override should Rec clip that will return false you can see that we have reshaped the container for the width and the height 80 if you want you can also put the left at 50 and this will create a spacing of 50 on the left the clip R wct widget in the center widget we will create a clip R wct this one will have a border radius with the Border radius. circular and the child will be an image asset this one will have the width of 350 you can use the clip R Rec widget with the Border radius to create rounded border for any widget the close button widget inside a center we will create the close button widget you can change the color of the widget we will use the color. red and you have the function unpress inside you can put anything we will just say debug print do something this widget have an icon X and this is the purpose of the close button just like this you have created the close button widget color red box in your app you can create a center widget inside we will have the color red box the color will be orang accent and the child will be a sized box with the width and the height of 100 and this will create a color red box the color filtered we will start by this Widget the color filtered inside you have the argument color filter and you can put the color filter. mode which have inside the colors. White the blend mode. color and the child of the color filtered will be an image asset blue PNG and because we use the color white and the blend mode color it will create this color filter effect over our image you can change the color or the blend mode if you want the constrained box in a center widget we will create the constrained box and inside we will have the argument constraints this will take a box constraints the max width will be way bigger than the size of the screen and the max height will be 350 in the child we will have a container this one will have the color or range accent and the width double. Infinity you can see that even if the max width is over the size of the screen by using the double. Infinity the container will take all the remaining place without giving any errors and also the container will use the max height at 350 if you want you can also have the Min height and Min width the constrained box is used to constrain any widget inside the container widget this one is very common but I would show you things that you don't know about the container so you can see that we have the padding the color and the alignment this is all the things that we already know we also know that we can add a child in this example it will be a text widget but did you know that you can add also constraints for this you will use the Box constraints. expand the height will be 200 by example and you can see that the height and the width value include the padding but there is another argument called the transform that you can use inside your container for for this we will use the Matrix 4. rotation Z at 0.2 and you will see that this will transform the position of the container Widget the column widget this one is very common but I will try to give you more information about it first thing first we have the children this one will be a list of widget so we will just create a couple of text widget inside and this is what you will see on the screen but you can also change the alignment of the column if you use the cross AIS alignment and you say cross AIS alignment. end this will align all the text widget to the end of the column you can do the same thing for the main AIS alignment you use the main AIS alignment. end and all the widget will be at the end from the main axis which is vertical there is a third argument called the main access size and you can set this one as main access size. minimum and this will make sure that the column will take only the place that it need so if I save all the widget will go back on the top even though we use the main access alignment. end this is very useful when you don't want your column to take all the remaining place the Cortino app in this example we will try to create this application with the cerino App instead of the material app so we will return the copertino app inside we have the mode Banner to false the team will be the copertino team data so the brightness will be dark the scaffold background color will be this color the primary color will be system orange and the home will be a text widget flutter map but you will see that this is not exactly the app that we want for this we will need to use the coppertino page scaffold and this is the next Widget the coppertino page scaffold Widget the previous widget was the cero app inside the copertino app and the home we will remove the text flutter map and we will create the certin no page scaffold instead this one will need a child which will be a center Widget the navig ation bar will be the copertino navigation bar the middle will be the text flutter map and in the center we will have the child icon copertino icons. shares and this is what we will have on the screen you can see that the navigation bar is the same thing as the app bar inside the scaffold widget this was how to use the copertino page scaffold with your flutter app the copertino action sheet action this is what you will have in your application at the end of this code so we will start with the corero page scaffold that we have looked at in the previous Widget the chart will be a center widget inside the center we will have the coer too button the child will be a text capertino action sheet and when we press on it this is what will trigger the show capertino model popup this one will need the context and the Builder the Builder will be a context that will return the corero action sheet the title will be a text flutter map the message will be another text your message and inside we have the action which is the property no action sheet action we have the first one inside you will need a child which will use a text do something and a unpress function we will just return a navigator poop context we will do the same thing for another copertino action sheet action the child will be a text do something else and the unpress will be also a navigator pop and with this you have created a button that when you press on it you have the two copper to no action sheet action the do something and the do something else the cero activity indicator in the cero page scaffold because we are in the team of cero right now we will have the widget Center in this one we will create a coppertino activity indicator and you can see that this trigger a loading animation icon but you can also change the radius for 50 or change the color for orange accent and this is the coppertino activity indicator it's a loading animation but for iOS the coppertino alert dialogue inside the capertino page cfold we have the center and inside this one we have the capertino button which is this one and when we will press on it this is what we will trigger right now the capertino button will have the unpress function and the child text capertino alert dialogue inside the onpress we will use the show cero dialogue this one will have the context and a builder the Builder will need the context and will return the capertino alert dialogue widget this widget will have inside the title this will be a text alert the content will be a text are you subscribed to flutter map and some actions that are the coppertino dialogue action we will create the first one the certin no dialogue action with the child text no we will set the is destructive action to through because this will make the button go red and when we press on it this will trigger the Navigator dop we will do the same thing for another copertino dialogue action the child will be yes when we press on it this will trigger the Navigator pop and you can see that we have created a coppertino alert dialogue the coppertino button so we will have two different coppertino button this one and this one in the center widget we will create a column the main access size will be main access size. minimum and inside we have all the children this will be the coer to no button the first one doesn't have borders we will have inside the unpressed function that will return nothing and we have the child text enabled right under we will create create a sized box just to create some spacing between those two widgets and under the sized box we will create the coppertino button do filled this one will have the unpress with nothing inside and the child will be enabled and with this you will have create two cero button but keep in mind that if you replace the unpress with null this will automatically disable the buttons this was the cero button Widget the coppertino context menu and this is what we will create a button that will trigger two different action inside the center widget we will create a sized box first with the width and the height 100 inside we have the child corero context menu this one will take a child in this case it will be the image Network and it's the YouTube image the actions will be a list of coppertino context menu action the child will be a text action one and the unpress will have the Navigator pop context we will do the same thing with another copertino context menu action the child will will be a text action to and the unpress will be a navigator dop and with this you have created an image button that when you press on it you have two different option the action one or the action two and this was the copertino context menu the copertino date picker we will create a button and when we press on it we will have access to a date picker you can select the date you can select the time also so let's create this right now the first thing you will need is a date time and this is how date time works we have the year then we have the month then we have the day the hour and the minute next inside the center widget we will use the cero button this one will have a text capertino date picker and the unpress function will trigger the show capertino model popup inside we have the context and we have the Builder the Builder will have inside the context and we'll return a sized box the height of the sized box is 250 the child is a coppertino date picker and you will see it's very simple to to set this up I will start by putting a background color white the initial date time will be the variable date time that we have created at the start then we have the argument onate time changed this will give us a new time which is the time that the user will select on the phone and then we just need to set State and we say that the date time is now equal to the new time then you can use this to know the time and the date selected you can use the 24hour format if you want and you can change the mode to use only the time by example so if I click again I will have only the time or you can have only the date I will try again and you will see that this is only the date now and if you want to display the date time on the screen you can change the current text widget by something like this and you will have the current selected date on the screen the CER to no page route and this is how it will look when we will press on this button another page will come but but with the transition of iOS and I will show you right now how to do this the first thing you need is to create another class page two this will be a stateless widget and inside the build we will return a simple scaffold the background color blue gray The Body Center and the child page two now on the first page inside a center widget we will create the coppertino button. filled this is the button and inside we will have the text click for page two the onpress function will trigger the navigator.of text. push and inside we will use the coppertino page route it's the same thing as the material page route but for iOS inside you will need the Builder the context and you will return the page two that we have created earlier and just like this you have created a coppertino page route for your flutter app the coppertino page scaffold and this is how it will look so let's do this right now first we will return a coppertino page cold but make sure that you use the cero app inste instead of the material app inside we will have the child which will be a stack Widget the background color will be a color from argb the navigation bar will be the corero navigation bar inside we have the background color with opacity the middle is the title which will be flut map and inside the stack widget we will have only one children it will be the image. network the fit will be box fit. cover and the height will be double that infinity and this is how it will look the coppertino page cold is the same thing as the scaffold widget but for copertino which mean for iOS the cero Picker you will see that when you press on the button you have a selection you can select between zero one or two and you will see the value on the screen change for the button we will need to start with the int selected value equal zero then inside a center widget we can create the coppertino button. filled this one will have a child text value is equal to the selected value which is currently the number two for the onpress function we will use the show capertino model popup inside we have the context and we have the Builder the Builder will have a sized box the width will be double at infinity and the height 250 the child will be the coppertino Picker this one will have a background color white the item extend 30 this is the height of the current item inside the list the scroll controller will be a fixed extend scroll controller we will also need children and unselected item changed this will give us a new value okay so now for the scroll controller inside this we will create the initial item at zero and you can see that every time we open this this will show us the value one next inside the children we have three different text widget which will be zero 1 and two and for the unselected item change we will set State and say that the selected value is now equal to the new value and just like this you have created a coppertino picker with flutter the coppertino popup surface and this this is how it will look you will click on a button and a popup surface will come up with the iOS style for this we will create a capertino page scaffold with a center inside and we want to create this button so we will say cotino button inside we will have the text click me and the unpress will trigger the show capertino model popup inside we have the context and the Builder the Builder will return the cerino popup surface the child will be a container inside we have the cerino white color the alignment would be Center the width will be double do infinity and the height will be 400 and like this you have created this popup but now inside we will create a child center with a cero button this one will have the text close and when we press on it this will trigger the Navigator pop and just like this you have created a coppertino popup surface the coppertino scroll bar and this is how it will look we will have the cero scroll bar on the side of the list view so we will return the copertino scroll bar inside we have the child list view. Builder this one will have the item count at 50 so we will have 50 items the item Builder will have the context and the current index and we will return a center widget with the text that will display the current index the style will be font 30 and this is what you should see on the screen right now but you can also change the visual of the scroll bar you can change the thickness for Sig by example or the thickness while dragging the radius and the radius while dragging this is what we see when we scroll normally and when we click on it to drag this is another Visual and this was how to create a coppertino scroll bar the coppertino search text field and you will see that this one have a leading and trailing icon already nested inside the widget for this one we will start with the final text editing controller which we will call text controller this one will be a text editing controller with the text flutter map inside the container we will have a color coppertino color system orang the padding will be 10 and the child will be a center with the coppertino search text field inside and just like this you have a search bar with the search icon but we will also set the controller to the text controller that we have created and now you will see that we have the text flutter map inside and if you click the X this will automatically delete the text inside and this was how to create the coppertino search text field with flutter number 63 the coppertino segment control you can see that we have three different button and when we click on it we have on the screen the text of the button and this is what we call a caporino segmented control the first thing we need is a notable string called it current text and in the column we will create a children the first one will be a sized box height 50 the second one will be the copertino segmented control for this we need the children which will be three different text the first one is the flutter which is a container the second one is map and the third one is is YouTube I will show you how to build this a little bit later the unchanged value will return a string with this one we will set State and say that the current text is equal to the value under we will create a sized box height 50 and if the current text is not equal null then we will create a text widget with the current text otherwise we will return an empty container and this part is the text that you can see on the screen YouTube now let's work on the containers of the Cortino segmented control for the first one one the container color will be if the current text is equal to flutter which is this text then we will return the color or range accent 100 otherwise it will be white the width will be double. Infinity the padding will be Ed and sets. all e and the childart will be a Simple Text flutter so you can see that when I press on flutter the color will be orange accent 100 now we will do the same thing for map and YouTube so for map we will say the color is equal to orange or white depending on the current text the width will be double infinity padding eight and text map for YouTube it's the same thing the color the width the padding and the child and with this you have created a cotino segmented control with flutter the cero slider and this is what you will have on the screen with this widget we will start this by creating a double current value equal to one and inside a sized box we will create a column widget with the children the first one will be a sized box height 50 the second one is a text widget with the current value. two string because we want to see the value on the screen after we have another sized box height 50 and we will use the coppertino slider this one will need a value which will be the current value that we have created the minimum value will be zero the maximum value will be 10 the divisions will be also 10 and when we change the slider we will have a new selected value this is a double we will set State and say that the current value is equal to the selected value and this is the Cortino slider with flutter number 65 the cero sliding segmented control you will see that you have a selection of multiple items and the segmented control will slide automatically with an animation to create this we will start with the int sliding equal zero inside the center widget we will have the copertino sliding segmented control the children will be zero the text text zero one text one and two text two so the children is a map next we need a group value and this is the sliding int that we have created next we have the unchanged value this will return us a new int value which we call the new value we will set State and say that the sliding is equal to the new value and just like this you have access to a cero sliding segmented control with your flutter app this one is pretty cool the coppertino switch this will create a switch with the iOS team for this we will start with the Boolean lights set as false in the center we will create a child coppertino switch this one will have the value light which is a Boolean the unchanged will return us a new value and we will set State and say that the lights is equal to the new value but keep in mind that you can also use only the switch widget and say do adaptive and flutter will automatically give you the coppertino switch if you are on a iOS device and give you the normal switch if you are on an Android device the cero tab scaffold with this you will be able to create a navigation bar with iOS style so we will return this Widget the cero tab scaffold and inside we will have the tab bar which is a cero tab bar I will explain you this in the next widget so for now we will just fill it with the items without explanation you will also need to have the tab Builder this one will have the context and the current index of the tab Builder this will return a coppertino tab View and again this is a widget that I will explain you right after the cero tab bar so for now we will just fill it with the Builder and you will see that with this you have created a corero tab scaffold widget with your flutter app the coppertino tab bar and you will see that this is the widget at the bottom of this application right now so you will need to create first a coppertino tab scaffold inside you will have your tab Builder which will return the cero tab view I will explain this one in the next widget but you will also need to have the tab bar and this is where we will use the coppertino tab bar this one will have the items inside which will be a list of bottom navigation bar item the first bottom navigation bar item will have the icon we will use the coppertino icons. home the label will just be the text home we will create another bottom navigation bar item the icon will be the coppertino icons. settings and the label will be settings and just like this you have created a coppertino tab bar with your flutter app inside the coer too tab scaffold the coer too tab View and this is all the middle space of our application right now so you will need to create a coppertino tab scaffold first inside you will have the tab bar which use the coppertino tab bar I already explained you this one in the previous widget and now we will create a tab Builder this one will have the context and the current Index this will return the corero tab view for this one you will need to have a builder this one will have the context and will return anything that you want for this example we will return a center Widget the child will be an icon and if the current index is equal to zero then we will return the capertino icons. home otherwise we will return the settings icon but keep in mind that you can put anything inside the coppertino tab View and just like this we have created a coppertino tab view with flutter the coppertino text field first we need to create a final text editing controller call it the text editing controller and we will set the initial text to flutter map inside the copertino app we will have the debug Banner to false the home will be the copertino page cold with a background orange the child will be a padding Edge and sets. all 10 and inside the child Center we have the cotino text field you can now put your text controller inside the controller and you will have access to a cero text field the custom paint widget and by using the custom paint we can create something like this this is like Pac-Man with a text over it so inside a center widget I will use the custom paint this one will need the child which will be a text widget and a painter we will need to create the demo painter for this the text will be just this is Pac-Man with a text style inside the color will be black the background color white and the font size 30 but now it's time to create the demo painter and for this you will need to create a class that extend the custom painter and you see that you have an error and this is because you need to overwrite the void paint and the Boolean should repaint for this one will just return false but you can return through if you want for the void paint that we have inside the canvas and the size what we will do is we will create a variable center with the size divided by two we will create a paint this one will be the paint color equal to Yellow the color of the Pacman and for the canvas we will say draw an arc inside this one we have the wct double double Boolean paint so for the wct we will say re. from Center inside we have the center the width and the height for the starting goal it will be 0.4 and the weend goal will be this we will say the U Center equal true and at the end we will put the paint that we have created with the variable and just like this you have used the custom paint widget with your flutter app the custom scroll view widget at the end of this video you will be able to create something just like this let's start right now by using the custom scroll view widget inside we will use the sliver which is a list of Widget the first one will be the sliver grid inside you will have the delegate sliver child Builder delegate and a function that use the context and the index the function will return a container inside we will have the alignment center and the color will be orange with some variation depending of the index next you will have a child which will be a text grid item with the index after this you will need to create a child count we will use 50 the next one is the grid Delegate for this you can use a constant slipper grid delegate with Max AIS cross axis extend we will use the Max cross axis extend at 200 the main AIS spacing to 10 the cross access spacing 10 and the child aspect ratio to four and just like this you have created a list of widget with the custom scroll view widget the data table widget and this is what you will have on the screen after this explanation so the first thing we will create is a title textile with the italic and the Bold style the return will be a data table widget and inside we have the colums and the rows for the columns we will have three data columns Widget the first one is the name the second one is the age and the third one is the color you can see that this is the titles of the table next inside the rows you will need to create three data rows widget and inside each data row you will need to create three data cell widget and this is because you have three title the name the age and the color so we have the name the age and the color this was how to use the data table with your flutter app the data column widget this widget can be used inside a data table widget under the arguments columns and inside this one you will need to put a list of data column widget in this example we have two data column widget this mean inside our data rows we need to have two data cell but if we add another data column by example the color data table we will have an error on the screen because if we want to do something like this we need to add also the data cells inside the data row and now if I add the color red red the color blue and the color yellow now we can see that we have a third column with the data column Widget the data cell widget for this example we currently use the data table widget with the column and the rows inside the rows we have the data row widget and this one have a list of data cell so by example if you want to add another row inside this data table widget you can add inside the list another data row this one will have the cell which contain multiple data cell widget and now you can see that we have another row inside the table but just make sure that you have the same amount of data cell compared to the number of title inside the columns the data row widget for this example we have a data table widget that have the columns and the rows this one will have a list of data row widget and this widget will need inside the cells which is a list of data cell so we will add three different different data cell the name the age and the color and now you can see that we have another row inside the table but keep in mind that you can add as many data row that you want inside your data table and this is how to use the data row widget inside your flutter app the time picker with flutter and I will show you how to create something like this you will be able to select any current time and this will be displayed on the screen to create something like this you will need to start with a time of day which we will call selected time time this one will be a time of day. now and inside the code we will have a center a column and inside the children of the column we will start with a text widget this one will display the selected time. hours and the selected time do minutes and this is what you see on the screen right now under this one we'll have the elevated button the child will be a text choose time and when we press on it this will be a N Sync function we will have the final time of day which is notable is equal to to await show time picker inside this one you will need the context the initial time which is the selected time we have created you can also create the initial entry mode for this example I will use time picker entry mode dial and after this you will say if the time of the day is not null then we will set State and say that the selected time is equal to the time of the day that we have received from the show time picker and just like this you have created a Time picker with your flutter app the date picker with flutter and you will see that when you click on this button you have access to a calendar and you can select any date to have it on the screen right after and I will show you how to create this right now the first thing you will need is the date time selected date this one is a date time. now and inside a center widget and a column we will have the list of Widget the first one will be a text widget inside we will have the selected date. year month and day right under we will create an elevated but button the child will be a text choose date and the unpress function will be async inside we have the final date time knowable call it date time this one will await the show date picker inside this one we need the context the initial date which is the selected date we created the first date I would say date time. 2000 the last date I would say date time. 3000 and right after you will say if the date time is not null then we will set State and say that the selected date is equal to the new date time and just like this you have created a calendar with your flutter app and you can select any date the date range picker with flutter this will allow you to select a range of date in your flutter app I will save and you will see that by example we have 17 days between those two dates so let's code this right now first thing we will need to create a date time range and this one will need to have the start which will be datetime.now and the end dates time. now also with this one we can go inside the center and the column widget and create a text widget that use the text selected date. duration. in days this will allow us to know how many days there is between those two dates and if I restart the application you can see that we have zero days because the end and the start is the same time under the text widget we will create an elevated button this one will have the child text choose dates the unpress function will be async and inside we have the date time range is equal to await show date range picker inside we have the context the first date which will be 2,000 the last date which is 3,000 and after we need to say if the date time range is not null then we set State and the selected date is equal to the new date time range with this you have a way to select a range of date inside your flutter app the decorated but box widget if you look at the application you will see that we have a gradient inside the background orange into red and this is what we will do right now with the decorated box widget so inside a sized box we will say that the height and the width is the b. Infinity inside this one we will use the decorated box we will need to add the decoration argument with the Box decoration inside this one I will use the gradient but if you go over box decoration you can see that you can change multiple different things for this example we will just touch on the gradient and we will use the radial gradient for this one inside we need the colors and we will give the color deep orange and red with this we have used the decorated box widget to create a gradient inside our background application keep in mind that the decorated box can do more than just the gradient the decorated box transition you can see on the screen what we will create with this widget it is an animation and let's do this right now first thing first we will need to say with thicker provider State mixing and I will tell you why we need this later next we will need to create a decoration twin this one will be called to a decoration twin inside we have the begin and the end you can see on the screen that we have two different box decoration one is with the rounded border with the Shadow and the other one is nothing so we will create this with those two box decoration the first one will have the color white the border will be border style. none and the Border radius is circular 60 inside we have the box Shadow this one will be a box Shadow with the color black 26 the blur radius spread radius and offset so this first one is this animation right now with the Shadow and now we will create the other one that have nothing so the end animation will be a box decoration the color white the Border will be border style. non and the Border radius will be zero okay so we have created our two box decoration now it's time to create an animation controller this animation controller will have the vsync this and you will have access to this only if you have the width thicker provider State mixing next we need to have the duration we will say 3 seconds and we will also say that this will repeat with the reverse true this mean the animation will never stop when we use controller we always need to dispose the controller so we create an override dispose controller. dispose all the setup is completed now it's time to create inside a center Widget the decorated box transition the decoration will be the decoration twin that we have created at the start you can see it is this final decoration twin and then you will say do animate and inside you will put the controller we have also create this one you will also need to create a child container ER this one will be the width and the height 250 the padding and the child will be the flutter logo and just like this you have created a decorated box transition with flutter and as the name said this will transition for two different box decoration the default textile widget inside a column we will have a list of children the first one will be the text widget flutter map and this is the one that is on the top and white next under this one will create a default textile and this will create a default textile for each text inside this widget for this we will need to create a style textile the font size will be 36 and the color will be blue this widget will also take a child which will be a center widget inside we have a column and in the list of column we will create a text widget flutter map and you can see that this one have the textile of the default textile widget but keep in mind that you can add other text and you can change the Style by example saying textile font size 20 24 and this will change the font size of the text but will keep the color of the default textile and you can do the same thing by example changing the color only so in this case the text size will be the same but the color will change and this was the default textile Widget the dismissible widget let's say you have a list of item and you want to remove items inside the list this is the dismissible widget and I will show you how to use it right now first thing first we will need to create a list of int which we call items to generate this one we will say list. generate 100 items and each item will give us an index that we will store inside the list in other words this is a list of 100 numbers in the return we will say list view. Builder because we want to create this list then you will need to say item counts items. length the padding will be vertical 16 and the item Builder will return the dismissible widget you can design the background of the dismissible widget in this example I will just use a red container inside we have the icon delete and you can see that when I scroll I have the icon delete with the red color behind this is the background next we need to have the key and for this one I will use the value key int and inside I will put the index of the item so the key will be 1 2 3 4 5 and so on this will be important because we want to keep track of items that we delete after we have the unmissed wi yet this will give you a demiss Direction so you can decide which action will be trigger if the user go from the left or from the right but for this example I will just set State and remove the item from the current index the child of the dismissible will be a list style the title will be a text with the current item and with this code you have created a list of dismissible items the divider widget it can be used to divide between two different widget and for this one we will create a column widget inside we will have two containers both will have a height of 200 a width of double infinity and the color orang right now there is no space between those two widgets but if you use the divider widget you will see that you have a line between those two you can also change the color of the divider the height of the divider the thickness of the divider the indent from the start and the indent at the end this was the divider Widget the dragable scrollable widget as the name said you will have a dragable list of scrollable items for this one you will need a draggable scrollable sheet inside you will have the Builder which have the build context and the scroll controller the return will be a container with the color orange the child will be a simple list view. Builder inside we will put the scroll controller that we receive from the drag ball scrollable sheet the item count will be 25 the the item Builder will have the context and the index which will return a list style of each items and just like this you have created a draggable and scrollable Sheet the drag Target widget and this is how it will look you will be able to take a draggable widget and put it inside the drag Target widget to create something like this we need to start with a variable cuff color which will be red in a sized box with double infinity we will have a column and in the column we will have a dragable widget this one will have the data color or range accent and the child will be a container with 100 100 with the color orang range we need also to create a UND draggable cancelled and also a feedback this one will be also a container with the color orang accent with opacity 0.5 and this one is the widget when we drag over the screen now that we have a dragable widget we can create the drag Target inside you will need to have the unaccept argument this will be the data that you receive from the dragable widget and inside this function we will call the cut color is now equal to the color we need also to create a builder for this one we will have the bill context the list accepted and the list reject we will return a container this one will have a width 200 by the height 200 the color will be if the accepted list is empty then it will will be the cut color otherwise it will be the color gray shade 200 the child will be a center widget with the text drag hair and you can see that the drag Target is currently the cuff color and as soon as we take the drag B widget and put it over the drag Target it is the gray color shade 200 and as soon as we release the widget the color is now cuff colors this was the drag Target Widget the dragable widget it's a widget that you can take and and drag anywhere on the screen for this example we will create a cuff color red and inside a sized box we will create a colum with multiple widgets we will use a drag Target widget so we will be able to take the dragable and put it inside this one have the argument unaccepted have a builder and return a container 200 by 200 with the text drag hair inside for the dragable widget we will put it over the drag Target and you will have the data argument this one can be any object but for this example we will use the color or range accent this is the information that will be used later in the drag Target widget we need also to create a child this will be a container 100 by 100 color orang range accent and the text box you can see it's this widget you can add also a UND draggable canell this will be triggered when you take the widget and don't complete the action the feedback will be a container with with the width and height of 150 the color will be orange accent. WID opacity 0.5 the child is a center widget with the text box and three dots this is the widget that you are currently dragging you will also need to create a style for the text I will use a color white and the font size 18 and just like this you have created a dragable widget that you can put inside the drag Target Widget the drawer widget you can click on this button and this will open what we call a drawer which you have two elements inside to create something like this with flutter you will need inside your scaffold to use the argument dryer inside the widget you will have a child we will use a list View and we will have two list style inside just like this you will have a button to open a dryer but how can you create a button in the middle of the screen to open this dryer for this we will create in the body a center widget with the elevated button then we will wrap the elevated button with a builder widget and inside the unpress we will have the scaffold of context. open drawer and just like this you can open the drawer from a button if you want you can change the location of the drawer by using instead the end dryer and now you will see it will open on the right side and if you want the button to work you will need to use the open end drawer just like this you have created a drawer within your flutter application the drawer widget first we will need to create inside the scaffold a drawer this one will have a list View and the children will be two list sty you can see that this will create a drawer on the screen but you can add the drawer header inside this one you can add a decoration I will use the color blue and then a child DET text is drawer header and you can see that now we have a drawer header the drop- down menu button this will create a list of selectable items and keep in mind that you can put this list inside your app bar on the top right corner to create something like this we will need first a variable drop- down value that we will set as one inside the center of the application we will create a drop- down button the value will be the drop- down value that we just created you can change the icon of this drop- down button I will use the icon menu the style of the text will be color white you can also change the underline this is the white bar under the drop- down Buton button the unchanged function will receive a new value and with this you can set State and set the drop down value to the new value that you received the last thing you need is the items inside your list we will use three different drop- down menu item the value will be one and the child will be one also but for the second one it will be two and the third one it will be three now just like this you have created a drop- down button within your flutter app the elevated button widget this is three different form of this elevated button widget and I will show you how to create them inside the column widget we will create the first elevated button with the unpress null this will automatically create a disabled widget under this one we will create a sized box highight 30 and another elevated button this one will have an empty function and now you can see that the button is enabled for the third one first we will separate with a sized box height 30 and then we will create an elevated Buton do icon this one will have an unpress function a label text enabled and the icon will be the icon message this will create an elevated button with an icon inside flutter error details when you use a TR catch inside your flutter app you will see that you can catch an error and then debug print this error but this is kind of bad you could use instead the flutter error details for this you will need a flutter error. report error inside you will have the flutter error details the exception will be the error that you catched the library will be a custom message one and the context will be the error summary with the custom message two now when you catch the error this is what you will have on the terminal you have the exception cut by the custom message one and then you have the following message by the custom message to following by your errors and I think this is better than the debug print the error widget when I click on this button this will draw the red screen error but what you can do is use instead the error widget. Builder just after the main this will give you the flutter error details and inside I will return a simple container the alignment will be centered the child will be a text widget with the error message I will also create a custom Style with the color orang and the text align do centered now when I click on controll the error this is is what I will see on the screen but if you want to see the red screen only when you use the debug mode then you can create a Boolean in debug is equal to false you can use the assert function which will be triggered only when you are in debug mode and then you set the in debug to through after you create a if condition if it's in debug then return the error widget detail exception in this way because I run the application in debug mode right now if I click on throw error this will still put the red screen but in production you will have the custom message error the expanded widget and this is how it will look if you have three widget like this with different Flex value for this one inside a column widget we will create the expanded Widget the flex will be two and the child will be a container blue under we create another expanded with the flex one and the color orange the last one will have a flex three and have the color red and you can see that that even if the container have a certain height value the expended widget will take all the remaining place and you can use the flex value to know which expanded will take more place than the others in this case this expended widget will take three times the space of this expanded Widget the expand icon widget it's an icon that will display either if it's expanded or not and to use this one we will first create a variable is expanded which we will set as false first we will create a container with the color orange and a row inside in the list of widget we will create a container with the title then we will use the expand icon widget we will Define the is expanded with the variable we created at the start the color will be white and the expanded color will be black when we press on it we will receive if it's currently expanded or not and with this we can set State and say that the is expanded variable is now equal to the inverse of the is expended but now we need to display something right under so inside our column we will create if it's expanded then we will create a text flutter map and now you can see we can press on the expanded icon to see more information the expansion panel list first we will create a class item this one will have three arguments inside the header text the expanded text and the is expanded with this we can now create a list of the item class call it data this one will be a list that generate of 10 items that will return the item class we have the Eder text and the expanded text now inside a single child School view we will create the expansion panel list for the expansion call back this one will return the current index and with the Boolean is expanded or not we can now set State and say that the data that we have created which is the list of generate items follow following by the current index of each element that is expanded is equal to the invert of the is expanded in very simple words if this expansion panel is not expanded and we click on it this one will set State and set the expansion panel as expanded the children will be a data. map. expansion panel because each element of this expansion panel list is an expension panel and we convert this into a list inside the bracket we will return the expansion panel this one take a header Builder which will be a listle and take a body which is also a listy you can see that on the untap function we create a set state that will remove the data of the current item in this way if we click on this trash icon this will remove the expansion panel from the expansion panel list the expansion panel this is what we consider an expansion panel which is inside an expansion panel list and for this example we will need to create a class item with the argument Ed text expanded text and is expended the eror text is this information the expanded text is the information inside the expended and the is expended is to know if this is open or not the next step is to create a final list of item called Data this one will be a list of item. generate we will generate 10 items inside this list and each of them will return the item inside we have the eror text and the expanded text now inside the single child School view we will use the expansion panel list the call back of this one will return the index and the is expended or not now we can set State and we can Define the value of the data index do is expended to the invert of the is exended with this we can create a children of the data. map of the expansion panel this one will return us each item which we will convert into a list at the end the return will be our widget expension panel and this one take a header Builder which have the context and the is expanded or not inside we return a list Style with a title of the item. header text this is the information panel 3 or panel 7 next we create a body for this expansion panel this one will also be a list the title will be a text item. expandex and this is the information inside the expansion panel you can also add a subtitle and a trailing for this list style item for this example when we tap on the icon this will set State and we'll go inside the data and remove the item where the current item is equal to the item finally for the expansion panel we have the is expended which will be called from the item that is expended if we restart the application you will see that we have 10 items inside the expansion panel list and each of them are an expansion panel when you click on the trash icon this will remove the expansion panel from the expansion panel list the expansion tle widget and this is what you will have at the end to do something like this we will first create a Boolean custom icon set as false inside a column widget we will create the expension ti the title will be a text expension tle and you can also change the trailing icon if you want for this example we will say if the custom icon is true then display this one otherwise display the other icon later we will find a way to set State the custom icon to a new value inside the children you can add anything you want but we will create a list style Widget the title will be a random text on the Expansion change we will receive a new Boolean value we will use this one to set State and set the custom icon to the value expended that we just received and with this you can see that the icon is now different when we click on the expansion but if you don't want to use a custom icon you can remove the trailing and it will still work with the basic icon the last thing I want to show you is you can use the control Affinity do leading in order to change the location of this icon and this was how to create an expension tile with flutter the fade in image widget when your image will load inside your flutter app this will display a placeholder before your image is loaded from the internet you can see that we have a placeholder until the image is loaded and to create something like this it's pretty simple with flutter we will start with a center widget we will create a child fade in image this one will be asset and network because the placeholder image is from the asset library and the final image is coming from a network the argument placeholder is from the asset library. ion. oan gpg this is inside the asset of my flutter project now for the final image this is coming from the internet and it's the image that you can see on the screen so now when we restart the application you will see that the placeholder image will be display before the network image is actually load and this was the fade in image Widget the fade transition widget this is what you will have at the end the flutter logo fade in and Fade Out forever and to create something like this we will start with an animation controller called controller this one will have a duration of 2 seconds and we will need to put the vsync this and to have access we will need to create the WID thicker provider State mix in after we will repeat this information with the reverse through this mean it will fade in and Fade Out forever with this controller we can now create an animation this one will be a curved animation the parent will be the controller we just created The Curve will be curved is in but you can put any curve you want after we will create a dis ose method and we will say controller. dispose in the center widget of the app we will create a fade transition widget this one will have the opacity which will be the animation we created and the child will be a flutter logo with size 300 and with all this you will have a flutter logo that will fade in and Fade Out forever this was the fade transition Widget the filter chip widget this is how it will look at the end and to create something like this we will start with the is selected set as false in the center of the application we will use the widget filter chip this one will have the label text filter chip and the selected argument will be the is selected Boolean the unselected will return a Boolean value so we will set State and we will say that is selected is now equal to the invert of is selected but if you want you can also use the value returned from the unselected and this will create a filter chip in your flutter app but you can also add an avatar and now the check mark will be over this Avatar this was the filter chipped with flutter the fitted box widget whatever the size of this orange container the text will always fit inside perfectly and this is because we use the fitted bux widget for this example we will create a container with height 25 with 100 color orange accent and the child will be a text widget this is a pretty long text we will also create a style of color black and we without the fitted box widget this is what we will see on the screen but if you wrap the text widget with the fitted box widget you will see that the text Will perfectly fit inside the container and now let's try to remove the height and change the width for 300 this is what you will have on the screen you can see that whatever the size of the container the text will always be perfectly fit inside and this is because we use the fitted box Widget the flexible widget in this example we will create create three flexible widget inside a column and you can see that the flexible widget is doing absolutely nothing if the inner widget have a certain height but now if we remove every height of each container you will see that the flexible will be used and we Define how many space each flexible take by using the flex argument five is bigger than three so the flexible five will be bigger than this one and if you want you can convert a flexible widget into a expanded widget first let's read add every height of each of them next I will add the argument fit Flex fit for each flexible widget and now you will see this is acting as a expended Widget the expanded widget will always take as much place as possible even if the inner widget have a certain height and now I will show you visually what is the difference between the expanded and the flexible I've just replaced everything thing with three different Row the first one have an expended and a flexible and you can see how the application is displaying both of them if you have too expanded this is how it will look and if you have too flexible this is how it will look I hope this example help you to understand what is the difference between the expanded and the flexible widget loting action button widget in this one I will show you how to create a button like this but did you know that this button can be anywhere inside your application and to build something like this you will need to go inside your scaffold widget and create a floating action button inside the floating action button argument you have the unpress function for this example we will have an empty function the background color is the color of the button we will use the orang accent the child is the icon. ADD and just like this you have created a floating action button but if you want you can change the floating action button location by using the floating action button location. Center dot now now it will be in the center but you can use many other location like the center Float Center top or end dockhead at this point all depend of your preferences this was how to create the floating action button with flutter a flow widget you can use this widget to create a menu just like this one to make this happen we will start by creating inside the build the flow widget and for this to work we will need to create multiple things first we will add the withd single ticker provider State mix in and we will create a late animation controller menu animation this example came from the flut website after we will create an icon data last icon clicked is the icon notification you can see that when I click on the menu the notification item is the last one selected if I select the home and I reopen the menu the home will be selected this is the reason of this variable next we will create a list of menu item this is all the icons available in our menu after inside the init State we will create a menu animation this one is an animation controller the duration will be 250 millisecond and the vsync this came from the WID single taker provider State mixing otherwise it will not work after this inside the flow widget we can create the delegate which will be a flow menu delegate inside we will pass the menu animation that we just created let's create a delegate for the flow menu we create a class flow menu delegate which extends the flow delegate inside we will pass the argument menu animation and we need two different override the shield repaint and the paint children this one will be the logic how your animation will be displayed after this inside the flow widget you can add the children this one will come from the menu item which is all the icons and then you will use do map and. list to convert this into a list of widget inside you will put a padding this this one will be an ENT set five the child will be a floating action button you can see that each icon is a floating action button the background color will depend if it's the last icon clicked or not the splash color will be orang accent inside the unpress function we will say if the icon is not the icon menu then we will set State and say that the last icon click is equal to the icon because we don't want the menu icon to be orang only the icons that are inside the list you will also verify that if the menu animation that status is equal to the animation status. completed then we will revert the animation otherwise we will forward the animation and this is what triggered both animation forward and reverse the child of the floating action button will be an icon coming from the list of icons and with all this you will have create a flow Widget the flutter logo widget did you know that you can add the text flutter under the flutter logo widget and for this you will have to use a center widget use the flutter logo inside you have the size which we will use at 300 you can change the style of the flutter logo to use the flutter logo style that's stacked and this will put the text right under but you can also change the color by using the text color blue and this will have the word flutter under the flutter logo this was the flutter logo Widget the form widget this widget will allow you to create a form within your flutter app and validate everything with only one button and to create something like this we will need to start by creating a global key which we will call the form key then inside a padding widget we will create a form the key will be the form key we just created and inside the child we will create a column widget this one will have children and the first one will be a text form field widget inside you can use the validator argument it will return you the value which is all the information entered inside the text field and then you can create conditions by example if the value is null and empty then we will return enter something otherwise we will return null we will create another text form field just like this one and right under we will create the elevated button when we press on it if the form key. current state. validate is true then we will trigger the scaffold messenger show snack bar in other words this will trigger the validator of every text form field inside the form and if the conditions are through then it will trigger the snack bar the child of the elevated button is a text validate and now you can see that if we have text inside both text field and we click the validate button we will see the snack bar and otherwise it will show us the error message and this is how to use the form widget with flutter the fractional translation widget as you can see on the screen we have have three containers but the orange and the red one is not the actual location where they came from because we use the fractional translation we are able to move widget to different location Let Me Show You by using an example we will use a column widget inside we have the children container with the color blue gray and this is how it look like now we will use a fractional translation widget inside we will use the translation to offset one minus one and the child will be a container or range ACC you can see that even though we use a column Widget the widget is actually on the side of the first one and this is because we use the translation we move the widget one on the side and then minus one which will go on the top we can use another example by using another fractional translation this one will have the same offset and the child will be a container red accent but this time the widget is under the orang container this is because the third widget is actually located in this location so when we move one and minus one this is the final location of the widget and this is how you can use the fractional translation widget with your flutter app the fractionally sized box widget this widget is exactly the half of the height of the screen and the half of the width of the screen and this is because we use the fractionally sized box let me show you how it works first inside a center widget you will use the fractionally sized box the width Factor will be 0.5 and the height Factor will be 0.5 inside you can put a child container with the color Ember accent and now you have this container but if you change the height factor to one you will see this will take the entire height of the screen and this was how to use the fractionally sized box with flutter the future Builder widget when I press on this button this will wait until we have the data and then it will display everything on the screen so how do we use the future Builder the first thing we will create is a future get data this will be a nynn function inside you will await a future delay for one second this just mean we will wait for one again then we will return the data super we will use this throw error later now inside the center widget we will create the future Builder inside we will have the future which is the get data the Builder will have the context and the Snapchat inside you can say if the snapchat. connection state is equal to connection state. waiting so if we are waiting for the data then it will return the circular progress indicator and then we create another if else condition if the Snapchat has an error then we will return something and otherwise we will return something else so if we have an error we will display a text widget with the snapchat. error. twring and otherwise we will return a column widget with a text that have the snapchat. dat. two string string we will also use an elevated button and this one will have a set State inside the unpressed function the child will be a text refresh okay so with all this when we press the refresh button this will trigger the function get data we'll wait for once again and then we'll return the data super but what will happen if we throw an error in this case it will return the error widget and this was how to use the future Builder with your flutter app the gesture detect widget in this example we have a simple container that we have WRA with a gesture detector so every time we click on the container this will trigger a function but you can wrap anything with the gesture detector in order to create a button to make something like this you will first create a int counter which will be zero inside a center widget we will use a gesture detector the untap function will trigger a set State and will add one to the counter the child will be a container with the height and width 200 and the color or range accent the child will be a center with the text counter the two string and we will add a style of font size 50 and this was how to use the gesture detector with flutter the grid paper widget and this is how it look like to create something like this you will start by creating a sized box with the height double infinity the width double. infinity and the chart will be the grid paper widget inside you can change the color for pink the division for one the interval for 210 and the subdivision for six you can change all of this to create your own unique grid paper Widget the grid tile widget you can see that we have a widget with a header and a footer and this is created by the grid tile widget to make something like this you will use a sized box inside a center widget you will create your own height and width the child will be the grid T and inside you can have a header which will use a simple container with the height 40 the child will be a center widget with the text header and the color will be black 38 after you can create a child widget in this example we will just use an image from Network and this is how it will look but you can also create a footer widget for this example we will use the same height the child will be a center with the text footer and the color will be also black 38 and now you can see on your screen you have created a grid tile Widget the grid Tile Bar widget on the screen right now we use the grid tile widget but inside we use what we call the grid Tile Bar let me show you right now by creating a center and a sized box widget with height and width inside the child we will have the grid tile the header will be a grid Tile Bar you can change the background color the leading will be an icon person the title will be text flutter map and the trailing will be an icon menu for the grid tile to work we'll need to create a child this one will just be an image Network and this is what we have on the screen right now you can also use the grid Tile Bar inside the footer for this example we use the background color and the leading so if you want to use the grid tile inside your flutter app you can use the grid Tile Bar inside the header and the footer this was how to use the grid tilebar Widget the grid view widget at the end of this video you will be able to create a list just like this one so first we will use the grid view. Builder inside we have the grid Delegate for this one we use the sliver grid delegate with fixed cross access count the cross access count will be two because we want to have two columns the item Builder will be a grid tile widget and this one is the picture with the header and the footer the next thing you need is the item count we will create 10 item inside this list and with all of this you have created a grid view widget but keep in mind that you can also just use the grid view like this you don't need to have the dot Builder and this was how to use the grid view widget inside your flutter app the ero widget this one can be used to animate the transition between two widget in this example we have an icon which animate the transition inside another page with a different widget and this is created with the EO widget let me show you how it work first we'll create a list style inside we will have the trilling hero the tag will be tag one keep this in mind because we will reuse this later inside we have the child icon person and when we press on this it will trigger the Navigator do push this will bring us to another page which we will use the material page route and the Builder that will return the second page in other words this will bring us to another page the title of this list style will be text click on me but now it's time to create this second page we will create the class and return a scaffold widget inside we have the ab bar second page the body will be a center with the column inside the children of the column we will have the eror widget the tag will be the same as the previous one tag one and the child will be a container or range accent with the height and the width 100 and just like this when you press on the listle this will bring you to the other page and will animate the transition between the two widgets the icon and the container the icon widget in this example we will create an icon with a shadow behind let's do this right now inside a center widget we will create the icon we will use the icon flutter Dash the color will be orang range accent and the size will be 200 but now how do we add the shadow for this you will use the shadow argument and inside you will use the Box Shadow the color will be black the offset 88 the spread radius and the BL radius will be 10 you can change all of this to your preference the icon button widget this is an icon but also a button at the same time to create something like this we will start with the int click equal zero in a center widget we will create a column with the children the first one will be the icon button this one will need the icon which will use the add box the icon size will be 50 the unpress will set State and add one to the click just keep in mind that you have many other arguments inside your icon button under this one we will create a text widget that will display the number of Click so every time you press on the icon button this will trigger the function and add one to the clicks the ignore pointer widget as you can see on the screen I can click on the click me button but as soon as I click on this button I will block the click of the second one and this is because we use the ignore pointer to create something like this we will start by using using a Boolean ignore set to false in the center of the app we use a column widget and the children will be an elevated button inside we have the unpress function that will trigger the set State and change the value of the ignor Boolean if it's false it will be true if it's true it will be false next the child is a text widget and if the value is true then it will be blocked otherwise it will be all good the style of the elevated button will also change we will use the elev button. style from the primary color will be if it's true then it will be red otherwise green and you can see that every time I press on this button the color change but now it's time to use the ignore pointer the argument ignoring will be ignore which is our Boolean we have created the child will be an elevated button with the unpress function and the child text click me if the value ignore is true then the button will not be clickable but if we change the value to false then the button will be clickable and this was how to use the ignore pointer with your flutter app the image widget in this example I will show you how to use an image but also how to create a filter of color over it inside the center widget will use the image this one will have the image argument we will say Network image and we will put the URL of the image this is the original image we will also use the color argument to Blue but this is not enough we also need to use the color blend mode and we will say color burn and just like this you have created a blue filter over your image the indexed stack widget if I click on different button this will change the image on the screen this is because we use the index tack widget to create something like this we will start with the int index equal Z inside the padding we will create a column widget and in the children we will start with a row the children inside the row will be first an ele elated button with the text zero it's the first button you can see on the screen the unpress will set State and set the index to zero this is the variable we created at the start we will create two other elevated button one that will set the index to one and one that will set the index to two in this way we can change the value of the index variable it's now time to create the index stack Widget the index argument will be the index variable we created the children will be three different different image and now when we click the buttons to change the index this will automatically switch between these three widget this was how to use the index tack widget with your flutter app The Inkwell widget this is a simple container with a text inside but when I click on it this will change the color of the widget because we have wrapped the container with the ink well widget let me show you how it works first we will create a variable color set as blue in the center we will use the in Quil widget with the untap function that will trigger the set State and change the color for red but you can also use the unble tap or the UNL long press the child of the ink well will be a ink widget with the height and the width 300 the color will be the color variable we created and the child will be a center text click you can wrap any widget with the ink well to create a button the input chip widget this is how the widget look like you can press on it to put a check mark Or you can click the delete button for this we'll start with the Boolean is Select set as false in the center of the app we will use the input chip Widget the Avatar will be a circle Avatar inside we will say the background image is a network image the label of the input chip will be a text Einstein the unselected will return a new bullan value so every time you click on this it will trigger the unselect for this example we will set State and say that the is Select is equal to the invert of the is Select now we can use the argument select is equal to is Select this code will create this in the application but you can also create the selected color in this example we use the white 38 you will see this will change just a little bit the color of the input chip you can also add the delete icon we will use the cancel outlined and the undelete which is a function that is trigger when you press the x button this was the input chip Widget the interactive viewer widget you can use this to zoom inside your application you can see this is a widget inside a scaffold which I can zoom and dooom and this is because of the interactive viewer let me show you how to create this first we will start with a scapel widget the background color will be orange accent the body will be the interactive viewer inside we will set the boundary margin to ENT sets. all double infinity the child will be another scaffold with a nap bar and now you can see that I can move the scaffold pretty much everywhere and I can also zoom and dooom everywhere inside the scaffold but keep in mind that you can use this for any widget the layout Builder widget this one can be used to display different things inside your app depending on the size of the screen you can see that when the screen is under six and this is what I see but if I move the screen on the side I will have an image so you can show different things on the app depending of the size of the screen to create something like this we will start with the layout Builder the Builder argument will have the context and the constraints and we will say if the constraints that Max width is bigger than 600 then we will return a center widget with an image Network and otherwise we will return a center widget with the text screen under 600 with this you can see that when I move my screen to the other side it's over 600 so we can display the image Network The Limited Buck widget on the screen right now the listy is limited withd is height and this is what we will do in this video first inside a center widget we will use a single child scroll view inside we have the scroll Direction axis vertical the child will be the limited box the max height will be 50 and we will play with the max width later inside we will use the child card which will be a list style inside the leading is a ion person and the title will be flutter map now you can see that the height of the listy is limited if we also add the max width you will see that nothing will change and this is because the limited box works only if the parent is a unconstrained widget which is the reason we have used this single child scroll view but now if we change the axis to horizontal you will see that only the width is working the height will be the normal size the linear progress indicator widget I will show you how to create this one and this one let's start right now the first thing you need is the width take care provider State mix in I will tell you why we need this later next you will create a late animation controller inside the init State you will declare this controller with the animation controller the vsync will use the disc which can be used because we use the WID tier provider the duration will be 5 Second and then you will add a listener that will set State everything after this we will say controller. repeat and the reverse will be through when you use a controller make sure that you dispose it inside the dispose method after this you can go inside the scold widget create a padding widget use the column and inside the children you will create a linear progress indicator this one will use the value controller. value and this is what you have on the screen screen but keep in mind that you can also use only the linear progress indicator and this is what you will have the listener widget as you can see when I press on the screen this register a press also it register the cursor location but when I release it will also listen to the release of the screen so let me show you how to create something like this with your flutter app first we will need four variables the number of presses the number of release the double x and the Double Y the this is the location of the cursor next we will create a listener widget inside we will have the UNP pointer down this is when we click on the screen and this will set State and add one to the number of press then we create the UNP pointer move this one will set State and register the location of the cursor the last one is on pointer up and this one will set State and add one to the number of release after this you can create a child we will use a container infinity infinity with the color arain this is the background color inside the column we will create the children which the first one will be a text widget displaying the number of press we will also add a textile and we will do the same thing for the number of release with the same textile and finally another text but this one will be the cursor and you can see that we have the location X the two string and the location y the two string we will also use a textile and just like this you have used the listener Widget the listle widget this this is a box where you can display a leading a title and a trailing widget I will show you how to create this right now inside a center widget we will use the list stle the title will be a text flutter map the tile color will be orange accent you can use a untap function the leading will be an icon person and finally the trailing will be an icon menu the list view widget this one is a way to display Multiple List inside a scrollable list I will also show you how to create divider between each list style so let's start right now by using the list view. separated the item count will be five the item Builder will have the context and the index which will return a list stle because we use the do separated you will need to create a separator Builder this one will have the context and the index you can create everything you need between each widget but for this example we will just use the divider widget with the color white and just like this you have used the list view widget the list wheel scroll view widget this is how it look and I will show you how to create this right now first you need to create the list view scroll view inside you have the item extend which we will use 100 this is the space between each widget next you can create other arguments if you want to change how it look but for this example we will just use the item extend the children will be a list that generate we will use 20 items and each item will be a list style and just like this we have created the list wheel scroll view widget the long press dragable widget this one can be used to select an item and move the location of the item so let me show you how it works first we create a variable offset which will be the location of the image when we start then inside a center widget we use a layout Builder this one have the context and the constraints we will need this to know where is the location of the widget inside we will use a stack widget which will have children the first one is the positioned so we will p position the widget from the left with the offset do xaxis we will do the same thing with the top with the offset Dy inside we have the child which will be the long press dragable first argument will be the feedback it will be an image network but with a color arrange and a blend mode color burn the feedback is the image we can see on the screen when we drag the widget after this you have the child widget which will be also an image but this one is the original image the the argument on drag end will have the details and inside you will set State and create an adjustment of the image location after you would set your offset variable using the adjustment we just created and just like this you have created a long press dragable widget which can be used to move anything inside your app the material app this is one of the most common but I want to show you things that maybe you don't know so let's start right now by creating a theme first you can create a team team and for this example we will just put the team data. light but you can also put a dark team since the application is already in a dark theme I can change the theme by using the theme mode theme mode. light you will see in a couple second it will works next I will use the debug show checked mode Banner as false so we don't have the banner on the right side the home will be a scaffold widget and now if I refresh the screen you will see we are inside a team mode. light if I replace the team mode by dark now it will be a dark app the next thing I want to show you is the localization delegate and the supported locales I will link all the documentation in the description of this video but this can be used to control the language of your application by example English or Spanish if you want to learn more you can search about localization with flutter the material Banner widget and this is what we will be able to create at the end of this video you have a little popup from the top that you can Di at any time to create this we'll start with a center widget an elevated button with the text open the unpress function will have the scaffold messenger. of context. show material Banner inside we use the material Banner widget you can create a padding the content will be just the text subscribe so you can see it's this information the leading will be an icon notification the elevation will be five the background color white 12 and the actions will have a text button with the unpress function that will trigger the scaffold messenger. of context that hide the current material Banner the child will be the Miss and just like this you have created a material Banner with your flutter app the material button widget if I click on this button it will be yellow but if I press long enough it will be red and this is because we use the material button inside a center widget we will create the material button inside we have the unpress function the child will be a text click and the highlight color will be orange accent this is what we have on the screen you can also change the splash color to Red accent this is when you keep pressing on the button and finally we will use the color blue gray to display a color of the button and that's it the merge semantic widget this is what you will have at the end but let me show you what is the purpose first thing first you will need to go inside your material app and add the show centic debugger to true this is what you will see on the screen next we will use the merge centic widget inside we will have a row and the children will be one text and another one you can see that the centic is only one block right now but if we remove the merge centic widget you will see that we have two different centic block this was how to merge semantics inside your flutter app the model barrier widget all the orang is what we call the model barrier and when we click on it this will disappear and we can reactivate the model barer by clicking on this button and I will show you how to create this with your flutter app we start by creating a variable activated which will be set as true inside a stack widget we will create the children the first one is a center which will be the elevated button the unpress function will trigger the set state which will change the value of the activated Boolean if it's true it will be false if it's false it will be true the child of the elevated button is a text reactivate after inside this stack widget we will create a if condition if it's activated then we will create a opacity widget jet with the opacity 0.4 and the child will be the model barrier there is an argument called dismissible we would set this one as true the argument on Theiss will have a set state which will reverse the value of the activated Boolean I also added a color orange so it's more visual for you okay so when I click on this it will not press on the button but deactivate the model barrier and then I will be able to click on the button but if you want you can set the dismissable to false and in this way no matter what how many time I click on the screen this will never remove the model barer and this was how to use the model barrier with your flutter app the system Mouse cursors and for this example we will need to have the web flutter because as you can see when I take my mouse and I put it over the widget we will have the grab icon let me show you how it works first thing first inside a center widget you will create the mouse region in the argument cursor you will use the system Mouse cursor. grab after we will use the child container with the width and the height 200 and 100 the decoration will be a box decoration box shaped circle with the color orang and just like this when you put your mouse over the widget it will create a grab icon but keep in mind that you can use many different icon by Example The Cell so if I go over we will have this icon that's it the mouse region widget and in this example we will need to use the web flutter so if I take my cursor and I go into Inside the Box this will register the number of enters and also the cursor location but as soon as I exit the container this will also register the exit and you can create something like this by using the mouse cursor widget first thing first we need to create four arguments the enter count the exit count the position X and Y and inside the center widget we will use the mouse region this one will have the argument un enter and with this we can set State and add one to the enter count we will do the UN over also with a set State and register the position of the cursor by using the detail. position. X and Y the third one is the onexit this one will be a set State and we will add the exit count with this you can create a child container I will use the color orange and inside we have a column widget with multiple children the first one will be the text enter count this will register how many time we enter inside the widget you can also add the text exit which will use the exit count and finally the text cursor this will have the X position do to string and the Y position do to string and just like this you have used the mouse cursor widget to register the number of enter and exit inside the widget the navigation bar widget this is what you will be able to create at the end of this video first thing first we will add a int current index and also a list which we will call Buddy of multiple icons with this we can go inside the scaffold widget and create a center Widget the child will be the body. element at of the current Index this is the variable we created after this we will use the bottom navigation bar with the navigation bar widget this one will use the destinations and it will require multiple navigation destination the icon will be home and the label will be home if you put only one of them you will have a red screen so make sure that you have multiple navigation destination but now the button are not clickable make this work you will need to use the selected index which will be the current index and then when you trigger the UND destination select you will be able to set State and say that the current index is now equal to the index you just received with the on destination select and now you are able to change Pages inside your app with the navigation bar Widget the notification listener widget if I start to scroll the screen you will see scroll updated but if I stop you will see scroll ended but how can we do this this with flutter for this you will need to use the notification listener so the first thing you need is to create a string message new then inside a column widget you will create first a container this one will have the height 60 the color orange accent the child will be a center and inside we have the text message which is the variable we created this is the orang block you can see on the screen next you will create an expended widget which will have a child of the notification listener the argument on notification will receive the scroll notification which you can use inside conditions if the scroll notification is a scroll start notification then you will set State and you will set the message as scroll started otherwise if the scroll notification is a scroll update notification you will set State the screen and you will set the message as scroll updated if it's not the case then you will see another condition if it's a scroll end notification then you will update and you will say scroll end at the end you will just put return through the child will be a list view. Builder the item count will be 100 the item Builder will have the context and the index inside you will return a list stle with the item number if I refresh the application you will see new on the top when I start to scroll you will see scroll update then you will see scroll in when I release and if I just click on the screen you will see scroll started so that's it the offstage widget as you can see when I press the button we have the icon flutter down but when I repress the icon will disappear I will show you how to use this widget first we will create a variable is hided which we will set as true inside the sized box we will use the WID double. Infinity child column and in the children we will use the offstage widget the offstage argument will use the variable we created and the child will be an icon flutter Dash under this one we will create an elevated button which will have the text is added is equal to the variable and the unpress function will set State and change the value of the is added if it's true it will be false if it's false it will be true and now you can hide and show widget inside your app the opacity widget on the screen we use the opacity widget this is three time the same widget that use different value of the opacity for this we will use a column and inside this column we will use the opacity Widget the opacity argument will be one which mean it will be completely visible and the child will be a container or range with the text flutter inside but we will also create another opacity with 0.5 and the last one with the opacity 0.1 and now you have different opacity for the same Widget the orientation Builder widget you can see on the screen right now this is a portrait mode but as soon as I turn the screen this is now landscape I will show you how to do this with your flutter app first we create a widget orientation Builder the Builder will have the context and the orientation and inside we will use a conditions if the orientation is equal to orientation. Portrait then we will return a center widget with the text portrait otherwise we will return a center widget with the text landscape and just like that you have used the orientation Builder widget with your flutter app the outlined button widget this is a button you can create with flutter first inside the center widget we will use the outlined button the unpress function will be an empty function and the child will be Tech click me and this is what you will have but you can change the color of the button and the text of the button by using the style outlined button. styr the primary color. white will be the text inside the button and the background color will be the background of the button the Overflow bar widget this one is a mix between the row widget and the column widget I will show you how it works inside a padding we will create the Overflow bar the spacing will be all the spacing between each Widget the the children will be an elevated button flutter map and we will create two other elevated button but now what will happen if we add another another button in this case it will become a column widget so as soon as we don't have place on the screen anymore this will transform into a column Widget the overflow box widget this one will allow you to create widget that go outside the boundary of the parent widget so inside a center widget we will create a container with the width and the height 100 the color will be orange accent now inside the child we will use the overflow box because we set the max width and the max height to 200 and inside we put a container with the color red opacity 0.5 and the width and height Infinity this will create a widget that overflow the parent Widget the padding widget on the screen we have a card with a text inside but we also have a padding around the text this is because inside a center widget we use the card widget which have the padding inside the arguments padding from this widget will use the edent sets. all 20 but you have multiple other possibility you can put ENT set. Zer do symmetric do from ltrb which mean left top right bottom and inside this widget you have a child which we will use the text if we put 80 instead of 20 you will see the padding is way bigger and this was the padding Widget the page view widget this is what you will be able to create and to make this we will start with the page view widget inside we will use the children and we will create three different container one which will be orange with the text one one that will be red accent with the text two and one that will be blue gray with the text three and with only this code you will have something like this in your flutter app the physical model widget on the screen we have an orange circle and a Red Shadow behind and this is because of the physical model let's make this right now first we will use the background color of the scaffold white because I want to make sure that you see the Shadow the body will be the center with the physical model the elevation is 20 the shadow color will be red accent the color of the actual circle is orange accent and the shape will be a box shape do circle inside we will use the sized box the width and the height will be 200 and the child will be a center with the icon flutter Dash and this was how to use the physical model widget with flutter the physical shape widget this will allow you to create rounded Corner inside a center widget we will use the physical shape the elevation will be five the Clipper will be a shape border Clipper inside we will use the rounded rectangle border with the Border radius circular 40 we need also to put the color orang accent and the child will be a sized box the height and the width will be 250 the child will be a center widget with the i flutter Dash inside and that's it the placeholder widget this one can be used if you are in development if you don't have the actual image so inside a column we will create in the children a place holder this is how it look like you can change the fallback height to 300 but if you try to change the fallback width to 50 nothing will change because the width is a defined value and the fallback height is working only because we use a column widget you can also change the color of this placeholder but if if we change the column for a row you will see that the width is now 50 and the height is everything this was the placeholder Widget the platform menu bar widget this widget is only available with Mac OS and you can see it's actually this thing you will have the about message and quit everything and I will show you how to create this with flutter you will need to start with the platform menu bar inside you will add the menus the first one will be the platform menu with the label platform menu the menu inside and the first one is the platform menu item group inside we have the members which use the platform menu item we can give a label and unselected this one is the first you can see on the screen right under we will create another platform menu item group we will also use the members to use the platform menu inside we will create a label message but also another menu because you can see that if we go on the widget the messages have a sub menu and for this inside the menu list we create another platform menu item we have the unselect the shortcut and the label learn more this one is inside the messages learn more and you can see that we have a shortcut come in which is the F and this is because we use the shortcut next at the end we will say if the platform provider menu item has a menu inside we will put the platform provider menu item type. quit and if it's the case then we will say platform provider menu item and the type will be be the platform provider menu item type. quit in other words if we go over the widget you will see that we have a third option quit every flutter widget this will close the entire application you can use it if you want finally in the body we will use a center widget with the text flut map this is the text that you can see in the center of the app and just like this you have created a menu inside your Mac OS application the popup menu button on the screen we have a listy and when we press on the icon we have a popup menu and you can select the second item to change the list stle to create something like this we will start with three variable the title the item one and the item two the title is what you can see on the listy next inside the listy we will create the title which will use the text title the trailing will be the popup menu button inside you will use the item Builder with the context and this will return you a list the first one will be a popup menu item the child will be the text item one which is first item and the value will be also item one you will create another popup menu item the child will be a text item two and the value also the argument on select will return you the new value select and you will be able to set State the application and set the title to the new value and with this you have created a popup menu button inside your flutter app deposited widget with this you will be able to display three different image one over the other but with different position let's start with a Center widget then a stack Widget the children will be a positioned widget inside we have the left 20 the top 20 and the child will be an image Network this will position the image 20 from the left and 20 from the top next we will create another positioned with the left 60 and the top 120 and you can see that the position is coming from this information we will finally add another position head with the left 100 and top 220 and this was how to use the position widget with your flut app the positioned transition widget this is what you will have at the end so let's start first by creating the with single taker provider State mixing because we will need this later then you will create an animation controller controller this one we'll need inside the duration which will be 2 second and the vsync this this is available because we use the single tier provider State mix in next you will say do repeat and the reverse will be through it will allow the animation to go back and forth when you use a controller make sure that you dispose it with the dispose method next you will create two variable a double small logo and a double big logo because on the top it's smaller and on the bottom it's bigger and now it's time to use the layout Builder this one will have the context and the constraints inside you will create a variable biggest which will be the constraints. biggest you will then return a stack widget inside you will add the positioned transition the W will be a relative re re twin. animate to create what you see on the screen you will need to put things inside the relative re twin the first one is the begin it will use a relative re do from size and the end will use the same thing but now let's add the logic inside it for the begin we will use the. from left top with height and this is all the logic for the position of the widget at the end of the animation we will create a different logic you see that we use the biggest width and bigest do height this is coming from the variable we created at the start after this inside the animate you will use the curved animation inside you have the parent which is the controller you created at the start and the curve which is the slow midle you can see the animation is slower in the middle the next thing you need is a child which will be the padding inside we have a container a shape Circle and the color orange and with all of this you will create an animation like this one the prefered size widget this can be used to create your own app bar widget so the first thing you need is to create the prefered size widget inside the abar of the scaffold the argument preferred size will be a size from height and we will use 80 the child will be a container with the height 120 the decoration will be a box decoration because we want to have a gradient we will use the linear gradient Widget the colors of the gradient will be color red and orange next we need to create a child which we will use the safe area the child will be a center and the child of the center will be a list tle widget we have the title flutter map and the trailing icon search and just like this you have created your own app bar Widget the radio widget on the screen we have two selectable item using the radio widget to create something like this we start with a list of string called options which have the option one and two then we create a string current option which will be the option number one in the column widget we create a list stle the title will be option one the leading will be the radio Widget the value is the option zero which mean the option one the group value will be the current option and the unchange will return a value which we can use to set State and set the current option to the value. two string if the value and the group value is the same then the radio button will be activated so now let's create the second option we create another list style the title option two the leading radio the value is the option one which mean it will be the option two and then you can add the group value the current option which is the variable we created the unchange will return the value that we set state to set the current option to the value. to string like this you have created two radio Widget the radio list style widget at the end this is what you will have on the screen and to create this we will start with a list of string called options the string current option will be option zero the column will have multiple Widget the first one is the radio listal you can put a title which will be option one the value will be the option with the index zero the group value will be the current option and the unchanged will return you the value that you can use to set State and set the current option to the new value this is pretty much the same thing as the radio button but already inside a list file now we will create another one with the title option two the value option with the index zero the value options with the index one group value current option and the unchange will set State and set the current option and like this you have created two radial listy the range slider widget this is what you will have at the end first we start by creating a range value this will be 0.1 to 0.5 which we call values next we create a variable labels this this will be a range labels and inside we put the values. start. two string and the value. end with this you can return a center widget with the range slider inside you will put the value which will be the value variable we created the division will be 10 the labels will be labels and the unchange will return you the new values which you can set state to set the values with the new values and just like that you have created a range slider Widget the raw autocomplete widgets this will give you multiple suggestion inside your text field and you will be able to select them to autocomplete the text field to create something like this we will start with a list of string this will return the list where each item need to respect the following condition if the item contain the text editing value the text that we just enter in the text field then it will return through and it will be one of our suggestion next you will need the Field view Builder this one will give you access to the controller text editing controller Focus node and onfield submitted with this you can return a padding the child will be a text form field this is what you see on the screen you will need to put the text editing controller inside and the focus node for the onfield submit you will trigger the unfill submitted next you will need to create an option view Builder this one will have the context the unselect and the options with this we can return the Align Widget the child will be a padding which inside we will put the material otherwise you will see that the Box will not work the elevation will be four the sized box will have a height of 200 this is the height of the Box the child will be a list view. Builder with a padding and the item count is the options. length the item Builder will have the context and the index with this you can create a variable option which will be options. element at index and we will return a gesture detector when we press on it this will trigger the UN select with the current option and the child will be a list Style with the title text option and with all this you have created the raw autocomplete Widget the raw chip widget and this is what you will have at the end first inside the center widget we use the rip Widget the label will be the text rip the Avatar will be a ncon person which is the leading of the rip you can also add a delete icon we will use the remove Circle the unpress function and the deleted and with only this little code you have created the raw chip Widget the refresh indicator widget in this example I can refresh my list to have one more item inside let's create this right now with flutter first you will start with a list of item I would say item one and two and you will build the refresh indicator this one will have the UN refresh which will be a async function the first thing we do is we will wait for one second and then we will Define the next item which will be the items. l+ one we will add this item inside the list of item we have and finally we will set State the child of the refresh indicator will be a list view. Builder and if you want to change the color of the refresh indicator you can say color equal white and background color is equal to Orange accent this was the refresh indicator the reorderable list view on the screen we have a list but we can reorder every item inside this one first we will need to create a list of item this one will be a list that generate of 30 items next we use the reable list view widget inside we have the children which will be a list that generate also the items. length will be the number of item inside the list and then each item will be a list stle make sure that you put the key which will be in this example a key with the index inside the tile color will depend if the item is odd or not the title will be the item and the end index of the item the trailing will be the drag endle sharp icon and after you need to create the on reorder this one will give you the old index and the new index with this you can create a logic you can say set state if the old index is smaller than the new index then you will say that the new index is minus one you can then create a final item is equal to item. remove at Old index and then insert the item at the new index location this is just all the logic to make sure that when you move an item it go to another place and this was how to use the reorderable list view with flutter the rich text widget with this you will be able to put different type of text inside the same line and for this we start with a center widget inside we have the rich text Widget the text argument will take a text pan you can give a default style if you want and as you can see inside the children we will put one text pan this one will just be the text to the which use the default text stle then you can create another text pan but if you change the style of this one it will be override and you will see that moon have a different textile which use the font weight Bold and the color white finally we will put a last text pan with the N Beyond so if I remove the font weight bold from the Moon then you will see that this will not be bold anymore because it use the default textile the rotated box widget on the screen we have the flutter logo which is rotated one quarter of a turn and you can do this by implementing the rotated box Widget the quarter turn argument will be one the child will be a flutter logo and this is what you will see on the screen if you change the quarter turn for two you will see the flutter logo will turn even more this was the rotated box Widget the rotation transition widget this is a flutter logo which turn and come back and this is because we use the rotation transition widget let me show you how it works first thing first you will need to create a width thicker provider State mixing then you can create a late final animation controller variable this one will have a duration of one second and we'll use the vsync disc the vsync disc is only available because we use the width ticker provider State mixing then you can say repeat reverse equal through this mean the animation will repeat forever after this we create another variable animation which is a curved animation the parent will be the controller with just created and the Curve will be a curves that is in circle because we use a controller we need to also dispose it and for the UI we can say use the rotation transition the turns argument will be the animation we created the child will be a padding with a flutter logo inside and with all of this you have created the rotation transition Widget the row widget this can be used to display multiple widget one after the other for this we start with a sized box height and width double the Infinity which mean take the entire screen then we create the row Widget the children will be three expended widget and inside we have the elevated button the row and the expanded widget work pretty well together and you can see that this will take the entire screen next we will add another expanded widget with another elevated button and finally another expanded with another elevated button and this will give you multiple widget on the horizontal axis this was the row Widget the scaffold this can be used Ed to create a drawer you can also use it to create all the skeleton of your app add a floating button in the middle and also a navigation bar in the bottom let me show you how it works first we will create a variable int count at zero inside the build we will return the scaffold widget if you want you can change the background color we will use orange accent there is an argument called AB bar this is the bar on the top of your application the body argument will be all the widget in the middle of the skeleton of the app if if you need to have a drawer inside your application you can use the argument dryer and use a widget called drawer also just like this you have a button which you can press and access a menu in the scaffold you can also add The Floating Action button location for this one we will use the center dock but you will also need to create a floating action button keep in mind that you can change the location of the floating action button wherever you want next you have also the possibility to add a bottom navigation bar for this example we'll just use the bottom navig ation bar widget and this can give you a big picture of what you can do with the scaffold the scale transition widget on the screen the scale of the fler logo is animated and I will show you how to create this right now first you will need to add the WID taker provider State mix in inside we will create an animation controller this one will have a duration of 1 second and we will use the vsync this this is only available because we use the WID thicker provider State mixing next you will say do repeat with a reverse through this mean the animation will always keep going after this you can create another variable animation which is a curved animation the parent will be the controller we just created and the Curve will be a curves that fast outf flow in because we use the controller we need to also dispose the controller and inside the build we will return a center Widget the scale transition widget this one have the argument scale which is the animation we just created the child will be a flutter logo 150 and just like this you have created a flutter logo with an animated scale the scroll bar widget if you want to have a scroll bar like this in your app then you can use the scroll bar widget first we will need to create a controller scroll controller then we will return the scroll bar widget we will give the controller we just created the child will be a list view. Builder inside you can put the same controller the item count will be 40 items and the item Builder will be a list Style with the item and the index plus one so just like this you have access to a scroll bar inside your app the selectable text widget this will most likely be useful inside your flutter web app but you can put this in any app and to use this we will start with a center widget inside we will have the selectable text the first thing you need to add is the text then you can create also a style if you want there is an argument called the UN selection changed and this will give you the information about the text selection you just did inside you can put any logic that you want and this was how to create a selectable text with flut the semantic widget with this you will be able to create a semantic for any of your widget this can be used for people using voice description inside their app and if you want to work with semantic you will need to start by going inside your material app and add the function show semantic debugger to through after this we can create our own widget inside the body of the scaold first we start with a center then we have the column Widget the children will be first a semantic widget the child of this one will be the flutter logo but if you want to see the description of the semantic you need to add the label this is the flutter logo and now you can see the semantic of the flutter logo under the semantic widget we will add another flutter logo widget and if I save you can see that we don't have the semantic of this one and this is because it's not wrapped with the semantic Widget the shatter mask widget this is a text with a gradient inside and I will show you how to create this using the shadow mask widget inside a padding we will create a child Center the child of this one will be the shatter mask and inside you can use the shatter call back this one will give you access to the rec the return will be a radial gradient and then you will need to say dot create a shatter with the bound we just received inside the radial gradient you will need to put the center argument which is an alignment the radius will be four and the color will be orange accent and red accent but as for now you will see nothing on the screen because you need to add also the tile mode which is the ti mode. mirror but also create the child which will be the text widget this is a cool looking text with a style 40 and just like this you created a gradient text inside your flutter app the shortcut widget if you want to trigger something in your app only using the keyboard you can use the shortcut widget when I press the up arrow and when I press the down arrow this will change the number of the counter let me show you how you can create this first you will need to create two class one call the increment intent that extend the intent and the second one decrement intent again we extend the intent now we can go down and create a variable int count starting at zero in the return of the build we will use the shortcuts Widget the arguments shortcuts will need to have the logical key set and inside you can Define which key inside your keyboard will be used this will be a map so when you press on this button something happen and this something will be the increment intent we will add another logical key set this one will be the arrow down and will be linked with the decrement intent for the child we will create the actions the actions argument will be also a map the key of the first one is the increment intent and this will trigger a call back action inside we have the UN invoke which will trigger the set State and say that the count is equal to the count + one we will do the same thing for the decrement intent we use the call back action when we invoke this this will trigger the set State and set the count as minus one the child of the actions will be a focus make sure that you have this one otherwise it will not work the child is a center widget with the text counter and the actual count and now if we refresh the application and I put my mouse outside the app you will see that when I press the up Arrow this will add one to the counter and if I press the down arrow this will decrease the counter this was the shortcuts Widget the the simple dialogue widget when you will press the show dialogue button you will have a popup on your screen and this is the simple dialogue so first inside a center widget we will create an elevated button first because we need something to press on it to display the actual popup the unpress will trigger the show dialogue inside we have the context and the Builder the Builder will return the simple dialogue widget inside we have the title this is the title then you can also add a Content padding and also children the first one will be a text more information and the second one will be a text button when we press on it this will trigger the navigator.of context. pop because we want to close the popup and the child will be a text close finally for the elevated button to work we will need to have the child text show dialogue and just like this you have created a simple dialogue with your flutter app this single child scroll view widget this can be used to make any widget scrollable first we will return the single child scroll view widget the child will be a column inside this one we will create a list. generate we will have 50 items and each item will be a list style widget you can see that the list is scrollable but what if we don't have the single child scroll view if I remove the widget and I save you will see that we will have an error so I will put it back I will save again and you can see that you can use the single Tri scoll view to make any widget scrollable the size transition widget on the screen we have a flutter logo which decize is animated and I will show you how to create something just like this first we start by creating the WID tier provider State mix in then we need to create an animation controller which will have a duration of 2 seconds the vsync this is accessible because we use the WID ticker provider State mixing after we will say repeat and reverse through this just mean the animation will repeat forever next we can create an animation with the curved animation the parent will be the controller we just created The Curve will be a curves that is in sin and as you know when we use a controller we need to also dispose the controller after this inside the build we can return the size transition Widget the size Factor will be the animation we just created the axis will be axis horizontal the alignment will be minus one and the child of this size transition widget will be a center with the flutter logo and this was how to use the size transition widget in your flutter app the sized box Widget the size of the arange box is determined because we use the sized box widget you will see this is very simple we use the sized box we will put the height and the width at 300 then we can create a child which will be a card the color will be orange accent and the child will be a center with the text flutter map you will see that if you remove the height and the width the card will take the entire screen so I will put them back I will save and this was the sied Box Widget the sied overflow box this will allow you to put a widget inside another another one that can actually take more place than the parent widget for this we create a center widget a container with the color orange the child will be a sized overflow box the size will be 100 100 and everything that is inside the sized overflow box can take more place than the 100 100 so if we put a child with the elevated button this is a button you will see that this widget is taking more place than its parent and this was the sied overflow box this slide transition widget you can see the animation on the screen and this is what we will build right now so first thing first you will need to add the width single thicker provider State mixing after this we will create an animation controller called controller the duration will be 2 seconds and then you need to put the vsync this which will be available only because we use the WID single ticker provider State mix in next we will say repeat reverse through this mean the animation will repeat forever after this you can create a enough set animation this this one will be a twin ofet do animate inside the twin you will put the begin of set. 0 and the end of set0 1.5 in the animate you will put a curved animation this one will have the parent controller which we just created The Curve will be the curves. elastic in as you know every time you use a controller you will need to also dispose the controller and now inside a center widget you can create the slide transition Widget the position will be offset animation this is the anim we created before the child will be a padding with the flutter logo inside and with all of this you have created a slight transition animation in your flutter app the slider widget if you need something like this in your app you can use the slider widget to build this we will start with a double current slider value at 20 the build will return the slider Widget the value will be the current slider value we just created Max is the maximum value of the slider and division is how many division you have in your slider slider the label will be the current slider value round. two string this is the value you can see on the screen when you move the slider the unchanged function will give you a new value which you can use to set State and set the new value of the current slider value to this value and this was how to create a slider Widget the sliver app bar widget if you want to create an app bar just like this one I will show you how to use the sliver appar widget we will start by using the custom scroll view widget inside you can put the sliver argument this this is a list of sliver so you will use first the sliver app bar widget if you set the argument pin as true that's mean that when you scroll you will see a nap bar on the top if you put this as false this will disappear when you scroll the floating set as true just mean that as soon as you start scrolling you will see the ab bar is coming back you don't have to wait until you are on the top of the list the expended height is the height of the image then you can create a flexible space bar inside we will use the title flutter map and the background ground will be an image asset with the box fit. cover but now we still need to have a scrollable widget otherwise it doesn't work so we will create another sliver this one will be a sliver list with this you can actually see the sliver AB bar in action just so you see the difference I will put the pinned as false and I will put the floating as false also now you can see that if I scroll the app bar will completely disappear and it will reappear only when I reach the top of the list the sliver fixed extend list if you need a list of item but inside a sliver you can use this widget we will start with a custom scroll View and inside the slivers we will create the sliver fixed extend list we will set the item extend at 50 and the delegate sliver child Builder delegate will have the context and the index with this we can return a container the alignment center and the color will change between white 12 and white 38 depending if it's even or not the child will be the item and the index we will we will also set the child count to 30 and like this we have created the sliver fixed extend list widget the sliver grid widget with this widget you will be able to create something like this we start inside a custom scroll view we have the slivers and we will put the sliver grid the grid delegate will be the sliver grid delegate with fixed cross aess count the cross aess count will be three this just mean we will have three different columns then the delegate will be the sliver child Builder delegate inside we have access to the context and the index which we will use to return a container with the alignment center the color will depend on the index and the child will be the text item and the number of the item at the end we will add the child count because we want to have 30 item inside our list the sliver list widget this is what we will create right now so we start inside a custom scroll view we have the slivers and we use the sliver list widget the delegate will be the sliver ch F Builder delegate which give us access to the context and the index in order to create a list style and put in the title a text widget with the item and the index plus one the tile color will depend on the index we will also create the child count to 50 because we want to have 50 items inside our list and this was how to create the sliver list widget the sliver opacity widget this is true sliver opacity widget and let's create them right now we start by creating the custom scroll view widget in the list of slivers we will create the sliver opacity you can give the opacity at 0.1 and the sliver will be a sliver list inside we can put the delegate sliver child list delegate and in this list we will just put one Widget the card widget with a child sized box and a center text flutter map and this is what you will have on the screen but now I will create two other sliver opacity one with the opacity 0.5 and one with the opacity 0 .8 and this was how to use the sliver opacity widget in your flutter app the sliver padding widget inside a custom scroll view widget you will have the slivers this is a list of multiple slivers and the one we will use is the sliver padding the padding argument will be edent sets. all 50 and the sliver will be a sliver list with the delegate sliver child list delegate inside we have a list of widget but we will create only one and it will be an image Network and you can see that we have now a padding of 50 around our image the sliver to box adapter this will allow you to display any widget in a sliver list but as simple as possible so inside a custom scroll view we will create the slivers and the widget inside will be the sliver to box adapter the child will be a size at box the height 20 the child a center with the text sliver to box adapter and like this you can display any widget as fast as possible inside a sliver to box adapter the snack bar widget when you press on this button Buton this will display a snack bar and it will disappear automatically after a while and to create something like this we need to create first an elevated button with the text show snack bar the onpress function will trigger the scaffold messenger. off context. show snack bar inside we will put the snack bar Widget the contents will be flutter map this is just the information inside the snack bar the action will be the snack bar action the label will be undo and the unpress will be nothing for now but keep in mind that you can trigger anything when you press the undo button and just like this you can trigger a snack bar widget in your flutter app the spacer widget this is three different arange container in between we use the spacer widget so inside a column widget we will create the children the first one will be a container color orange and height 100 next we will create a spacer widget with the flex one after if we create another container you will see that this one will be at the end of the column and this is because the spacer will take as much place as possible but now if we add another spacer but with the flex two this mean this widget will also take as much place as possible but will be two time bigger than the other spacer widget and now if we add a third container you will see that we have two spacer widget and one is two time bigger than the other one the stack widget on this example we have two image one over the other and this is because we use the stack widget in a center widget we will create the stack widget this one will take a list of children the first widget which will be under everything will be the center widget with an image asset ocean and now we will create another Center widget with the image asset blue. gpg and you can see that the other image will stack over the first one this was how to use the stack Widget the stepper widget this will create a stepbystep flow inside your app to make something like this we start by creating a variable current step set at zero in a center widget we use the stepper widget with with the step argument the first one will be a step the argument is active is a true or false Boolean and we will Define this by saying the current step is equal to zero if this is true you will see the information of the current step next you can create a title it will be step one and the content can be anything we will use a text with information for step one but now we will create two other step this one will be the step number two with a different logic and step number three with also a different logic and now I will show you how to trigger those buttons first you will need to use the unep T which give you a new index with this you can set State and set the current step to the new index now you can see that I can press on the other steps but nothing really happened this is because we need to set the current step to the variable current step now if I click you will see that the steps are changing after this we can use the onstep continue this will say if the current step is not the last one then you will move forward and go one step further we will also Al use the onstep cancel and if it's not the first item then we will set State and go back from one item before so now you can click continue and cancel to go back but you can also change the type with the stepper type. horizontal and this will give you an horizontal stepper Widget the stream Builder widget in this example new data are coming inside the application and every time we receive a new data the value will change we will start by creating a fake Firebase stream this one will be called the generate stream the first thing we will do inside is wait for 2 seconds and then we will receive the value one then we will wait for once again and receive the value two later in this example I will show you what happen if we throw an error the third one will wait for once again and receive the value three now that we have created a fake Firebase stream we can put inside a center widget this stream Builder the stream will be the generate stream that we just created the initial data will be zero zero and the Builder will have the context and the snapshot we will create a condition if the snapshot. connection state is equal waiting then we will return a circular progress indicator if the Snapchat has an error then we will display a text error and otherwise we will say a text snapchat. dat. two string and now if we refresh the application you will see that this will load for 2 second display the value one two and three but now let's draw an error right after the value number two now I will refresh the app and you will see one and then the error this is because we have the condition if we have an error then display the text error the switch widget if you need a button just like this you can do it with the switch widget first we create a variable Boolean is Switched set as false in the center widget we create the switch Widget the value will be the Boolean is Switched and the unchange will have the value which we will set State and set the is switch to the new value this will give you access to a switch Widget the switch list style widget if you need a list Style with a switch at the end you can use this widget first we create a Boolean lights is equal to false in the center widget we will use the switch listar the title will be text lights the value will be the light Boolean and the unchange will return you a new value which you can use to set States the lights variable to the new value but if you want to put an icon also before the light text you can use the secondary icon light bulb outline and this will give you an icon at the leading the tab bar widget this is what you will be able to create with the tab bar Widget the first thing you need is a default tab controller you will set the number of item inside your tab bar the child will be a scaffold widget with the ab bar inside we have the bottom and we will use the tab bar Widget the tabs argument will requir three different tab the first one is home then setting then person after after this we will also create a title with the text flutter map in the body of the scaffold we will use the tab bar view the children will require three widget we will put a container orang accent home and now you see we have an error because we need to have three Widget the second one will be red accent with the icon setting and then orang range accent with the person icon and now you have access to a tab bar widget inside flutter the tab page selector if you need to show the current page with dots like this at the bottom you can use the tab page selector widget first thing first we will create a list of widget and inside we will put three different icon next we will need to use the WID single ticker provider State mix in after we will create a controller and an index set as zero in the init State we will set the controller to a tab controller the length will be the widgets. length the initial index will be the current index value you will also need the vsync this which is accessible because we use the single tier provider State mix in because we use the controller we also need to dispose this controller with this we can go inside a scaffold widget create a stack widget with the alignment center inside the children we will use the tab bar view the controller will be the controller we just created the children will be the widgets which is a list of Icon then we need to create a positioned Widget the bottom will be 40 this is just the location for the tab page selector Widget the controller will also be the same controller the color will be black 38 and then we can create a floating action button which will use the Bottom bar this one will be used to change pages so inside the children we will create a floating action button do small the unpress will have a condition if it's not the last index then add one and change page otherwise reset everything and put the endex as zero then we will use the controller to animate into the next index with an icon the the over elevation will be zero and the elevation zero also and with all this you have created the tab page selector Widget the table widget this is what it look like and I will show you how to create this right now first we use a center and a padding widget inside we use the table Widget the Border will be table border.all with the color white 30 the default vertical alignment will be in the middle the children will start with a table Row the decoration will be a box decoration with the color red accent this will be the color of the first table row inside this one we have multiple children we will use the table cell in the child we use a padding widget with the child text Title One this is the first cell you can see on the screen we will also add two other table cell and I will save the application now what I will do is after the table row I will create a list of multiple table row by doing list the generate with 20 items each of them will be a table row the children will be three table cells with the text cell one two and three and now you have access to a table in your app if you want to make sure that this list is scrollable you can wrap everything with the single child scroll View and now you will have a scrollable table inside your app the text widget this is one of the most common widget but I will try to give you some tips that maybe you don't know by example how to put three dots if the text is way too long for this we will work inside a center widget with a padding and the child will be the text Widget the text will be this is a text which is pretty long you can change the text alignment if you want and you can use the Overflow text overflow ellipses which is useful if the text is way bigger than the size of the screen so to show you how this is working I will change the style of the text the font weight will be bold the word spacing will be two the letter spacing will be two and the font size will be 30 and because we we use the ellipses you can see that we have three dots because the text is not able to enter in the screen this was the text Widget the text button widget I will show you how to use this and also how to create a button with a gradient background inside a center widget we will start with the column the children will be the text button you can change the Style by recalling the text button the style from and change the textile for font size 20 the unpress of the first button will be null and the child will be disabled you can see this button is not clickable after I will space this with a sized box 30 and I will create another text button but this one will have an empty function you can see that this one is clickable and now how do we create a gradient button first we create a sized box height 30 and then after we use the clip r w Widget the Border radius will be circular five and the child is a stack widget inside the stack we use the positioned fill and we put a container with the decoration box decoration gradient linear gradient the colors will be three different kind of blue and inside the stack we will also put a text button you can see that this create a button with a gradient background the text field widget in this example I will show you how you can create a text field and also when the user press enter you will see the information right under to create this we start with a text editing controller called controller the string will be a text with nothing inside with this we can create an init state to set the controller to the text editing controller since we use the controller we need to also dispose it in the center widget we will create a padding with the ENT sets eight the childart will be a column widget and inside this children you will have the text field Widget the controller will be the controller we created the unsubmit will give you the information enter inside this text field and with this you can set State and set the text to the controller the text after this inside the column you can add a sized box and a text with the text inside so now if I write hello flutter and I press enter this is what you will see on the screen the text form field widget this is the application you will have at the end we will start by creating a variable titles which is a list of string then inside a single child School view we will create the form widget we will make sure that the auto validate mode is always and then every time we change something inside the form this will set State and Trigger the form. of primary focus. context do save you will see later why we use this next inside the child of the form we will create a column Widget the children will be a list that generate we will create three items and each of them will have a padding and a child column inside this one we will create text form field widget which inside will use the unsaved this is a function that will be triggered every time we save the form and inside we will receive the value and say if the value is not null then the title of the current index will be equal to this value this is why we can see the text right under at the same time as the user is writing information after we will create a sied box and secondly we will create a card widget this one will have a padding and the child will be a text title of the current index and so now every time you start to write something the this will trigger the unchanged function of the form widget which will set State and Trigger the save once the save is triggered this will trigger the unsaved from the text form field which at the same time will change the value writen inside the card widget and this was the text form field Widget the text pan widget you can see that in one line of text we have two different style and this is because inside a center widget we use the text. rich inside we can put a text Pan and the style will be the default Tex stle which is a Tex stle with the font size 25 we will also add a color blue gray and then on the text argument we will say flutter you can also put inside the text pan children which in this case we will also put another text pan inside put the text to the moon and we will override the Style by using the Tex stle font weight. bold this is what you have on the screen right now if you add a color this will override this blue gray color and now this is what you will have the tee data inside the material app you have something called the tee argument and inside you can put the team data and this is what we will talk about first inside the home the only thing we have is a scaffold widget and this is what you can see on the screen so what will happen if we play with the team data you can change the brightness by using brightness. dark this will automatically change the brightness of the app you can also change the scaffold background color by example red accent and the primary color let's say colors. orange accent but keep in mind that you can change the theme of multiple things inside your app so now how can we access the primary color from the scaffold we will start by creating in the body a sized box infinity infinity and then we will change the color by using the theme.of context. primary color and this will access the information from the team data the last thing I want to show you is if you want to have the Dark theme application you have also something called the dark tee argument which you can use to create an application switching between the light and the Dark theme this was the theme data wiget for your flutter app the Tuggle button widget this is what you will be able to create at the end we start by creating a list of Boolean is select all of them will be false when we start then inside the center widget we use the toggle butttons the children will be three different icons home setting and person the unpress function will return you the new index which you can set State and set the is Select with the current index to the invert of the is Select from the same index the last thing you need is to put the list of Boolean inside the is Select and just like this you created the toggle buttons Widget the tool tip widget as you can see we have an image and when I press long enough you will see a message this is an image we can create this by using a center Widget the child will be a tool tip Widget the message will be this is an image and finally in the child you can put any widget I will use an image and just like this when you press long enough on the image you will see the tool tip Widget the transform widget this image has been rotated 45° and this is because we use inside a center Widget the transform Widget the alignment will be centered and the transform will use the Matrix 4. rotation Z and inside we will put Pi * 1/4 the child will be an image asset and you can see that if I change the angle for 1/2 the image will be rotated 90° the twin animation Builder widget when I press on this icon this will change the size and animate the transition let's create this by first creating a Target value at 100 in the center widget we use the twin animation Builder the twin will be a twin double which we put the big begin at zero and the end with the target value we just created the duration will be 500 milliseconds and the Builder will return an icon button the icon size will be determined by the size and the color will have the color orang the icon will be the flutter Dash finally the unpress will have the set State this one will change the target value if the target value is currently equal to 100 then it will be 250 otherwise it will be 100 and now when you press on this icon button you can see a little animation the value listenable Builder widget on the screen we have a simple counter app but we don't even use the set State and I will show you how to create this with the value listenable Builder first we need to create a value Notifier int called number this one is equal to a value Notifier which we start at zero in the center widget we create a column in the children we will put an icon button when we press on this as I told you we will will not use the set State we will just say number do Value Plus One and the icon will be an icon add after this we will create a sized box height 30 and a value listenable Builder the value listenable will be the number the Builder will return a text widget and this text will display the value the style will be font size 30 and with all this code we are able to create a counter app without using the set State the vertical divider widget this is what we will create first inside a padding widget we create a row the children will have first an expended widget then we will create the vertical divider the width will be 40 the thickness one the indendent 40 this is just the space between the top and the vertical divider the end indent will be 100 this one is the bottom space the color will be gray after this we will create another expanded widget and you can see in the middle we have the vertical divider Widget the visibility widget when I press on this button this will show and hide the image at the bottom we start with the is visible Boolean set as true in the center and the column widget we will create the children the first one is a text button when we press on this this will set State and change the Boolean value for the invert if it's true it will be false if it's false it will be true the child will be a text show and hide after this we create another Widget the image asset then a size at box 30 and finally we will use the visibility Widget the visible argument will use the variable Boolean we created and the child will be an image asset and now when you press on the button this will hide and show the image at the bottom the will poop scope widget when I go inside a second page and I try to come back with the arrow Android button this doesn't work because I use the will poop scope widget let me show you how to create this first inside a center widget we create an elevated button the unpress will just trigger another page which is called the next page this is the class next I will also add a child text next page so when I click on this elevated button we go inside this page and this one will have the willp scope Widget the child will be a scaffold Widget the background color will be blue the app bar will be a title text next page and the body will be a center Widget the on will pop will have a function and we will just return false so now if I click on next page you will see that this button is blocked but also this one so what we can do to solve this problem we can change the leading for an icon button when we press on this we trigger the Navigator dop and the icon will be Arrow back now if I click on the button we can go back in the first page and the bottom will pop scope is still block the only reason why the button is block is because we return the value false this was the willp scope Widget the wrap widget this one is like a row but each element over the screen will go right under and to create this we start with a padding a center Widget the child will be a wrap the spacing will be 10 this is the space between each Widget the Run spacing will be five this is the additional space between each of them and the children will be a list that generate inside we will put 10 item and each of them will be a chip widget you can see that if I change the Run spacing for 50 and I save this will put a bigger space between each line of widget and this was the wrap Widget the safe area widget on the application right now we have a text behind the status bar because we don't use the app bar but the safe area widget will make sure that this never happen and to use it the only thing you need is to wrap the text widget with the safe area and now you can see that the text is right under the status bar this was the safe area widget and this was 215 widgets now if you see this outro why don't we do a prank let's write in the comment you forgot the mooner widget so everyone that will read the comment will be like what's going on what's this widget that's it for this one see you in the next video bye
Info
Channel: Flutter Mapp
Views: 87,673
Rating: undefined out of 5
Keywords: Flutter, every flutter widget, all flutter widget, flutter widgets, every widget flutter, flutter every widget, all widgets in flutter
Id: kj_tldMmu4w
Channel Id: undefined
Length: 203min 30sec (12210 seconds)
Published: Sat Dec 03 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.