i_auth.dart 608 B

123456789101112131415161718
  1. import 'package:flowy_sdk/protobuf/flowy-user/protobuf.dart';
  2. import 'package:dartz/dartz.dart';
  3. import 'package:flutter/material.dart';
  4. abstract class IAuth {
  5. Future<Either<UserProfile, UserError>> signIn(
  6. String? email, String? password);
  7. Future<Either<UserProfile, UserError>> signUp(
  8. String? name, String? password, String? email);
  9. Future<Either<Unit, UserError>> signOut();
  10. }
  11. abstract class IAuthRouter {
  12. void pushWelcomeScreen(BuildContext context, UserProfile userProfile);
  13. void pushSignUpScreen(BuildContext context);
  14. void pushForgetPasswordScreen(BuildContext context);
  15. }