ios_battery_indicator 1.2.6
ios_battery_indicator: ^1.2.6 copied to clipboard
A Flutter widget that replicates the native iOS battery indicator, including support for iOS 27 style and automatic system battery monitoring.
1.2.6 #
- ๐ฌ Unify crossfade animation for both iOS 27 and non-iOS 27 styles in basic battery mode
1.2.5 #
- ๐จ Restore cutout percentage style when battery is full โ plain fill now only applies when charging or critically low
- ๐จ Use
FontFeature.tabularFigures()for percentage text to prevent digit-width jitter - ๐จ Shrink positive pole diameter from 4.2 to 3.9 for better visual proportion
- ๐จ Prevent "100" text overflow by reducing scale when battery is full
- ๐จ Reduce minimum fill bar from 5% to 2% for more accurate low-level display
1.2.4 #
- ๐ Fix screenshot images and language link in README โ use absolute GitHub URLs so they render correctly on pub.dev
1.2.3 #
- ๐ฆ Add
platformsdeclaration topubspec.yamlfor all supported platforms
1.2.2 #
- ๐จ Refine battery indicator layout and fill animation for smoother, more polished appearance
- ๐ Fix
chargingWithBoltdisplay logic - ๐งน Simplify positive pole color logic by delegating to
_trackColor(theme)
1.2.1 #
- ๐จ Refine percentage text rendering: increase font size from 12 to 13, remove letter spacing for cleaner appearance
- ๐จ Adjust bolt icon size from 10 to 9.6 for better visual balance with percentage text
- ๐จ Remove
Transform.scalewrappers from percentage text and cutout mask, usePaddinginset instead for more predictable layout
1.2.0 #
- ๐ New
playChargingSoundparameter โ optionally play the native iOS charging sound (connectedToPower) when entering the charging state in manual mode. Uses the ios_system_sound package and is only supported on iOS. Disabled by default.
1.1.0 #
- ๐ก New callbacks โ added
onBatteryLevelChangedandonBatteryStateChangedto receive real-time system battery updates in auto mode - ๐ Fix percentage text vertical misalignment by applying
TextHeightBehaviorto suppress extra ascent/descent
1.0.3 #
- ๐ฌ Added
animationDurationparameter to control all indicator animations, including fill progress, color changes, bolt icon, and crossfade transitions - ๐จ Fix cutout percentage text overflow by wrapping
maskChildwithFittedBoxfor proper scaling
1.0.2 #
- ๐จ Adjust text rendering: wrap battery indicator in
DefaultTextStylewithheight: 1andfontWeight: .w500for consistent typography - ๐จ Refine cutout percentage font size from 14 to 13 for better visual balance
- ๐ฑ Update example app defaults: battery state set to charging, percentage display toggled off
- ๐ง Fix formatting of Repository and Issue tracker links in README
- ๐ Improve example web page SEO: update meta description, keywords, title, and apple-mobile-web-app-title
- ๐ Add class-level documentation comment to
IosBatteryIndicator - ๐ฆ Include
screenshots/in published package files
1.0.1 #
- ๐ Improve code formatting in README and README_CN documentation examples
- Bump version to 1.0.1
1.0.0 #
- ๐ Initial stable release
- Core widget: Added
IosBatteryIndicatorwidget that faithfully replicates the native iOS battery indicator - Auto system battery monitoring: Reads battery level, charging state, and low-power mode from the device in real time
- Manual control mode: Supports manually specifying battery state via
batteryLevel,batteryState, andisInBatterySaveMode - iOS 27 style support: Supports the new borderless design introduced in iOS 27, with automatic iOS version detection
- Charging bolt overlay: Renders a bolt (โก) icon using the native Cupertino icon font when the battery is charging
- Cutout percentage effect: Percentage text is punched through the fill using a cutout effect for a polished look when discharging
- Low battery warning: Indicator turns red when the battery level drops below a configurable threshold (10โ30, defaults to 20)
- Battery save mode: Track turns yellow when low-power mode is active
- Light / Dark mode: Automatically adapts to ambient
Brightness, with an option to force a specific brightness via thebrightnessproperty - Smooth animations: Uses
AnimatedSwitcherfor display mode transitions andAnimatedThemefor theme transitions - Flexible sizing: Supports scaling via
heightorwidthproperties (mutually exclusive) - Display option controls: Supports
showBatteryPercentageto hide the percentage number andchargingWithBoltto hide the charging bolt icon - Custom theme: Added
BatteryIndicatorTheme, supports custom color schemes viaThemeData.extensions, with built-in.light()and.dark()factory constructors
