getPopOverBottomInsets static method

EdgeInsets getPopOverBottomInsets()

Implementation

static EdgeInsets getPopOverBottomInsets() {
  switch (UFUScreen.type) {
    case DeviceType.mobile:
      return EdgeInsets.zero;

    case DeviceType.desktop:
    case DeviceType.tablet:
      final bottom = MediaQueryData.fromView(WidgetsBinding.instance.platformDispatcher.views.first)
              .viewInsets
              .bottom -
          50;
      return EdgeInsets.only(
        bottom: bottom >= 0 ? bottom : 0,
      );
  }
}