copyWith method

  1. @override
FastMediaLayoutBlocState copyWith({
  1. FastMediaType? mediaType,
  2. bool? isLoading,
  3. bool? isLoaded,
})
override

Creates a copy of this TModel but with the given fields replaced with the new values.

For example:

var myModel2 = myModel1.copyWith(age: 42);

Implementation

@override
FastMediaLayoutBlocState copyWith({
  FastMediaType? mediaType,
  bool? isLoading,
  bool? isLoaded,
}) {
  return FastMediaLayoutBlocState(
    mediaType: mediaType ?? this.mediaType,
    isLoading: isLoading ?? this.isLoading,
    isLoaded: isLoaded ?? this.isLoaded,
  );
}