formatted all files.

This commit is contained in:
Faris Armoush
2025-06-12 15:33:32 +03:00
parent 29959f567e
commit 04250ebc98
474 changed files with 5425 additions and 4338 deletions

View File

@ -5,7 +5,8 @@ import 'package:syncrow_web/utils/constants/assets.dart';
class PhaseWidget extends StatefulWidget {
final List<Map<String, dynamic>> phaseData;
PhaseWidget({
const PhaseWidget({
super.key,
required this.phaseData,
});
@override
@ -19,7 +20,7 @@ class _PhaseWidgetState extends State<PhaseWidget> {
Widget build(BuildContext context) {
return Column(
children: [
SizedBox(height: 10),
const SizedBox(height: 10),
Row(
children: List.generate(widget.phaseData.length, (index) {
return InkWell(
@ -43,27 +44,28 @@ class _PhaseWidgetState extends State<PhaseWidget> {
);
}),
),
SizedBox(height: 10),
_selectedPhaseIndex == 0
? phase(
totalActive: widget.phaseData[0]['activePower'] ?? '0',
totalCurrent: widget.phaseData[0]['current'] ?? '0',
totalFactor: widget.phaseData[0]['powerFactor'] ?? '0',
totalVoltage: widget.phaseData[0]['voltage'] ?? '0',
)
: _selectedPhaseIndex == 1
? phase(
totalActive: widget.phaseData[1]['activePower'] ?? '0',
totalCurrent: widget.phaseData[1]['current'] ?? '0',
totalFactor: widget.phaseData[1]['powerFactor'] ?? '0',
totalVoltage: widget.phaseData[1]['voltage'] ?? '0',
)
: phase(
totalActive: widget.phaseData[2]['activePower'] ?? '0',
totalCurrent: widget.phaseData[2]['current'] ?? '0',
totalFactor: widget.phaseData[2]['powerFactor'] ?? '0',
totalVoltage: widget.phaseData[2]['voltage'] ?? '0',
),
const SizedBox(height: 10),
if (_selectedPhaseIndex == 0)
phase(
totalActive: widget.phaseData[0]['activePower'] ?? '0',
totalCurrent: widget.phaseData[0]['current'] ?? '0',
totalFactor: widget.phaseData[0]['powerFactor'] ?? '0',
totalVoltage: widget.phaseData[0]['voltage'] ?? '0',
)
else
_selectedPhaseIndex == 1
? phase(
totalActive: widget.phaseData[1]['activePower'] ?? '0',
totalCurrent: widget.phaseData[1]['current'] ?? '0',
totalFactor: widget.phaseData[1]['powerFactor'] ?? '0',
totalVoltage: widget.phaseData[1]['voltage'] ?? '0',
)
: phase(
totalActive: widget.phaseData[2]['activePower'] ?? '0',
totalCurrent: widget.phaseData[2]['current'] ?? '0',
totalFactor: widget.phaseData[2]['powerFactor'] ?? '0',
totalVoltage: widget.phaseData[2]['voltage'] ?? '0',
),
],
);
}