added border radius to overlays

This commit is contained in:
Vadim 2022-10-29 14:06:39 +03:00
parent 3c1f803e25
commit 2300c828b1
2 changed files with 105 additions and 93 deletions

View file

@ -18,27 +18,33 @@ class MeteringBottomControls extends StatelessWidget {
@override
Widget build(BuildContext context) {
return ColoredBox(
color: Theme.of(context).colorScheme.surface,
child: SafeArea(
top: false,
child: Padding(
padding: const EdgeInsets.all(Dimens.paddingM),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
MeteringBottomControlsSideButton(
onPressed: onSourceChanged,
icon: Icons.flip_camera_android,
),
MeteringMeasureButton(
onTap: onMeasure,
),
MeteringBottomControlsSideButton(
onPressed: onSettings,
icon: Icons.settings,
),
],
return ClipRRect(
borderRadius: const BorderRadius.only(
topLeft: Radius.circular(Dimens.borderRadiusL),
topRight: Radius.circular(Dimens.borderRadiusL),
),
child: ColoredBox(
color: Theme.of(context).colorScheme.surface,
child: SafeArea(
top: false,
child: Padding(
padding: const EdgeInsets.symmetric(vertical: Dimens.paddingM),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
MeteringBottomControlsSideButton(
onPressed: onSourceChanged,
icon: Icons.flip_camera_android,
),
MeteringMeasureButton(
onTap: onMeasure,
),
MeteringBottomControlsSideButton(
onPressed: onSettings,
icon: Icons.settings,
),
],
),
),
),
),

View file

@ -22,85 +22,91 @@ class MeteringTopBar extends StatelessWidget {
Widget build(BuildContext context) {
final columnWidth =
(MediaQuery.of(context).size.width - Dimens.paddingM * 2 - Dimens.grid16 * (_columnsCount - 1)) / 3;
return ColoredBox(
color: Theme.of(context).colorScheme.surface,
child: Padding(
padding: const EdgeInsets.all(Dimens.paddingM),
child: SafeArea(
bottom: false,
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
SizedBox(
height: columnWidth / 3 * 4,
child: ReadingContainer(
values: const [
ReadingValue(
label: 'Fastest',
value: 'f/5.6 - 1/2000',
return ClipRRect(
borderRadius: const BorderRadius.only(
bottomLeft: Radius.circular(Dimens.borderRadiusL),
bottomRight: Radius.circular(Dimens.borderRadiusL),
),
child: ColoredBox(
color: Theme.of(context).colorScheme.surface,
child: Padding(
padding: const EdgeInsets.all(Dimens.paddingM),
child: SafeArea(
bottom: false,
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
SizedBox(
height: columnWidth / 3 * 4,
child: ReadingContainer(
values: const [
ReadingValue(
label: 'Fastest',
value: 'f/5.6 - 1/2000',
),
ReadingValue(
label: 'Slowest',
value: 'f/45 - 1/30',
),
],
),
),
const _InnerPadding(),
Row(
children: [
SizedBox(
width: columnWidth,
child: ReadingContainer.singleValue(
value: ReadingValue(
label: 'EV',
value: ev.toString(),
),
),
),
ReadingValue(
label: 'Slowest',
value: 'f/45 - 1/30',
const _InnerPadding(),
SizedBox(
width: columnWidth,
child: ReadingContainer.singleValue(
value: ReadingValue(
label: 'ISO',
value: iso.toString(),
),
),
),
],
),
),
const _InnerPadding(),
Row(
children: [
SizedBox(
width: columnWidth,
child: ReadingContainer.singleValue(
value: ReadingValue(
label: 'EV',
value: ev.toString(),
),
),
),
const _InnerPadding(),
SizedBox(
width: columnWidth,
child: ReadingContainer.singleValue(
value: ReadingValue(
label: 'ISO',
value: iso.toString(),
),
),
),
],
)
],
)
],
),
),
),
const _InnerPadding(),
SizedBox(
width: columnWidth,
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
ClipRRect(
borderRadius: BorderRadius.circular(Dimens.borderRadiusM),
child: const AspectRatio(
aspectRatio: 3 / 4,
child: ColoredBox(color: Colors.black),
const _InnerPadding(),
SizedBox(
width: columnWidth,
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
ClipRRect(
borderRadius: BorderRadius.circular(Dimens.borderRadiusM),
child: const AspectRatio(
aspectRatio: 3 / 4,
child: ColoredBox(color: Colors.black),
),
),
),
const _InnerPadding(),
ReadingContainer.singleValue(
value: ReadingValue(
label: 'ND',
value: nd.toString(),
const _InnerPadding(),
ReadingContainer.singleValue(
value: ReadingValue(
label: 'ND',
value: nd.toString(),
),
),
),
],
],
),
),
),
],
],
),
),
),
),