Skip to content

Commit

Permalink
[battery_plus] Fix analyze issue (#719)
Browse files Browse the repository at this point in the history
  • Loading branch information
JSUYA authored Aug 21, 2024
1 parent d9a0ddc commit c38ff79
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/battery_plus/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## NEXT

* Update minimum Flutter and Dart version to 3.13 and 3.1.
* Fix analyze issue.

## 1.1.2

Expand Down
2 changes: 2 additions & 0 deletions packages/battery_plus/example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ class _MyHomePageState extends State<MyHomePage> {
onPressed: () {
_battery.batteryLevel.then(
(batteryLevel) {
if (!context.mounted) return;
showDialog<void>(
context: context,
builder: (_) => AlertDialog(
Expand All @@ -98,6 +99,7 @@ class _MyHomePageState extends State<MyHomePage> {
onPressed: () {
_battery.isInBatterySaveMode.then(
(isInPowerSaveMode) {
if (!context.mounted) return;
showDialog<void>(
context: context,
builder: (_) => AlertDialog(
Expand Down

0 comments on commit c38ff79

Please sign in to comment.