Border radius is not working

how i can make container layout rounded from top-right and top left

        child: Padding(
          padding: const EdgeInsets.all(18.0),
          child: Container(
            width: ScreenUtil().screenWidth,
            height: ScreenUtil().screenHeight,
            color: Colors.black12,
            child: Stack(
              children: [
                Container(
                  width: 500,
                  height: 400,
                  decoration: BoxDecoration(
                    image: DecorationImage(
                        image: AssetImage("assets/images/x.jpg"),
                        fit: BoxFit.cover),
                  ),
                ),
                Positioned(
                  top: 300,
                  left: 50,
                  right: 50,
                  child: Container(

                    decoration: BoxDecoration(
                      color: Colors.red,
                      borderRadius: BorderRadius.only(
                        topLeft: Radius.circular(20),
                        topRight: Radius.circular(20),

                      ),
                    ),
                    padding: EdgeInsets.symmetric(horizontal: 30),
                    width: 400,

                    child: Column(
                      children: [],
                    ),
                  ),
                ),
              ],
            ),
          ),

used in a Positioned widgets Container are does not support any box decoration vale so you can try without Positioned

Container(
          decoration: BoxDecoration(
            color: Colors.red,

            borderRadius: BorderRadius.only(
              topLeft: Radius.circular(20),
              topRight: Radius.circular(20),

            ),

            boxShadow: [BoxShadow(color: Colors.white, blurRadius: 1)],
          ),
          padding: EdgeInsets.symmetric(horizontal: 30),
          width: 400,

          child: Column(
            children: [],
          ),
        ),