해결된 질문
작성
·
224
답변 1
0
네. sealed 키워드만 넣어주세요
import 'package:freezed_annotation/freezed_annotation.dart';
import 'package:flutter/foundation.dart';
part '$NAME$.freezed.dart';
@freezed
sealed class $CAP_NAME$<T> with _$$$CAP_NAME$<T> {
const factory $CAP_NAME$.success(T data) = Success;
const factory $CAP_NAME$.error(String e) = Error;
}
state는 freezed를 이용해서 구현하면된다는 말씀이신가요?