Тёмный
No video :(

Flutter Custom Painter Tutorial || Clock App (Episode-1) 

CodeX
Подписаться 48 тыс.
Просмотров 75 тыс.
50% 1

Опубликовано:

 

26 авг 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 162   
@radiowallofsound
@radiowallofsound 2 года назад
there two small issues: you are using cos() for X and sin() for Y, that gives a 90 degrees rotation reading on the needles. you can use sin() for X and -cos() for y another one: minHandY hourHandY and secHandY should use centerY not centerX... you only notice the bug when the canvas is not square... anyway, I loved the video!! thanks
@eleandro
@eleandro 4 года назад
I loved the fact you took your time to explain the mathematics things. Most tutorials lack on this part, but you did your best to let us understand the logic behind the clock. I would really love if you made explain mathematically how all this draw works! Can you??? Please??
@CodeXdev
@CodeXdev 4 года назад
Sure, i will write blog for that. Follow my FB page to get notified.
@mehuljain7267
@mehuljain7267 4 года назад
This is one of the best tutorials I found out on yt. Super easy to follow through, explained briefly everything. Awesome man! You are seriously underrated. 🔥
@AkhilSharmaTech
@AkhilSharmaTech 3 года назад
mind=blown with the canvas and mathematics bit
@charlesclayman3909
@charlesclayman3909 16 часов назад
Well explained. i love this
@GameNation4K
@GameNation4K 4 года назад
The Best canva tutorial in youtube 💗✔️ keeping making some more high level tutorials
@fatihsonmez
@fatihsonmez Год назад
Simple, elegant, fast. A perfect tutorial. Thanks
@musicproductionbrauns2594
@musicproductionbrauns2594 4 года назад
5:23 that double dot man crazy didnt knew about that
@Jan123.
@Jan123. 4 года назад
What does it do? I don't understand it.
@crymat123
@crymat123 4 года назад
@@Jan123. it's called cascade notation: dart.dev/guides/language/language-tour#cascade-notation-
@SalMakes
@SalMakes 4 года назад
It's a really solid Tutorial there even a newbie like me can Follow it Thanks !
@Grewal0007
@Grewal0007 4 года назад
But if u are expert in math 🙄
@CodeXdev
@CodeXdev 4 года назад
Agree, it will come if we think and search in right direction. I found this sin* and cos* thing on stackoverflow 😄
@Grewal0007
@Grewal0007 4 года назад
@@CodeXdev thanks for this truth 😂 gains confidence in me 🙏😊
@GoToMan
@GoToMan 4 года назад
@@Grewal0007 Hey Gurpreet. www.mathsisfun.com/polar-cartesian-coordinates.html This is a basic application of polar coordinates, I'm still in highschool, I searched it up. It's easily understandable, hope it helps
@junaidjameel5049
@junaidjameel5049 Год назад
Thanks Dear Afzal
@jabinaansari1447
@jabinaansari1447 4 года назад
Love the way you explain. Great job.
@CodeXdev
@CodeXdev 4 года назад
Glad you liked it
@radiowallofsound
@radiowallofsound 2 года назад
Thanks for this video, it saved me a lot of research time, in 15 mins I already know what I needed for my project
@samsurya283
@samsurya283 4 года назад
No body is gonna explain better than u 😍🔥......thanks a lot brother......... And plz make a vedio on that maths logic, Angle, offset..... Plz brother plzz
@SwarajRoutray
@SwarajRoutray 3 года назад
Wow sir i love this series Hope you would post more backend app tutorials like e-commerce food app etc thanks for making such great content ❤️
@Amjad_Sajjad329
@Amjad_Sajjad329 3 месяца назад
Very nice video but please keep slow speed of writing the code for new comer students.
@pravinprince3221
@pravinprince3221 Год назад
Thank you for the wonderful video sir it is very helpful for me and my team, Thanks again sir
@be_like__prateek
@be_like__prateek 2 года назад
Very underrated teacher ❤️
@CodeXdev
@CodeXdev 2 года назад
For those who understand 🤭
@RandalLSchwartz
@RandalLSchwartz 3 года назад
You would get better smooth movement of all three hands with something like this: void main() { var now = DateTime.now(); print(now); var midnight= DateTime(now.year, now.month, now.day); var diff = now.difference(midnight); print(diff); var secs = diff.inMilliseconds / 1000 ; print(secs); print(secs % 60); print(secs / 60 % 60); print(secs / 60 / 60 % 12); } It will need translation to turn those three values into radians, but they'll be much smoother, like a real analog clock.
@betaguitarist9385
@betaguitarist9385 3 года назад
Thank you! Keep up the good works. I'm your fan now. 😀
@CodeXdev
@CodeXdev 3 года назад
Welcome aboard! 😍
@muneebshahzad1335
@muneebshahzad1335 2 года назад
impressive
@joshuarfernandon.deleon9822
@joshuarfernandon.deleon9822 3 года назад
Awesome since Guatemala thanks for this teach. Sure amazing teacher.
@user-ib3fl8st3s
@user-ib3fl8st3s Год назад
Great work.. man
@rec-trick
@rec-trick Год назад
amazing
@GArvinthKrishna
@GArvinthKrishna 2 года назад
How make second hand to pointer like hand.
@sanderluis3652
@sanderluis3652 3 года назад
wow!
@mbagozpel
@mbagozpel 3 года назад
Great
@abraiyan7984
@abraiyan7984 4 года назад
Okay, I subscribed. Hope we will get a video each week.
@CodeXdev
@CodeXdev 4 года назад
Will try my best to hit RU-vid with new video each week..
@user-tz3sd3sd6d
@user-tz3sd3sd6d 2 года назад
Hello what should i remember from school math to master and to draw everything i want? Cause spend a lot of time and still no idea how to realize some things
@kavindutharaka2273
@kavindutharaka2273 4 года назад
wow. attractive UI. nice tutorial. Thank you.
@CodeXdev
@CodeXdev 4 года назад
Glad you like it!😊
@ujjwalchetan4907
@ujjwalchetan4907 5 месяцев назад
Great tutorial. Thanks👍
@laiho143
@laiho143 4 года назад
awesome! well explained! 👍🏼
@CodeXdev
@CodeXdev 4 года назад
Thanks! 😃
@kisanshah3739
@kisanshah3739 4 года назад
best explanation best logic
@CodeXdev
@CodeXdev 4 года назад
Glad you think so!
@lowkeylyesmith
@lowkeylyesmith 2 года назад
Hi, somehow I can't get it to show me the right time and I have no idea where the problem is.
@gt_diego
@gt_diego 4 года назад
Great tutorial, thanks!
@CodeXdev
@CodeXdev 4 года назад
Glad you enjoyed it!
@mohiro3993
@mohiro3993 4 года назад
Great tutorial, it helps me a lot!
@CodeXdev
@CodeXdev 4 года назад
Glad it helped!
@tiefsoftwarelab
@tiefsoftwarelab 4 года назад
hello.new friend thank you for the tutorial
@isho7777
@isho7777 Год назад
Awesome. Please share how the Stateful widget code was added automatically to the code together with the State class code added to vs studio automatically fast?
@CodeXdev
@CodeXdev Год назад
If you write `stf` you will get suggestion to generate StatefulWidget. `stl` is for StatelessWidget
@sanketpatel7924
@sanketpatel7924 3 года назад
Super video I learned lots of things.
@Zuke22
@Zuke22 3 года назад
Question: var centerX = size.width / 2; var centerY = size.height / 2; var radius = min(centerX, centerY); if width = 200 height = 400 min would return 200, making the radius 200. but isn't the radius supposed to be the length from the center of the circle to the edge? so the 'real' radius would be 50?
@CodeXdev
@CodeXdev 3 года назад
It will return radius as 100, centerX and CenterY are already half of width and height. This is to keep the circle ⭕️ of minimum size which can fit in screen
@LuminousAsianBeauties
@LuminousAsianBeauties 2 года назад
wow.amazing tutorial.
@belsoufi5217
@belsoufi5217 2 года назад
could someone explain more mathematically : 🥵 var secHandX = centerX + 80 * cos(90* pi / 180); var secHandY = centerX + 80 * sin(90 * pi / 180);
@user-rp3kn9tm7r
@user-rp3kn9tm7r 3 года назад
amazing stuff. thx man.
@mikethegamedev
@mikethegamedev 3 года назад
How do you get that iphone screen test?
@yadhusanil7077
@yadhusanil7077 2 года назад
awesome bro , can you tell me how to add animation while changing the colour in custom paint, plzz help🙏
@faheemahmadofficial7701
@faheemahmadofficial7701 4 года назад
Pleas make more tutorials for simple apps, also make them not too faced paced make them easier too
@CarlosHenrique-er7zq
@CarlosHenrique-er7zq 2 года назад
Amazing tutorial!
@angrykorean3323
@angrykorean3323 Год назад
Thanks a lot! Where is define of 'dashBrush' at last part.
@angrykorean3323
@angrykorean3323 Год назад
I got it at his github 113row
@imankamali5799
@imankamali5799 3 года назад
fantastic
3 года назад
how to feed that class/widget from the homepage, how to add parameters to the class? Let's say I want to make several clocks with different time inputs.
@ashikmahmood4018
@ashikmahmood4018 Год назад
is this program run in background???
@suryameda6215
@suryameda6215 3 года назад
Wonderful
@jatinraj4974
@jatinraj4974 4 года назад
Will it be the fully functional clock app or just UI brother!🤗 Btw your channel content is really good♥️♥️
@CodeXdev
@CodeXdev 4 года назад
I am planning to create this as full fledge app and publish on store. Thank you for feedback 🤗
@jatinraj4974
@jatinraj4974 4 года назад
@@CodeXdev please make tutorial on that also😅😁🤣
@GoToMan
@GoToMan 4 года назад
@@CodeXdev make a tutorial on this pls
@amartyapatil4124
@amartyapatil4124 3 года назад
I likedthe way you implemented but It doesn't work when you backnavigate it and then working with it and My seconds hand isn't moving
@nazimjoli549
@nazimjoli549 3 года назад
Amazing 🤩
@AndrewMackenzie1
@AndrewMackenzie1 2 года назад
I saw some bugs where Y coodinates are calculated based on centerX not centerY. I think a repo with branches or tags for different video stages would be better than a gist. But thanks for the video and code.
@CodeXdev
@CodeXdev 2 года назад
Hello, thanks for highlighting. Actually there are different branches on the git reference provided. I fixed this issue in latest branch. :)
@HarshKumarKhatri
@HarshKumarKhatri 4 года назад
Hey is there something like erase with the help of which we can erase whatever we have drawn. I know about the complete removing/erase of the screen. I want to know about something with the help of which we can erase only a section of what we have drawn.
@M37Shadow
@M37Shadow 3 года назад
U are amazing! keep going
@CodeXdev
@CodeXdev 3 года назад
Thank you so much!!
@the_offroad_diaries
@the_offroad_diaries 4 года назад
Really great tutorial
@CodeXdev
@CodeXdev 4 года назад
Thank you! Cheers!
@Gamerboy18821
@Gamerboy18821 3 года назад
sir, it doesn't showing correct time.
@muhammadrizqyalfaruq9977
@muhammadrizqyalfaruq9977 4 года назад
I love this tutorial
@panzorax.
@panzorax. 3 года назад
i loved
@nurbekbatyrzhanuulu2957
@nurbekbatyrzhanuulu2957 3 года назад
I made dashes outside of the circle from 2 to 16(which divides the circle into equal parts). Have point! how can we make it all divisions to start from 12? @Codex
@franciscopalacios3799
@franciscopalacios3799 3 года назад
crack!! 👏🏻👏🏻👏🏻👏🏻👏🏻👏🏻
@adzeyk
@adzeyk 2 года назад
Hi, Will this tutorial work on a Windows Machine and an Android Emulator?
2 года назад
Do I understand correctly that the whole clock is redrawn each second?
@CodeXdev
@CodeXdev 2 года назад
Yes, and that may sound too much.. but in fact its very normal process! On Flutter we get at low level where we talk about rendering and painting, otherwise its just the process of widget update.
@harloom9603
@harloom9603 4 года назад
Awesome
@CodeXdev
@CodeXdev 4 года назад
Thank you Harloom.
@mustafasinankoca6439
@mustafasinankoca6439 3 года назад
Hi, Codex It was a very nice video and content. I want to ask something. After making the design on Adobe XD and printing it out for flutter, do these clock settings come automatically or did you adjust it manually?
@CodeXdev
@CodeXdev 3 года назад
We have to calculate angles for each hand with respect to current time.. :)
@hemanthpagadala3099
@hemanthpagadala3099 3 года назад
can i run this code in android studio????
@CodeXdev
@CodeXdev 3 года назад
Yes, of course!
@sameerk12982
@sameerk12982 4 года назад
Thank you for this fun tutorial....too much Maths :( ....but I followed your tutorial and my clock is up and running....I wish I had good understanding of maths like you do....please provide some link if you could... so I can learn this maths from there.
@CodeXdev
@CodeXdev 4 года назад
It was back in college days I used Mathematics last time 😄😃 Google is the best teacher now days.
@sameerk12982
@sameerk12982 4 года назад
@@CodeXdev I never went to college... Just done school.
@codester1217
@codester1217 3 года назад
Everything is fine but even after following along, my state is not updating. I don't what's the problem. Edit: It's working fine. I had to restart app instead of hot reload.
@medamine194
@medamine194 3 года назад
i need to review some basic highschool math haha
@CodeXdev
@CodeXdev 3 года назад
Hahaha.. even i did some stackoverflow search for the formulas
@fallofmanbrand
@fallofmanbrand 4 года назад
nice video bro
@CodeXdev
@CodeXdev 4 года назад
Thanks for the visit
@mtux
@mtux 4 года назад
very thanks!!!
@CodeXdev
@CodeXdev 4 года назад
You're welcome!😊
@user-th5rs5eo1d
@user-th5rs5eo1d 3 года назад
iam very bad in math i didn't understand what does the cos(90 * pi /180) and sin too can you make another video for it
@CodeXdev
@CodeXdev 3 года назад
Its simple, cos gives X coordinate sin gives Y coordinate.
@stlo0309
@stlo0309 3 года назад
I need help. My project requires me to do custom painting On an image. Like basically an image of a map has to be the background, and upon that image I have to do custom painting like drawing circles, pointers and such. How can this be done?
@CodeXdev
@CodeXdev 3 года назад
Use stack, put image below and on top you can draw something.. if you want free hand drawing then use signature package
@dipenmavani8079
@dipenmavani8079 3 года назад
why are we multiplying Degree angle to radian ???? any point in circle is p(radius * cos Θ, radius * sin Θ) why are we converting Θ to Θ * pi/180
@CodeXdev
@CodeXdev 3 года назад
Because we are making clock, and we want to work with 360' (degrees)
@BEESaiShivam
@BEESaiShivam 3 года назад
sir can u plz provide us the source code of full app
@thesaulo14
@thesaulo14 4 года назад
thanks
@CodeXdev
@CodeXdev 4 года назад
You're welcome!
@ratulicious
@ratulicious 3 года назад
i += 30 for exact outLine
@Karim-wd2je
@Karim-wd2je 4 года назад
First view👍
@CodeXdev
@CodeXdev 4 года назад
Super 🎊 🎉
@mika-pc2rc
@mika-pc2rc 4 года назад
Excuse me sir.. but your clock is rotated around 90 degrees to the right. 12 is on the clock I created at the point where usually 3 o clock would be... how can I fix this... but still an amazing video:)
@CodeXdev
@CodeXdev 4 года назад
Hello Mika, I think you missed last part of tutorial where I explain the canvas rotation thing.. check this out and your problem will be solved 14:32
@mika-pc2rc
@mika-pc2rc 4 года назад
@@CodeXdev wow thanks for your answer.. Thank u👍
@Himanshukumar-ix5bd
@Himanshukumar-ix5bd 3 года назад
bro can you explain me why you are using double dot for fill the color and stroke also like (..color and ..style )
@CodeXdev
@CodeXdev 3 года назад
double dot (..) is called cascade operator. It's used to access the object without specifying name. So, on same object you can perform multiple operation with cascade operator.
@Himanshukumar-ix5bd
@Himanshukumar-ix5bd 3 года назад
@@CodeXdev thanks bro and can you make video on custompaint ❤️
@CodeXdev
@CodeXdev 3 года назад
🤣🤣🤣 u r commenting on custom paint video only 😉
@Himanshukumar-ix5bd
@Himanshukumar-ix5bd 3 года назад
@@CodeXdev because I saw only first video of clock playlist ❤️
@_haptic_shorts
@_haptic_shorts 4 года назад
Explain is just Awesome, But I'm pretty week on Math .. Sir, how do i learn these logic ??😔
@CodeXdev
@CodeXdev 4 года назад
Don't worry, it comes with practice. Sometime googling also will help :)
@_haptic_shorts
@_haptic_shorts 4 года назад
@@CodeXdev okay sir🥰
@GoToMan
@GoToMan 4 года назад
@@_haptic_shorts This logic, some of the times even experienced codes don't know all this that's why they try to master mathematics in university or they all question in stack overflow. www.mathsisfun.com/polar-cartesian-coordinates.html This is the logic CodeX used, he found it on stack overflow too, don't worry
@Jan123.
@Jan123. 4 года назад
Sorry, what is the .. syntax about? Thanks. Great video :)
@CodeXdev
@CodeXdev 4 года назад
Hi, Which syntax?
@Jan123.
@Jan123. 4 года назад
@@CodeXdev this dot dot .. syntax.
@Jan123.
@Jan123. 4 года назад
For example you wrote in your code ..color = Color();
@CodeXdev
@CodeXdev 4 года назад
Oh, thats called Cascade Notation in dart 🎯 It gives access to preceding object without specifying name.
@Dev100-du4tc
@Dev100-du4tc 2 месяца назад
Jay ramJiKi
@urban10x43
@urban10x43 2 года назад
Très Bon travail ! Pouvons-nous rentrer en contact ? Merci
@darlingtonobiriyeboah9600
@darlingtonobiriyeboah9600 4 года назад
I love u
@CodeXdev
@CodeXdev 4 года назад
Thanks for the love 💓
@votuankiet5982
@votuankiet5982 3 года назад
hi bro I'm new in Flutter, could you tell me how to quick call the code in 1:35 ? I have subscribed btw, great tutorial !
@quicktips3858
@quicktips3858 3 года назад
Just starting typing: stf (Stateful) or stl (Stateless), then Ctrl + Space and you will see the autocomplete option.
@votuankiet5982
@votuankiet5982 3 года назад
@@quicktips3858 thank you sooo much !
@quicktips3858
@quicktips3858 3 года назад
@@votuankiet5982 u are welcome!
@syedafatima2889
@syedafatima2889 3 года назад
sir can you help me and explain the part of draw dashes,I am really thankfull to you .i can not understand why we callculate the outer Circle Radius and inner circle Radius .kindly help me plz and explain this part. var outerCircleRadius=radius; var innerCircleRadius =radius-14; for(double i=0;i
@CodeXdev
@CodeXdev 3 года назад
⭕️ look at this emoji or think of donut 🍩 , if you want dash lines between thickness of donut.. you need two points p1 from center to inner radius, p2 from center to outer radius... thats the funda used here. To draw a dash line we need x1,y1 and x2,y2 which are of 2 different radius 👍🏼
@syedafatima2889
@syedafatima2889 3 года назад
@@CodeXdev thank you sir for solving my problem☺
@666skimes
@666skimes Месяц назад
ehhh its not a tutorial if you take things for granted.. i cant continue bacause im unable to create this homepage my god
@CodeXdev
@CodeXdev Месяц назад
4 years old video 😐 my new videos should impress you😍
@666skimes
@666skimes Месяц назад
@@CodeXdev alright thank you for letting me know, its so hard to find good tutorial for learning flutter
@anandmagar6132
@anandmagar6132 4 года назад
Look at your camara not on your camara Display
@CodeXdev
@CodeXdev 4 года назад
Exactly, trying hard to act 😜Talking to camera is difficult than I thought.
@sharbelokzan9673
@sharbelokzan9673 4 года назад
The video isn't working properly.. and not because my internet connection or device, other videos on RU-vid are working fine except this video Anyone else noticed something like that?
@laiho143
@laiho143 4 года назад
it’s working fine!
@CodeXdev
@CodeXdev 4 года назад
I exported in normal bit rate only, on top of that RU-vid does its own conversion so it should work fine!
@v0xl
@v0xl 4 года назад
Too much copy paste
@CodeXdev
@CodeXdev 4 года назад
😊 this video topic was soo deep it would have became 1 hour video.. thats y! But i tried to explain what I am pasting..
@nwosuolumide7329
@nwosuolumide7329 3 года назад
Amazing tutorial!
@CodeXdev
@CodeXdev 3 года назад
Glad it was helpful!
Далее
Я ДОСТРОИЛ ЗАВОД - Satisfactory
19:13
Просмотров 170 тыс.
Коротко о моей жизни:
01:00
Просмотров 301 тыс.
ПАВЕЛ ДУРОВ АРЕСТОВАН
1:45:21
Просмотров 114 тыс.
I Built a WATERPARK In My House!
26:28
Просмотров 14 млн
Flutter Design Tutorial || Clock App (Episode-2)
11:33
5 SaaS Ideas You Can Build as a Solo Founder
13:30
Просмотров 391 тыс.
Flutter in 2024: Cross Platform Tool You Must Learn!
10:05
Flutter Basics by a REAL Project
25:42
Просмотров 458 тыс.
5 New Things in Flutter | Google IO 2024 keynote
4:39
Complex Animations in Flutter using Rive | Flare
15:44
Просмотров 225 тыс.
Flutter Implicit Animations 2024 | The Right Way
12:48
Я ДОСТРОИЛ ЗАВОД - Satisfactory
19:13
Просмотров 170 тыс.