Fitbit Api Oauth Issue
I am trying to connect to fitbit oauth, here is my code:
Map<String, String> customParameters = {"scope": "activity"}; final OAuth flutterOAuth = new FlutterOAuth(new Config( "https://www.fitbit.com/oauth2/authorize", "https://api.fitbit.com/oauth2/token", "######", "################", "http://localhost:8080", "code", parameters:customParameters, contentType: "application/x-www-form-urlencoded"));
But i keep getting a null return after I logged in and allowed access to app.
Error:
I/flutter ( 6554): null
E/flutter ( 6554): [ERROR:topaz/lib/tonic/logging/dart_error.cc(16)] Unhandled exception:
E/flutter ( 6554): 'package:flutter/src/widgets/text.dart': Failed assertion: line 212 pos 15: 'data != null': is not true.
E/flutter ( 6554): #0 _AssertionError._doThrowNew (dart:core-patch/dart:core/errors_patch.dart:37)
E/flutter ( 6554): #1 _AssertionError._throwNew (dart:core-patch/dart:core/errors_patch.dart:33)
E/flutter ( 6554): #2 new Text (package:flutter/src/widgets/text.dart:212:15)
E/flutter ( 6554): #3 MainState.authorise (/data/user/0/co.joebirch.tide/cache/exampleFJXSCW/example/lib/main.dart:71:20)
E/flutter ( 6554):