Play Flutter Quiz. Click here .

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

This Errors is posted by seven.srikanth@gmail.com 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.







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

Terms | Privacy