Search code examples
flutterdartconstraints

widget flutter to sticking to left, and right


I have this widget code

child: Row(
    mainAxisAlignment: MainAxisAlignment.spaceBetween,
    crossAxisAlignment: CrossAxisAlignment.center,
    children: [
      Container(alignment: Alignment.topLeft, child: BtnPoin()),
      Container(alignment: Alignment.topRight, child: BtnFilter()),
    ],
  ),

can i put BtnPoin() to sticking to the left, ant BtnFilter() to the right here my pic reference

Reference


Solution

  • Have you tried this?

    child: Row(
        mainAxisAlignment: MainAxisAlignment.spaceBetween,
        children: [
          BtnPoin(),
          BtnFilter(),
        ],
      ),