Custom Card Shape Flutter SDK

前端 未结 4 1761
迷失自我
迷失自我 2021-01-30 12:10

I just started learning Flutter and I have developed an app with GridView. GridView items are Card. Default card shape is Rectangle with a radius of 4.

I know there is s

4条回答
  •  不要未来只要你来
    2021-01-30 12:47

    You can use it this way

    Card(
      shape: RoundedRectangleBorder(
        borderRadius: BorderRadius.circular(15.0),
      ),
      child: Text(
        'Card with circular border',
        textScaleFactor: 1.2,
      ),
    ),
    Card(
      shape: BeveledRectangleBorder(
        borderRadius: BorderRadius.circular(10.0),
      ),
      child: Text(
        'Card with Beveled border',
        textScaleFactor: 1.2,
      ),
    ),
    Card(
      shape: StadiumBorder(
      side: BorderSide(
        color: Colors.black,
        width: 2.0,
      ),
    ),
      child: Text(
        'Card with Beveled border',
        textScaleFactor: 1.2,
      ),
    ),
    

提交回复
热议问题