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", "film": "Film",
"filmPush": "Film (push)", "filmPush": "Film (push)",
"filmPull": "Film (pull)", "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", "equipmentProfileName": "Equipment profile name",
"equipmentProfileNameHint": "Praktica MTL5B", "equipmentProfileNameHint": "Praktica MTL5B",
"equipmentProfileAllValues": "All", "equipmentProfileAllValues": "All",
@ -112,4 +112,4 @@
"tooltipUseLightSensor": "Use lightsensor", "tooltipUseLightSensor": "Use lightsensor",
"tooltipUseCamera": "Use camera", "tooltipUseCamera": "Use camera",
"tooltipOpenSettings": "Open settings" "tooltipOpenSettings": "Open settings"
} }

View file

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