ContextManager class

A class for managing the application context.

The ContextManager class provides a way to set and retrieve the current BuildContext within the application. It follows the singleton design pattern to ensure there's only one instance of the context manager throughout the application.

Example usage:

// Instantiate the ContextManager
ContextManager contextManager = ContextManager();

// Set the BuildContext
contextManager.setContext(context);

// Retrieve the BuildContext
BuildContext? currentContext = contextManager.context;

Constructors

ContextManager.new()
Factory constructor
factory

Properties

context BuildContext?
Gets the current BuildContext.
no setter
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setContext(BuildContext context) → void
Sets the current BuildContext.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited