add option to send attachments in SIB messages
What changed, and why it matters
This commit adds the ability to attach files to customer-support messages in the ShopInBit feature of Stack Wallet. It introduces file picking, client-side type and size checks, and a multipart upload path to the server. The change is a feature addition, not a documented security fix. There are no obvious remote-code-execution or data-theft bugs visible in the diff, but the new code handles user-chosen files and uploads them over the network, which always carries some privacy and abuse risk.
Treat as a routine feature commit. Reviewers should verify that server-side enforcement matches the client-side limits (extension whitelist, per-category sizes, combined 50 MB cap), that uploaded files are not served from the same origin as authenticated app content, and that the in-memory buffering of the multipart body is acceptable on low-memory devices. The mobile file-picker behavior flagged by the TODO should be tested on Android and iOS before release.
Security signals we found
New file upload surface added to ShopInBit ticket messages
Client-side validation of extension, per-file category size, and 50 MB combined cap before upload
Multipart upload body is fully buffered in memory (bounded by the 50 MB cap) to allow 401 re-auth resend without re-reading files
No server-side validation visible in the diff; relies on client-enforced limits
File names are taken from `file.uri.pathSegments.last` and extension parsing uses `split('.').last`, which can behave oddly for names with multiple dots or no dots (though null is handled)
TODO comment notes mobile file-picker behavior is not yet verified
No explicit security claim, CVE, or researcher attribution in commit or supplied references
Evidence from the diff
The patch extends the ShopInBit ticket chat flow with attachment support. A new _pickAttachments() method uses file_picker to let the user select files, validates them against an extension whitelist and per-category size limits, and shows selected files as removable chips. sendMessage() now accepts an optional List<File> attachments and routes to a new sendAttachments() client method when present. sendAttachments() builds a multipart/form-data request via package:http, sends it through the existing Tor-capable HTTP client with a 5-minute upload timeout, and reuses the same 401 re-auth logic as other requests. The pubspec bumps http from ^1.5.0 to ^1.6.0.
Changed components
lib/pages/shopinbit/shopinbit_ticket_detail.dartlib/services/shopinbit/shopinbit_service.dartlib/services/shopinbit/src/client.dartscripts/app_config/templates/pubspec.template.yamlInspect captured patch +473 / −23
diff --git a/lib/pages/shopinbit/shopinbit_ticket_detail.dart b/lib/pages/shopinbit/shopinbit_ticket_detail.dart
index 7c3c29e..1c03051 100644
--- a/lib/pages/shopinbit/shopinbit_ticket_detail.dart
+++ b/lib/pages/shopinbit/shopinbit_ticket_detail.dart
@@ -1,5 +1,7 @@
import 'dart:async';
+import 'dart:io';
+import 'package:file_picker/file_picker.dart';
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:flutter_svg/svg.dart';
@@ -157,18 +159,110 @@ class _ShopInBitTicketDetailState extends ConsumerState<ShopInBitTicketDetail>
Future<void> _refresh() => _shopinBitService.refreshOne(_id);
+ List<File>? _currentSelectedAttachments;
+
+ /// Pick files and validate them with the same rules the client enforces at
+ /// send time (type whitelist, per-category size caps, 50 MB combined), so
+ /// a doomed selection is rejected here with a specific reason instead of
+ /// failing later behind a generic "Message failed to send".
+ Future<void> _pickAttachments() async {
+ if (_sending) return;
+
+ // TODO verify this works on android and ios
+ final result = await FilePicker.platform.pickFiles(
+ allowMultiple: true,
+ type: .custom,
+ allowedExtensions: kAllowedAttachmentExtensions,
+ lockParentWindow: true,
+ );
+ if (result == null || !mounted) return;
+
+ final accepted = [...?_currentSelectedAttachments];
+ int combinedBytes = 0;
+ for (final file in accepted) {
+ combinedBytes += await file.length();
+ }
+
+ String? rejection;
+ for (final picked in result.files) {
+ final path = picked.path;
+ if (path == null || accepted.any((f) => f.path == path)) continue;
+
+ final file = File(path);
+ final fileName = file.uri.pathSegments.last;
+ final resolved = resolveAttachmentType(fileName);
+ if (resolved == null) {
+ rejection = "$fileName is not a supported file type";
+ continue;
+ }
+
+ final sizeBytes = await file.length();
+ if (sizeBytes > resolved.category.maxBytes) {
+ rejection =
+ "$fileName is larger than the "
+ "${resolved.category.maxBytes ~/ 1000000} MB "
+ "${resolved.category.name} limit";
+ continue;
+ }
+ if (combinedBytes + sizeBytes > kCombinedAttachmentMaxBytes) {
+ rejection =
+ "Combined attachment size exceeds the "
+ "${kCombinedAttachmentMaxBytes ~/ 1000000} MB limit";
+ continue;
+ }
+
+ combinedBytes += sizeBytes;
+ accepted.add(file);
+ }
+
+ if (!mounted) return;
+ setState(() {
+ _currentSelectedAttachments = accepted.isEmpty ? null : accepted;
+ });
+ if (rejection != null) {
+ unawaited(
+ showFloatingFlushBar(
+ type: FlushBarType.warning,
+ message: rejection,
+ context: context,
+ ),
+ );
+ }
+ }
+
+ void _removeAttachment(File file) {
+ final current = _currentSelectedAttachments;
+ if (current == null) return;
+ setState(() {
+ current.remove(file);
+ if (current.isEmpty) _currentSelectedAttachments = null;
+ });
+ }
+
Future<void> _sendMessage() async {
final text = _messageController.text.trim();
- if (text.isEmpty || _sending) return;
+ // Capture the selection now: the field is cleared optimistically below,
+ // so a re-pick while this send is in flight can't be lost or orphaned.
+ final attachmentsToSend = _currentSelectedAttachments;
+ if ((text.isEmpty && attachmentsToSend == null) || _sending) return;
+
+ // The server's copy will carry real attachment links after processing;
+ // until then the optimistic bubble just notes the count.
+ final optimisticContent = switch ((text, attachmentsToSend?.length)) {
+ (final t, null) => t,
+ ("", final int n) => "$n attachment(s)",
+ (final t, final int n) => "$t ($n attachment(s))",
+ };
final optimistic = TicketMessage(
timestamp: DateTime.now(),
fromAgent: false,
- content: text,
+ content: optimisticContent,
);
setState(() {
_sending = true;
_pending.add(optimistic);
+ _currentSelectedAttachments = null;
});
_messageController.clear();
@@ -182,7 +276,12 @@ class _ShopInBitTicketDetailState extends ConsumerState<ShopInBitTicketDetail>
if (customerKey != null) {
sent = await ref
.read(pShopinBitService)
- .sendMessage(_id, text, customerKey);
+ .sendMessage(
+ _id,
+ text,
+ customerKey,
+ attachments: attachmentsToSend,
+ );
}
} catch (_) {
sent = false;
@@ -199,10 +298,13 @@ class _ShopInBitTicketDetailState extends ConsumerState<ShopInBitTicketDetail>
if (mounted) setState(() => _pending.remove(optimistic));
} else {
// The send didn't go through: roll the optimistic message back, restore
- // the text so it isn't lost, and let the user know.
+ // the text and attachments so nothing is lost, and let the user know.
_pending.remove(optimistic);
if (mounted) {
if (_messageController.text.isEmpty) _messageController.text = text;
+ // Don't clear a selection the user made while this send was
+ // in flight; only restore into an empty slot.
+ _currentSelectedAttachments ??= attachmentsToSend;
unawaited(
showFloatingFlushBar(
type: FlushBarType.warning,
@@ -395,6 +497,20 @@ class _ShopInBitTicketDetailState extends ConsumerState<ShopInBitTicketDetail>
color: Theme.of(context).extension<StackColors>()!.popupBG,
child: Row(
children: [
+ IconButton(
+ onPressed: _sending ? null : _pickAttachments,
+ tooltip: "Attach files",
+ icon: SvgPicture.asset(
+ Assets.svg.file,
+ width: 20,
+ height: 20,
+ colorFilter: ColorFilter.mode(
+ Theme.of(context).extension<StackColors>()!.textSubtitle1,
+ .srcIn,
+ ),
+ ),
+ ),
+ const SizedBox(width: 8),
Expanded(
child: TextField(
controller: _messageController,
@@ -483,6 +599,14 @@ class _ShopInBitTicketDetailState extends ConsumerState<ShopInBitTicketDetail>
child: _TrackingLinks(trackingLinks: trackingLinks),
),
chatArea,
+ if (_currentSelectedAttachments != null) ...[
+ SizedBox(height: isDesktop ? 8 : 6),
+ _SelectedAttachmentChips(
+ files: _currentSelectedAttachments!,
+ enabled: !_sending,
+ onRemove: _removeAttachment,
+ ),
+ ],
SizedBox(height: isDesktop ? 12 : 8),
inputBar,
],
@@ -565,6 +689,101 @@ const double _kAttachmentMaxHeight = 220;
const int _kAttachmentDecodeHeight = 440;
const double _kAttachmentLoaderHeight = 80;
const double _kAttachmentLoaderWidth = 40;
+// Selected-attachment chip layout.
+const double _kChipIconSize = 12;
+const double _kChipMaxNameWidth = 140;
+
+/// Chips for attachments that are selected but not yet sent, each removable
+/// until the send starts.
+class _SelectedAttachmentChips extends StatelessWidget {
+ const _SelectedAttachmentChips({
+ required this.files,
+ required this.enabled,
+ required this.onRemove,
+ });
+
+ final List<File> files;
+ final bool enabled;
+ final void Function(File) onRemove;
+
+ @override
+ Widget build(BuildContext context) {
+ return Align(
+ alignment: Alignment.centerLeft,
+ child: Wrap(
+ spacing: 6,
+ runSpacing: 6,
+ children: [
+ for (final File file in files)
+ _AttachmentChip(
+ file: file,
+ enabled: enabled,
+ onRemove: () => onRemove(file),
+ ),
+ ],
+ ),
+ );
+ }
+}
+
+class _AttachmentChip extends StatelessWidget {
+ const _AttachmentChip({
+ required this.file,
+ required this.enabled,
+ required this.onRemove,
+ });
+
+ final File file;
+ final bool enabled;
+ final VoidCallback onRemove;
+
+ @override
+ Widget build(BuildContext context) {
+ final colors = Theme.of(context).extension<StackColors>()!;
+ final String fileName = file.uri.pathSegments.last;
+ return Container(
+ padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 4),
+ decoration: BoxDecoration(
+ color: colors.textFieldDefaultBG,
+ borderRadius: BorderRadius.circular(8),
+ ),
+ child: Row(
+ mainAxisSize: .min,
+ children: [
+ SvgPicture.asset(
+ Assets.svg.file,
+ width: _kChipIconSize,
+ height: _kChipIconSize,
+ colorFilter: ColorFilter.mode(colors.textSubtitle1, .srcIn),
+ ),
+ const SizedBox(width: 4),
+ ConstrainedBox(
+ constraints: const BoxConstraints(maxWidth: _kChipMaxNameWidth),
+ child: Text(
+ fileName,
+ style: STextStyles.itemSubtitle12(context),
+ maxLines: 1,
+ overflow: .ellipsis,
+ ),
+ ),
+ const SizedBox(width: 6),
+ MouseRegion(
+ cursor: SystemMouseCursors.click,
+ child: GestureDetector(
+ onTap: enabled ? onRemove : null,
+ child: SvgPicture.asset(
+ Assets.svg.x,
+ width: _kChipIconSize,
+ height: _kChipIconSize,
+ colorFilter: ColorFilter.mode(colors.textSubtitle1, .srcIn),
+ ),
+ ),
+ ),
+ ],
+ ),
+ );
+ }
+}
/// Renders an authenticated `/attachment-proxy/` image.
///
diff --git a/lib/services/shopinbit/shopinbit_service.dart b/lib/services/shopinbit/shopinbit_service.dart
index b6e07f2..ac0a4da 100644
--- a/lib/services/shopinbit/shopinbit_service.dart
+++ b/lib/services/shopinbit/shopinbit_service.dart
@@ -1,4 +1,5 @@
import "dart:async";
+import "dart:io";
import "package:drift/drift.dart";
import "package:flutter/foundation.dart";
@@ -71,14 +72,17 @@ class ShopInBitService {
await Future.wait(
resp.value!
.where((e) => !e.isKnownReceipt)
- .map((ref) => _refreshRef(ref, key)),
+ .map((ref) => _refreshRef(ref, key, false)),
);
}
/// Refresh a single ticket. The row must already exist; use this for
/// polling and post-action refreshes. For an unknown ticket id, call
/// [refreshAll] (which has the customer-key context needed to insert).
- Future<void> refreshOne(int apiTicketId) async {
+ Future<void> refreshOne(
+ int apiTicketId, {
+ bool forceUpdateMessages = false,
+ }) async {
final ShopInBitTicket? existing = await db.shopInBitTicketsDao.getByApiId(
apiTicketId,
);
@@ -86,6 +90,7 @@ class ShopInBitService {
await _refreshRef(
TicketRef(id: existing.apiTicketId, number: existing.ticketNumber),
existing.customerKey,
+ forceUpdateMessages,
);
}
@@ -134,15 +139,24 @@ class ShopInBitService {
Future<bool> sendMessage(
int apiTicketId,
String message,
- String customerKey,
- ) async {
- final ApiResponse<Map<String, dynamic>> resp = await client.sendMessage(
- apiTicketId,
- message,
- customerKey: customerKey,
- );
+ String customerKey, {
+ List<File>? attachments,
+ }) async {
+ final ApiResponse<Map<String, dynamic>> resp =
+ attachments != null && attachments.isNotEmpty
+ ? await client.sendAttachments(
+ apiTicketId,
+ message: message,
+ customerKey: customerKey,
+ attachments: attachments,
+ )
+ : await client.sendMessage(
+ apiTicketId,
+ message,
+ customerKey: customerKey,
+ );
if (resp.hasError) return false;
- unawaited(refreshOne(apiTicketId));
+ unawaited(refreshOne(apiTicketId, forceUpdateMessages: true));
return true;
}
@@ -156,7 +170,11 @@ class ShopInBitService {
/// Concurrent calls for the same ticket id are coalesced onto the
/// in-flight refresh — later callers await the same completer rather
/// than kicking off a second round-trip.
- Future<void> _refreshRef(TicketRef ref, String customerKey) {
+ Future<void> _refreshRef(
+ TicketRef ref,
+ String customerKey,
+ bool forceUpdateMessages,
+ ) {
final int id = ref.id;
final Completer<void>? pending = _inFlight[id];
@@ -169,13 +187,16 @@ class ShopInBitService {
// the completer), so the unawaited future is safe. Every caller —
// including the first — awaits the completer, guaranteeing there's a
// listener for any error.
- unawaited(_refreshRefBody(ref, customerKey, completer));
+ unawaited(
+ _refreshRefBody(ref, customerKey, forceUpdateMessages, completer),
+ );
return completer.future;
}
Future<void> _refreshRefBody(
TicketRef ref,
String customerKey,
+ bool forceUpdateMessages,
Completer<void> completer,
) async {
final int id = ref.id;
@@ -244,7 +265,8 @@ class ShopInBitService {
} else {
final List<TicketMessage>? messages;
- if ((existing.lastAgentMessageAt != null &&
+ if (forceUpdateMessages ||
+ (existing.lastAgentMessageAt != null &&
status.lastAgentMessageAt != null &&
status.lastAgentMessageAt!.toUtc().isAfter(
existing.lastAgentMessageAt!.toUtc(),
diff --git a/lib/services/shopinbit/src/client.dart b/lib/services/shopinbit/src/client.dart
index a457254..fa46fdd 100644
--- a/lib/services/shopinbit/src/client.dart
+++ b/lib/services/shopinbit/src/client.dart
@@ -3,6 +3,7 @@ import 'dart:io';
import 'dart:math';
import 'package:flutter/foundation.dart';
+import 'package:http/http.dart' as http;
import '../../../app_config.dart';
import '../../../networking/http.dart';
@@ -31,6 +32,10 @@ const Duration _kMaxBackoff = Duration(seconds: 30);
// caller's in-flight guard and silently stop all further polling.
const Duration _kRequestTimeout = Duration(seconds: 30);
+// Uploads can carry up to 50 MB; the 30s request ceiling would kill them on
+// slow links, so multipart sends get their own generous ceiling.
+const _kUploadTimeout = Duration(minutes: 5);
+
class ShopInBitClient {
final String accessKey;
final String partnerSecret;
@@ -225,13 +230,47 @@ class ShopInBitClient {
Future<ApiResponse<Map<String, dynamic>>> sendAttachments(
int ticketId, {
required String message,
- required List<Map<String, String>> attachments,
+ required List<File> attachments,
required String customerKey,
}) async {
- return _request(
- 'POST',
- '/tickets/$ticketId/attachments',
- body: {'message': message, 'attachments': attachments},
+ if (attachments.isEmpty) {
+ return _validationError(
+ "No files to upload. Use POST /tickets/{id}/messages for text-only messages.",
+ );
+ }
+
+ int combinedBytes = 0;
+ final List<_AttachmentUpload> uploads = [];
+
+ for (final file in attachments) {
+ final fileName = file.uri.pathSegments.last;
+ final resolved = resolveAttachmentType(fileName);
+
+ if (resolved == null) {
+ return _validationError("Unsupported file type: $fileName");
+ }
+
+ final sizeBytes = await file.length();
+ if (sizeBytes > resolved.category.maxBytes) {
+ return _validationError(
+ "$fileName is larger than the "
+ "${resolved.category.maxBytes ~/ 1000000} MB "
+ "${resolved.category.name} limit",
+ );
+ }
+
+ combinedBytes += sizeBytes;
+ if (combinedBytes > kCombinedAttachmentMaxBytes) {
+ return _validationError("Combined upload size exceeds the 50 MB limit");
+ }
+
+ uploads.add((path: file.path, contentType: resolved.mimeType));
+ }
+
+ return _multipartRequest(
+ "/tickets/$ticketId/attachments",
+ fields: {"message": message},
+ uploads: uploads,
parse: (json) => json,
customerKey: customerKey,
);
@@ -868,4 +907,174 @@ class ShopInBitClient {
return ApiResponse(exception: ApiException.network(e));
}
}
+
+ /// Client-side rejection: the request never left the device. Uses the same
+ /// ApiException channel as server failures so call sites handle one format.
+ ApiResponse<T> _validationError<T>(String message) =>
+ ApiResponse(exception: ApiException(message));
+
+ /// Multipart sibling of [_request]. package:http is used only to *encode*
+ /// the multipart/form-data body.
+ /// Transport goes through [_httpClient] so uploads ride the same
+ /// Tor-capable pipe as every other request.
+ ///
+ /// The encoded body is held in memory once (bounded to 50 MB by the
+ /// validation in [sendAttachments]) so the 401 re-auth can resend it
+ /// without re-reading files from disk. Deliberately no 429 auto-retry:
+ /// unlike [_send], a retry here would re-send the full upload body, which
+ /// the user should trigger explicitly.
+ Future<ApiResponse<T>> _multipartRequest<T>(
+ String path, {
+ required Map<String, String> fields,
+ required List<_AttachmentUpload> uploads,
+ required T Function(Map<String, dynamic>) parse,
+ required String customerKey,
+ }) async {
+ final resolved = _resolvePath(path);
+ final uri = Uri.parse("$baseUrl$resolved");
+
+ try {
+ // Encode once. finalize() fixes the boundary and yields the body
+ // stream; the content-type header carrying that boundary is only
+ // valid after finalize() has run, so it is read afterwards.
+ final encoder = http.MultipartRequest("POST", uri)..fields.addAll(fields);
+ for (final upload in uploads) {
+ encoder.files.add(
+ await http.MultipartFile.fromPath(
+ "attachments", // repeated field name, as the doc specifies
+ upload.path,
+ contentType: http.MediaType.parse(upload.contentType),
+ ),
+ );
+ }
+ final bodyBytes = await encoder.finalize().toBytes();
+ final contentType = encoder.headers["content-type"]!;
+
+ Future<Response> sendOnce(String token) {
+ Logging.instance.t("$_kTag POST $uri");
+ return _httpClient
+ .postBytes(
+ url: uri,
+ headers: {
+ "Authorization": "Bearer $token",
+ "External-Customer-Key": customerKey,
+ "Content-Type": contentType,
+ "Accept": "application/json",
+ },
+ bodyBytes: bodyBytes,
+ proxyInfo: _proxyInfo,
+ )
+ .timeout(_kUploadTimeout);
+ }
+
+ Response response = await sendOnce(await _tokenManager.getValidToken());
+
+ // Mirror [_send]'s single re-auth on a stale bearer token; the encoded
+ // bytes are immutable, so resending needs no rebuild.
+ if (response.code == 401) {
+ _tokenManager.invalidate();
+ Logging.instance.w("$_kTag POST $resolved HTTP:401, re-authenticating");
+ response = await sendOnce(await _tokenManager.getValidToken());
+ }
+
+ if (response.code >= 200 && response.code < 300) {
+ Logging.instance.t("$_kTag POST $resolved HTTP:${response.code}");
+ final json = jsonDecode(response.body) as Map<String, dynamic>;
+ return ApiResponse(value: parse(json));
+ } else {
+ Logging.instance.w(
+ "$_kTag POST $resolved HTTP:${response.code} "
+ "body: ${response.body}",
+ );
+ return ApiResponse(
+ exception: ApiException.fromResponse(response.code, response.body),
+ );
+ }
+ } on ApiException catch (e) {
+ Logging.instance.e(
+ "$_kTag _multipartRequest(POST $path) threw: ",
+ error: e,
+ );
+ return ApiResponse(exception: e);
+ } catch (e, s) {
+ Logging.instance.e(
+ "$_kTag _multipartRequest(POST $path) threw: ",
+ error: e,
+ stackTrace: s,
+ );
+ return ApiResponse(exception: ApiException.network(e));
+ }
+ }
+}
+
+/// Per-category limits from POST /tickets/{ticket_id}/attachments.
+///
+/// The doc says "MB" without defining it, so the stricter 1000-based reading
+/// is enforced: a client-side pass then implies a server-side pass under
+/// either interpretation. Confirm with it@shopinbit.com and pin the answer
+/// here.
+enum AttachmentCategory {
+ image(5 * 1000 * 1000),
+ document(10 * 1000 * 1000),
+ video(50 * 1000 * 1000);
+
+ const AttachmentCategory(this.maxBytes);
+
+ final int maxBytes;
+}
+
+/// Combined upload cap for a single attachments message.
+const kCombinedAttachmentMaxBytes = 50 * 1000 * 1000;
+
+/// Extensions accepted by [resolveAttachmentType], in file-picker
+/// allowedExtensions form (no dots). Keep in sync with the switch in
+/// [resolveAttachmentType]; drift fails safe because every picked file is
+/// re-validated through the resolver anyway.
+const kAllowedAttachmentExtensions = [
+ "jpg", "jpeg", "png", "webp", "heic", "heif", "gif", // images
+ "pdf", "docx", "xlsx", "odt", // documents
+ "mp4", "mov", "webm", "3gp", "3gpp", // videos
+];
+
+typedef ResolvedAttachment = ({String mimeType, AttachmentCategory category});
+
+/// Path + content type, materialized into multipart bytes inside
+/// [_multipartRequest]: validation stays separate from encoding, and the
+/// encoded bytes can be resent on 401 without re-reading files from disk.
+typedef _AttachmentUpload = ({String path, String contentType});
+
+/// Maps a filename to its API-supported MIME type and size category.
+/// Returns null for unsupported types. Public so the UI can validate at
+/// pick time with the same rules [ShopInBitClient.sendAttachments] enforces
+/// at send time.
+ResolvedAttachment? resolveAttachmentType(String fileName) {
+ final extension = fileName.split(".").last.toLowerCase();
+ return switch (extension) {
+ "jpg" || "jpeg" => (mimeType: "image/jpeg", category: .image),
+ "png" => (mimeType: "image/png", category: .image),
+ "webp" => (mimeType: "image/webp", category: .image),
+ "heic" => (mimeType: "image/heic", category: .image),
+ "heif" => (mimeType: "image/heif", category: .image),
+ "gif" => (mimeType: "image/gif", category: .image),
+ "pdf" => (mimeType: "application/pdf", category: .document),
+ "docx" => (
+ mimeType:
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
+ category: .document,
+ ),
+ "xlsx" => (
+ mimeType:
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
+ category: .document,
+ ),
+ "odt" => (
+ mimeType: "application/vnd.oasis.opendocument.text",
+ category: .document,
+ ),
+ "mp4" => (mimeType: "video/mp4", category: .video),
+ "mov" => (mimeType: "video/quicktime", category: .video),
+ "webm" => (mimeType: "video/webm", category: .video),
+ "3gp" || "3gpp" => (mimeType: "video/3gpp", category: .video),
+ _ => null,
+ };
}
diff --git a/scripts/app_config/templates/pubspec.template.yaml b/scripts/app_config/templates/pubspec.template.yaml
index 4264b4c..3c70db7 100644
--- a/scripts/app_config/templates/pubspec.template.yaml
+++ b/scripts/app_config/templates/pubspec.template.yaml
@@ -113,7 +113,7 @@ dependencies:
ref: 14427bcbbe1e754bce4a1b93cdb0a31ce56d792b
# Utility plugins
- http: ^1.5.0
+ http: ^1.6.0
local_auth: ^2.3.0
permission_handler: ^12.0.0+1
flutter_local_notifications: ^17.2.2
Why this scored 26/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.