mirror of
https://github.com/vodemn/m3_lightmeter.git
synced 2024-11-24 08:20:40 +00:00
Compare commits
6 commits
8cf5d38c37
...
1b508ca894
Author | SHA1 | Date | |
---|---|---|---|
|
1b508ca894 | ||
|
60323f4856 | ||
|
cb6880da49 | ||
|
d6fa69400a | ||
|
a2b4c88256 | ||
|
d09542cede |
3 changed files with 35 additions and 10 deletions
|
@ -47,7 +47,7 @@
|
|||
"film": "Film",
|
||||
"filmPush": "Film (push)",
|
||||
"filmPull": "Film (pull)",
|
||||
"filmReciprocityHint": "Applies correction for shutter speeds grater than 1 second",
|
||||
"filmReciprocityHint": "Applies correction for shutter speeds greater 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"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -191,7 +191,6 @@ 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!,
|
||||
|
@ -291,7 +290,6 @@ class _AnimatedOverlay extends StatelessWidget {
|
|||
}
|
||||
|
||||
class _AnimatedSwitcher extends StatelessWidget {
|
||||
final Animation<Size?> sizeAnimation;
|
||||
final Animation<double> closedOpacityAnimation;
|
||||
final Animation<double> openedOpacityAnimation;
|
||||
final Size closedSize;
|
||||
|
@ -300,7 +298,6 @@ class _AnimatedSwitcher extends StatelessWidget {
|
|||
final Widget openedChild;
|
||||
|
||||
const _AnimatedSwitcher({
|
||||
required this.sizeAnimation,
|
||||
required this.closedOpacityAnimation,
|
||||
required this.openedOpacityAnimation,
|
||||
required this.closedSize,
|
||||
|
@ -316,17 +313,21 @@ class _AnimatedSwitcher extends StatelessWidget {
|
|||
children: [
|
||||
Opacity(
|
||||
opacity: closedOpacityAnimation.value,
|
||||
child: Transform.scale(
|
||||
scale: sizeAnimation.value!.width / closedSize.width,
|
||||
child: SizedBox(
|
||||
width: closedSize.width,
|
||||
child: FittedBox(
|
||||
child: SizedBox.fromSize(
|
||||
size: closedSize,
|
||||
child: closedChild,
|
||||
),
|
||||
),
|
||||
),
|
||||
Opacity(
|
||||
opacity: openedOpacityAnimation.value,
|
||||
child: openedChild,
|
||||
child: FittedBox(
|
||||
child: SizedBox.fromSize(
|
||||
size: openedSize,
|
||||
child: openedChild,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
|
|
24
test/utils/ev_from_bytes_test.dart
Normal file
24
test/utils/ev_from_bytes_test.dart
Normal file
|
@ -0,0 +1,24 @@
|
|||
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));
|
||||
},
|
||||
);
|
||||
});
|
||||
}
|
Loading…
Reference in a new issue