increase min sdk and apply new formatter

This commit is contained in:
Fabian Freund
2025-02-18 15:37:03 +01:00
parent f7885fc829
commit a1ee8bef35
266 changed files with 11329 additions and 10058 deletions
+1 -4
View File
@@ -2,10 +2,7 @@ import 'dart:typed_data';
import 'package:langchain/langchain.dart';
String combineDocuments(
List<Document> documents, {
String separator = '\n\n',
}) {
String combineDocuments(List<Document> documents, {String separator = '\n\n'}) {
return documents.map((d) => d.pageContent).join(separator);
}
+4 -4
View File
@@ -10,10 +10,10 @@ class LRUCache<K, V> {
int Function(K)? hashCode,
bool Function(dynamic)? isValidKey,
}) : _cache = LinkedHashMap<K, V>(
equals: equals,
hashCode: hashCode,
isValidKey: isValidKey,
);
equals: equals,
hashCode: hashCode,
isValidKey: isValidKey,
);
void resize(int capacity) {
if (_capacity > capacity) {
+3 -11
View File
@@ -5,9 +5,7 @@ void showErrorMessage(BuildContext context, String message) {
final snackBar = SnackBar(
content: Text(
message,
style: TextStyle(
color: Theme.of(context).colorScheme.error,
),
style: TextStyle(color: Theme.of(context).colorScheme.error),
),
backgroundColor: Theme.of(context).colorScheme.onError,
);
@@ -19,15 +17,9 @@ Future<void> launchUrlFeedback(
Uri url, {
LaunchMode mode = LaunchMode.externalApplication,
}) async {
if (!await launchUrl(
url,
mode: mode,
)) {
if (!await launchUrl(url, mode: mode)) {
if (context.mounted) {
showErrorMessage(
context,
'Could not launch URL ($url)',
);
showErrorMessage(context, 'Could not launch URL ($url)');
}
}
}