Prefer void to null (#22977)
* Future<void> main * Future<void>.delayed * prefer_void_to_Null * address review comments
This commit is contained in:
committed by
GitHub
parent
5efe095895
commit
0fb84e96c7
@@ -21,7 +21,7 @@ class _PlatformChannelState extends State<PlatformChannel> {
|
||||
String _batteryLevel = 'Battery level: unknown.';
|
||||
String _chargingStatus = 'Battery status: unknown.';
|
||||
|
||||
Future<Null> _getBatteryLevel() async {
|
||||
Future<void> _getBatteryLevel() async {
|
||||
String batteryLevel;
|
||||
try {
|
||||
final int result = await methodChannel.invokeMethod('getBatteryLevel');
|
||||
|
||||
Reference in New Issue
Block a user