How to change specific card border radius when running a video in joy Material UI? - material-ui

When running --Card-radius as recommended, it applied to all border radius.
Here is an example:
https://codesandbox.io/s/affectionate-antonelli-y1dyny?file=/demo.tsx
If I want to only change one border radius, e.g. borderTopRightRadius, it does not work as expected.

Related

How to create a shadow for a CustomPaint with flutter?

I am trying to reproduce this navigation bar (made on figma) with flutter :
I have already done the background shape with the CustomPaint class, however I cannot reproduce the shadow.
As you can slightly see, the border isn't equal along all borders, there is more shadow inside the half-circle in the middle than on the top border parts.
Also, I cannot control the blur and spread values (as with figma). Is there a way to achieve what I am trying to do. Or did I missed something ?

Is there any way to Circle pop-up into full screen in flutter

I try to animate using height as radius also but that's not working outside screen it seems impossible.
I want to make this circle avatar cover all screen but it stop whenever radius is max to device width/2 or height/2.
Wrap your CircleAvatar with Transform.scale() and increase its scale property.

Flutter - Hard color stop in linear gradient

I'm using CustomPaint to make a custom shape and I want to apply a color gradient but with hard color stops. Without color transitions.
PS:I cannot use different Paints instead of gradient because of the custom shape.
I checked the documentation and couldn't find anything. Is it impossible? Or is there any other workarounds? Thanks!
You could split your custom shape in smaller shapes and give each one its correct color. That would be one way to do it.
I have another idea. You could do it like so: Give the complete canvas of you custom paint a color, the color of your application's background. Give your custom shape Colors.transparent as its color. Then you make as many containers with the colors you want to have and put them below each other so that there overall size matches the size of your custom paint. You stack the custom paint onto these containers using Stack Widget and your custom shape will take the colors of these containers because its color is transparent. While the surrounding of your custom shape will have the color of the background of your application, because the whole custom paint is colored that way.
Okay I figured it out myself, I use Gradient.linear as the shader for custom paint. I noticed that it only blends colors when there is a big gap in stops. So I put my colors and stops like this.
Colors | Stop
Green 0.2
Green 0.201
Blue 0.5
Blue 0.501
Yellow 1
Now the color stops are hard.
Here's a preview of before and after |

How do I make my UI text centered to my 2d object when changing resolutions in Unity?

I have a 2d circle in the scene, and a text inside it that I want to always be in the middle of the circle when I am changing resolutions.
For better understanding, it's just like a replica game.
You can create a circle including a text box. Make the text box child object of your circle and add HorizontalLayoutGroup to your circle
Tick all of its properties.

Broken outline image in Unity

I want to put an outline around images but on some of the images the outline is broken. Notice the corners in the attached image.
I'm using 5 as the X and Y on the outline. In addition if I use a color besides black, the outline seems to be trying to blend. For example if I set the color to EEC209FF. See 2nd image.
So, i'm trying to explain both of your questions:
Why is the outline shape broken?
That’s the way the default Unity Outline script works: It just draws your UI.Image 4 time with the defined offset behind your image, it 4 different directions, which is cheap performance trick that fits most needs, but obviously not yours.
You can take a look at the Outline script on bitbucket here.
Why is the outline color partially yellow?
Unitys Outline Script draws your image in the background and multiplies the color values with your custom color.
That’s why the white part of your image on the upper right edge become yellow in the outline (almost the color you definied EEC209FF).
The outline on the lower right stays greens since it the take the colors from your image edge, approximately 19B754 multiplied with EEC209 to 178B03, which is a slightly dark green.