From 00efb9c531d96aa82ee1730a69f19bf30a2245c2 Mon Sep 17 00:00:00 2001 From: Koji Wakamiya Date: Thu, 8 Aug 2024 01:58:22 +0900 Subject: [PATCH] fix(battery_plus): Fix type conversion --- .../battery_plus/battery_plus/lib/src/battery_plus_web.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/battery_plus/battery_plus/lib/src/battery_plus_web.dart b/packages/battery_plus/battery_plus/lib/src/battery_plus_web.dart index 0307f498c8..f179ad289a 100644 --- a/packages/battery_plus/battery_plus/lib/src/battery_plus_web.dart +++ b/packages/battery_plus/battery_plus/lib/src/battery_plus_web.dart @@ -44,7 +44,7 @@ class BatteryPlusWebPlugin extends BatteryPlatform { // level is a number representing the system's battery charge level scaled to a value between 0.0 and 1.0 final level = batteryManager.level; - return level * 100 as int; + return (level * 100).toInt(); } /// Returns the current battery state.