writePower method Null safety

Future<bool?> writePower (
  1. int newPower
)

Use this for write new power value (return bool)

Implementation

static Future<bool?> writePower(int newPower) async {
  final bool? isSuccess = await _channel
      .invokeMethod('setPower', <String, int>{'newPower': newPower});
  return isSuccess;
}