Skip to content

Mynority/flutter_safe_area_height

 
 

Repository files navigation

safe_area_height

Demonstrates how to use the safe_area_height plugin.

Example

  • Add th dependecies in pubspec.yaml
safe_area_height: 0.0.1
  • Import safe_area_height package;

  • Get the top/bottom safe area height like this:

Future<void> getSafeAreaHeight() async {
    double safeAreaHeight = 0;
    double safeAreaHeightBottom = 0;

    safeAreaHeight = await SafeAreaHeight.safeAreaHeightTop;
    safeAreaHeightBottom = await SafeAreaHeight.safeAreaHeightBottom;

    setState(() {
      _safeAreaHeight = safeAreaHeight;
      _safeAreaHeightBottom = safeAreaHeightBottom;
    });
  }

About

A Flutter plugin to get the Safe Area height on iOS

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 36.7%
  • Dart 20.2%
  • Swift 19.9%
  • Java 12.9%
  • Shell 6.3%
  • Objective-C 4.0%