GraphController class

The GraphController class controls a graph.

Constructors

GraphController({required Graph graph})
Creates a GraphController instance with the specified graph.

Properties

graph Graph
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addConstObject(DrawableObject object) → void
Adds a constant drawable object to the list of objects to be drawn on the graph.
addFunction(GraphFunction function) → void
Adds a mathematical function to the list of functions to be drawn on the graph.
addNumbers(Canvas canvas, Size size) → void
Adds numbers to the graph indicating the grid steps.
addObject(DrawableObject object) → void
Adds a drawable object to the list of objects to be drawn on the graph.
backToHome() → void
Resets the focus point to the home position (0,0).
drawAxes(Canvas canvas, Size size) → void
Draws the graph axes on the given canvas with the provided size.
drawFunctions(Canvas canvas, Size size) → void
Draws all the mathematical functions on the graph canvas with the given size.
drawObjects(Canvas canvas, Size size) → void
Draws all the drawable objects on the graph canvas with the given size.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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