Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
340 views
in Technique[技术] by (71.8m points)

api - Flutter Template Is not displaying debug

flutter buddy press app which link my flutter app and my wordpress app is build on redux it makes request using dio like below to list an activity

static getAllActivityList(Map<String, dynamic> paramsMap) async {
    String requestUrl =
        "${getConfigHost()}/wp-json/buddyboss/v1/get_all_activity";
    Dio dio = new Dio();

    try {
      Response response = await dio.get(requestUrl,
          queryParameters: paramsMap,
          options: Options(headers: {
            "Authorization":
                makeAuthorizationHeader('GET', requestUrl, paramsMap)
          }));
      Activities listActivitity = Activities.fromJson(response.data);
      print("Hmmm");

      return listActivitity;
    } on DioError catch (error) {
      handleDioError(error);
    } catch (e) {
      return null;
    }
  }

The response in android is No data found the app uses auth1 for security but cant even debug on the app it didn't print any data or error or success i have tried logging library and other print but nothing shows. The response on post man works fine using authorization.Thanks

question from:https://stackoverflow.com/questions/65890629/flutter-template-is-not-displaying-debug

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
flutter clean 

Run this in the terminal then try again , it will work


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...