transform method - FTransformables extension - forui.foundation library (original) (raw)
T transform(
- T function(
- T
)
- T
)
Transform this T
using the given function
.
This should be used in conjunction with copyWith
to update deeply nested properties that rely on this T
.
Implementation
// This function cannot be implemented directly in [FTransformable] as the callback accepts a self-referencing type.
// It prevents mixed-in types from being inherited.
T transform(T Function(T) function) => function(this);