1+ import 'package:camerawesome/camerawesome_plugin.dart' ;
12import 'package:camerawesome/models/capture_modes.dart' ;
23import 'package:camerawesome/models/flashmodes.dart' ;
34import 'package:camerawesome/models/orientations.dart' ;
@@ -15,12 +16,14 @@ class TopBarWidget extends StatelessWidget {
1516 final ValueNotifier <bool > enableAudio;
1617 final ValueNotifier <CameraFlashes > switchFlash;
1718 final ValueNotifier <bool > enablePinchToZoom;
19+ final ExifPreferences exifPreferences;
1820 final Function onFullscreenTap;
1921 final Function onResolutionTap;
2022 final Function onChangeSensorTap;
2123 final Function onFlashTap;
2224 final Function onAudioChange;
2325 final Function onPinchToZoomChange;
26+ final Function onSetExifPreferences;
2427
2528 const TopBarWidget ({
2629 Key key,
@@ -39,6 +42,8 @@ class TopBarWidget extends StatelessWidget {
3942 @required this .onChangeSensorTap,
4043 @required this .onResolutionTap,
4144 @required this .onPinchToZoomChange,
45+ @required this .exifPreferences,
46+ @required this .onSetExifPreferences,
4247 }) : super (key: key);
4348
4449 @override
@@ -115,24 +120,44 @@ class TopBarWidget extends StatelessWidget {
115120 children: [
116121 OptionButton (
117122 rotationController: rotationController,
118- icon: enablePinchToZoom.value ? Icons .pinch_rounded : Icons .pinch_outlined,
123+ icon: enablePinchToZoom.value
124+ ? Icons .pinch_rounded
125+ : Icons .pinch_outlined,
119126 orientation: orientation,
120127 onTapCallback: () => onPinchToZoomChange? .call (),
121128 ),
122129 captureMode.value == CaptureModes .VIDEO
123130 ? Padding (
124- padding: const EdgeInsets .only (left: 20.0 ),
125- child: OptionButton (
131+ padding: const EdgeInsets .only (left: 20.0 ),
132+ child: OptionButton (
126133 icon: enableAudio.value ? Icons .mic : Icons .mic_off,
127134 rotationController: rotationController,
128135 orientation: orientation,
129136 isEnabled: ! isRecording,
130137 onTapCallback: () => onAudioChange? .call (),
131138 ),
132- )
139+ )
133140 : Container (),
134141 ],
135142 ),
143+ SizedBox (height: 20.0 ),
144+ Row (
145+ mainAxisAlignment: MainAxisAlignment .end,
146+ children: [
147+ OptionButton (
148+ rotationController: rotationController,
149+ icon: exifPreferences.saveGPSLocation
150+ ? Icons .gps_fixed_rounded
151+ : Icons .gps_not_fixed_outlined,
152+ orientation: orientation,
153+ onTapCallback: () {
154+ exifPreferences.saveGPSLocation =
155+ ! exifPreferences.saveGPSLocation;
156+ onSetExifPreferences? .call (exifPreferences);
157+ },
158+ ),
159+ ],
160+ ),
136161 ],
137162 ),
138163 );
0 commit comments