Move apps to mobile directory structure
Relocated all app directories (client, design_system_viewer, staff) and their contents under the new 'apps/mobile' path. This change improves project organization and prepares for future platform-specific structuring.
This commit is contained in:
4
apps/mobile/packages/core/lib/core.dart
Normal file
4
apps/mobile/packages/core/lib/core.dart
Normal file
@@ -0,0 +1,4 @@
|
||||
library core;
|
||||
|
||||
export 'src/domain/arguments/usecase_argument.dart';
|
||||
export 'src/domain/usecases/usecase.dart';
|
||||
@@ -0,0 +1,12 @@
|
||||
import 'package:equatable/equatable.dart';
|
||||
|
||||
/// Abstract base class for all use case arguments.
|
||||
///
|
||||
/// Use case arguments are data transfer objects (DTOs) used to pass data
|
||||
/// into a use case. They must extend [Equatable] to ensure value equality.
|
||||
abstract class UseCaseArgument extends Equatable {
|
||||
const UseCaseArgument();
|
||||
|
||||
@override
|
||||
List<Object?> get props => [];
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
/// Abstract base class for all use cases in the application.
|
||||
///
|
||||
/// Use cases encapsulate application-specific business rules and orchestrate
|
||||
/// the flow of data to and from the entities. They are typically invoked
|
||||
/// from the presentation layer (e.g., BLoCs, ViewModels) and interact with
|
||||
/// repositories from the data layer.
|
||||
///
|
||||
/// [Input] represents the type of data passed into the use case.
|
||||
/// [Output] represents the type of data returned by the use case.
|
||||
abstract class UseCase<Input, Output> {
|
||||
/// Executes the use case with the given [input].
|
||||
///
|
||||
/// This method should contain the core business logic of the use case.
|
||||
Future<Output> call(Input input);
|
||||
}
|
||||
|
||||
/// Abstract base class for use cases that do not require any input.
|
||||
///
|
||||
/// [Output] represents the type of data returned by the use case.
|
||||
abstract class NoInputUseCase<Output> {
|
||||
/// Executes the use case.
|
||||
///
|
||||
/// This method should contain the core business logic of the use case.
|
||||
Future<Output> call();
|
||||
}
|
||||
13
apps/mobile/packages/core/pubspec.yaml
Normal file
13
apps/mobile/packages/core/pubspec.yaml
Normal file
@@ -0,0 +1,13 @@
|
||||
name: krow_core
|
||||
description: Core utilities and shared logic.
|
||||
version: 0.0.1
|
||||
publish_to: none
|
||||
resolution: workspace
|
||||
|
||||
environment:
|
||||
sdk: '>=3.10.0 <4.0.0'
|
||||
flutter: ">=3.0.0"
|
||||
|
||||
dependencies:
|
||||
flutter:
|
||||
sdk: flutter
|
||||
Reference in New Issue
Block a user