Skip to content

Commit

Permalink
fix: [TM-43252] taking time to capture an image
Browse files Browse the repository at this point in the history
  • Loading branch information
thelukewalton committed May 23, 2024
1 parent e307368 commit 595edbf
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions lib/src/components/organisms/camera/camera_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ class ZdsCamera extends StatelessWidget {
this.cameraMode = ZdsCameraMode.photo,
this.maxVideoDuration,
this.showPreview = true,
this.saveGPSLocation = false,
this.photoPathBuilder,
this.videoPathBuilder,
this.filters,
Expand All @@ -60,6 +61,9 @@ class ZdsCamera extends StatelessWidget {
/// - [showPreview] determines whether the camera preview is shown before selecting a file, enabled by default.
final bool showPreview;

/// - [saveGPSLocation] determines whether the camera output be tagged with GPS location, disabled by default.
final bool saveGPSLocation;

/// A builder for the path to save the photo or video file.
///
/// This builder is used to specify the path to save the photo or video file.
Expand Down Expand Up @@ -87,6 +91,7 @@ class ZdsCamera extends StatelessWidget {
BuildContext context, {
bool showPreview = true,
bool rootNavigator = true,
bool saveGPSLocation = false,
CaptureRequestBuilder? photoPathBuilder,
CaptureRequestBuilder? videoPathBuilder,
List<AwesomeFilter>? filters,
Expand All @@ -98,6 +103,7 @@ class ZdsCamera extends StatelessWidget {
ZdsFadePageRouteBuilder(
builder: (context) => ZdsCamera(
showPreview: showPreview,
saveGPSLocation: saveGPSLocation,
photoPathBuilder: photoPathBuilder,
videoPathBuilder: videoPathBuilder,
filters: filters,
Expand Down Expand Up @@ -242,7 +248,7 @@ class ZdsCamera extends StatelessWidget {
),
)
: SaveConfig.photo(
exifPreferences: ExifPreferences(saveGPSLocation: true),
exifPreferences: ExifPreferences(saveGPSLocation: saveGPSLocation),
pathBuilder: videoPathBuilder ??
(sensors) async {
final Directory extDir = await getTemporaryDirectory();
Expand Down Expand Up @@ -270,7 +276,8 @@ class ZdsCamera extends StatelessWidget {
..add(DiagnosticsProperty<bool>('showPreview', showPreview))
..add(ObjectFlagProperty<CaptureRequestBuilder?>.has('photoPathBuilder', photoPathBuilder))
..add(ObjectFlagProperty<CaptureRequestBuilder?>.has('videoPathBuilder', videoPathBuilder))
..add(IterableProperty<AwesomeFilter>('filters', filters));
..add(IterableProperty<AwesomeFilter>('filters', filters))
..add(DiagnosticsProperty<bool>('saveGPSLocation', saveGPSLocation));
}
}

Expand Down

0 comments on commit 595edbf

Please sign in to comment.