mirror of
https://github.com/vodemn/m3_lightmeter.git
synced 2024-11-24 08:20:40 +00:00
added items count check
This commit is contained in:
parent
b6e377959f
commit
050c0f3ea3
1 changed files with 3 additions and 0 deletions
|
@ -78,6 +78,9 @@ class MeteringBloc extends Bloc<MeteringEvent, MeteringState> {
|
|||
int itemsCount = min(_apertureValues.length + shutterSpeedOffset, _shutterSpeedValues.length + apertureOffset) -
|
||||
max(apertureOffset, shutterSpeedOffset);
|
||||
|
||||
if (itemsCount < 0) {
|
||||
return List.empty(growable: false);
|
||||
}
|
||||
return List.generate(
|
||||
itemsCount,
|
||||
(index) => ExposurePair(
|
||||
|
|
Loading…
Reference in a new issue