mirror of
https://github.com/vodemn/m3_lightmeter.git
synced 2024-11-22 07:20:39 +00:00
moved center button size to the bar itself
This commit is contained in:
parent
41353c9383
commit
04bd00b2c0
3 changed files with 40 additions and 43 deletions
|
@ -55,8 +55,6 @@ class _MeteringMeasureButtonState extends State<MeteringMeasureButton> {
|
||||||
_isPressed = false;
|
_isPressed = false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
child: SizedBox.fromSize(
|
|
||||||
size: const Size.square(Dimens.grid72),
|
|
||||||
child: Stack(
|
child: Stack(
|
||||||
children: [
|
children: [
|
||||||
Center(
|
Center(
|
||||||
|
@ -82,7 +80,6 @@ class _MeteringMeasureButtonState extends State<MeteringMeasureButton> {
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,8 +3,8 @@ import 'package:lightmeter/res/dimens.dart';
|
||||||
|
|
||||||
class BottomControlsBar extends StatelessWidget {
|
class BottomControlsBar extends StatelessWidget {
|
||||||
final Widget center;
|
final Widget center;
|
||||||
final IconButton? left;
|
final Widget? left;
|
||||||
final IconButton? right;
|
final Widget? right;
|
||||||
|
|
||||||
const BottomControlsBar({
|
const BottomControlsBar({
|
||||||
required this.center,
|
required this.center,
|
||||||
|
@ -42,7 +42,10 @@ class BottomControlsBar extends StatelessWidget {
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||||
children: [
|
children: [
|
||||||
if (left != null) Expanded(child: Center(child: left)) else const Spacer(),
|
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(),
|
if (right != null) Expanded(child: Center(child: right)) else const Spacer(),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|
|
@ -75,7 +75,6 @@ class _TimerScreenState extends State<TimerScreen> with TickerProviderStateMixin
|
||||||
fontSize: Dimens.grid24,
|
fontSize: Dimens.grid24,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
actions: [if (Navigator.of(context).canPop()) const CloseButton()],
|
|
||||||
),
|
),
|
||||||
body: SafeArea(
|
body: SafeArea(
|
||||||
bottom: false,
|
bottom: false,
|
||||||
|
@ -108,9 +107,7 @@ class _TimerScreenState extends State<TimerScreen> with TickerProviderStateMixin
|
||||||
},
|
},
|
||||||
icon: const Icon(Icons.restore),
|
icon: const Icon(Icons.restore),
|
||||||
),
|
),
|
||||||
center: SizedBox.fromSize(
|
center: BlocBuilder<TimerBloc, TimerState>(
|
||||||
size: const Size.square(Dimens.grid72),
|
|
||||||
child: BlocBuilder<TimerBloc, TimerState>(
|
|
||||||
builder: (_, state) => FloatingActionButton(
|
builder: (_, state) => FloatingActionButton(
|
||||||
shape: state is TimerResumedState ? null : const CircleBorder(),
|
shape: state is TimerResumedState ? null : const CircleBorder(),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
|
@ -126,7 +123,7 @@ class _TimerScreenState extends State<TimerScreen> with TickerProviderStateMixin
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
right: Navigator.of(context).canPop() ? const CloseButton() : null,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|
Loading…
Reference in a new issue