copyWith method

CascadeModel copyWith({
  1. required String code,
  2. required String name,
  3. List<CascadeModel>? children,
})

Implementation

CascadeModel copyWith({
  required String code,
  required String name,
  List<CascadeModel>? children,
}) {
  return new CascadeModel(
    code: code,
    name: name,
    children: children ?? this.children,
  );
}