@@ -288,14 +288,12 @@ class AuthCategory<
288
288
required String username,
289
289
required String password,
290
290
PluginSignUpOptions ? options,
291
- }) {
292
- final request = SignUpRequest (
293
- username: username,
294
- password: password,
295
- options: options,
296
- );
297
- return plugin.signUp (request: request);
298
- }
291
+ }) =>
292
+ plugin.signUp (
293
+ username: username,
294
+ password: password,
295
+ options: options,
296
+ );
299
297
300
298
/// {@template amplify_core.amplify_auth_category.confirm_sign_up}
301
299
/// Confirm the current sign up for [username] with the [confirmationCode]
@@ -305,14 +303,12 @@ class AuthCategory<
305
303
required String username,
306
304
required String confirmationCode,
307
305
PluginConfirmSignUpOptions ? options,
308
- }) {
309
- final request = ConfirmSignUpRequest (
310
- username: username,
311
- confirmationCode: confirmationCode,
312
- options: options,
313
- );
314
- return plugin.confirmSignUp (request: request);
315
- }
306
+ }) =>
307
+ plugin.confirmSignUp (
308
+ username: username,
309
+ confirmationCode: confirmationCode,
310
+ options: options,
311
+ );
316
312
317
313
/// {@template amplify_core.amplify_auth_category.resend_sign_up_code}
318
314
/// Resends the code that is used to confirm the user's account after sign up
@@ -325,13 +321,11 @@ class AuthCategory<
325
321
Future <PluginResendSignUpCodeResult > resendSignUpCode ({
326
322
required String username,
327
323
PluginResendSignUpCodeOptions ? options,
328
- }) {
329
- final request = ResendSignUpCodeRequest (
330
- username: username,
331
- options: options,
332
- );
333
- return plugin.resendSignUpCode (request: request);
334
- }
324
+ }) =>
325
+ plugin.resendSignUpCode (
326
+ username: username,
327
+ options: options,
328
+ );
335
329
336
330
/// {@template amplify_core.amplify_auth_category.sign_in}
337
331
/// Initiate sign in for user with [username] and optional [password] .
@@ -343,14 +337,12 @@ class AuthCategory<
343
337
required String username,
344
338
String ? password,
345
339
PluginSignInOptions ? options,
346
- }) {
347
- final request = SignInRequest (
348
- username: username,
349
- password: password,
350
- options: options,
351
- );
352
- return plugin.signIn (request: request);
353
- }
340
+ }) =>
341
+ plugin.signIn (
342
+ username: username,
343
+ password: password,
344
+ options: options,
345
+ );
354
346
355
347
/// {@template amplify_core.amplify_auth_category.confirm_sign_in}
356
348
/// Confirm the current sign in with the [confirmationValue] provided by the
@@ -359,13 +351,11 @@ class AuthCategory<
359
351
Future <PluginConfirmSignInResult > confirmSignIn ({
360
352
required String confirmationValue,
361
353
PluginConfirmSignInOptions ? options,
362
- }) {
363
- final request = ConfirmSignInRequest (
364
- confirmationValue: confirmationValue,
365
- options: options,
366
- );
367
- return plugin.confirmSignIn (request: request);
368
- }
354
+ }) =>
355
+ plugin.confirmSignIn (
356
+ confirmationValue: confirmationValue,
357
+ options: options,
358
+ );
369
359
370
360
/// {@template amplify_core.amplify_auth_category.sign_out}
371
361
/// Sign the user out of the current device.
@@ -375,10 +365,8 @@ class AuthCategory<
375
365
/// {@endtemplate}
376
366
Future <PluginSignOutResult > signOut ({
377
367
PluginSignOutOptions ? options,
378
- }) {
379
- final request = SignOutRequest (options: options);
380
- return plugin.signOut (request: request);
381
- }
368
+ }) =>
369
+ plugin.signOut (options: options);
382
370
383
371
/// {@template amplify_core.amplify_auth_category.update_password}
384
372
/// Update the password of the current user.
@@ -391,14 +379,12 @@ class AuthCategory<
391
379
required String oldPassword,
392
380
required String newPassword,
393
381
PluginUpdatePasswordOptions ? options,
394
- }) {
395
- final request = UpdatePasswordRequest (
396
- oldPassword: oldPassword,
397
- newPassword: newPassword,
398
- options: options,
399
- );
400
- return plugin.updatePassword (request: request);
401
- }
382
+ }) =>
383
+ plugin.updatePassword (
384
+ oldPassword: oldPassword,
385
+ newPassword: newPassword,
386
+ options: options,
387
+ );
402
388
403
389
/// {@template amplify_core.amplify_auth_category.reset_password}
404
390
/// Initiates a password reset for the user with the given username.
@@ -411,13 +397,11 @@ class AuthCategory<
411
397
Future <PluginResetPasswordResult > resetPassword ({
412
398
required String username,
413
399
PluginResetPasswordOptions ? options,
414
- }) {
415
- final request = ResetPasswordRequest (
416
- username: username,
417
- options: options,
418
- );
419
- return plugin.resetPassword (request: request);
420
- }
400
+ }) =>
401
+ plugin.resetPassword (
402
+ username: username,
403
+ options: options,
404
+ );
421
405
422
406
/// {@template amplify_core.amplify_auth_category.confirm_reset_password}
423
407
/// Completes the password reset process given a username, new password,
@@ -433,35 +417,29 @@ class AuthCategory<
433
417
required String newPassword,
434
418
required String confirmationCode,
435
419
PluginConfirmResetPasswordOptions ? options,
436
- }) {
437
- final request = ConfirmResetPasswordRequest (
438
- username: username,
439
- newPassword: newPassword,
440
- confirmationCode: confirmationCode,
441
- options: options,
442
- );
443
- return plugin.confirmResetPassword (request: request);
444
- }
420
+ }) =>
421
+ plugin.confirmResetPassword (
422
+ username: username,
423
+ newPassword: newPassword,
424
+ confirmationCode: confirmationCode,
425
+ options: options,
426
+ );
445
427
446
428
/// {@template amplify_core.amplify_auth_category.get_current_user}
447
429
/// Retrieve the current active user.
448
430
/// {@endtemplate}
449
431
Future <PluginAuthUser > getCurrentUser ({
450
432
PluginAuthUserOptions ? options,
451
- }) {
452
- final request = AuthUserRequest (options: options);
453
- return plugin.getCurrentUser (request: request);
454
- }
433
+ }) =>
434
+ plugin.getCurrentUser (options: options);
455
435
456
436
/// {@template amplify_core.amplify_auth_category.fetch_user_attributes}
457
437
/// Fetch all user attributes associated with the current user.
458
438
/// {@endtemplate}
459
439
Future <List <PluginAuthUserAttribute >> fetchUserAttributes ({
460
440
PluginFetchUserAttributeOptions ? options,
461
- }) {
462
- final request = FetchUserAttributesRequest (options: options);
463
- return plugin.fetchUserAttributes (request: request);
464
- }
441
+ }) =>
442
+ plugin.fetchUserAttributes (options: options);
465
443
466
444
/// {@template amplify_core.amplify_auth_category.fetch_auth_session}
467
445
/// Fetch the current auth session.
@@ -472,24 +450,20 @@ class AuthCategory<
472
450
/// {@endtemplate}
473
451
Future <PluginAuthSession > fetchAuthSession ({
474
452
PluginAuthSessionOptions ? options,
475
- }) {
476
- final request = AuthSessionRequest (options: options);
477
- return plugin.fetchAuthSession (request: request);
478
- }
453
+ }) =>
454
+ plugin.fetchAuthSession (options: options);
479
455
480
456
/// {@template amplify_core.amplify_auth_category.sign_in_with_web_ui}
481
457
/// Initiate sign in for a web-based flow, e.g. a social provider.
482
458
/// {@endtemplate}
483
459
Future <PluginSignInWithWebUIResult > signInWithWebUI ({
484
460
AuthProvider ? provider,
485
461
PluginSignInWithWebUIOptions ? options,
486
- }) {
487
- final request = SignInWithWebUIRequest (
488
- provider: provider,
489
- options: options,
490
- );
491
- return plugin.signInWithWebUI (request: request);
492
- }
462
+ }) =>
463
+ plugin.signInWithWebUI (
464
+ provider: provider,
465
+ options: options,
466
+ );
493
467
494
468
/// {@template amplify_core.amplify_auth_category.update_user_attribute}
495
469
/// Updates a single user attribute and returns a [UpdateUserAttributeResult] .
@@ -500,14 +474,12 @@ class AuthCategory<
500
474
required PluginUserAttributeKey userAttributeKey,
501
475
required String value,
502
476
PluginUpdateUserAttributeOptions ? options,
503
- }) {
504
- final request = UpdateUserAttributeRequest (
505
- userAttributeKey: userAttributeKey,
506
- value: value,
507
- options: options,
508
- );
509
- return plugin.updateUserAttribute (request: request);
510
- }
477
+ }) =>
478
+ plugin.updateUserAttribute (
479
+ userAttributeKey: userAttributeKey,
480
+ value: value,
481
+ options: options,
482
+ );
511
483
512
484
/// {@template amplify_core.amplify_auth_category.update_user_attributes}
513
485
/// Updates multiple user attributes and returns a map of
@@ -519,13 +491,11 @@ class AuthCategory<
519
491
updateUserAttributes ({
520
492
required List <PluginAuthUserAttribute > attributes,
521
493
PluginUpdateUserAttributesOptions ? options,
522
- }) {
523
- final request = UpdateUserAttributesRequest (
524
- attributes: attributes,
525
- options: options,
526
- );
527
- return plugin.updateUserAttributes (request: request);
528
- }
494
+ }) =>
495
+ plugin.updateUserAttributes (
496
+ attributes: attributes,
497
+ options: options,
498
+ );
529
499
530
500
/// {@template amplify_core.amplify_auth_category.confirm_user_attribute}
531
501
/// Confirms a user attribute update and returns a
@@ -535,14 +505,12 @@ class AuthCategory<
535
505
required PluginUserAttributeKey userAttributeKey,
536
506
required String confirmationCode,
537
507
PluginConfirmUserAttributeOptions ? options,
538
- }) {
539
- final request = ConfirmUserAttributeRequest (
540
- userAttributeKey: userAttributeKey,
541
- confirmationCode: confirmationCode,
542
- options: options,
543
- );
544
- return plugin.confirmUserAttribute (request: request);
545
- }
508
+ }) =>
509
+ plugin.confirmUserAttribute (
510
+ userAttributeKey: userAttributeKey,
511
+ confirmationCode: confirmationCode,
512
+ options: options,
513
+ );
546
514
547
515
/// {@template amplify_core.amplify_auth_category.resend_user_attribute_confirmation_code}
548
516
/// Resends a confirmation code for the given attribute and returns a
@@ -554,13 +522,11 @@ class AuthCategory<
554
522
resendUserAttributeConfirmationCode ({
555
523
required PluginUserAttributeKey userAttributeKey,
556
524
PluginResendUserAttributeConfirmationCodeOptions ? options,
557
- }) {
558
- final request = ResendUserAttributeConfirmationCodeRequest (
559
- userAttributeKey: userAttributeKey,
560
- options: options,
561
- );
562
- return plugin.resendUserAttributeConfirmationCode (request: request);
563
- }
525
+ }) =>
526
+ plugin.resendUserAttributeConfirmationCode (
527
+ userAttributeKey: userAttributeKey,
528
+ options: options,
529
+ );
564
530
565
531
/// {@template amplify_core.amplify_auth_category.remember_device}
566
532
/// Remembers the current device.
0 commit comments