notchHeight property

double get notchHeight

Height of the notch (刘海) area specifically. Returns (topInset - statusBarThreshold) when topInset exceeds the threshold, otherwise returns 0. Use this when you need to know how much the notch extends beyond the status bar.

Implementation

double get notchHeight {
    final topInset = adaptSafeTop;
    final threshold = StatusBarConfig.currentPlatformThreshold;
    return topInset > threshold ? topInset - threshold : 0;
  }