animated EquipmentProfileContainer

This commit is contained in:
Vadim 2023-03-23 07:38:45 +03:00
parent 2e9d49eb06
commit a12c9b8558
2 changed files with 31 additions and 24 deletions

View file

@ -104,14 +104,18 @@ class EquipmentProfileContainerState extends State<EquipmentProfileContainer> {
),
],
),
if (_expanded)
EquipmentListTiles(
AnimatedSize(
alignment: Alignment.topCenter,
duration: Dimens.durationM,
child: _expanded
? EquipmentListTiles(
selectedApertureValues: _equipmentProfileData.apertureValues,
selectedIsoValues: _equipmentProfileData.isoValues,
selectedNdValues: _equipmentProfileData.ndValues,
selectedShutterSpeedValues: _equipmentProfileData.shutterSpeedValues,
onApertureValuesSelected: (value) {
_equipmentProfileData = _equipmentProfileData.copyWith(apertureValues: value);
_equipmentProfileData =
_equipmentProfileData.copyWith(apertureValues: value);
widget.onUpdate(_equipmentProfileData);
},
onIsoValuesSelecred: (value) {
@ -123,9 +127,12 @@ class EquipmentProfileContainerState extends State<EquipmentProfileContainer> {
widget.onUpdate(_equipmentProfileData);
},
onShutterSpeedValuesSelected: (value) {
_equipmentProfileData = _equipmentProfileData.copyWith(shutterSpeedValues: value);
_equipmentProfileData =
_equipmentProfileData.copyWith(shutterSpeedValues: value);
widget.onUpdate(_equipmentProfileData);
},
)
: Row(mainAxisSize: MainAxisSize.max),
),
],
),

View file

@ -14,7 +14,7 @@ class EquipmentProfilesListTile extends StatelessWidget {
title: Text(S.of(context).equipmentProfiles),
onTap: () {
Navigator.of(context).push<EquipmentProfileData>(
MaterialPageRoute(builder: (_) => const EquipmentProfileScreen()));
MaterialPageRoute(builder: (_) => const EquipmentProfilesScreen()));
},
);
}