Basic post item

This commit is contained in:
2024-11-09 11:16:14 +08:00
parent bac90aad23
commit 07b8ec6e96
16 changed files with 726 additions and 13 deletions

View File

@ -27,9 +27,14 @@ class SnNetworkProvider {
],
));
if (!kIsWeb && Platform.isAndroid || Platform.isIOS || Platform.isMacOS) {
if (!kIsWeb && (Platform.isAndroid || Platform.isIOS || Platform.isMacOS)) {
// Switch to native implementation if possible
client.httpClientAdapter = NativeAdapter();
}
}
String getAttachmentUrl(String ky) {
if (ky.startsWith("http://")) return ky;
return '${client.options.baseUrl}/cgi/uc/attachments/$ky';
}
}