base_domain 2.0.0
base_domain: ^2.0.0 copied to clipboard

Flutter package for manage general use cases.

Library for manage general use cases.

Using #

For use use cases


import 'package:base_domain/base_domain.dart';

mixin UsersRepository on GetAllRepository<User> {}

mixin UsersUseCase on GetAllUseCase<User>, SaveUseCase<User, User> {}

class UsersUseCaseAdapter
    with GetAllUseCaseAdapter<User>, SaveUseCaseAdapter<User, User>
    implements UsersUseCase {
  final UsersRepository repository;

  UsersUseCaseAdapter(this.repository);

  @override
  List<Rule<User>> get rules => [
        cannotBeNull((user) => user.name, 'name', 'Name can not be null'),
        cannotBeNull((user) => user.lastname, 'lastname', 'Lastname can not be null'),
      ];
}

0
likes
100
pub points
5%
popularity

Flutter package for manage general use cases.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD (LICENSE)

Dependencies

base_models, flutter

More

Packages that depend on base_domain