mirror of
https://github.com/flutter/samples.git
synced 2025-11-14 11:28:36 +00:00
[compass_app] Standardize on Result factories rather than constructors (#2538)
From my review of the recipes PR in https://github.com/flutter/website/pull/11444#pullrequestreview-2480423811.
This commit is contained in:
@@ -11,7 +11,7 @@ class FakeAuthApiClient implements AuthApiClient {
|
||||
@override
|
||||
Future<Result<LoginResponse>> login(LoginRequest loginRequest) async {
|
||||
if (loginRequest.email == 'EMAIL' && loginRequest.password == 'PASSWORD') {
|
||||
return Result.ok(const LoginResponse(token: 'TOKEN', userId: '123'));
|
||||
return const Result.ok(LoginResponse(token: 'TOKEN', userId: '123'));
|
||||
}
|
||||
return Result.error(Exception('ERROR!'));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user