I am new to flutter and after searching everywhere I couldn't find the reason behind this error
Below is my code
// ignore: file_names
import 'package:freezed_annotation/freezed_annotation.dart';
part 'NetworkResponse.freezed.dart';
@freezed
class NetworkResponse with _$NetworkResponse {
const factory NetworkResponse.success(Map<String, dynamic> data) = OK;
const factory NetworkResponse.error(String message) = ERROR;
const factory NetworkResponse.loading(String message) = LOADING;
}
Error
1) Target of URI doesn't exist: 'NetworkResponse.freezed.dart'.
2) Classes can only mix in mixins and classes.dartmixin_of_non_class
3) The name 'OK' isn't a type and can't be used in a redirected constructor.
Try redirecting to a different constructor.
Code Source: https://betterprogramming.pub/building-generic-and-performant-networking-layer-in-flutter-b25c2b1b89a4