Skip to content

Commit

Permalink
Improve classroom update
Browse files Browse the repository at this point in the history
  • Loading branch information
VitorCantao committed Mar 2, 2021
1 parent ef36979 commit 085184c
Showing 1 changed file with 16 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,23 @@ class ClassroomListView extends StatelessWidget {
return Column(
children: <Widget>[
Expanded(
child: ListView.builder(
shrinkWrap: true,
itemCount: bloc.classrooms.length,
itemBuilder: (_, index) => Padding(
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 8),
child: BlocProvider(
create: (context) => GetIt.instance<StudentBloc>(
param1: bloc.classrooms[index],
child: BlocBuilder<ClassroomBloc, ClassroomState>(
builder: (context, state) {
return ListView.builder(
shrinkWrap: true,
itemCount: bloc.classrooms.length,
itemBuilder: (_, index) => Padding(
padding:
const EdgeInsets.symmetric(horizontal: 16, vertical: 8),
child: BlocProvider(
create: (context) => GetIt.instance<StudentBloc>(
param1: bloc.classrooms[index],
),
child: ClassroomItem(index: index),
),
),
child: ClassroomItem(index: index),
),
),
);
},
),
),
],
Expand Down

0 comments on commit 085184c

Please sign in to comment.