gcx/frontend/genex-mobile/lib/core/usecases/usecase.dart

18 lines
495 B
Dart
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// ============================================================
// UseCase — 用例基类
//
// 遵循单一职责原则:每个 UseCase 只做一件事。
// 泛型参数:
// Type — 成功返回的数据类型
// Params — 入参类型(无参数时使用 NoParams
// ============================================================
abstract class UseCase<Type, Params> {
Future<Type> call(Params params);
}
/// 无入参的占位类型
class NoParams {
const NoParams();
}