firebase / FirebaseUI-Flutter

Apache License 2.0
99 stars 86 forks source link

šŸ› [flutterfire_ui_auth] showReauthenticateDialog have unexpected interaction with app Theme #24

Closed dreyes17 closed 9 months ago

dreyes17 commented 1 year ago

Bug report

showReauthenticateDialog is not printing any text in reauthenticate button when the user is signed by email and using a theme with:

colorScheme: ColorScheme.light( primary: Colors.white )

Describe the bug The problem is that if I need to put that primary color to white I don't have a chance to change the background of the button as it is a clipRect. At least I can't find the way.

Steps to reproduce

Steps to reproduce the behavior:

  1. Add an AppTheme with the ColorScheme as above
  2. Sign up using email and password
  3. Try to reauthenticate using showReauthenticateDialog

Expected behavior

The text in the button on the bottom should be displayed or at least have the chance to change the background color of the button.

Additional context

Add any other context about the problem here.


Flutter doctor

Run flutter doctor and paste the output below:

Click To Expand ``` Doctor summary (to see all details, run flutter doctor -v): [āœ“] Flutter (Channel stable, 3.7.11, on macOS 13.3.1 22E261 darwin-arm64, locale es-ES) [āœ“] Android toolchain - develop for Android devices (Android SDK version 33.0.2) [āœ“] Xcode - develop for iOS and macOS (Xcode 14.3) [āœ“] Chrome - develop for the web [āœ“] Android Studio (version 2022.1) [āœ“] VS Code (version 1.77.3) [āœ“] Connected device (3 available) [āœ“] HTTP Host Availability ā€¢ No issues found! ```

Flutter dependencies

Run flutter pub deps -- --style=compact and paste the output below:

Click To Expand ``` Dart SDK 2.19.6 Flutter SDK 3.7.11 tattoo_discovery 4.0.5+23 dependencies: - _fe_analyzer_shared 58.0.0 [meta] - animations 2.0.7 [flutter] - auto_route 6.3.0 [flutter path collection meta] - carousel_slider 4.2.1 [flutter] - cloud_firestore 4.5.2 [cloud_firestore_platform_interface cloud_firestore_web collection firebase_core firebase_core_platform_interface flutter meta] - cloud_functions 4.1.1 [cloud_functions_platform_interface cloud_functions_web firebase_core firebase_core_platform_interface flutter] - connectivity_plus 3.0.4 [flutter flutter_web_plugins connectivity_plus_platform_interface js meta nm] - firebase_analytics 10.2.1 [firebase_analytics_platform_interface firebase_analytics_web firebase_core firebase_core_platform_interface flutter] - firebase_auth 4.4.2 [firebase_auth_platform_interface firebase_auth_web firebase_core firebase_core_platform_interface flutter meta] - firebase_core 2.10.0 [firebase_core_platform_interface firebase_core_web flutter meta] - firebase_crashlytics 3.1.1 [firebase_core firebase_core_platform_interface firebase_crashlytics_platform_interface flutter stack_trace] - firebase_messaging 14.4.1 [firebase_core firebase_core_platform_interface firebase_messaging_platform_interface firebase_messaging_web flutter meta] - firebase_performance 0.9.1+1 [firebase_core firebase_core_platform_interface firebase_performance_platform_interface firebase_performance_web flutter] - firebase_remote_config 4.0.1 [firebase_core firebase_core_platform_interface firebase_remote_config_platform_interface firebase_remote_config_web flutter] - firebase_ui_auth 1.2.2 [email_validator firebase_auth firebase_core firebase_dynamic_links firebase_ui_localizations firebase_ui_oauth firebase_ui_shared flutter flutter_localizations flutter_svg] - firebase_ui_oauth_apple 1.1.2 [firebase_auth firebase_ui_oauth flutter] - firebase_ui_oauth_google 1.1.2 [firebase_auth firebase_ui_oauth flutter google_sign_in] - flutter 0.0.0 [characters collection js material_color_utilities meta vector_math sky_engine] - flutter_local_notifications 14.0.0-dev.4 [clock flutter flutter_local_notifications_linux flutter_local_notifications_platform_interface timezone] - flutter_markdown 0.6.14 [flutter markdown meta path] - flutter_native_splash 2.2.19 [args flutter flutter_web_plugins js html image meta path universal_io xml yaml] - geolocator 9.0.2 [flutter geolocator_platform_interface geolocator_android geolocator_apple geolocator_web geolocator_windows] - get_it 7.2.0 [async collection] - global_configuration 2.0.0-nullsafety.1 [flutter http] - google_fonts 4.0.3 [flutter http path_provider crypto] - google_maps_flutter 2.2.5 [flutter google_maps_flutter_android google_maps_flutter_ios google_maps_flutter_platform_interface] - google_mobile_ads 2.4.0 [meta flutter visibility_detector] - google_sign_in 6.1.0 [flutter google_sign_in_android google_sign_in_ios google_sign_in_platform_interface google_sign_in_web] - http 0.13.5 [async http_parser meta path] - image_gallery_saver 1.7.1 [flutter] - in_app_purchase 3.1.5 [flutter in_app_purchase_android in_app_purchase_platform_interface in_app_purchase_storekit] - in_app_purchase_platform_interface 1.3.3 [flutter plugin_platform_interface] - in_app_review 2.0.6 [flutter in_app_review_platform_interface] - injectable 2.1.1 [get_it] - intl 0.17.0 [clock path] - introduction_screen 3.1.7 [flutter dots_indicator collection flutter_keyboard_visibility] - path_provider 2.0.14 [flutter path_provider_android path_provider_foundation path_provider_linux path_provider_platform_interface path_provider_windows] - permission_handler 10.2.0 [flutter meta permission_handler_android permission_handler_apple permission_handler_windows permission_handler_platform_interface] - share_plus 6.3.2 [cross_file meta mime flutter flutter_web_plugins share_plus_platform_interface file url_launcher_web url_launcher_windows url_launcher_linux url_launcher_platform_interface ffi win32] - shared_preferences 2.1.0 [flutter shared_preferences_android shared_preferences_foundation shared_preferences_linux shared_preferences_platform_interface shared_preferences_web shared_preferences_windows] - showcaseview 2.0.3 [flutter] - sign_in_with_apple 4.3.0 [flutter meta sign_in_with_apple_platform_interface sign_in_with_apple_web] - stacked 3.2.1 [flutter get_it meta provider collection stacked_shared universal_io path] - url_launcher 6.1.10 [flutter url_launcher_android url_launcher_ios url_launcher_linux url_launcher_macos url_launcher_platform_interface url_launcher_web url_launcher_windows] dev dependencies: - auto_route_generator 6.2.0 [build source_gen analyzer path build_runner code_builder dart_style xml args glob auto_route] - build_runner 2.3.3 [args async analyzer build build_config build_daemon build_resolvers build_runner_core code_builder collection crypto dart_style frontend_server_client glob graphs http_multi_server io js logging meta mime package_config path pool pub_semver pubspec_parse shelf shelf_web_socket stack_trace stream_transform timing watcher web_socket_channel yaml] - flutter_test 0.0.0 [flutter test_api path fake_async clock stack_trace vector_math async boolean_selector characters collection js matcher material_color_utilities meta source_span stream_channel string_scanner term_glyph] - injectable_generator 2.1.5 [build source_gen path glob analyzer code_builder dart_style injectable collection recase] transitive dependencies: - _flutterfire_internals 1.1.1 [collection firebase_core firebase_core_platform_interface flutter meta] - analyzer 5.10.0 [_fe_analyzer_shared collection convert crypto glob meta package_config path pub_semver source_span watcher yaml] - archive 3.3.7 [crypto path pointycastle] - args 2.4.0 - async 2.10.0 [collection meta] - boolean_selector 2.1.1 [source_span string_scanner] - build 2.3.1 [analyzer async convert crypto glob logging meta path] - build_config 1.1.1 [checked_yaml json_annotation path pubspec_parse yaml] - build_daemon 3.1.1 [built_collection built_value http_multi_server logging path pool shelf shelf_web_socket stream_transform watcher web_socket_channel] - build_resolvers 2.2.0 [analyzer async build collection crypto graphs logging path package_config pool pub_semver stream_transform yaml] - build_runner_core 7.2.7 [async build build_config build_resolvers collection convert crypto glob graphs json_annotation logging meta path package_config pool timing watcher yaml] - built_collection 5.1.1 - built_value 8.4.4 [built_collection collection fixnum meta] - characters 1.2.1 - checked_yaml 2.0.2 [json_annotation source_span yaml] - clock 1.1.1 - cloud_firestore_platform_interface 5.12.1 [_flutterfire_internals collection firebase_core flutter meta plugin_platform_interface] - cloud_firestore_web 3.4.2 [_flutterfire_internals cloud_firestore_platform_interface collection firebase_core firebase_core_web flutter flutter_web_plugins js] - cloud_functions_platform_interface 5.2.1 [firebase_core flutter meta plugin_platform_interface] - cloud_functions_web 4.4.1 [cloud_functions_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins js] - code_builder 4.4.0 [built_collection built_value collection matcher meta] - collection 1.17.0 - connectivity_plus_platform_interface 1.2.4 [flutter meta plugin_platform_interface] - convert 3.1.1 [typed_data] - cross_file 0.3.3+4 [js meta] - crypto 3.0.2 [typed_data] - csslib 0.17.2 [source_span] - dart_style 2.3.0 [analyzer args path pub_semver source_span] - dbus 0.7.8 [args ffi meta xml] - desktop_webview_auth 0.0.11 [crypto flutter http flutter_web_plugins plugin_platform_interface] - dots_indicator 2.1.0 [flutter] - email_validator 2.1.17 - fake_async 1.3.1 [clock collection] - ffi 2.0.1 - file 6.1.4 [meta path] - firebase_analytics_platform_interface 3.4.1 [_flutterfire_internals firebase_core flutter meta plugin_platform_interface] - firebase_analytics_web 0.5.2+1 [_flutterfire_internals firebase_analytics_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins js] - firebase_auth_platform_interface 6.13.1 [_flutterfire_internals collection firebase_core flutter meta plugin_platform_interface] - firebase_auth_web 5.3.2 [firebase_auth_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins http_parser intl js meta] - firebase_core_platform_interface 4.6.0 [collection flutter flutter_test meta plugin_platform_interface] - firebase_core_web 2.3.0 [firebase_core_platform_interface flutter flutter_web_plugins js meta] - firebase_crashlytics_platform_interface 3.4.1 [_flutterfire_internals collection firebase_core flutter meta plugin_platform_interface] - firebase_dynamic_links 5.1.1 [firebase_core firebase_core_platform_interface firebase_dynamic_links_platform_interface flutter meta plugin_platform_interface] - firebase_dynamic_links_platform_interface 0.2.4+1 [_flutterfire_internals firebase_core flutter meta plugin_platform_interface] - firebase_messaging_platform_interface 4.3.1 [_flutterfire_internals firebase_core flutter meta plugin_platform_interface] - firebase_messaging_web 3.3.1 [_flutterfire_internals firebase_core firebase_core_web firebase_messaging_platform_interface flutter flutter_web_plugins js meta] - firebase_performance_platform_interface 0.1.2+1 [_flutterfire_internals firebase_core flutter plugin_platform_interface] - firebase_performance_web 0.1.2+1 [_flutterfire_internals firebase_core firebase_core_web firebase_performance_platform_interface flutter flutter_web_plugins js] - firebase_remote_config_platform_interface 1.2.1 [_flutterfire_internals firebase_core flutter meta plugin_platform_interface] - firebase_remote_config_web 1.2.1 [firebase_core firebase_core_web firebase_remote_config_platform_interface flutter flutter_web_plugins js] - firebase_ui_localizations 1.3.0 [flutter flutter_localizations intl path] - firebase_ui_oauth 1.2.2 [desktop_webview_auth firebase_auth firebase_ui_auth firebase_ui_shared flutter_svg flutter] - firebase_ui_shared 1.2.0 [flutter] - fixnum 1.1.0 - flutter_keyboard_visibility 5.4.0 [meta flutter_keyboard_visibility_platform_interface flutter_keyboard_visibility_linux flutter_keyboard_visibility_macos flutter_keyboard_visibility_web flutter_keyboard_visibility_windows flutter] - flutter_keyboard_visibility_linux 1.0.0 [flutter_keyboard_visibility_platform_interface flutter] - flutter_keyboard_visibility_macos 1.0.0 [flutter_keyboard_visibility_platform_interface flutter] - flutter_keyboard_visibility_platform_interface 2.0.0 [flutter meta plugin_platform_interface] - flutter_keyboard_visibility_web 2.0.0 [flutter_keyboard_visibility_platform_interface flutter_web_plugins flutter] - flutter_keyboard_visibility_windows 1.0.0 [flutter_keyboard_visibility_platform_interface flutter] - flutter_local_notifications_linux 4.0.0-dev.2 [dbus ffi flutter flutter_local_notifications_platform_interface path xdg_directories] - flutter_local_notifications_platform_interface 7.0.0-dev.3 [flutter plugin_platform_interface] - flutter_localizations 0.0.0 [flutter intl characters clock collection js material_color_utilities meta path vector_math] - flutter_plugin_android_lifecycle 2.0.9 [flutter] - flutter_svg 1.1.6 [flutter meta path_drawing vector_math xml] - flutter_web_plugins 0.0.0 [flutter js characters collection material_color_utilities meta vector_math] - frontend_server_client 3.2.0 [async path] - geolocator_android 4.1.7 [flutter geolocator_platform_interface] - geolocator_apple 2.2.5 [flutter geolocator_platform_interface] - geolocator_platform_interface 4.0.7 [flutter plugin_platform_interface vector_math meta] - geolocator_web 2.1.6 [flutter flutter_web_plugins geolocator_platform_interface] - geolocator_windows 0.1.1 [flutter geolocator_platform_interface] - glob 2.1.1 [async collection file path string_scanner] - google_identity_services_web 0.2.1 [js meta] - google_maps_flutter_android 2.4.10 [flutter flutter_plugin_android_lifecycle google_maps_flutter_platform_interface stream_transform] - google_maps_flutter_ios 2.2.1 [flutter google_maps_flutter_platform_interface stream_transform] - google_maps_flutter_platform_interface 2.2.6 [collection flutter plugin_platform_interface stream_transform] - google_sign_in_android 6.1.9 [flutter google_sign_in_platform_interface] - google_sign_in_ios 5.6.1 [flutter google_sign_in_platform_interface] - google_sign_in_platform_interface 2.4.0 [flutter plugin_platform_interface quiver] - google_sign_in_web 0.12.0 [flutter flutter_web_plugins google_identity_services_web google_sign_in_platform_interface http js] - graphs 2.2.0 [collection] - html 0.15.2 [csslib source_span] - http_multi_server 3.2.1 [async] - http_parser 4.0.2 [collection source_span string_scanner typed_data] - image 4.0.15 [archive meta xml] - in_app_purchase_android 0.2.5 [collection flutter in_app_purchase_platform_interface json_annotation] - in_app_purchase_storekit 0.3.6+3 [collection flutter in_app_purchase_platform_interface json_annotation] - in_app_review_platform_interface 2.0.4 [flutter url_launcher plugin_platform_interface platform] - io 1.0.4 [meta path string_scanner] - js 0.6.5 [meta] - json_annotation 4.8.0 [meta] - logging 1.1.1 - markdown 7.0.2 [args meta] - matcher 0.12.13 [meta stack_trace] - material_color_utilities 0.2.0 - meta 1.8.0 - mime 1.0.4 - nested 1.0.0 [flutter] - nm 0.5.0 [dbus] - package_config 2.1.0 [path] - path 1.8.2 - path_drawing 1.0.1 [vector_math meta path_parsing flutter] - path_parsing 1.0.1 [vector_math meta] - path_provider_android 2.0.25 [flutter path_provider_platform_interface] - path_provider_foundation 2.2.2 [flutter path_provider_platform_interface] - path_provider_linux 2.1.10 [ffi flutter path path_provider_platform_interface xdg_directories] - path_provider_platform_interface 2.0.6 [flutter platform plugin_platform_interface] - path_provider_windows 2.1.5 [ffi flutter path path_provider_platform_interface win32] - permission_handler_android 10.2.0 [flutter permission_handler_platform_interface] - permission_handler_apple 9.0.8 [flutter permission_handler_platform_interface] - permission_handler_platform_interface 3.9.0 [flutter meta plugin_platform_interface] - permission_handler_windows 0.1.2 [flutter permission_handler_platform_interface] - petitparser 5.1.0 [meta] - platform 3.1.0 - plugin_platform_interface 2.1.4 [meta] - pointycastle 3.7.3 [collection convert js] - pool 1.5.1 [async stack_trace] - process 4.2.4 [file path platform] - provider 6.0.5 [collection flutter nested] - pub_semver 2.1.3 [collection meta] - pubspec_parse 1.2.2 [checked_yaml collection json_annotation pub_semver yaml] - quiver 3.2.1 [matcher] - recase 4.1.0 - share_plus_platform_interface 3.2.1 [cross_file flutter meta mime plugin_platform_interface path_provider uuid] - shared_preferences_android 2.1.2 [flutter shared_preferences_platform_interface] - shared_preferences_foundation 2.2.1 [flutter shared_preferences_platform_interface] - shared_preferences_linux 2.2.0 [file flutter path path_provider_linux path_provider_platform_interface shared_preferences_platform_interface] - shared_preferences_platform_interface 2.2.0 [flutter plugin_platform_interface] - shared_preferences_web 2.1.0 [flutter flutter_web_plugins shared_preferences_platform_interface] - shared_preferences_windows 2.2.0 [file flutter path path_provider_platform_interface path_provider_windows shared_preferences_platform_interface] - shelf 1.4.0 [async collection http_parser path stack_trace stream_channel] - shelf_web_socket 1.0.3 [shelf stream_channel web_socket_channel] - sign_in_with_apple_platform_interface 1.0.0 [flutter plugin_platform_interface meta] - sign_in_with_apple_web 1.0.1 [flutter flutter_web_plugins sign_in_with_apple_platform_interface js] - sky_engine 0.0.99 - source_gen 1.2.7 [analyzer async build dart_style glob path source_span yaml] - source_span 1.9.1 [collection path term_glyph] - stack_trace 1.11.0 [path] - stacked_shared 1.3.1 [get_it] - stream_channel 2.1.1 [async] - stream_transform 2.1.0 - string_scanner 1.2.0 [source_span] - term_glyph 1.2.1 - test_api 0.4.16 [async boolean_selector collection meta source_span stack_trace stream_channel string_scanner term_glyph matcher] - timezone 0.9.1 [path] - timing 1.0.1 [json_annotation] - typed_data 1.3.1 [collection] - universal_io 2.2.0 [collection meta typed_data] - url_launcher_android 6.0.27 [flutter url_launcher_platform_interface] - url_launcher_ios 6.1.4 [flutter url_launcher_platform_interface] - url_launcher_linux 3.0.4 [flutter url_launcher_platform_interface] - url_launcher_macos 3.0.5 [flutter url_launcher_platform_interface] - url_launcher_platform_interface 2.1.2 [flutter plugin_platform_interface] - url_launcher_web 2.0.16 [flutter flutter_web_plugins url_launcher_platform_interface] - url_launcher_windows 3.0.5 [flutter url_launcher_platform_interface] - uuid 3.0.7 [crypto] - vector_math 2.1.4 - visibility_detector 0.3.3 [flutter] - watcher 1.0.2 [async path] - web_socket_channel 2.4.0 [async crypto stream_channel] - win32 3.1.4 [ffi] - xdg_directories 1.0.0 [meta path process] - xml 6.2.2 [collection meta petitparser] - yaml 3.1.1 [collection source_span string_scanner] ```

darshankawar commented 1 year ago

Thanks for the report @dreyes17 Assuming you are using flutterfire_ui plugin, but it is deprecated https://pub.dev/packages/flutterfire_ui#-flutterfire-ui-is-deprecated

Please try the alternative plugins as listed and see if using either of them gives you still same behavior or not.

Screenshot 2023-04-24 at 4 30 00 PM
dreyes17 commented 1 year ago

Hello @darshankawar ,

I am using the new firebase_ui_auth, you can check it in the Flutter Dependencies section.

darshankawar commented 1 year ago

Thanks for the feedback @dreyes17 I tried to use the firebase_ui_auth package code and add your snippet in it, but not seem to be able to replicate it properly. Can you provide the complete code sample that shows the reported error ?

I see a similar issue you had logged last year: https://github.com/firebase/flutterfire/issues/9202 which got closed as we were unable to replicate it too.

dreyes17 commented 1 year ago

Sure, I have made the most simple example possible and I have realized that happens also in the login. The only thing that you have to do to make it work is create a new project, add firebase to it (start the authentication service in firebase) and add this libraries to pubspec.yaml: firebase_ui_auth an firebase_auth.

After that, replace all the main.dart with the following code:

import 'package:firebase_auth/firebase_auth.dart' hide EmailAuthProvider;
import 'package:firebase_ui_auth/firebase_ui_auth.dart';
import 'package:flutter/material.dart';
import 'package:firebase_core/firebase_core.dart';
import 'firebase_options.dart';

void main() async {
  WidgetsFlutterBinding.ensureInitialized();
  await Firebase.initializeApp(
    options: DefaultFirebaseOptions.currentPlatform,
  );
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    final providers = [EmailAuthProvider()];

    return MaterialApp(
        initialRoute:
            FirebaseAuth.instance.currentUser == null ? '/sign-in' : '/',
        routes: {
          '/sign-in': (context) {
            return SignInScreen(
              providers: providers,
              actions: [
                AuthStateChangeAction<SignedIn>((context, state) {
                  Navigator.pushReplacementNamed(context, '/');
                }),
              ],
            );
          },
          '/': (context) {
            return const MyHomePage(title: 'Flutter Demo Home Page');
          }
        },
        title: 'Flutter Demo',
        theme: ThemeData(
          // This is the theme of your application.
          //
          // Try running your application with "flutter run". You'll see the
          // application has a blue toolbar. Then, without quitting the app, try
          // changing the primarySwatch below to Colors.green and then invoke
          // "hot reload" (press "r" in the console where you ran "flutter run",
          // or simply save your changes to "hot reload" in a Flutter IDE).
          // Notice that the counter didn't reset back to zero; the application
          // is not restarted.
          primarySwatch: Colors.blue,
          colorScheme: const ColorScheme.light(
              primary: Colors.white, background: Colors.black
              // on light theme surface = Colors.white by default
              ),
          elevatedButtonTheme: ElevatedButtonThemeData(
            style: ElevatedButton.styleFrom(
              backgroundColor: Colors.black, // background (button) color
              foregroundColor: Colors.white, // foreground (text) color
            ),
          ),
        ));
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({super.key, required this.title});

  // This widget is the home page of your application. It is stateful, meaning
  // that it has a State object (defined below) that contains fields that affect
  // how it looks.

  // This class is the configuration for the state. It holds the values (in this
  // case the title) provided by the parent (in this case the App widget) and
  // used by the build method of the State. Fields in a Widget subclass are
  // always marked "final".

  final String title;

  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  final int _counter = 0;

  void reauthenticate() async {
    await showReauthenticateDialog(
        context: context,
        providers: [EmailAuthProvider()],
        auth: FirebaseAuth.instance,
        onSignedIn: (() async {}));
  }

  @override
  Widget build(BuildContext context) {
    // This method is rerun every time setState is called, for instance as done
    // by the _incrementCounter method above.
    //
    // The Flutter framework has been optimized to make rerunning build methods
    // fast, so that you can just rebuild anything that needs updating rather
    // than having to individually change instances of widgets.
    return Scaffold(
        appBar: AppBar(
          // Here we take the value from the MyHomePage object that was created by
          // the App.build method, and use it to set our appbar title.
          title: Text(widget.title),
        ),
        body: Center(
          // Center is a layout widget. It takes a single child and positions it
          // in the middle of the parent.
          child: Column(
            // Column is also a layout widget. It takes a list of children and
            // arranges them vertically. By default, it sizes itself to fit its
            // children horizontally, and tries to be as tall as its parent.
            //
            // Invoke "debug painting" (press "p" in the console, choose the
            // "Toggle Debug Paint" action from the Flutter Inspector in Android
            // Studio, or the "Toggle Debug Paint" command in Visual Studio Code)
            // to see the wireframe for each widget.
            //
            // Column has various properties to control how it sizes itself and
            // how it positions its children. Here we use mainAxisAlignment to
            // center the children vertically; the main axis here is the vertical
            // axis because Columns are vertical (the cross axis would be
            // horizontal).
            mainAxisAlignment: MainAxisAlignment.center,
            children: <Widget>[
              ElevatedButton(
                onPressed: reauthenticate,
                child: const Text('Reauthenticate'),
              ),
            ],
          ),
        ) // This trailing comma makes auto-formatting nicer for build methods.
        );
  }
}
darshankawar commented 1 year ago

Thanks for the update. I am able to replicate it using the code sample provided and see below:

Screenshot 2023-04-28 at 4 02 30 PM Screenshot 2023-04-28 at 4 03 08 PM
darshankawar commented 1 year ago

/cc @lesnitsky

lesnitsky commented 9 months ago

The problem is that if I need to put that primary color to white I don't have a chance to change the background of the button as it is a clipRect. At least I can't find the way.

You need to use outlinedButtonTheme:

ThemeData(
  // ...
  outlinedButtonTheme: OutlinedButtonThemeData(
    style: OutlinedButton.styleFrom(
      backgroundColor: Colors.black,
    ),
  ),
)

Firebase UI uses Material and Cupertino widgets under the hood, so any styling issues are likely a misconfiguration of the theme and have nothing to do with Firebase UI itself, you'd be able to reproduce the same issue with regular widgets coming directly from flutter.