An implementation of the Cassowary constraint solving algorithm in Dart.
To use, import package:flutter/cassowary.dart
.
This is used by the RenderAutoLayout
render object in the rendering
library and by the AutoLayout
widget in the widget library.
See also:
Functions
-
cm(
double value) → ConstantMember -
Creates a ConstantMember.
Enums
- Relation
-
Relationships between Constraint expressions.
Classes
- ConstantMember
-
A member of a Constraint Expression that represent a constant at the time the Constraint is added to the solver.
- Constraint
-
A relationship between two expressions (represented by Expression) that the Solver tries to hold true. In case of ambiguities, the Solver will use priorities to determine Constraint precedence. Once a Constraint is added to the Solver, this Priority cannot be changed.
- EquationMember
-
A member that can be used to construct an Expression that may be used to create a constraint. This is to facilitate the easy creation of constraints. The use of the operator overloads is completely optional and is only meant as a convenience. The Constraint expressions can be created by manually creating instance of Constraint variables, then terms and combining those to create expression.
- Expression
-
The representation of a linear Expression that can be used to create a constraint.
- Param
-
A Param wraps a Variable and makes it suitable to be used in an expression.
- Priority
-
Utility functions for managing cassowary priorities.
- Result
-
Return values used by methods on the cassowary Solver.
- Solver
-
Solves cassowary constraints.
- Term
-
Represents a single term in an expression. This term contains a single indeterminate and has degree 1.
- Variable
-
A Variable inside the layout Solver. It represents an indeterminate in the Expression that is used to create the Constraint. If any entity is interested in watching updates to the value of this indeterminate, it can assign a watcher as the
owner
.
Exceptions / Errors
- ParserException
-
Exception thrown when attempting to create a non-linear expression.