increase min sdk and apply new formatter
This commit is contained in:
@@ -62,9 +62,7 @@ class ChatArchiveDetailScreen extends HookConsumerWidget {
|
||||
onPressed: () async {
|
||||
if (chatAsync.valueOrNull != null) {
|
||||
await Clipboard.setData(
|
||||
ClipboardData(
|
||||
text: chatAsync.valueOrNull!,
|
||||
),
|
||||
ClipboardData(text: chatAsync.valueOrNull!),
|
||||
);
|
||||
}
|
||||
},
|
||||
@@ -94,23 +92,24 @@ class ChatArchiveDetailScreen extends HookConsumerWidget {
|
||||
enabled: chatAsync.isLoading,
|
||||
justifyMultiLineText: false,
|
||||
child: chatAsync.when(
|
||||
data: (data) => Markdown(
|
||||
data: data,
|
||||
selectable: true,
|
||||
onTapLink: (text, href, title) async {
|
||||
if (href != null) {
|
||||
if (Uri.parse(href) case final Uri url) {
|
||||
await ref
|
||||
.read(tabRepositoryProvider.notifier)
|
||||
.addTab(url: url);
|
||||
data:
|
||||
(data) => Markdown(
|
||||
data: data,
|
||||
selectable: true,
|
||||
onTapLink: (text, href, title) async {
|
||||
if (href != null) {
|
||||
if (Uri.parse(href) case final Uri url) {
|
||||
await ref
|
||||
.read(tabRepositoryProvider.notifier)
|
||||
.addTab(url: url);
|
||||
|
||||
if (context.mounted) {
|
||||
context.go(BrowserRoute().location);
|
||||
if (context.mounted) {
|
||||
context.go(BrowserRoute().location);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
error: (error, stackTrace) {
|
||||
return FailureWidget(
|
||||
title: 'Could not load chat',
|
||||
@@ -118,9 +117,7 @@ class ChatArchiveDetailScreen extends HookConsumerWidget {
|
||||
onRetry: () => ref.refresh(readArchivedChatProvider(fileName)),
|
||||
);
|
||||
},
|
||||
loading: () => const Bone.multiText(
|
||||
lines: 15,
|
||||
),
|
||||
loading: () => const Bone.multiText(lines: 15),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
@@ -48,8 +48,9 @@ class ChatArchiveListScreen extends HookConsumerWidget {
|
||||
),
|
||||
onTap: () async {
|
||||
await context.push(
|
||||
ChatArchiveDetailRoute(fileName: chat.fileName)
|
||||
.location,
|
||||
ChatArchiveDetailRoute(
|
||||
fileName: chat.fileName,
|
||||
).location,
|
||||
);
|
||||
},
|
||||
);
|
||||
@@ -65,13 +66,15 @@ class ChatArchiveListScreen extends HookConsumerWidget {
|
||||
onRetry: () => ref.refresh(chatArchiveRepositoryProvider),
|
||||
);
|
||||
},
|
||||
loading: () => ListView.builder(
|
||||
itemCount: 3,
|
||||
itemBuilder: (context, index) => const ListTile(
|
||||
title: Bone.text(),
|
||||
subtitle: Bone.text(),
|
||||
),
|
||||
),
|
||||
loading:
|
||||
() => ListView.builder(
|
||||
itemCount: 3,
|
||||
itemBuilder:
|
||||
(context, index) => const ListTile(
|
||||
title: Bone.text(),
|
||||
subtitle: Bone.text(),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
@@ -56,58 +56,58 @@ class ChatArchiveSearchScreen extends HookConsumerWidget {
|
||||
),
|
||||
body: resultsAsync.when(
|
||||
skipLoadingOnReload: true,
|
||||
data: (chats) => FadingScroll(
|
||||
fadingSize: 25,
|
||||
builder: (context, controller) {
|
||||
return ListView.builder(
|
||||
controller: controller,
|
||||
itemCount: chats.length,
|
||||
itemBuilder: (context, index) {
|
||||
final chat = chats[index];
|
||||
final chatEntity = ChatEntity.fromFileName(chat.fileName);
|
||||
data:
|
||||
(chats) => FadingScroll(
|
||||
fadingSize: 25,
|
||||
builder: (context, controller) {
|
||||
return ListView.builder(
|
||||
controller: controller,
|
||||
itemCount: chats.length,
|
||||
itemBuilder: (context, index) {
|
||||
final chat = chats[index];
|
||||
final chatEntity = ChatEntity.fromFileName(chat.fileName);
|
||||
|
||||
return Card(
|
||||
clipBehavior: Clip.antiAlias,
|
||||
child: InkWell(
|
||||
onTap: () async {
|
||||
await context.push(
|
||||
ChatArchiveDetailRoute(fileName: chat.fileName)
|
||||
.location,
|
||||
);
|
||||
},
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(16.0),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
MarkdownBody(
|
||||
data: '## ${chat.title}',
|
||||
return Card(
|
||||
clipBehavior: Clip.antiAlias,
|
||||
child: InkWell(
|
||||
onTap: () async {
|
||||
await context.push(
|
||||
ChatArchiveDetailRoute(
|
||||
fileName: chat.fileName,
|
||||
).location,
|
||||
);
|
||||
},
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(16.0),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
MarkdownBody(data: '## ${chat.title}'),
|
||||
if (chatEntity.dateTime != null)
|
||||
Text(
|
||||
chatEntity.dateTime!
|
||||
.formatWithMinutePrecision(),
|
||||
),
|
||||
const SizedBox(height: 8.0),
|
||||
if (chat.contentSnippet != null)
|
||||
MarkdownBody(data: chat.contentSnippet!),
|
||||
],
|
||||
),
|
||||
if (chatEntity.dateTime != null)
|
||||
Text(
|
||||
chatEntity.dateTime!.formatWithMinutePrecision(),
|
||||
),
|
||||
const SizedBox(height: 8.0),
|
||||
if (chat.contentSnippet != null)
|
||||
MarkdownBody(
|
||||
data: chat.contentSnippet!,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
},
|
||||
);
|
||||
},
|
||||
),
|
||||
error: (error, stackTrace) => Center(
|
||||
child: FailureWidget(
|
||||
title: 'Chat Search failed',
|
||||
exception: error,
|
||||
),
|
||||
),
|
||||
),
|
||||
error:
|
||||
(error, stackTrace) => Center(
|
||||
child: FailureWidget(
|
||||
title: 'Chat Search failed',
|
||||
exception: error,
|
||||
),
|
||||
),
|
||||
loading: () => const SizedBox.shrink(),
|
||||
),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user