increase min sdk and apply new formatter
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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)');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user