AwesomeLocationButton constructor

AwesomeLocationButton({
  1. Key? key,
  2. required PhotoCameraState state,
  3. AwesomeTheme? theme,
  4. Widget iconBuilder(
    1. bool saveGpsLocation
    )?,
  5. void onLocationTap(
    1. PhotoCameraState state,
    2. bool saveGpsLocation
    )?,
})

Implementation

AwesomeLocationButton({
  super.key,
  required this.state,
  this.theme,
  Widget Function(bool saveGpsLocation)? iconBuilder,
  void Function(PhotoCameraState state, bool saveGpsLocation)? onLocationTap,
})  : iconBuilder = iconBuilder ??
          ((saveGpsLocation) {
            return AwesomeCircleWidget.icon(
              theme: theme,
              icon: saveGpsLocation == true
                  ? Icons.location_pin
                  : Icons.location_off_outlined,
            );
          }),
      onLocationTap = onLocationTap ??
          ((state, saveGpsLocation) =>
              state.shouldSaveGpsLocation(saveGpsLocation));