File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -34,6 +34,9 @@ class _NearbyPageState extends State<NearbyPage> {
3434 bool get _supportsDesktopDrop =>
3535 ! kIsWeb && (Platform .isWindows || Platform .isLinux);
3636
37+ bool get _supportsFolderSelection =>
38+ ! kIsWeb && ! Platform .isAndroid && ! Platform .isIOS;
39+
3740 @override
3841 void dispose () {
3942 _textController.dispose ();
@@ -153,13 +156,14 @@ class _NearbyPageState extends State<NearbyPage> {
153156 icon: const Icon (Icons .videocam),
154157 label: Text (l10n.contentVideo),
155158 ),
156- OutlinedButton .icon (
157- onPressed: _isPreparingItems || draft.isSending
158- ? null
159- : () => _pickByType (TransferPayloadType .folder),
160- icon: const Icon (Icons .folder),
161- label: Text (l10n.contentFolder),
162- ),
159+ if (_supportsFolderSelection)
160+ OutlinedButton .icon (
161+ onPressed: _isPreparingItems || draft.isSending
162+ ? null
163+ : () => _pickByType (TransferPayloadType .folder),
164+ icon: const Icon (Icons .folder),
165+ label: Text (l10n.contentFolder),
166+ ),
163167 ],
164168 ),
165169 const SizedBox (height: 14 ),
Original file line number Diff line number Diff line change @@ -656,6 +656,10 @@ class AppController extends ChangeNotifier {
656656 }
657657
658658 Future <int > addDraftItemsFromType (TransferPayloadType type) async {
659+ if (type == TransferPayloadType .folder &&
660+ (Platform .isAndroid || Platform .isIOS)) {
661+ return 0 ;
662+ }
659663 final items = await _payloadBuilder.pickByType (type);
660664 _sendDraft = _sendDraft.addItems (items);
661665 notifyListeners ();
You can’t perform that action at this time.
0 commit comments