diff --git a/lib/features/sensors/calibration_sheet.dart b/lib/features/sensors/calibration_sheet.dart index 1657dc8..e261a5a 100644 --- a/lib/features/sensors/calibration_sheet.dart +++ b/lib/features/sensors/calibration_sheet.dart @@ -806,10 +806,12 @@ class _RingAreaState extends State<_RingArea> with TickerProviderStateMixin { ], ) else if (widget.onStart != null) - _AsyncButton( - onPressed: widget.onStart!, - label: 'Start', - compact: true, + Positioned.fill( + child: _AsyncButton( + onPressed: widget.onStart!, + label: 'Start', + circular: true, + ), ), ], ), @@ -952,6 +954,7 @@ class _AsyncButton extends StatefulWidget { required this.label, this.icon, this.compact = false, + this.circular = false, this.enabled = true, }); @@ -959,6 +962,7 @@ class _AsyncButton extends StatefulWidget { final String label; final IconData? icon; final bool compact; + final bool circular; final bool enabled; @override @@ -992,6 +996,22 @@ class _AsyncButtonState extends State<_AsyncButton> { final canPress = !_loading && widget.enabled; + if (widget.circular) { + final cs = Theme.of(context).colorScheme; + return SizedBox.expand( + child: TextButton( + style: TextButton.styleFrom( + shape: const CircleBorder(), + foregroundColor: cs.primary, + overlayColor: cs.onSurface, + padding: EdgeInsets.zero, + ), + onPressed: canPress ? _run : null, + child: child, + ), + ); + } + if (widget.compact) { return TextButton( style: TextButton.styleFrom(shape: shape, textStyle: const TextStyle(fontSize: 36, color: Colors.black)),