copyWith method
CubitEntity
copyWith({
- ID? id,
- String? name,
- ID? initialState,
- Map<
ID, CubitStateEntity> ? states, - Map<
ID, WorkflowEntity> ? workflows, - ID? currentState,
- List<
CubitStateEntity> ? stateHistory,
Implementation
CubitEntity copyWith({
ID? id,
String? name,
ID? initialState,
Map<ID, CubitStateEntity>? states,
Map<ID, WorkflowEntity>? workflows,
ID? currentState,
List<CubitStateEntity>? stateHistory,
}) {
return CubitEntity(
id: id ?? this.id,
name: name ?? this.name,
initialState: initialState ?? this.initialState,
states: states ?? this.states,
workflows: workflows ?? this.workflows,
currentState: currentState ?? this.currentState,
stateHistory: stateHistory ?? this.stateHistory,
);
}