Skip to content

Commit

Permalink
fix format
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandre_poichet committed Aug 2, 2024
1 parent 29b7f48 commit 32d7bac
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
4 changes: 2 additions & 2 deletions example/lib/extensions.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ extension FlutterEcoModeExtension on FlutterEcoMode {
.then((value) => value > 0 ? value.toString() : "not reachable");

Future<String> getBatteryLevelPercent() => getBatteryLevel().then((value) =>
value != null && value > 0 ? "${value.toInt()} %" : "not reachable");
value != null && value > 0 ? "${value.toInt()} %" : "not reachable");

Stream<String> getBatteryLevelPercentStream() => batteryLevelEventStream
.map((value) => value > 0 ? "${value.toInt()} %" : "not reachable");
}

extension FutureEcoRangeExtension on Future<EcoRange?> {
Future<String?> getScore() => then((value) =>
value?.score != null ? "${(value!.score * 100).toInt()}/100" : null);
value?.score != null ? "${(value!.score * 100).toInt()}/100" : null);

Future<String?> getRange() => then((value) => value?.range.name);

Expand Down
2 changes: 0 additions & 2 deletions example/lib/low_end_device/low_end_device_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -72,5 +72,3 @@ class _LowEndDevicePageState extends State<LowEndDevicePage> {
);
}
}


3 changes: 1 addition & 2 deletions example/lib/wrapper_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ class WrapperPage extends StatelessWidget {
onPressed: () {
Navigator.of(context).pop();
},
)
),
)),
body: Padding(
padding: const EdgeInsets.all(8.0),
child: child,
Expand Down

0 comments on commit 32d7bac

Please sign in to comment.