Q:

How Can I set width of a card in list view in flutter?

I have a list of cards but when I have changed the width of card it still takes the same width as parent container. I have tried wrapping up listview, card, and even scrollView with sized box or container but nothing has worked for me.
  Container(
              height: MediaQuery.of(context).size.height * 0.6,
              width: MediaQuery.of(context).size.width * 0.8,
              decoration: BoxDecoration(
                color: kWhiteColor,
                borderRadius: BorderRadius.all(
                    Radius.circular(MediaQuery.of(context).size.height * 0.02)),
              ),
              child: Padding(
                padding:
                    EdgeInsets.all(MediaQuery.of(context).size.height * 0.015),
                child: SingleChildScrollView(
                  scrollDirection: Axis.vertical,
                  child: ListView.builder(
                    physics: const NeverScrollableScrollPhysics(),
                    shrinkWrap: true,
                    itemCount: 10,
                    itemBuilder: (BuildContext context, int index) {
                      return SizedBox(
                        width: MediaQuery.of(context).size.width*0.001,
                        height: MediaQuery.of(context).size.height*0.3,
                        child: Card(
                          color: Colors.black,
                        ),
                      );
                    },
                  ),
                ),
              ),
            ),

White Card Behind is the parent or we can say outermost container.

A:

wrap your children in an Align widget
return Align(
  alignment: Alignment.centerRight, //or choose another Alignment
  child: SizedBox(
    width: MediaQuery.of(context).size.width*0.001, //you sure it should be 0.001?
    height: MediaQuery.of(context).size.height*0.3,
    child: Card(
      color: Colors.black,
    ),
  ),
);

