Revert "formatted all files."

This reverts commit 04250ebc98.
This commit is contained in:
Faris Armoush
2025-06-12 16:04:49 +03:00
parent 218f43bacb
commit c642ba2644
473 changed files with 4335 additions and 5417 deletions

View File

@ -5,8 +5,7 @@ import 'package:syncrow_web/utils/constants/assets.dart';
class PhaseWidget extends StatefulWidget {
final List<Map<String, dynamic>> phaseData;
const PhaseWidget({
super.key,
PhaseWidget({
required this.phaseData,
});
@override
@ -20,7 +19,7 @@ class _PhaseWidgetState extends State<PhaseWidget> {
Widget build(BuildContext context) {
return Column(
children: [
const SizedBox(height: 10),
SizedBox(height: 10),
Row(
children: List.generate(widget.phaseData.length, (index) {
return InkWell(
@ -44,28 +43,27 @@ class _PhaseWidgetState extends State<PhaseWidget> {
);
}),
),
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',
),
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',
),
],
);
}