darwin-morocho / flutter-facebook-auth

A flutter plugin to add login with facebook in your flutter app
191 stars 124 forks source link

Return data type is different on iOS and Android #383

Closed leduchung closed 2 months ago

leduchung commented 3 months ago

What version are you using?

flutter_facebook_auth:6.0.4

What OS and version are you using to local deploy your application?

macOS 14.0

What platforms are you seeing the problem on?

iOS

pubspec.yaml

flutter_facebook_auth: ^6.0.3

Describe the Bug

In Flutter code, after logging user in, try to get user data by command:

Map<String, dynamic> responseUser = await FacebookAuth.instance.getUserData();
print(responseUser['picture'].runtimeType);

On iOS, I got: _Map<Object?, Object?> On Android, I got: _Map<String, dynamic>

Expected Behavior

The data type should be the same on iOS and Android, so the data processing is right. Expect: _Map<String, dynamic>

To Reproduce

The bug in the getUserData() function.

Relevant log output

No response

flutter doctor -v

[✓] Flutter (Channel stable, 3.16.4, on macOS 14.0 23A344 darwin-arm64, locale en-AT)
    • Flutter version 3.16.4 on channel stable at /Users/dhl/opt/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 2e9cb0aa71 (6 weeks ago), 2023-12-11 14:35:13 -0700
    • Engine revision 54a7145303
    • Dart version 3.2.3
    • DevTools version 2.28.4

Info.plist (iOS)

No response

Podfile (iOS)

No response

AndroidManifest.xml

No response

MainActivity.java

No response

MainActivity.kt

No response

index.html

No response

Info.plist (macOS)

No response