copyWith method

AppState copyWith({
  1. bool? forPlay,
  2. Map<ID, CubitEntity Function()>? cubits,
  3. Map<ID, CubitEntity>? instantiatedCubits,
  4. Map<ID, MapPagesEntry>? inEditorPages,
  5. Map<ID, Widget Function()>? forPlayPages,
  6. Map<ID, String Function()>? forPlayComponentsIDToName,
})

Implementation

AppState copyWith({
  final bool? forPlay,
  final Map<ID, CubitEntity Function()>? cubits,
  final Map<ID, CubitEntity>? instantiatedCubits,
  final Map<ID, MapPagesEntry>? inEditorPages,
  final Map<ID, Widget Function()>? forPlayPages,
  final Map<ID, String Function()>? forPlayComponentsIDToName,
}) {
  return AppState(
    forPlay: forPlay ?? this.forPlay,
    cubits: cubits ?? this.cubits,
    instantiatedCubits: instantiatedCubits ?? this.instantiatedCubits,
    inEditorPages: inEditorPages ?? this.inEditorPages,
    forPlayPages: forPlayPages ?? this.forPlayPages,
    forPlayComponentsIDToName:
        forPlayComponentsIDToName ?? this.forPlayComponentsIDToName,
  );
}