edge_to_edge_plus 0.1.0 copy "edge_to_edge_plus: ^0.1.0" to clipboard
edge_to_edge_plus: ^0.1.0 copied to clipboard

PlatformAndroid

Typed Android window insets, tappableElement-aware system bar protection and diagnostics for the mandatory edge-to-edge enforcement in Android 15 and 16.

Changelog #

All notable changes to this project are documented here. The format follows Keep a Changelog, and this project adheres to Semantic Versioning.

0.1.0 #

First release.

Added #

  • SystemInsets — one EdgeInsets per WindowInsets.Type, in logical pixels: statusBars, navigationBars, navigationBarsIgnoringVisibility, systemBars, tappableElement, displayCutout, ime, systemGestures, mandatorySystemGestures, captionBar, plus imeVisible and hasTappableNavigationBar. MediaQuery exposes none of these separately.
  • SystemBarProtection.top / .bottom — draws a background behind a system bar, sized from statusBars.top and tappableElement.bottom respectively. Renders nothing when the inset is zero, so the bottom variant disappears under gesture navigation.
  • EdgeToEdgeScope — streams inset changes from the host and rebuilds dependents. Falls back to SystemInsets.fromMediaQuery when absent rather than asserting.
  • EdgeToEdgeRegion.solidBottom / .scrollingBottom / .custom — per-page system bar styling over AnnotatedRegion<SystemUiOverlayStyle>, differing in whether the system's contrast scrim is suppressed.
  • SystemBarStyles — the same four styles as plain constants, suitable for AppBarTheme.systemOverlayStyle. Unlike SystemUiOverlayStyle.light/.dark they do not set an opaque black navigation bar.
  • SystemNavigationModethreeButton, twoButton, gesture, unknown, resolved natively from Settings.Secure.navigation_mode with a config_navBarInteractionMode fallback and an inset-shape hint.
  • EdgeToEdgeCapabilities — API level, host targetSdkVersion, whether edge-to-edge is enforced, whether windowOptOutEdgeToEdgeEnforcement is set, and whether this device still honours it.
  • EdgeToEdgeDiagnostics — structured warnings for the misconfigurations that fail silently: a dead opt-out flag, targetSdk below 35, system bar colours the OS is ignoring on API 35+, and a missing EdgeToEdgeScope.
  • EdgeToEdgeDebugOverlay — labelled, measured bands for every inset type plus a summary card. Compiles out of release builds.
  • EdgeToEdge — static, context-free accessors for one-shot reads, plus setNavigationBarContrastEnforced and setStatusBarContrastEnforced.
  • Example app with five screens, including a before/after switch that turns the handling off so the overlap is visible.

Platform support #

  • Android API 24–36. Insets are converted to logical pixels on the native side.
  • iOS, web, macOS, Windows and Linux are a safe no-op: capabilities report unsupported, insets fall back to MediaQuery, widgets render their child unchanged, and nothing throws.

Notes #

  • The navigation-mode enum is named SystemNavigationMode. Flutter already exports a NavigationMode from media_query.dart, and reusing that name would cause ambiguous_import errors in any file importing both this package and package:flutter/material.dart.
  • This package will never recommend android:windowOptOutEdgeToEdgeEnforcement. It is deprecated and disabled for apps targeting API 36 on Android 16, and EdgeToEdge.diagnose() reports it as an error when it is being ignored.
1
likes
160
points
83
downloads

Documentation

API reference

Publisher

verified publisherkerembas.com.tr

Weekly Downloads

Typed Android window insets, tappableElement-aware system bar protection and diagnostics for the mandatory edge-to-edge enforcement in Android 15 and 16.

Repository (GitHub)
View/report issues

Topics

#android #edge-to-edge #insets #system-ui #safe-area

License

MIT (license)

Dependencies

flutter, meta

More

Packages that depend on edge_to_edge_plus

Packages that implement edge_to_edge_plus