Fixed alingment for the task tile
This commit is contained in:
parent
ae0f8515aa
commit
a253207376
2 changed files with 18 additions and 13 deletions
|
|
@ -17,20 +17,24 @@ class HomeScreen extends StatelessWidget {
|
|||
appBar: AppBar(
|
||||
title: Text('Main Screen'),
|
||||
),
|
||||
body: StreamBuilder(
|
||||
stream: _firestore.getUserTasks('mariano159357'),
|
||||
builder: (BuildContext context, AsyncSnapshot<List<TaskModel>> snap) {
|
||||
if (!snap.hasData) {
|
||||
return Center(
|
||||
child: LoadingIndicator(),
|
||||
body: MediaQuery.removePadding(
|
||||
context: context,
|
||||
removeLeft: true,
|
||||
child: StreamBuilder(
|
||||
stream: _firestore.getUserTasks('mariano159357'),
|
||||
builder: (BuildContext context, AsyncSnapshot<List<TaskModel>> snap) {
|
||||
if (!snap.hasData) {
|
||||
return Center(
|
||||
child: LoadingIndicator(),
|
||||
);
|
||||
}
|
||||
return ListView(
|
||||
padding: EdgeInsets.zero,
|
||||
children:
|
||||
snap.data.map((task) => TaskListTile(task: task)).toList(),
|
||||
);
|
||||
}
|
||||
return ListView(
|
||||
padding: EdgeInsets.all(0.0),
|
||||
children:
|
||||
snap.data.map((task) => TaskListTile(task: task)).toList(),
|
||||
);
|
||||
},
|
||||
},
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@ class TaskListTile extends StatelessWidget {
|
|||
|
||||
Widget build(BuildContext context) {
|
||||
return FractionallySizedBox(
|
||||
alignment: Alignment.centerLeft,
|
||||
widthFactor: .9,
|
||||
child: Container(
|
||||
height: 116,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue