diff --git a/lib/screens/metering/components/bottom_controls/components/measure_button/widget_button_measure.dart b/lib/screens/metering/components/bottom_controls/components/measure_button/widget_button_measure.dart index e918557..7104d5b 100644 --- a/lib/screens/metering/components/bottom_controls/components/measure_button/widget_button_measure.dart +++ b/lib/screens/metering/components/bottom_controls/components/measure_button/widget_button_measure.dart @@ -55,33 +55,30 @@ class _MeteringMeasureButtonState extends State { _isPressed = false; }); }, - child: SizedBox.fromSize( - size: const Size.square(Dimens.grid72), - child: Stack( - children: [ - Center( - child: AnimatedScale( - duration: Dimens.durationS, - scale: _isPressed ? 0.9 : 1.0, - child: FilledCircle( - color: Theme.of(context).colorScheme.onSurface, - size: Dimens.grid72 - Dimens.grid8, - child: Center( - child: widget.ev != null ? _EvValueText(ev: widget.ev!, ev100: widget.ev100!) : null, - ), + child: Stack( + children: [ + Center( + child: AnimatedScale( + duration: Dimens.durationS, + scale: _isPressed ? 0.9 : 1.0, + child: FilledCircle( + color: Theme.of(context).colorScheme.onSurface, + size: Dimens.grid72 - Dimens.grid8, + child: Center( + child: widget.ev != null ? _EvValueText(ev: widget.ev!, ev100: widget.ev100!) : null, ), ), ), - Positioned.fill( - child: CircularProgressIndicator( - /// This key is needed to make indicator start from the same point every time - key: ValueKey(widget.isMetering), - color: Theme.of(context).colorScheme.onSurface, - value: widget.isMetering ? null : 1, - ), + ), + Positioned.fill( + child: CircularProgressIndicator( + /// This key is needed to make indicator start from the same point every time + key: ValueKey(widget.isMetering), + color: Theme.of(context).colorScheme.onSurface, + value: widget.isMetering ? null : 1, ), - ], - ), + ), + ], ), ); } diff --git a/lib/screens/shared/bottom_controls_bar/widget_bottom_controls_bar.dart b/lib/screens/shared/bottom_controls_bar/widget_bottom_controls_bar.dart index b8ad576..bbe9c98 100644 --- a/lib/screens/shared/bottom_controls_bar/widget_bottom_controls_bar.dart +++ b/lib/screens/shared/bottom_controls_bar/widget_bottom_controls_bar.dart @@ -3,8 +3,8 @@ import 'package:lightmeter/res/dimens.dart'; class BottomControlsBar extends StatelessWidget { final Widget center; - final IconButton? left; - final IconButton? right; + final Widget? left; + final Widget? right; const BottomControlsBar({ required this.center, @@ -42,7 +42,10 @@ class BottomControlsBar extends StatelessWidget { mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: [ if (left != null) Expanded(child: Center(child: left)) else const Spacer(), - center, + SizedBox.fromSize( + size: const Size.square(Dimens.grid72), + child: center, + ), if (right != null) Expanded(child: Center(child: right)) else const Spacer(), ], ), diff --git a/lib/screens/timer/screen_timer.dart b/lib/screens/timer/screen_timer.dart index 0ab9a91..10343f3 100644 --- a/lib/screens/timer/screen_timer.dart +++ b/lib/screens/timer/screen_timer.dart @@ -75,7 +75,6 @@ class _TimerScreenState extends State with TickerProviderStateMixin fontSize: Dimens.grid24, ), ), - actions: [if (Navigator.of(context).canPop()) const CloseButton()], ), body: SafeArea( bottom: false, @@ -108,25 +107,23 @@ class _TimerScreenState extends State with TickerProviderStateMixin }, icon: const Icon(Icons.restore), ), - center: SizedBox.fromSize( - size: const Size.square(Dimens.grid72), - child: BlocBuilder( - builder: (_, state) => FloatingActionButton( - shape: state is TimerResumedState ? null : const CircleBorder(), - onPressed: () { - if (timelineAnimation.value == 0) { - return; - } - final event = state is TimerStoppedState ? const StartTimerEvent() : const StopTimerEvent(); - context.read().add(event); - }, - child: AnimatedIcon( - icon: AnimatedIcons.play_pause, - progress: startStopIconAnimation, - ), + center: BlocBuilder( + builder: (_, state) => FloatingActionButton( + shape: state is TimerResumedState ? null : const CircleBorder(), + onPressed: () { + if (timelineAnimation.value == 0) { + return; + } + final event = state is TimerStoppedState ? const StartTimerEvent() : const StopTimerEvent(); + context.read().add(event); + }, + child: AnimatedIcon( + icon: AnimatedIcons.play_pause, + progress: startStopIconAnimation, ), ), ), + right: Navigator.of(context).canPop() ? const CloseButton() : null, ), ], ),