From 357a2488ac3cc96f8a29b222e3bc8eef96b163d8 Mon Sep 17 00:00:00 2001 From: sahani-deriv Date: Mon, 29 Jan 2024 15:19:07 +0800 Subject: [PATCH] refactor(deriv_auth):add reset state functionality to DerivResetPassCubit --- .../features/reset_password/cubit/reset_password_cubit.dart | 5 +++++ .../lib/features/reset_password/deriv_reset_password_io.dart | 3 +++ 2 files changed, 8 insertions(+) diff --git a/packages/deriv_auth/lib/features/reset_password/cubit/reset_password_cubit.dart b/packages/deriv_auth/lib/features/reset_password/cubit/reset_password_cubit.dart index d11c07999..7a515f839 100644 --- a/packages/deriv_auth/lib/features/reset_password/cubit/reset_password_cubit.dart +++ b/packages/deriv_auth/lib/features/reset_password/cubit/reset_password_cubit.dart @@ -65,4 +65,9 @@ class DerivResetPassCubit extends Cubit @override Stream get output => stream; + + @override + void resetState() { + emit(const DerivResetPassInitialState()); + } } diff --git a/packages/deriv_auth/lib/features/reset_password/deriv_reset_password_io.dart b/packages/deriv_auth/lib/features/reset_password/deriv_reset_password_io.dart index a059eef51..5b617cf4c 100644 --- a/packages/deriv_auth/lib/features/reset_password/deriv_reset_password_io.dart +++ b/packages/deriv_auth/lib/features/reset_password/deriv_reset_password_io.dart @@ -13,4 +13,7 @@ abstract class DerivResetPasswordIO { /// Deriv reset pass output. Stream get output; + + /// Resets [DerivResetPassState] to [DerivResetPassInitialState]. + void resetState(); }