-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
26 changed files
with
402 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import 'package:meta/meta.dart'; | ||
import 'package:my_quran/app/app.dart'; | ||
|
||
@immutable | ||
final class EmailLoginUseCase { | ||
const EmailLoginUseCase(this.repository); | ||
|
||
final AuthRepository repository; | ||
|
||
Future<void> call(String email) { | ||
return repository.loginWithEmail(email); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import 'package:meta/meta.dart'; | ||
import 'package:my_quran/app/app.dart'; | ||
import 'package:my_quran/core/core.dart'; | ||
|
||
@immutable | ||
final class FetchSmsCodeUseCase { | ||
const FetchSmsCodeUseCase(this.repository); | ||
|
||
final AuthRepository repository; | ||
|
||
Future<Either<UserEntity, Exception>> call({ | ||
required String code, | ||
required String languageCode, | ||
required Gender gender, | ||
}) { | ||
return repository.fetchSmsCode( | ||
code: code, | ||
languageCode: languageCode, | ||
gender: gender, | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import 'package:flutter/material.dart'; | ||
|
||
class CustomTextFormField extends StatelessWidget { | ||
const CustomTextFormField({ | ||
this.controller, | ||
this.labelText, | ||
this.obscureText = false, | ||
this.suffixIcon, | ||
this.validator, | ||
super.key, | ||
}); | ||
|
||
final bool obscureText; | ||
final TextEditingController? controller; | ||
final String? labelText; | ||
final Widget? suffixIcon; | ||
final String? Function(String?)? validator; | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return TextFormField( | ||
controller: controller, | ||
decoration: InputDecoration( | ||
labelText: labelText, | ||
border: const OutlineInputBorder(), | ||
suffixIcon: suffixIcon, | ||
errorMaxLines: 3, | ||
), | ||
obscureText: obscureText, | ||
validator: validator, | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
export 'cubit/login_cubit.dart'; | ||
export 'view/login_view.dart'; | ||
export 'view/sign_in_view.dart'; | ||
export 'view/verification_code_view.dart'; | ||
export 'widgets/select_gender.dart'; | ||
export 'widgets/select_lang.dart'; |
Oops, something went wrong.