@@ -109,7 +109,7 @@ class _UsersBodyViewState extends State<UsersBodyView> {
109109 @override
110110 void initState () {
111111 _flowCubit = context.read <FlowCubit >();
112- _bloc = SourcedPagingBloc .item (
112+ _bloc = SourcedPagingBloc < User > .item (
113113 cubit: _flowCubit,
114114 fetch: (source, service, offset, limit) async =>
115115 _filter.source != null && _filter.source != source
@@ -141,49 +141,51 @@ class _UsersBodyViewState extends State<UsersBodyView> {
141141 @override
142142 Widget build (BuildContext context) {
143143 return Scaffold (
144- body: Column (
145- children: [
146- UserFilterView (
147- initialFilter: _filter,
148- onChanged: (filter) {
149- setState (() {
150- _filter = filter;
151- });
152- _bloc.refresh ();
153- },
154- ),
155- const SizedBox (height: 8 ),
156- Expanded (
157- child: PagedListView .item (
158- bloc: _bloc,
159- itemBuilder: (ctx, item, index) => Align (
160- alignment: Alignment .topCenter,
161- child: Container (
162- constraints: const BoxConstraints (maxWidth: 800 ),
163- child: Dismissible (
164- key: ValueKey ('${item .model .id }@${item .source }' ),
165- onDismissed: (direction) async {
166- await _flowCubit
167- .getService (item.source)
168- .user
169- ? .deleteUser (item.model.id! );
170- _bloc.remove (item);
171- },
172- background: Container (
173- color: Colors .red,
174- ),
175- child: UserTile (
176- flowCubit: _flowCubit,
177- bloc: _bloc,
178- source: item.source,
179- user: item.model,
144+ body: Center (
145+ child: Column (
146+ crossAxisAlignment: CrossAxisAlignment .center,
147+ children: [
148+ UserFilterView (
149+ initialFilter: _filter,
150+ onChanged: (filter) {
151+ setState (() {
152+ _filter = filter;
153+ });
154+ _bloc.refresh ();
155+ },
156+ ),
157+ const SizedBox (height: 8 ),
158+ Expanded (
159+ child: PagedListView .item (
160+ bloc: _bloc,
161+ itemBuilder: (ctx, item, index) => Center (
162+ child: Container (
163+ constraints: const BoxConstraints (maxWidth: 800 ),
164+ child: Dismissible (
165+ key: ValueKey ('${item .model .id }@${item .source }' ),
166+ onDismissed: (direction) async {
167+ await _flowCubit
168+ .getService (item.source)
169+ .user
170+ ? .deleteUser (item.model.id! );
171+ _bloc.remove (item);
172+ },
173+ background: Container (
174+ color: Colors .red,
175+ ),
176+ child: UserTile (
177+ flowCubit: _flowCubit,
178+ bloc: _bloc,
179+ source: item.source,
180+ user: item.model,
181+ ),
180182 ),
181183 ),
182184 ),
183185 ),
184186 ),
185- ) ,
186- ] ,
187+ ] ,
188+ ) ,
187189 ),
188190 floatingActionButton: FloatingActionButton .extended (
189191 onPressed: () => showDialog (
0 commit comments