Renamed EquipmentProfileData ->EquipmentProfile

This commit is contained in:
Vadim 2023-07-19 16:29:56 +02:00
parent cb675e43e1
commit 8595aae00f
5 changed files with 10 additions and 10 deletions

View file

@ -6,7 +6,7 @@ sealed class MeteringEvent {
} }
class EquipmentProfileChangedEvent extends MeteringEvent { class EquipmentProfileChangedEvent extends MeteringEvent {
final EquipmentProfileData equipmentProfileData; final EquipmentProfile equipmentProfileData;
const EquipmentProfileChangedEvent(this.equipmentProfileData); const EquipmentProfileChangedEvent(this.equipmentProfileData);
} }

View file

@ -8,8 +8,8 @@ import 'package:lightmeter/screens/settings/components/metering/components/equip
import 'package:m3_lightmeter_resources/m3_lightmeter_resources.dart'; import 'package:m3_lightmeter_resources/m3_lightmeter_resources.dart';
class EquipmentProfileContainer extends StatefulWidget { class EquipmentProfileContainer extends StatefulWidget {
final EquipmentProfileData data; final EquipmentProfile data;
final ValueChanged<EquipmentProfileData> onUpdate; final ValueChanged<EquipmentProfile> onUpdate;
final VoidCallback onDelete; final VoidCallback onDelete;
final VoidCallback onExpand; final VoidCallback onExpand;
@ -27,7 +27,7 @@ class EquipmentProfileContainer extends StatefulWidget {
class EquipmentProfileContainerState extends State<EquipmentProfileContainer> class EquipmentProfileContainerState extends State<EquipmentProfileContainer>
with TickerProviderStateMixin { with TickerProviderStateMixin {
late EquipmentProfileData _equipmentData = EquipmentProfileData( late EquipmentProfile _equipmentData = EquipmentProfile(
id: widget.data.id, id: widget.data.id,
name: widget.data.name, name: widget.data.name,
apertureValues: widget.data.apertureValues, apertureValues: widget.data.apertureValues,
@ -45,7 +45,7 @@ class EquipmentProfileContainerState extends State<EquipmentProfileContainer>
@override @override
void didUpdateWidget(EquipmentProfileContainer oldWidget) { void didUpdateWidget(EquipmentProfileContainer oldWidget) {
super.didUpdateWidget(oldWidget); super.didUpdateWidget(oldWidget);
_equipmentData = EquipmentProfileData( _equipmentData = EquipmentProfile(
id: widget.data.id, id: widget.data.id,
name: widget.data.name, name: widget.data.name,
apertureValues: widget.data.apertureValues, apertureValues: widget.data.apertureValues,
@ -196,7 +196,7 @@ class _AnimatedArrowButton extends AnimatedWidget {
} }
class _AnimatedEquipmentListTiles extends AnimatedWidget { class _AnimatedEquipmentListTiles extends AnimatedWidget {
final EquipmentProfileData equipmentData; final EquipmentProfile equipmentData;
final ValueChanged<List<ApertureValue>> onApertureValuesSelected; final ValueChanged<List<ApertureValue>> onApertureValuesSelected;
final ValueChanged<List<IsoValue>> onIsoValuesSelecred; final ValueChanged<List<IsoValue>> onIsoValuesSelecred;
final ValueChanged<List<NdValue>> onNdValuesSelected; final ValueChanged<List<NdValue>> onNdValuesSelected;

View file

@ -17,7 +17,7 @@ class EquipmentProfilesListTile extends StatelessWidget {
onTap: () { onTap: () {
if (context.get<Environment>().buildType == BuildType.dev || if (context.get<Environment>().buildType == BuildType.dev ||
IAPProducts.isPurchased(context, IAPProductType.paidFeatures)) { IAPProducts.isPurchased(context, IAPProductType.paidFeatures)) {
Navigator.of(context).push<EquipmentProfileData>( Navigator.of(context).push<EquipmentProfile>(
MaterialPageRoute(builder: (_) => const EquipmentProfilesScreen()), MaterialPageRoute(builder: (_) => const EquipmentProfilesScreen()),
); );
} else { } else {

View file

@ -495,7 +495,7 @@ void main() {
group( group(
'`EquipmentProfileChangedEvent`', '`EquipmentProfileChangedEvent`',
() { () {
final reducedProfile = EquipmentProfileData( final reducedProfile = EquipmentProfile(
id: '0', id: '0',
name: 'Reduced', name: 'Reduced',
apertureValues: ApertureValue.values, apertureValues: ApertureValue.values,

View file

@ -5,7 +5,7 @@ import 'package:lightmeter/screens/metering/screen_metering.dart';
import 'package:m3_lightmeter_resources/m3_lightmeter_resources.dart'; import 'package:m3_lightmeter_resources/m3_lightmeter_resources.dart';
void main() { void main() {
const defaultEquipmentProfile = EquipmentProfileData( const defaultEquipmentProfile = EquipmentProfile(
id: "", id: "",
name: 'Default', name: 'Default',
apertureValues: ApertureValue.values, apertureValues: ApertureValue.values,
@ -334,7 +334,7 @@ void main() {
}); });
group('Reduced equipment profile', () { group('Reduced equipment profile', () {
final equipmentProfile = EquipmentProfileData( final equipmentProfile = EquipmentProfile(
id: "1", id: "1",
name: 'Test1', name: 'Test1',
apertureValues: ApertureValue.values.sublist(4), apertureValues: ApertureValue.values.sublist(4),