Created
April 16, 2022 14:05
-
-
Save JaveedIshaq/403335bb10fb1d4d7bf992711c52ec0b to your computer and use it in GitHub Desktop.
Creat Singletone pattern in dart
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
class LoginApi implements LoginApiProtocol { | |
const LoginApi._sharedInstance(); | |
static const LoginApi _shared = LoginApi._sharedInstance(); | |
factory LoginApi.instance() => _shared; | |
@override | |
Future<LoginHandle?> login( | |
{required String email, required String password}) { | |
throw UnimplementedError(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment