Spacer

Spacer()

untuk menambah kan spasi dengan flex, artinya langsung memenuhi bagian yang kosong

Text(
  'Total',
  style: TextStyle(fontSize: 20),
),
Spacer(),
Chip(
  label: Text(
    '\$${cart.totalAmount}',
    style: TextStyle(
        color:
            Theme.of(context).primaryTextTheme.title.color),
  ),
  backgroundColor: Theme.of(context).primaryColor,
),
FlatButton(
  onPressed: () {},
  child: Text(
    'ORDER NOW',
  ),
  textColor: Theme.of(context).primaryColor,
)

Last updated

Was this helpful?