Compare commits

..

No commits in common. "1b508ca894bd65ba22a235dbeefbb76b6023e54d" and "8cf5d38c37adc4d9b715182e180519b50d84928f" have entirely different histories.

3 changed files with 10 additions and 35 deletions

View file

@ -47,7 +47,7 @@
"film": "Film",
"filmPush": "Film (push)",
"filmPull": "Film (pull)",
"filmReciprocityHint": "Applies correction for shutter speeds greater than 1 second",
"filmReciprocityHint": "Applies correction for shutter speeds grater than 1 second",
"equipmentProfileName": "Equipment profile name",
"equipmentProfileNameHint": "Praktica MTL5B",
"equipmentProfileAllValues": "All",
@ -112,4 +112,4 @@
"tooltipUseLightSensor": "Use lightsensor",
"tooltipUseCamera": "Use camera",
"tooltipOpenSettings": "Open settings"
}
}

View file

@ -191,6 +191,7 @@ class AnimatedDialogState extends State<AnimatedDialog> with SingleTickerProvide
onDismiss: close,
builder: widget.closedChild != null && widget.openedChild != null
? (_) => _AnimatedSwitcher(
sizeAnimation: _sizeAnimation,
closedOpacityAnimation: _closedOpacityAnimation,
openedOpacityAnimation: _openedOpacityAnimation,
closedSize: _sizeTween.begin!,
@ -290,6 +291,7 @@ class _AnimatedOverlay extends StatelessWidget {
}
class _AnimatedSwitcher extends StatelessWidget {
final Animation<Size?> sizeAnimation;
final Animation<double> closedOpacityAnimation;
final Animation<double> openedOpacityAnimation;
final Size closedSize;
@ -298,6 +300,7 @@ class _AnimatedSwitcher extends StatelessWidget {
final Widget openedChild;
const _AnimatedSwitcher({
required this.sizeAnimation,
required this.closedOpacityAnimation,
required this.openedOpacityAnimation,
required this.closedSize,
@ -313,21 +316,17 @@ class _AnimatedSwitcher extends StatelessWidget {
children: [
Opacity(
opacity: closedOpacityAnimation.value,
child: FittedBox(
child: SizedBox.fromSize(
size: closedSize,
child: Transform.scale(
scale: sizeAnimation.value!.width / closedSize.width,
child: SizedBox(
width: closedSize.width,
child: closedChild,
),
),
),
Opacity(
opacity: openedOpacityAnimation.value,
child: FittedBox(
child: SizedBox.fromSize(
size: openedSize,
child: openedChild,
),
),
child: openedChild,
),
],
);

View file

@ -1,24 +0,0 @@
import 'dart:io';
import 'package:flutter_test/flutter_test.dart';
import 'package:lightmeter/utils/ev_from_bytes.dart';
void main() {
group('evFromImage', () {
test(
'camera_stub_image.jpg',
() {
final bytes = File('assets/camera_stub_image.jpg').readAsBytesSync();
expectLater(evFromImage(bytes), completion(8.25230310752341));
},
);
test(
'no EXIF',
() {
final bytes = File('assets/launcher_icon_dev_512.png').readAsBytesSync();
expectLater(evFromImage(bytes), completion(null));
},
);
});
}