Skip to content

Commit

Permalink
fix: incorrect string interpolation
Browse files Browse the repository at this point in the history
  • Loading branch information
alexVinarskis committed Dec 30, 2023
1 parent 1bc46fe commit cc4904a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/screens/screen_summary.dart
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ class ScreenSummaryState extends State<ScreenSummary> {
style: TextStyle(fontSize: Theme.of(context).textTheme.titleMedium!.fontSize),
),
Text(
CCTK.primaryBattChargeCfg.strings(context).containsKey(_currentBatteryState?.mode) ? CCTK.primaryBattChargeCfg.strings(context)[_currentBatteryState?.mode]![indexTitle].replaceAllMapped(RegExp(r'\((.*?)\)'), (match) => "") + _currentBatteryModeExtended : "ERR: '$_currentBatteryState?.mode'",
CCTK.primaryBattChargeCfg.strings(context).containsKey(_currentBatteryState?.mode) ? CCTK.primaryBattChargeCfg.strings(context)[_currentBatteryState?.mode]![indexTitle].replaceAllMapped(RegExp(r'\((.*?)\)'), (match) => "") + _currentBatteryModeExtended : "ERR: '${_currentBatteryState?.mode}'",
style: Theme.of(context).textTheme.titleMedium!.copyWith(fontWeight: FontWeight.w700, color: Theme.of(context).colorScheme.primary),
),
],)
Expand Down Expand Up @@ -261,7 +261,7 @@ class ScreenSummaryState extends State<ScreenSummary> {
style: TextStyle(fontSize: Theme.of(context).textTheme.titleMedium!.fontSize),
),
Text(
CCTK.thermalManagement.strings(context).containsKey(_currentThermalState?.mode) ? CCTK.thermalManagement.strings(context)[_currentThermalState?.mode]![indexTitle] : "ERR: '$_currentThermalState?.mode'",
CCTK.thermalManagement.strings(context).containsKey(_currentThermalState?.mode) ? CCTK.thermalManagement.strings(context)[_currentThermalState?.mode]![indexTitle] : "ERR: '${_currentThermalState?.mode}'",
style: Theme.of(context).textTheme.titleMedium!.copyWith(fontWeight: FontWeight.w700, color: Theme.of(context).colorScheme.primary),
),
],)
Expand Down

0 comments on commit cc4904a

Please sign in to comment.