ViewsModel class

A data model for keeping track of the on-screen views.

Inheritance
  • Object
  • Model
  • ViewsModel

Constructors

ViewsModel()

Properties

hashCode → int
The hash code for this object.
no setterinherited
hasListeners → bool
Whether any listeners are currently registered.
no setterinherited
horizontalController1 ResizableController
The controller for the resizable row on top.
final
horizontalController2 ResizableController
The controller for the resizable row on bottom.
final
horizontalController3 ResizableController
The controller for screen 2's first row.
final
horizontalController4 ResizableController
The controller for screen 2's second row.
final
isLoadingPreset ↔ bool
Whether there is a preset already loading.
getter/setter pair
presets → List<ViewPreset>
The list of all available presets.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
settings DashboardSettings
The user's Dashboard settings.
no setterinherited
splitMode SplitMode
The current DashboardSettings.splitMode.
no setterinherited
verticalController1 ResizableController
The controller for the resizable column.
final
verticalController2 ResizableController
The vertical controller for screen 2.
final
views ↔ List<DashboardView>
The current views on the screen.
getter/setter pair

Methods

addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
deletePreset(ViewPreset preset) → Future<void>
Deletes presets and rewrites Json file
inherited
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).
override
init() → Future<void>
Initializes any data needed by this model.
override
isDefaultPreset(ViewPreset preset) → bool
Returns whether this preset is the default.
inherited
loadDefaultPreset() → Future<void>
Retreives and loads the default settings.
inherited
loadPreset(ViewPreset preset) → Future<void>
Loads the given preset.
nextFrame() → Future<void>
Waits for the next frame to build.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
Call all the registered listeners.
inherited
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
inherited
replaceView(int index, DashboardView newView, {bool ignoreErrors = false}) → void
Replaces the view at the given index with the new view.
resetSizes() → void
Resets the size of all the views.
saveAsPreset(String? name) → Future<void>
Saves the current state as a preset and updates the user's settings.
inherited
setDefaultPreset(String? preset) → Future<void>
Sets the default preset to preset
inherited
setNumViews(int? value) → void
Adds or subtracts a number of views to/from the UI
swapPresets(int oldIndex, int newIndex) → void
Swaps two presets in the user's settings.
inherited
toggleDefaultPreset(ViewPreset preset) → void
Sets or clears this preset as the default.
inherited
toPreset(String name) ViewPreset
Returns a ViewPreset to match the current state.
toString() → String
A string representation of this object.
inherited
updatePreset(ViewPreset preset) → Future<void>
Replaces the given preset with the current state using toPreset.
inherited
updateSplitMode(SplitMode? value) → void
Updates DashboardSettings.splitMode.
inherited

Operators

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