How can I create this shape in Flutter?


Anas Ressa

Please can anyone help me to create this shape in the top right corner of my phone screen:enter image description here

Thanks in advance.

Jaime Ortiz

You can use the Stack widget and it's child widgets, it has a container with a circle, after which you can push the circle off the screen so that only part of it is rendered

class _MyAppState extends State<MyApp> {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: MyApp._title,
      home: Scaffold(
          body: Column(
        children: [
          CircleCorner(),
        ],
      )),
    );
  }
}

class CircleCorner extends StatelessWidget {
  const CircleCorner({
    Key? key,
  }) : super(key: key);

  @override
  Widget build(BuildContext context) {
    Size size = MediaQuery.of(context).size;
    return SizedBox(
      width: size.width,
      height: 300,
      child: Stack(
        children: [
          Positioned(
            top: -460,
            right: -380,
            child: Container(
               width: 600.0,
               height: 600.0,
              decoration: new BoxDecoration(
                color: Colors.black87,
                shape: BoxShape.circle,
              ),
            ),
          ),
        ],
      ),
    );
  }
}

result

Related


How can I create such a shape?

Rudy How can I create this with css? thank you for your help. What I have tried: .box { background: purple; padding: 20px; clip-path: polygon( 70% 100%, 100% calc(100% - 3vw), 100% 0, 0 0, 0 calc(100% - 3vw) ); } <div class="box"></

How can I create this shape in SVG?

Rahul Desai Now, I use an ellipse to set the base of the bars to be shaded. : http://jsfiddle.net/rdesai/MjFgK/55/ _ _ How can I change the style so that the base is as shown in the table below? edit The problem can be reduced to creating a shape like this: I

How can I create this shape in SVG?

Rahul Desai Now, I use an ellipse to set the base of my bars to be shaded. : http://jsfiddle.net/rdesai/MjFgK/55/ _ _ How can I change the style so that the base is as shown in the table below? edit The problem can be reduced to creating a shape like this: I c

How can I create this shape in SVG?

Rahul Desai Now, I use an ellipse to set the base of my bars to be shaded. : http://jsfiddle.net/rdesai/MjFgK/55/ _ _ How can I change the style so that the base is as shown in the table below? edit The problem can be reduced to creating a shape like this: I c

How can I create a custom shape that can display an image?

Ashish Tiwari In a project I have to display contour plots and other images with different shapes . I don't know how to create such a shape, and how to display an image in it. I also have to place this shape in the list view. Please give me advice. Thanks in a

How can I create a shape in android like the image I added?

Aksukumar Maldeh Can anyone tell me how to create a shape that is somewhat rectangular but ends up being a triangle. Jack' I would use the gradient image from the drawable folder. Let's call it background.png. You can also do it with the icons searchicon.png a

How can I create a shape in android like the image I added?

Aksukumar Maldeh Can anyone tell me how to create a shape that is somewhat rectangular but ends up being a triangle. Jack' I would use the gradient image from the drawable folder. Let's call it background.png. You can also do it with the icons searchicon.png a

How can I create this shape (quad with rounded corners) in CSS?

Jerin A Mathews I'm building a widget in React Js and in design this image is in the background. My problem is that the background color is dynamic and the width and height may change depending on the device. I've tried using inline SVG (I can control the fill

How can I create this specific shape using xml in android?

Mohammad Nouri I want to create a shape like the picture below, but i want to create this with xml code (while drawing), i don't want to create this picture with 9.patch ! How can I create this shape using xml code? johnrao07 Here is a workaround <shape xmlns:

How can I create this shape (quad with rounded corners) in CSS?

Jerin A Mathews I'm building a widget in React Js and in design this image is in the background. My problem is that the background color is dynamic and the width and height may change depending on the device. I've tried using inline SVG (I can control the fill

How can I create this shape with pure CSS3?

Michael Smith I'm having trouble recreating this shape with CSS3! This will be used as a header that will expand to the entire site, and it has to have a transparent background, so you'll have problems trying to recreate it! EDIT: This is so far, I just can't

How can I create this shape (quad with rounded corners) in CSS?

Jerin A Mathews I'm building a widget in React Js and in design this image is in the background. My problem is that the background color is dynamic and the width and height may change depending on the device. I've tried using inline SVG (I can control the fill

How can I create this shape (quad with rounded corners) in CSS?

Jerin A Mathews I'm building a widget in React Js and in design this image is in the background. My problem is that the background color is dynamic and the width and height may change depending on the device. I've tried using inline SVG (I can control the fill

How can I create this shape (quad with rounded corners) in CSS?

Jerin A Mathews I'm building a widget in React Js and in design this image is in the background. My problem is that the background color is dynamic and the width and height may change depending on the device. I've tried using inline SVG (I can control the fill

How can I create such an element in Flutter?

FroDK I want to create an element like this. But I am still very new. Will there be something similar? I need the button and textbox (I don't know what it's called) to have state depending on how it changes color and the open and closed state of the plus butto

How can I create such an element in Flutter?

FroDK I want to create an element like this. But I am still very new. Will there be something similar? I need the button and textbox (I don't know what it's called) to have state depending on how it changes color and the open and closed state of the plus butto

How can I create a custom shape using CSS3 to match this shape?

3g network train I have a graphic detail, but I want to display the shape using CSS. For this, I'm trying to create a css3shape to match my graph (see attached), but I can't get the result. How can I replicate this graphic? My attempt: this is pretty bad: <div

How can I create a custom shape using CSS3 to match this shape?

3g network train I have a graphic detail, but I want to display the shape using CSS. For this, I'm trying to create a css3shape to match my graph (see attached), but I can't get the result. How can I replicate this graphic? My attempt: this is pretty bad: <div

How can I create a custom shape using CSS3 to match this shape?

3g network train I have a graphic detail, but I want to display the shape using CSS. For this, I'm trying to create a css3shape to match my graph (see attached), but I can't get the result. How can I replicate this graphic? My attempt: this is pretty bad: <div

Can I only create this shape with CSS?

Ivan S95 I'm building a hero section for a webpage with a specific shape, at the moment, I'm just using an image as an overlay for the actual section background, but I'd like to reduce the number of requests made, wondering if the following shapes can be done

Can I only create this shape with CSS?

Ivan S95 I'm building a hero section for a webpage with a specific shape, at the moment, I'm just using an image as an overlay for the actual section background, but I'd like to reduce the number of requests made, wondering if the following shapes can be done

How can i create a div shape like i have shared 100% width

username I want to create a divfigure with the above shape and I want it to have a width of 100%. Below is the HTML and CSS I have tried. I can make a triangle, but not with 100% width div: HTML: <div class="triangle-up"><div></div></div> CSS: .triangle-up {

How can i create a div shape like i have shared 100% width

username I want to create a divfigure with the above shape and I want it to have a width of 100%. Below is the HTML and CSS I have tried. I can make a triangle, but not with 100% width div: HTML: <div class="triangle-up"><div></div></div> CSS: .triangle-up {