Skip to content

Instantly share code, notes, and snippets.

@fredgrott
Created May 4, 2025 18:14
Show Gist options
  • Save fredgrott/549f95d6a0639ac1c8f202cd871e9360 to your computer and use it in GitHub Desktop.
Save fredgrott/549f95d6a0639ac1c8f202cd871e9360 to your computer and use it in GitHub Desktop.
app lifecycle globals
// Copyright 2025 Fredrick Allan Grott. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
import 'dart:ui';
/// Used with the AppLifecycleMixin scaffold wrapper
/// and in MediaQuery extensions I use this to get the devicePixelRatio
/// and size as the size will represent the physical size in foldables and
/// big screens where multiple windows may exist.
Display? appDisplay;
/// Used with the AppLifecycleMixin scaffold wrapper
FlutterView? appView;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment