FirebaseUI-Flutter icon indicating copy to clipboard operation
FirebaseUI-Flutter copied to clipboard

🐛 [firebase_ui_auth] problems with LoginView layout

Open Shiru99 opened this issue 1 year ago • 0 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues and found no duplicates.

What plugin is this bug for?

Firebase UI Auth

What platform(s) does this bug affect?

Android

List of dependencies used.

flutter pub deps -s list
Dart SDK 3.3.3
Flutter SDK 3.19.5
ad 1.0.0
dependencies:
- flutter 0.0.0
  - characters 1.3.0
  - collection 1.18.0
  - material_color_utilities 0.8.0
  - meta 1.11.0
  - vector_math 2.1.4
  - sky_engine any
- cupertino_icons 1.0.6
- firebase_core 2.29.0
  - firebase_core_platform_interface ^5.0.0
  - firebase_core_web ^2.15.0
  - flutter any
  - meta ^1.8.0
- firebase_auth 4.19.1
  - firebase_auth_platform_interface ^7.2.2
  - firebase_auth_web ^5.11.1
  - firebase_core ^2.29.0
  - firebase_core_platform_interface ^5.0.0
  - flutter any
  - meta ^1.8.0
- firebase_ui_auth 1.13.1
  - email_validator ^2.1.17
  - firebase_auth ^4.17.5
  - firebase_core ^2.25.4
  - firebase_dynamic_links ^5.4.14
  - firebase_ui_localizations ^1.10.2
  - firebase_ui_oauth ^1.5.1
  - firebase_ui_shared ^1.4.1
  - flutter any
  - flutter_localizations any
  - meta ^1.10.0
- firebase_ui_oauth_google 1.3.1
  - firebase_auth ^4.17.5
  - firebase_ui_oauth ^1.5.1
  - flutter any
  - google_sign_in ^6.2.1
- google_sign_in 6.2.1
  - flutter any
  - google_sign_in_android ^6.1.0
  - google_sign_in_ios ^5.7.0
  - google_sign_in_platform_interface ^2.4.0
  - google_sign_in_web ^0.12.0
dev dependencies:
- flutter_test 0.0.0
  - flutter any
  - test_api 0.6.1
  - matcher 0.12.16+1
  - path 1.9.0
  - fake_async 1.3.1
  - clock 1.1.1
  - stack_trace 1.11.1
  - vector_math 2.1.4
  - leak_tracker_flutter_testing 2.0.1
  - async 2.11.0
  - boolean_selector 2.1.1
  - characters 1.3.0
  - collection 1.18.0
  - leak_tracker 10.0.0
  - leak_tracker_testing 2.0.1
  - material_color_utilities 0.8.0
  - meta 1.11.0
  - source_span 1.10.0
  - stream_channel 2.1.2
  - string_scanner 1.2.0
  - term_glyph 1.2.1
  - vm_service 13.0.0
- flutter_lints 3.0.2
  - lints ^3.0.0
transitive dependencies:
- _flutterfire_internals 1.3.29
  - collection ^1.0.0
  - firebase_core ^2.29.0
  - firebase_core_platform_interface ^5.0.0
  - flutter any
  - meta ^1.8.0
- args 2.5.0
- async 2.11.0
  - collection ^1.15.0
  - meta ^1.1.7
- boolean_selector 2.1.1
  - source_span ^1.8.0
  - string_scanner ^1.1.0
- characters 1.3.0
- clock 1.1.1
- collection 1.18.0
- crypto 3.0.3
  - typed_data ^1.3.0
- desktop_webview_auth 0.0.15
  - crypto ^3.0.3
  - flutter any
  - http ^1.0.0
  - flutter_web_plugins any
  - plugin_platform_interface ^2.1.4
- email_validator 2.1.17
- fake_async 1.3.1
  - clock ^1.1.0
  - collection ^1.15.0
- firebase_auth_platform_interface 7.2.2
  - _flutterfire_internals ^1.3.29
  - collection ^1.16.0
  - firebase_core ^2.29.0
  - flutter any
  - meta ^1.8.0
  - plugin_platform_interface ^2.1.3
- firebase_auth_web 5.11.1
  - firebase_auth_platform_interface ^7.2.2
  - firebase_core ^2.29.0
  - firebase_core_web ^2.15.0
  - flutter any
  - flutter_web_plugins any
  - http_parser ^4.0.0
  - meta ^1.8.0
  - web ^0.5.1
- firebase_core_platform_interface 5.0.0
  - collection ^1.0.0
  - flutter any
  - flutter_test any
  - meta ^1.8.0
  - plugin_platform_interface ^2.1.3
- firebase_core_web 2.15.0
  - firebase_core_platform_interface ^5.0.0
  - flutter any
  - flutter_web_plugins any
  - meta ^1.8.0
  - web ^0.5.1
- firebase_dynamic_links 5.5.1
  - firebase_core ^2.29.0
  - firebase_core_platform_interface ^5.0.0
  - firebase_dynamic_links_platform_interface ^0.2.6+29
  - flutter any
  - meta ^1.8.0
  - plugin_platform_interface ^2.1.3
- firebase_dynamic_links_platform_interface 0.2.6+29
  - _flutterfire_internals ^1.3.29
  - firebase_core ^2.29.0
  - flutter any
  - meta ^1.8.0
  - plugin_platform_interface ^2.1.3
- firebase_ui_localizations 1.10.2
  - flutter any
  - flutter_localizations any
  - path ^1.8.3
- firebase_ui_oauth 1.5.1
  - desktop_webview_auth ^0.0.14
  - firebase_auth ^4.17.5
  - firebase_ui_auth ^1.13.1
  - firebase_ui_shared ^1.4.1
  - flutter_svg ^2.0.9
  - flutter any
- firebase_ui_shared 1.4.1
  - flutter any
- flutter_localizations 0.0.0
  - flutter any
  - intl 0.18.1
  - characters 1.3.0
  - clock 1.1.1
  - collection 1.18.0
  - material_color_utilities 0.8.0
  - meta 1.11.0
  - path 1.9.0
  - vector_math 2.1.4
- flutter_svg 2.0.10+1
  - flutter any
  - http ^1.0.0
  - vector_graphics ^1.1.11
  - vector_graphics_codec ^1.1.11
  - vector_graphics_compiler ^1.1.11
- flutter_web_plugins 0.0.0
  - flutter any
  - characters 1.3.0
  - collection 1.18.0
  - material_color_utilities 0.8.0
  - meta 1.11.0
  - vector_math 2.1.4
- google_identity_services_web 0.3.1+1
  - meta ^1.3.0
  - web ^0.5.1
- google_sign_in_android 6.1.23
  - flutter any
  - google_sign_in_platform_interface ^2.2.0
- google_sign_in_ios 5.7.6
  - flutter any
  - google_sign_in_platform_interface ^2.2.0
- google_sign_in_platform_interface 2.4.5
  - flutter any
  - plugin_platform_interface ^2.1.7
- google_sign_in_web 0.12.4
  - flutter any
  - flutter_web_plugins any
  - google_identity_services_web ^0.3.1
  - google_sign_in_platform_interface ^2.4.0
  - http >=0.13.0 =11.10.0 =10.0.0 =2.0.1 =9.0.0 =0.5.0 

Steps to reproduce

Just switch showAuthActionSwitch: true to showAuthActionSwitch: false

SignInScreen(
            providers: [
              GoogleProvider(clientId: GOOGLE_CLIENT_ID),
            ],
            showAuthActionSwitch: false,
            ...
)

Expected Behavior

Expected it to hide all Title & AuthAction, but it hides only 'AuthAction'

Actual Behavior

Only hides 'AuthAction' & not Title - "Sing in/ Register"

Before After (expected to hide text - "Sign in")
Before After (expected to hide text - "Register")

Additional Information

Can be corrected by-

In Class _LoginViewState : var _showTitle can be set to widget.showAuthActionSwitch instead of widget.showTitle which has default value of true and no option to set any other value

class _LoginViewState extends State<LoginView> {
  late AuthAction _action = widget.action;

  // bool get _showTitle => widget.showTitle ?? true;
  bool get _showTitle => widget.showAuthActionSwitch ?? true;   //      <<<---  Change suggestion --->>>

  bool get _showAuthActionSwitch => widget.showAuthActionSwitch ?? true;
  bool _buttonsBuilt = false;

  void setAction(AuthAction action) {
    setState(() {
      _action = action;
    });
  }
...
}

Shiru99 avatar Apr 23 '24 15:04 Shiru99