[Flutter] Freezed Pakcage Sealed Classes Methods

When I generate sealed classes with Freezed, How can I add methods to the sealed classes?

For example:

import 'package:freezed_annotation/freezed_annotation.dart';
part 'student_state.freezed.dart';

@freezed
abstract class StudentState with _$StudentState {
  factory StudentState.loading() = StudentFetchInProgress;
  factory StudentState.success(List<int> studentIds) = StudentFetchSuccess;
}

I want to add a function to the StudentFetchSuccess class.

Thanks for the help :slight_smile: