elbeicktalat / flutter_auth_buttons

Auth Buttons is a flutter widget library, include buttons for authenticating with the most popular social networks.
https://pub.dev/packages/auth_buttons
BSD 3-Clause "New" or "Revised" License
32 stars 32 forks source link

Null check operator used on a null value #50

Closed adar2378 closed 1 year ago

adar2378 commented 1 year ago

Hi, sometimes I get this error when loading screen with AuthButtons

Null check operator used on a null value, #0 RenderBox.size (package:flutter/src/rendering/box.dart:2023) #1 _ButtonContentState.getTextWidgetWidth (package:auth_buttons/src/shared/core/widgets/button_content.dart:95) #2 _ButtonContentState.initState. (package:auth_buttons/src/shared/core/widgets/button_content.dart:50) #3 SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1175) #4 SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:1113) #5 SchedulerBinding._handleDrawFrame (package:flutter/src/scheduler/binding.dart:1015) #6 _rootRun (dart:async/zone.dart:1391) #7 _CustomZone.run (dart:async/zone.dart:1293) #8 _CustomZone.runGuarded (dart:async/zone.dart:1201) #9 _invoke (dart:ui/hooks.dart:150) #10 PlatformDispatcher._drawFrame (dart:ui/platform_dispatcher.dart:318) #11 _drawFrame (dart:ui/hooks.dart:115)

elbeicktalat commented 1 year ago

Hi there, Thanks for your time,

This happened because the AuthButton is not able to get the RenderBox. This is not really an issue, but I will provide some failback value.

Thanks an good coding!

adar2378 commented 1 year ago

@elbeicktalat I think this is a Flutter related issue https://github.com/flutter/flutter/issues/107397

A fallback value may not work due this bug.

elbeicktalat commented 1 year ago

I think no body facing this issue anymore, by the way it was caused to flutter.