remove unnecessary safearea

This commit is contained in:
Fabian Freund
2024-06-16 21:15:50 +02:00
parent 33d6121053
commit 11e3b9c0a1
2 changed files with 334 additions and 342 deletions
@@ -25,44 +25,41 @@ class ChatArchiveListScreen extends HookConsumerWidget {
),
],
),
body: SafeArea(
child: Skeletonizer(
enabled: chatsAsync.isLoading,
child: chatsAsync.when(
data: (chats) {
return ListView.builder(
itemCount: chats.length,
itemBuilder: (context, index) {
final chat = chats[index];
body: Skeletonizer(
enabled: chatsAsync.isLoading,
child: chatsAsync.when(
data: (chats) {
return ListView.builder(
itemCount: chats.length,
itemBuilder: (context, index) {
final chat = chats[index];
return ListTile(
title: Text(chat.toString()),
subtitle: (chat.dateTime != null)
? Text(chat.dateTime!.formatWithMinutePrecision())
: null,
onTap: () async {
await context.push(
ChatArchiveDetailRoute(fileName: chat.fileName)
.location,
);
},
);
},
);
},
error: (error, stackTrace) {
return FailureWidget(
title: 'Could not load archived chats',
exception: error,
onRetry: () => ref.refresh(chatArchiveRepositoryProvider),
);
},
loading: () => ListView.builder(
itemCount: 3,
itemBuilder: (context, index) => const ListTile(
title: Bone.text(),
subtitle: Bone.text(),
),
return ListTile(
title: Text(chat.toString()),
subtitle: (chat.dateTime != null)
? Text(chat.dateTime!.formatWithMinutePrecision())
: null,
onTap: () async {
await context.push(
ChatArchiveDetailRoute(fileName: chat.fileName).location,
);
},
);
},
);
},
error: (error, stackTrace) {
return FailureWidget(
title: 'Could not load archived chats',
exception: error,
onRetry: () => ref.refresh(chatArchiveRepositoryProvider),
);
},
loading: () => ListView.builder(
itemCount: 3,
itemBuilder: (context, index) => const ListTile(
title: Bone.text(),
subtitle: Bone.text(),
),
),
),