ios_battery_indicator 1.2.6 copy "ios_battery_indicator: ^1.2.6" to clipboard
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 platforms declaration to pubspec.yaml for all supported platforms

1.2.2 #

  • ๐ŸŽจ Refine battery indicator layout and fill animation for smoother, more polished appearance
  • ๐Ÿ› Fix chargingWithBolt display 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.scale wrappers from percentage text and cutout mask, use Padding inset instead for more predictable layout

1.2.0 #

  • ๐Ÿ”Š New playChargingSound parameter โ€” 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 onBatteryLevelChanged and onBatteryStateChanged to receive real-time system battery updates in auto mode
  • ๐Ÿ› Fix percentage text vertical misalignment by applying TextHeightBehavior to suppress extra ascent/descent

1.0.3 #

  • ๐ŸŽฌ Added animationDuration parameter to control all indicator animations, including fill progress, color changes, bolt icon, and crossfade transitions
  • ๐ŸŽจ Fix cutout percentage text overflow by wrapping maskChild with FittedBox for proper scaling

1.0.2 #

  • ๐ŸŽจ Adjust text rendering: wrap battery indicator in DefaultTextStyle with height: 1 and fontWeight: .w500 for 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 IosBatteryIndicator widget 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, and isInBatterySaveMode
  • 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 the brightness property
  • Smooth animations: Uses AnimatedSwitcher for display mode transitions and AnimatedTheme for theme transitions
  • Flexible sizing: Supports scaling via height or width properties (mutually exclusive)
  • Display option controls: Supports showBatteryPercentage to hide the percentage number and chargingWithBolt to hide the charging bolt icon
  • Custom theme: Added BatteryIndicatorTheme, supports custom color schemes via ThemeData.extensions, with built-in .light() and .dark() factory constructors
1
likes
150
points
480
downloads
screenshot

Documentation

API reference

Publisher

verified publishernoob-coder.com

Weekly Downloads

A Flutter widget that replicates the native iOS battery indicator, including support for iOS 27 style and automatic system battery monitoring.

Homepage
Repository (GitHub)
View/report issues

Topics

#battery-indicator #cupertino #widget #ui #components

License

MIT (license)

Dependencies

battery_plus, cutout, device_info_plus, flutter, ios_system_sound, version

More

Packages that depend on ios_battery_indicator