copyWith method

LmNavigationState copyWith({
  1. String? activeBranchId,
  2. Map<String, LmBranchState>? branches,
  3. LmLocation? location,
  4. List<LmModalNode>? modalStack,
  5. int? version,
})

Implementation

LmNavigationState copyWith({
  String? activeBranchId,
  Map<String, LmBranchState>? branches,
  LmLocation? location,
  List<LmModalNode>? modalStack,
  int? version,
}) {
  return LmNavigationState(
    activeBranchId: activeBranchId ?? this.activeBranchId,
    branches: branches ?? this.branches,
    location: location ?? this.location,
    modalStack: modalStack ?? this.modalStack,
    version: version ?? this.version + 1,
  );
}