Skip to content

Commit

Permalink
Limit file_picker to json
Browse files Browse the repository at this point in the history
  • Loading branch information
xpavle00 committed Aug 20, 2023
1 parent 884dd4c commit 625a609
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 47 deletions.
3 changes: 3 additions & 0 deletions ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelpe

flutter_ios_podfile_setup

Pod::PICKER_MEDIA = false
Pod::PICKER_AUDIO = false

target 'Runner' do
use_frameworks!
use_modular_headers!
Expand Down
48 changes: 2 additions & 46 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4,39 +4,7 @@ PODS:
- awesome_notifications (0.7.5-dev.3):
- Flutter
- IosAwnCore (= 0.7.5-dev.3)
- DKImagePickerController/Core (4.3.4):
- DKImagePickerController/ImageDataManager
- DKImagePickerController/Resource
- DKImagePickerController/ImageDataManager (4.3.4)
- DKImagePickerController/PhotoGallery (4.3.4):
- DKImagePickerController/Core
- DKPhotoGallery
- DKImagePickerController/Resource (4.3.4)
- DKPhotoGallery (0.0.17):
- DKPhotoGallery/Core (= 0.0.17)
- DKPhotoGallery/Model (= 0.0.17)
- DKPhotoGallery/Preview (= 0.0.17)
- DKPhotoGallery/Resource (= 0.0.17)
- SDWebImage
- SwiftyGif
- DKPhotoGallery/Core (0.0.17):
- DKPhotoGallery/Model
- DKPhotoGallery/Preview
- SDWebImage
- SwiftyGif
- DKPhotoGallery/Model (0.0.17):
- SDWebImage
- SwiftyGif
- DKPhotoGallery/Preview (0.0.17):
- DKPhotoGallery/Model
- DKPhotoGallery/Resource
- SDWebImage
- SwiftyGif
- DKPhotoGallery/Resource (0.0.17):
- SDWebImage
- SwiftyGif
- file_picker (0.0.1):
- DKImagePickerController/PhotoGallery
- Flutter
- Flutter (1.0.0)
- flutter_file_dialog (0.0.1):
Expand All @@ -56,16 +24,12 @@ PODS:
- FlutterMacOS
- rive_common (0.0.1):
- Flutter
- SDWebImage (5.17.0):
- SDWebImage/Core (= 5.17.0)
- SDWebImage/Core (5.17.0)
- shared_preferences_foundation (0.0.1):
- Flutter
- FlutterMacOS
- sqflite (0.0.3):
- Flutter
- FMDB (>= 2.7.5)
- SwiftyGif (5.4.4)
- url_launcher_ios (0.0.1):
- Flutter

Expand All @@ -86,12 +50,8 @@ DEPENDENCIES:

SPEC REPOS:
trunk:
- DKImagePickerController
- DKPhotoGallery
- FMDB
- IosAwnCore
- SDWebImage
- SwiftyGif

EXTERNAL SOURCES:
audio_session:
Expand Down Expand Up @@ -124,9 +84,7 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS:
audio_session: 4f3e461722055d21515cf3261b64c973c062f345
awesome_notifications: 1b6393d6ce02878dc50d0ae87baf7bdbc9d802a2
DKImagePickerController: b512c28220a2b8ac7419f21c491fc8534b7601ac
DKPhotoGallery: fdfad5125a9fdda9cc57df834d49df790dbb4179
file_picker: ce3938a0df3cc1ef404671531facef740d03f920
file_picker: 1d63c4949e05e386da864365f8c13e1e64787675
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
flutter_file_dialog: 4c014a45b105709a27391e266c277d7e588e9299
flutter_keyboard_visibility: 0339d06371254c3eb25eeb90ba8d17dca8f9c069
Expand All @@ -136,12 +94,10 @@ SPEC CHECKSUMS:
package_info_plus: fd030dabf36271f146f1f3beacd48f564b0f17f7
path_provider_foundation: 29f094ae23ebbca9d3d0cec13889cd9060c0e943
rive_common: 8a159d68033a8b073e5853acc50f03aa486a2888
SDWebImage: 750adf017a315a280c60fde706ab1e552a3ae4e9
shared_preferences_foundation: 5b919d13b803cadd15ed2dc053125c68730e5126
sqflite: 31f7eba61e3074736dff8807a9b41581e4f7f15a
SwiftyGif: 93a1cc87bf3a51916001cf8f3d63835fb64c819f
url_launcher_ios: 08a3dfac5fb39e8759aeb0abbd5d9480f30fc8b4

PODFILE CHECKSUM: 08fd28456829cf8b05b5e4f1782e4a91ef256853
PODFILE CHECKSUM: a3b531ec123805d5b1262fc2fe935cb5b2fba4e2

COCOAPODS: 1.12.1
5 changes: 4 additions & 1 deletion lib/habits/habits_manager.dart
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ class HabitsManager extends ChangeNotifier {
} else {
final outputFile = await FilePicker.platform.saveFile(
dialogTitle: "",
type: FileType.custom,
allowedExtensions: ['json'],
fileName: file.path.split("/").last,
);
if (outputFile != null) {
Expand All @@ -83,7 +85,8 @@ class HabitsManager extends ChangeNotifier {
filePath = await FlutterFileDialog.pickFile(params: params);
} else {
filePath = (await FilePicker.platform.pickFiles(
type: FileType.any,
type: FileType.custom,
allowedExtensions: ['json'],
allowMultiple: false,
withReadStream: Platform.isLinux))
?.files
Expand Down

0 comments on commit 625a609

Please sign in to comment.