How to remove the extra space on left side of Column Widget?

This Errors is posted by seven.srikanth at 07-12-2018 18:42:22

If you are seeing some space on the left side of the Column Widget as below. You need to add crossAxisAlignment: CrossAxisAlignment.start to your column widget to fix the issue.

Screenshot with Issue:




Screenshot after fix:



Hope this fixes your issue.

Here is the full code from main.dart file.

import 'package:flutter/material.dart';

void main() {
runApp(MyApp());
}

class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
Widget titlesection = Container(
padding: EdgeInsets.all(32.0),
child: Row(
children: <Widget>[
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Container(
padding: EdgeInsets.only(bottom: 8.0),
child: Text(
"Some Lage Somthing",
style: TextStyle(fontWeight: FontWeight.bold),
),
),
Text("Someplace, Country")
],
),
),
Icon(Icons.star)
],
),
);

return MaterialApp(
title: 'My Layout App',
home: Scaffold(
appBar: AppBar(
title: Text("My Layout App"),
),
body: ListView(
children: <Widget>[
// Image.asset('images/lake.jpg'),
titlesection,
],
)),
);
}
}


Thanks,
Srikanth


Tags: How to remove the extra space on left side of Column Widget?



0 Comments
Login to comment.
Recent Comments

Be the first to Comment. You can ask a Query or Share your toughts or Just say thanks.



Recent Articles


How to deploy flutter web site on GitHub using peanut

Posted by nikhilchaudhary12155 on 13 Oct 2019 Article


AnimatedPositioned Widget Example in Flutter

Posted by seven.srikanth on 10 Oct 2019 Article


Flutter Open-Source and directory lists

Posted by nishantkotatech on 09 Oct 2019 Article


Flutter Travelling Couple Leading Page - Flutter Web Series 3

Posted by nikhilchaudhary12155 on 05 Oct 2019 Article



© 2018 - Fluttercentral | Email to me - Seven.srikanth@gmail.com