Great session Againt ! But one suggestion: Flutter's ClipOval widget should be used for TCiruclarContainer to avoid the radius, padding and decorations params. You can even have just a size and a color if the circle is never oval. Here's the code: class TClipOval extends StatelessWidget { final double size; final Widget? child; final Color backgroundColor; const TClipOval({ this.size = 400, this.child, this.backgroundColor = Colors.white, super.key, }); @override Widget build(BuildContext context) { return ClipOval( child: Container( height: size, width: size, color: backgroundColor, child: child, ), ); } }
You're very welcome! Your effort in communicating in English is commendable, and I’m glad to hear that you’re finding the content helpful.Thank you for your kind words, and keep up the great work!
why u removed the sizedbox with 400 height inside primaryheadercontainer after u extracted it ? and how come we still can see the shapes after you removed it ? after i removed the sizedbox, nothing is showing , only full white background.... thanks in advance
you could have easily achieved thiss using stack and then positioned or alignment widget which child is white container theh have given border radius.only at top left and top right ie.ciruclar
I am wondering if there is another option to get the curves. Could we use a stack to have a container (the blue one) followed by another container that has the curves and position it overlaying the bottom 20 pixels of the first container?
The other widgets placed after this curve are not positioned directly after it there's some extra space on top. I have no extra padding added in any widget is there a way to display them directly in the top of the white space ? Thank you.
I have a doubt , when we are navigating the getx controllers are not getting disposed, all controllers are in intialized state , so is it a good thing? because getx advantage is there route system, it will dispose the controllers automatically
The 0 offset for the secondFirstCurve is used to maintain the horizontal alignment for the second curve along the x-axis. Since the second curve is intended to start from the same vertical level as the first one, the x-coordinate remains at 0, ensuring that the curve is positioned correctly without any horizontal shift.
Using a CustomClipper allows for more complex shapes and precise control compared to Container with borderRadius. For intricate designs like this, CustomClipper is the better choice.
why not putting the blue container and the white one in a stack, then making the top right and left corners of the white container circular? why whoudn't this work?
Using a Stack with a circular top-right and top-left border on the white container should work. Just ensure you use a ClipRRect or Container with BoxDecoration and set borderRadius for the corners.
Its amazing tutorial and understandably sir but i want to tell you and requested you to make your editor to zoom because its var away to see nicely plz zoom sir 🎉
class HomeScreen extends StatelessWidget { const HomeScreen({super.key}); @override Widget build(BuildContext context) { return Scaffold( body: SingleChildScrollView( child: Column( children: [ TPrimaryHeaderContainer( child: Container(), ), ], ), ) ); } } it is not working it doesn't show me a custom shape help me please?
Hello friend, I did everything as it is. However, when I put the container position in the stack, I cannot see the container. If you have email I can show you the code and what it looks like.
I understand that you want to keep a clean code , but factoring everything to a custom widget became annoying, it's not clean code anymore and trying to find a specific widget in a pile of widgets is kinda annoying, i like your videos , but i hope you change this part
the king is back!
So nice of you 💕💖
Great session Againt ! But one suggestion: Flutter's ClipOval widget should be used for TCiruclarContainer to avoid the radius, padding and decorations params. You can even have just a size and a color if the circle is never oval. Here's the code:
class TClipOval extends StatelessWidget {
final double size;
final Widget? child;
final Color backgroundColor;
const TClipOval({
this.size = 400,
this.child,
this.backgroundColor = Colors.white,
super.key,
});
@override
Widget build(BuildContext context) {
return ClipOval(
child: Container(
height: size,
width: size,
color: backgroundColor,
child: child,
),
);
}
}
These are of the best flutter tutorials if not the best. Thank you brother
You welcome
Thank you for the very detailed tutorial, I'm looking forward to your flutter ecommece product
I'm glad it was helpful ☺️
Thank you, "with a T." My English is poor, but I'm trying to understand. I thank you with all my heart for your valuable efforts, brother.
You're very welcome! Your effort in communicating in English is commendable, and I’m glad to hear that you’re finding the content helpful.Thank you for your kind words, and keep up the great work!
this is a whole calculus class 😃
😂🤣 This is...
wow this is amazing
Thank you 🤩
Definitely a savior! Thanks a lot!
Glad it's helpful 😁
Very nice and informative... thanks
You welcome 🤗
I learnt 50% of knowledge from this video and I being learning flutter for 2 years..
That’s huge buddy.
I am really glad you like this and it’s helpful.
why u removed the sizedbox with 400 height inside primaryheadercontainer after u extracted it ? and how come we still can see the shapes after you removed it ? after i removed the sizedbox, nothing is showing , only full white background.... thanks in advance
i can see in the next video you inserted the sizedbox back, sorry for the misunderstanding
please how did you solve this problem i am facing thesame issue
insert the sizedbox again @@ryansumbele3552
you could have easily achieved thiss using stack and then positioned or alignment widget which child is white container theh have given border radius.only at top left and top right ie.ciruclar
I am wondering if there is another option to get the curves. Could we use a stack to have a container (the blue one) followed by another container that has the curves and position it overlaying the bottom 20 pixels of the first container?
import 'package:best_uis/utils/constants/colors.dart';
import 'package:best_uis/utils/constants/helper_functions.dart';
import 'package:flutter/material.dart';
class Home extends StatelessWidget {
const Home({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
body: Stack(
children: [
Container(
color: AppColors.primary,
),
Positioned(
top: 50,
left: HelperFunctions.screenWidth(context) * .95,
child: CustomPaint(
painter: CircledShape(),
)),
Positioned(
top: 300,
left: HelperFunctions.screenWidth(context) * .999,
child: CustomPaint(
painter: CircledShape(),
)),
Positioned(
left: 1,
top: HelperFunctions.screenHeight(context) * .5,
child: Container(
height: HelperFunctions.screenHeight(context) * .5,
width: HelperFunctions.screenHeight(context) * .5,
decoration: BoxDecoration(
color: AppColors.white,
borderRadius: BorderRadius.only(
topLeft: Radius.circular(20),
topRight: Radius.circular(20),
)),
),
),
],
),
);
}
}
class CircledShape extends CustomPainter {
@override
void paint(Canvas canvas, Size size) {
canvas.drawCircle(
Offset(25, 25),
170,
Paint()
..color = AppColors.white.withOpacity(.1)
..style = PaintingStyle.fill);
}
@override
bool shouldRepaint(covariant CustomPainter oldDelegate) {
return false;
}
}
this exactly what i thought of as well
Which state management you are using
GetX 🤗
Master T as always . awesome
Thank you so much for your appreciation! Keep up the great work!
please I want to create a logo for my application so I can use it in the splash screen, any recommandations ?
The other widgets placed after this curve are not positioned directly after it there's some extra space on top.
I have no extra padding added in any widget is there a way to display them directly in the top of the white space ? Thank you.
AMAZING , but i should try to understand the clippath widget better , thanks
You're welcome! Understanding the ClipPath widget can really enhance your designs.
I have a doubt , when we are navigating the getx controllers are not getting disposed, all controllers are in intialized state , so is it a good thing? because getx advantage is there route system, it will dispose the controllers automatically
Although I have purchased a kit... I'm still waiting for your videos... Please upload every part as fast as you can... Please....
Thank you 😊. I'm on it.
Why did you take 0 as the offset x of second first curve?
The 0 offset for the secondFirstCurve is used to maintain the horizontal alignment for the second curve along the x-axis. Since the second curve is intended to start from the same vertical level as the first one, the x-coordinate remains at 0, ensuring that the curve is positioned correctly without any horizontal shift.
@@CodingwithT but if i replace 0 with 100 in the code, then also I amgetting the same result
Why not stack with containers? The container on the top will have borderRadius and it will have the same result. Am I missing something?
Using a CustomClipper allows for more complex shapes and precise control compared to Container with borderRadius. For intricate designs like this, CustomClipper is the better choice.
Merci. Le code est bon mais rien ne s'affiche sur mon emulateur. C'est seulement la bottom navigation bar qui apparaît. Pouvez vous m'aider svp ?
How to solve this problem
Failed assertion: line 599 pos 12: 'size.isFinite': is not true.
very nice. can you explain riverpod with one small project.
Yes sure, I will try to make a playlist on that along with other State Managements 💕
I should learn more about ClipPath
Learning more about ClipPath can really enhance your design skills! 🎨 It's a powerful widget for creating custom clip shapes in Flutter.
why not putting the blue container and the white one in a stack, then making the top right and left corners of the white container circular? why whoudn't this work?
You are right. That is the easiest way rather than using clipper
@pintsizedpals I think clip is better, like how would u make the container cover the whole screen?
Using a Stack with a circular top-right and top-left border on the white container should work. Just ensure you use a ClipRRect or Container with BoxDecoration and set borderRadius for the corners.
Its amazing tutorial and understandably sir but i want to tell you and requested you to make your editor to zoom because its var away to see nicely plz zoom sir 🎉
I tried to zoom but in upcoming videos I'll increase the zoom.
Thankyou 💖
@CodingwithT Sir Thankfully 💥🙏🤩
Pls solve the problem
size.isFinite : is not true
class HomeScreen extends StatelessWidget {
const HomeScreen({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
body: SingleChildScrollView(
child: Column(
children: [
TPrimaryHeaderContainer(
child: Container(),
),
],
),
)
);
}
}
it is not working it doesn't show me a custom shape help me please?
Give the container a height property of 400.
Sir, in primary_header_container.dart, can you tell me the code for background custom shape? I can't see the code because of the emulator
Which one?
i finished the whole video till end and when i was done nothing is popping up on my home screen, please help
Make sure to add child property in your widget
Hello friend, I did everything as it is. However, when I put the container position in the stack, I cannot see the container. If you have email I can show you the code and what it looks like.
Hi,
You have to use positioned widget while using stack.
api.flutter.dev/flutter/widgets/Positioned-class.html
what extension did u used to get the small box of colors near the line number, can you tell
Which one?
when u are using a color in the code, u r getting a small box near the line number which shows which color is used , how do u get that?
@@CodingwithT
❤❤❤
if possible make source code free
He needs the support to keep giving us current tutorials, lets support
😊
Source code please 🥺😢
Link to download source code is available in the description 🎉
I understand that you want to keep a clean code , but factoring everything to a custom widget became annoying, it's not clean code anymore and trying to find a specific widget in a pile of widgets is kinda annoying, i like your videos , but i hope you change this part
Exactly 😂
Like for you salam
W.Salam Thank you for your support.
I made a Path Element class so we can name properly the edges and the horizontal line:
class PathElement {
PathElement(this.curveBeginning, this.curveEnding, this.path);
final Offset curveBeginning;
final Offset curveEnding;
final Path path;
void quadraticBezierTo() {
path.quadraticBezierTo(
curveBeginning.dx,
curveBeginning.dy,
curveEnding.dx,
curveEnding.dy,
);
}
}
FULL: curved_edges.dart
import 'package:flutter/material.dart';
class TCustomCurvedEdges extends CustomClipper {
@override
Path getClip(Size size) {
var path = Path();
path.lineTo(0, size.height);
PathElement firstEdge = PathElement(
Offset(0, size.height - 20),
Offset(30, size.height - 20),
path,
);
firstEdge.quadraticBezierTo();
PathElement horizontalLine = PathElement(
Offset(0, size.height - 20),
Offset(size.width - 30, size.height - 20),
path,
);
horizontalLine.quadraticBezierTo();
PathElement lastEdge = PathElement(
Offset(size.width, size.height - 20),
Offset(size.width, size.height),
path,
);
lastEdge.quadraticBezierTo();
path.lineTo(size.width, 0);
path.close();
return path;
}
@override
bool shouldReclip(covariant CustomClipper oldClipper) {
return true;
}
}
class PathElement {
PathElement(this.curveBeginning, this.curveEnding, this.path);
final Offset curveBeginning;
final Offset curveEnding;
final Path path;
void quadraticBezierTo() {
path.quadraticBezierTo(
curveBeginning.dx,
curveBeginning.dy,
curveEnding.dx,
curveEnding.dy,
);
}
}