mirror of
https://github.com/vodemn/m3_lightmeter.git
synced 2025-04-19 07:50:39 +00:00
Compare commits
No commits in common. "91f90ae8e825d2d9cbe859e3952e725c8e14e775" and "f0110e0edfd9a6db5a0e39deeadb36654ebefbf0" have entirely different histories.
91f90ae8e8
...
f0110e0edf
5 changed files with 42 additions and 87 deletions
|
@ -1,3 +0,0 @@
|
||||||
- Fixed histogram being affected by spot metering.
|
|
||||||
- Improved text fields focus handling.
|
|
||||||
- Added German translation.
|
|
|
@ -109,17 +109,17 @@ void testE2E(String description) {
|
||||||
);
|
);
|
||||||
|
|
||||||
/// Add ND to shoot another scene
|
/// Add ND to shoot another scene
|
||||||
// await tester.openPickerAndSelect<NdValuePicker, NdValue>('2');
|
await tester.openPickerAndSelect<NdValuePicker, NdValue>('2');
|
||||||
// await _expectMeteringStateAndMeasure(
|
await _expectMeteringStateAndMeasure(
|
||||||
// tester,
|
tester,
|
||||||
// equipmentProfile: mockEquipmentProfiles[0],
|
equipmentProfile: mockEquipmentProfiles[0],
|
||||||
// film: mockFilms[0],
|
film: mockFilms[0],
|
||||||
// fastest: 'f/1.8 - 1/200',
|
fastest: 'f/1.8 - 1/200',
|
||||||
// slowest: 'f/16 - 1/2.5',
|
slowest: 'f/16 - 1/2.5',
|
||||||
// iso: '400',
|
iso: '400',
|
||||||
// nd: '2',
|
nd: '2',
|
||||||
// ev: mockPhotoEv100 + 2 - 1,
|
ev: mockPhotoEv100 + 2 - 1,
|
||||||
// );
|
);
|
||||||
|
|
||||||
/// Select another lens without ND
|
/// Select another lens without ND
|
||||||
await tester.openPickerAndSelect<EquipmentProfilePicker, EquipmentProfile>(mockEquipmentProfiles[1].name);
|
await tester.openPickerAndSelect<EquipmentProfilePicker, EquipmentProfile>(mockEquipmentProfiles[1].name);
|
||||||
|
|
|
@ -137,7 +137,6 @@ class _NameFieldBuilder extends StatelessWidget {
|
||||||
bottom: Dimens.paddingS / 2,
|
bottom: Dimens.paddingS / 2,
|
||||||
),
|
),
|
||||||
child: LightmeterTextField(
|
child: LightmeterTextField(
|
||||||
autofocus: true,
|
|
||||||
initialValue: state.name,
|
initialValue: state.name,
|
||||||
maxLength: 48,
|
maxLength: 48,
|
||||||
hintText: S.of(context).name,
|
hintText: S.of(context).name,
|
||||||
|
|
|
@ -1,74 +1,33 @@
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/services.dart';
|
|
||||||
|
|
||||||
class LightmeterTextField extends StatefulWidget {
|
class LightmeterTextField extends TextFormField {
|
||||||
const LightmeterTextField({
|
LightmeterTextField({
|
||||||
this.autofocus = false,
|
super.controller,
|
||||||
this.controller,
|
super.autofocus,
|
||||||
this.hintText,
|
super.initialValue,
|
||||||
this.initialValue,
|
super.inputFormatters,
|
||||||
this.inputFormatters,
|
super.maxLength,
|
||||||
this.leading,
|
super.onChanged,
|
||||||
this.maxLength,
|
super.style,
|
||||||
this.onChanged,
|
super.textAlign,
|
||||||
this.style,
|
Widget? leading,
|
||||||
this.textAlign = TextAlign.start,
|
String? hintText,
|
||||||
});
|
}) : super(
|
||||||
|
autovalidateMode: AutovalidateMode.onUserInteraction,
|
||||||
final bool autofocus;
|
maxLines: 1,
|
||||||
final TextEditingController? controller;
|
decoration: InputDecoration(
|
||||||
final String? hintText;
|
counter: const SizedBox(),
|
||||||
final String? initialValue;
|
contentPadding: EdgeInsets.zero,
|
||||||
final List<TextInputFormatter>? inputFormatters;
|
errorStyle: const TextStyle(fontSize: 0),
|
||||||
final Widget? leading;
|
icon: leading,
|
||||||
final int? maxLength;
|
hintText: hintText,
|
||||||
final void Function(String)? onChanged;
|
),
|
||||||
final TextStyle? style;
|
validator: (value) {
|
||||||
final TextAlign textAlign;
|
if (value == null || value.isEmpty) {
|
||||||
|
return '';
|
||||||
@override
|
} else {
|
||||||
State<LightmeterTextField> createState() => _LightmeterTextFieldState();
|
return null;
|
||||||
}
|
}
|
||||||
|
},
|
||||||
class _LightmeterTextFieldState extends State<LightmeterTextField> {
|
);
|
||||||
late final focusNode = FocusNode(debugLabel: widget.hintText);
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
return TextFormField(
|
|
||||||
autofocus: widget.autofocus,
|
|
||||||
autovalidateMode: AutovalidateMode.onUserInteraction,
|
|
||||||
controller: widget.controller,
|
|
||||||
focusNode: focusNode,
|
|
||||||
initialValue: widget.initialValue,
|
|
||||||
inputFormatters: widget.inputFormatters,
|
|
||||||
maxLength: widget.maxLength,
|
|
||||||
onChanged: widget.onChanged,
|
|
||||||
style: widget.style,
|
|
||||||
textAlign: widget.textAlign,
|
|
||||||
decoration: InputDecoration(
|
|
||||||
counter: const SizedBox(),
|
|
||||||
contentPadding: EdgeInsets.zero,
|
|
||||||
errorStyle: const TextStyle(fontSize: 0),
|
|
||||||
icon: widget.leading,
|
|
||||||
hintText: widget.hintText,
|
|
||||||
),
|
|
||||||
onTapOutside: (event) {
|
|
||||||
focusNode.unfocus();
|
|
||||||
},
|
|
||||||
validator: (value) {
|
|
||||||
if (value == null || value.isEmpty) {
|
|
||||||
return '';
|
|
||||||
} else {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
void dispose() {
|
|
||||||
focusNode.dispose();
|
|
||||||
super.dispose();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
name: lightmeter
|
name: lightmeter
|
||||||
description: Lightmeter app inspired by Material 3 design system.
|
description: Lightmeter app inspired by Material 3 design system.
|
||||||
publish_to: "none"
|
publish_to: "none"
|
||||||
version: 1.0.4+59
|
version: 1.0.3+58
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: ">=3.0.0 <4.0.0"
|
sdk: ">=3.0.0 <4.0.0"
|
||||||
|
|
Loading…
Reference in a new issue