mirror of
https://github.com/vodemn/m3_lightmeter.git
synced 2025-08-05 04:36:41 +00:00
typo
This commit is contained in:
parent
d67b75cbca
commit
5363d22fb5
6 changed files with 10 additions and 10 deletions
|
@ -5,6 +5,6 @@ import 'package:lightmeter/screens/shared/animated_circular_button/widget_button
|
||||||
extension CommonFindersExtension on CommonFinders {
|
extension CommonFindersExtension on CommonFinders {
|
||||||
Finder measureButton() => find.descendant(
|
Finder measureButton() => find.descendant(
|
||||||
of: find.byType(MeteringBottomControls),
|
of: find.byType(MeteringBottomControls),
|
||||||
matching: find.byType(AnimatedCircluarButton),
|
matching: find.byType(AnimatedCircularButton),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,7 +40,7 @@ class MeteringBottomControls extends StatelessWidget {
|
||||||
: S.of(context).tooltipUseLightSensor,
|
: S.of(context).tooltipUseLightSensor,
|
||||||
)
|
)
|
||||||
: null,
|
: null,
|
||||||
center: AnimatedCircluarButton(
|
center: AnimatedCircularButton(
|
||||||
progress: isMetering ? null : 1.0,
|
progress: isMetering ? null : 1.0,
|
||||||
isPressed: isMetering,
|
isPressed: isMetering,
|
||||||
onPressed: onMeasure,
|
onPressed: onMeasure,
|
||||||
|
|
|
@ -2,13 +2,13 @@ import 'package:flutter/material.dart';
|
||||||
import 'package:lightmeter/res/dimens.dart';
|
import 'package:lightmeter/res/dimens.dart';
|
||||||
import 'package:lightmeter/screens/shared/filled_circle/widget_circle_filled.dart';
|
import 'package:lightmeter/screens/shared/filled_circle/widget_circle_filled.dart';
|
||||||
|
|
||||||
class AnimatedCircluarButton extends StatefulWidget {
|
class AnimatedCircularButton extends StatefulWidget {
|
||||||
final double? progress;
|
final double? progress;
|
||||||
final bool isPressed;
|
final bool isPressed;
|
||||||
final VoidCallback onPressed;
|
final VoidCallback onPressed;
|
||||||
final Widget? child;
|
final Widget? child;
|
||||||
|
|
||||||
const AnimatedCircluarButton({
|
const AnimatedCircularButton({
|
||||||
this.progress = 1.0,
|
this.progress = 1.0,
|
||||||
required this.isPressed,
|
required this.isPressed,
|
||||||
required this.onPressed,
|
required this.onPressed,
|
||||||
|
@ -17,14 +17,14 @@ class AnimatedCircluarButton extends StatefulWidget {
|
||||||
});
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<AnimatedCircluarButton> createState() => _AnimatedCircluarButtonState();
|
State<AnimatedCircularButton> createState() => _AnimatedCircularButtonState();
|
||||||
}
|
}
|
||||||
|
|
||||||
class _AnimatedCircluarButtonState extends State<AnimatedCircluarButton> {
|
class _AnimatedCircularButtonState extends State<AnimatedCircularButton> {
|
||||||
bool _isPressed = false;
|
bool _isPressed = false;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void didUpdateWidget(covariant AnimatedCircluarButton oldWidget) {
|
void didUpdateWidget(covariant AnimatedCircularButton oldWidget) {
|
||||||
super.didUpdateWidget(oldWidget);
|
super.didUpdateWidget(oldWidget);
|
||||||
if (oldWidget.isPressed != widget.isPressed) {
|
if (oldWidget.isPressed != widget.isPressed) {
|
||||||
_isPressed = widget.isPressed;
|
_isPressed = widget.isPressed;
|
||||||
|
|
|
@ -105,7 +105,7 @@ class TimerScreenState extends State<TimerScreen> with TickerProviderStateMixin
|
||||||
icon: const Icon(Icons.restore),
|
icon: const Icon(Icons.restore),
|
||||||
),
|
),
|
||||||
center: BlocBuilder<TimerBloc, TimerState>(
|
center: BlocBuilder<TimerBloc, TimerState>(
|
||||||
builder: (_, state) => AnimatedCircluarButton(
|
builder: (_, state) => AnimatedCircularButton(
|
||||||
isPressed: state is TimerResumedState,
|
isPressed: state is TimerResumedState,
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
if (timelineAnimation.value == 0) {
|
if (timelineAnimation.value == 0) {
|
||||||
|
|
|
@ -232,7 +232,7 @@ extension on WidgetTester {
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> mockTimerResumedState(ShutterSpeedValue shutterSpeedValue) async {
|
Future<void> mockTimerResumedState(ShutterSpeedValue shutterSpeedValue) async {
|
||||||
await tap(find.byType(AnimatedCircluarButton));
|
await tap(find.byType(AnimatedCircularButton));
|
||||||
await pump(Dimens.durationS);
|
await pump(Dimens.durationS);
|
||||||
|
|
||||||
late final skipTimerDuration =
|
late final skipTimerDuration =
|
||||||
|
|
|
@ -55,7 +55,7 @@ void main() {
|
||||||
Future<void> toggleTimer(WidgetTester tester, Key scenarioWidgetKey) async {
|
Future<void> toggleTimer(WidgetTester tester, Key scenarioWidgetKey) async {
|
||||||
final button = find.descendant(
|
final button = find.descendant(
|
||||||
of: find.byKey(scenarioWidgetKey),
|
of: find.byKey(scenarioWidgetKey),
|
||||||
matching: find.byType(AnimatedCircluarButton),
|
matching: find.byType(AnimatedCircularButton),
|
||||||
);
|
);
|
||||||
await tester.tap(button);
|
await tester.tap(button);
|
||||||
await tester.pump(Dimens.durationS);
|
await tester.pump(Dimens.durationS);
|
||||||
|
|
Loading…
Reference in a new issue