AwesomeLocationButton constructor
AwesomeLocationButton({
- Key? key,
- required PhotoCameraState state,
- AwesomeTheme? theme,
- Widget iconBuilder(
- bool saveGpsLocation
- void onLocationTap(
- PhotoCameraState state,
- 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));