getSafeInsets function Null safety

Future<EdgeInsets> getSafeInsets()

Implementation

Future<EdgeInsets> getSafeInsets() async {
  final insets = await _channel.invokeMapMethod<String, int>('getSafeInsets');
  return EdgeInsets.fromLTRB(
      insets!['left']!.toDouble(),
      insets['top']!.toDouble(),
      insets['right']!.toDouble(),
      insets['bottom']!.toDouble());
}