From 443d19642dcf291f053cafea2520ff97efb731a3 Mon Sep 17 00:00:00 2001 From: oltimaloku Date: Tue, 30 Jan 2024 10:20:57 -0800 Subject: [PATCH] reverted back to local photo storage --- client/.env.example | 2 -- client/ios/Flutter/AppFrameworkInfo.plist | 2 +- client/ios/Podfile | 2 +- client/ios/Runner.xcodeproj/project.pbxproj | 2 +- .../xcshareddata/xcschemes/Runner.xcscheme | 2 +- .../gallery/widgets/photo_prompt.dart | 20 ++++++++++++------- client/pubspec.yaml | 3 --- 7 files changed, 17 insertions(+), 16 deletions(-) delete mode 100644 client/.env.example diff --git a/client/.env.example b/client/.env.example deleted file mode 100644 index 5b829a2..0000000 --- a/client/.env.example +++ /dev/null @@ -1,2 +0,0 @@ -GOOGLE_API_KEY= -SERVER_URI= diff --git a/client/ios/Flutter/AppFrameworkInfo.plist b/client/ios/Flutter/AppFrameworkInfo.plist index 9625e10..7c56964 100644 --- a/client/ios/Flutter/AppFrameworkInfo.plist +++ b/client/ios/Flutter/AppFrameworkInfo.plist @@ -21,6 +21,6 @@ CFBundleVersion 1.0 MinimumOSVersion - 11.0 + 12.0 diff --git a/client/ios/Podfile b/client/ios/Podfile index fdcc671..d97f17e 100644 --- a/client/ios/Podfile +++ b/client/ios/Podfile @@ -1,5 +1,5 @@ # Uncomment this line to define a global platform for your project -# platform :ios, '11.0' +# platform :ios, '12.0' # CocoaPods analytics sends network stats synchronously affecting flutter build latency. ENV['COCOAPODS_DISABLE_STATS'] = 'true' diff --git a/client/ios/Runner.xcodeproj/project.pbxproj b/client/ios/Runner.xcodeproj/project.pbxproj index 3981051..19792ec 100644 --- a/client/ios/Runner.xcodeproj/project.pbxproj +++ b/client/ios/Runner.xcodeproj/project.pbxproj @@ -218,7 +218,7 @@ isa = PBXProject; attributes = { BuildIndependentTargetsInParallel = YES; - LastUpgradeCheck = 1300; + LastUpgradeCheck = 1430; ORGANIZATIONNAME = ""; TargetAttributes = { 331C8080294A63A400263BE5 = { diff --git a/client/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/client/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme index e42adcb..87131a0 100644 --- a/client/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ b/client/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -1,6 +1,6 @@ { this.image = imageTemporary; // Save the image path to the gallery - /* Provider.of(context, listen: false) + Provider.of(context, listen: false) .addPhotoToGallery(widget.geoSphereId, image.path); - */ + + /* Provider.of(context, listen: false) - .uploadPhoto(widget.geoSphereId, imageTemporary); + .uploadPhoto(widget.geoSphereId, imageTemporary);*/ } on PlatformException catch (e) { print("Failed to pick image: $e"); } @@ -52,11 +53,16 @@ class _PhotoPromptState extends State { ), ElevatedButton( onPressed: () async { - var status = await Permission.camera.request(); - if (status.isGranted) { + if (Platform.isAndroid) { + var status = await Permission.camera.request(); + if (status.isGranted) { + pickImage(ImageSource.camera); + } else { + print("bruh"); + } + } else if (Platform.isIOS) { + // TODO: Implement iOS camera permission pickImage(ImageSource.camera); - } else { - print("bruh"); } }, child: const Text("Pick Camera"), diff --git a/client/pubspec.yaml b/client/pubspec.yaml index 60b6e34..fb501b4 100644 --- a/client/pubspec.yaml +++ b/client/pubspec.yaml @@ -70,9 +70,6 @@ flutter: uses-material-design: true # To add assets to your application, add an assets section, like this: - # assets: - # - images/a_dot_burr.jpeg - # - images/a_dot_ham.jpeg # An image asset can refer to one or more resolution-specific "variants", see # https://flutter.dev/assets-and-images/#resolution-aware