Removed source-swap button

This commit is contained in:
Vadim 2023-01-20 23:39:01 +03:00
parent bdf03f708f
commit 02e5fc582c
3 changed files with 16 additions and 18 deletions

View file

@ -14,14 +14,16 @@ class MeteringSecondaryButton extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return FilledCircle( return Center(
color: Theme.of(context).colorScheme.surfaceVariant, child: FilledCircle(
size: 48, color: Theme.of(context).colorScheme.surfaceVariant,
child: Center( size: 48,
child: IconButton( child: Center(
onPressed: onPressed, child: IconButton(
color: Theme.of(context).colorScheme.onSurface, onPressed: onPressed,
icon: Icon(icon), color: Theme.of(context).colorScheme.onSurface,
icon: Icon(icon),
),
), ),
), ),
); );

View file

@ -5,12 +5,10 @@ import 'components/widget_button_measure.dart';
import 'components/widget_button_secondary.dart'; import 'components/widget_button_secondary.dart';
class MeteringBottomControls extends StatelessWidget { class MeteringBottomControls extends StatelessWidget {
final VoidCallback onSourceChanged;
final VoidCallback onMeasure; final VoidCallback onMeasure;
final VoidCallback onSettings; final VoidCallback onSettings;
const MeteringBottomControls({ const MeteringBottomControls({
required this.onSourceChanged,
required this.onMeasure, required this.onMeasure,
required this.onSettings, required this.onSettings,
super.key, super.key,
@ -32,16 +30,15 @@ class MeteringBottomControls extends StatelessWidget {
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly, mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [ children: [
MeteringSecondaryButton( const Spacer(),
onPressed: onSourceChanged,
icon: Icons.flip_camera_android,
),
MeteringMeasureButton( MeteringMeasureButton(
onTap: onMeasure, onTap: onMeasure,
), ),
MeteringSecondaryButton( Expanded(
onPressed: onSettings, child: MeteringSecondaryButton(
icon: Icons.settings, onPressed: onSettings,
icon: Icons.settings,
),
), ),
], ],
), ),

View file

@ -86,7 +86,6 @@ class _MeteringScreenState extends State<MeteringScreen> {
), ),
), ),
MeteringBottomControls( MeteringBottomControls(
onSourceChanged: () {},
onMeasure: () => context.read<MeteringBloc>().add(const MeasureEvent()), onMeasure: () => context.read<MeteringBloc>().add(const MeasureEvent()),
onSettings: () { onSettings: () {
Navigator.push(context, MaterialPageRoute(builder: (context) => const SettingsScreen())); Navigator.push(context, MaterialPageRoute(builder: (context) => const SettingsScreen()));