import 'package:equatable/equatable.dart'; class PhasesEnergyConsumption extends Equatable { final int month; final double phaseA; final double phaseB; final double phaseC; const PhasesEnergyConsumption({ required this.month, required this.phaseA, required this.phaseB, required this.phaseC, }); @override List get props => [month, phaseA, phaseB, phaseC]; factory PhasesEnergyConsumption.fromJson(Map json) { return PhasesEnergyConsumption( month: json['month'] as int, phaseA: (json['phaseA'] as num).toDouble(), phaseB: (json['phaseB'] as num).toDouble(), phaseC: (json['phaseC'] as num).toDouble(), ); } }