ScaleController class
Controller para controlar a escala globalmente
- Inheritance
-
- Object
- ChangeNotifier
- ScaleController
Constructors
- ScaleController({required ScaleType type, double factor = 1.0, Size? baseDimension})
Properties
- baseDimension → Size?
-
no setter
- currentScreenSize → Size?
-
no setter
- factor → double
-
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasListeners → bool
-
Whether any listeners are currently registered.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scale → double
-
Escala calculada (automática para dimension, manual para factor)
no setter
- type → ScaleType
-
no setter
Methods
-
addListener(
VoidCallback listener) → void -
Register a closure to be called when the object changes.
inherited
-
changeBaseDimension(
Size newBaseDimension) → void - Altera apenas a dimensão base (para modo dimension)
-
changeFactor(
double newFactor) → void - Altera apenas o fator (para modo factor)
-
changeToDimension(
Size baseDimension) → void - Muda para modo dimension e define a resolução base
-
changeToFactor(
double newFactor) → void - Muda para modo factor e define o fator
-
dispose(
) → void -
Discards any resources used by the object. After this is called, the
object is not in a usable state and should be discarded (calls to
addListener will throw after the object is disposed).
inherited
-
getCurrentResolution(
) → String - ✅ NOVO: Retorna a resolução atual como string formatada
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notifyListeners(
) → void -
Call all the registered listeners.
override
-
removeListener(
VoidCallback listener) → void -
Remove a previously registered closure from the list of closures that are
notified when the object changes.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
updateScreenSize(
Size newSize) → void - Atualiza o tamanho da tela atual (reativo)
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited