website icon indicating copy to clipboard operation
website copied to clipboard

'Building layouts' page issue

Open BilalAlam173 opened this issue 6 years ago • 4 comments

Page URL: https://flutter.dev/docs/development/ui/layout/tutorial.html Page source: https://github.com/flutter/website/tree/master/src/docs/development/ui/layout/tutorial.md

Description of issue: While learning layout in flutter i found a mistake in the docs. In step 2, We have created a row, Inside an expandable column, and after that there is an Icon and a text, but both icon and text that comes in the last are not wrapped in a column that is why they don't display aligned with the first column (screenshot attached)

image

main.dart

class TitleSction extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return new Container(
      padding: const EdgeInsets.all(32),
      child: Row(
        children: [
          Expanded(
            /*1*/
            child: Column(
              crossAxisAlignment: CrossAxisAlignment.start,
              children: [
                /*2*/
                Container(
                  padding: const EdgeInsets.only(bottom: 8),
                  child: Text(
                    'Oeschinen Lake Campground',
                    style: TextStyle(
                      fontWeight: FontWeight.bold,
                    ),
                  ),
                ),
                Text(
                  'Kandersteg, Switzerland',
                  style: TextStyle(
                    color: Colors.grey[500],
                  ),
                ),
              ],
            ),
          ),
          /*3*/
          Icon(
            Icons.star,
            color: Colors.red[500],
          ),
          Text('41'),
        ],
      ),
    );
  }
}

BilalAlam173 avatar Dec 16 '19 06:12 BilalAlam173

PR that fixes the issue https://github.com/flutter/website/pull/3423

BilalAlam173 avatar Dec 16 '19 06:12 BilalAlam173

Thanks for catching and fixing, @BilalAlam173!! Can you sign the CLA so I can merge?

sfshaza2 avatar Dec 16 '19 17:12 sfshaza2

Done! @sfshaza2

BilalAlam173 avatar Dec 17 '19 06:12 BilalAlam173

PR is merged. Closing.

sfshaza2 avatar Dec 18 '19 08:12 sfshaza2