Removed unnecessary remode padding widget
This commit is contained in:
parent
8e378c0e8e
commit
b112e629a4
1 changed files with 20 additions and 24 deletions
|
|
@ -23,31 +23,27 @@ class _HomeScreenState extends State<HomeScreen> {
|
|||
appBar: AppBar(
|
||||
title: Text('Main Screen'),
|
||||
),
|
||||
body: MediaQuery.removePadding(
|
||||
context: context,
|
||||
removeLeft: true,
|
||||
child: StreamBuilder(
|
||||
stream: bloc.userTasks,
|
||||
builder: (BuildContext context, AsyncSnapshot<List<TaskModel>> snap) {
|
||||
if (!snap.hasData) {
|
||||
return Center(
|
||||
child: LoadingIndicator(),
|
||||
);
|
||||
}
|
||||
return ListView(
|
||||
padding: EdgeInsets.zero,
|
||||
children: snap.data
|
||||
.map((task) => Container(
|
||||
child: TaskListTile(
|
||||
task: task,
|
||||
onDone: () => bloc.markTaskAsDone(task),
|
||||
),
|
||||
padding: EdgeInsets.only(bottom: 12),
|
||||
))
|
||||
.toList(),
|
||||
body: StreamBuilder(
|
||||
stream: bloc.userTasks,
|
||||
builder: (BuildContext context, AsyncSnapshot<List<TaskModel>> snap) {
|
||||
if (!snap.hasData) {
|
||||
return Center(
|
||||
child: LoadingIndicator(),
|
||||
);
|
||||
},
|
||||
),
|
||||
}
|
||||
return ListView(
|
||||
padding: EdgeInsets.zero,
|
||||
children: snap.data
|
||||
.map((task) => Container(
|
||||
child: TaskListTile(
|
||||
task: task,
|
||||
onDone: () => bloc.markTaskAsDone(task),
|
||||
),
|
||||
padding: EdgeInsets.only(bottom: 12),
|
||||
))
|
||||
.toList(),
|
||||
);
|
||||
},
|
||||
),
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue