Row (Flexible -Expanded) In Flutter

Row (Flexible -Expanded) In Flutter :

Screenshot :

Row (Flexible -Expanded) In Flutter

Row (Flexible -Expanded) In Flutter.dart

class grabReward extends StatelessWidget {
  String iconPath;
  Color iconBgColor;
  Color textColor;

  grabReward({this.iconPath, this.iconBgColor, this.textColor});

  @override
  Widget build(BuildContext context) {
    return Container(
        width: 234,
        padding: EdgeInsets.symmetric(horizontal: 14, vertical: 12),
        child: Row(
          children: <Widget>[
            Flexible(
              child: Container(
                width: 30,
                decoration: BoxDecoration(
                    color: iconBgColor, borderRadius: BorderRadius.circular(4)),
                child: Center(
                  child: Text('0'),
                ),
              ),
            ),
            Spacer(),
            Expanded(
              flex: 6,
              child: Column(
                crossAxisAlignment: CrossAxisAlignment.start,
                children: <Widget>[
                  Text('Wait ! Grab FREE reward',
                      maxLines: 1,
                      style: FONT_CONST.OSWALD_REGULAR_RED2_12
                          .copyWith(color: textColor)),
                  Text(
                    'Book your seats and tap on the reward box to claim it.',
                    style: FONT_CONST.REGULAR_GRAY4_10,
                  ),
                ],
              ),
            )
          ],
        ),
      );
  }
}

The flutter tutorial  is a website that bring you the latest and amazing resources of code. All the languages codes are included in this website. The languages like flutter, android, java,kotlin etc.with the help of this languages any user can develop the beautiful application

For more information about Flutter. visit www.fluttertutorial.in