There is a case that response returns a list and ApiService should convert each item to a model object and put it into a List
Proof Of Work
flutter: *** Request ***
flutter: uri: https://nimble-survey-web-staging.herokuapp.com/api/v1/surveys?number=1&size=5
flutter: method: GET
flutter: responseType: ResponseType.json
flutter: followRedirects: true
flutter: connectTimeout: 0
flutter: sendTimeout: 0
flutter: receiveTimeout: 0
flutter: receiveDataWhenStatusError: true
flutter: extra: {}
flutter: headers:
flutter: authorization: Bearer qgl0wRClzrBsOu-AVYT0Np0STHQb6qERjvMTsirT3xg
flutter: data:
flutter: null
flutter:
flutter: *** Response ***
flutter: uri: https://nimble-survey-web-staging.herokuapp.com/api/v1/surveys?number=1&size=5
flutter: statusCode: 200
flutter: headers:
flutter: connection: keep-alive
flutter: cache-control: max-age=0, private, must-revalidate
flutter: transfer-encoding: chunked
flutter: date: Tue, 11 May 2021 04:46:12 GMT
flutter: vary: Accept-Encoding, Origin
flutter: content-encoding: gzip
flutter: strict-transport-security: max-age=31536000; includeSubDomains
flutter: referrer-policy: strict-origin-when-cross-origin
flutter: x-permitted-cross-domain-policies: none
flutter: content-type: application/json; charset=utf-8
flutter: x-xss-protection: 1; mode=block
flutter: server: Cowboy
flutter: x-request-id: 4ff12c92-d275-4f82-a2a5-013a73247b4e
flutter: x-download-options: noopen
flutter: x-runtime: 0.042441
flutter: etag: W/"9d8238e13517f409dcfbff0e630d4c74"
flutter: via: 1.1 vegur
flutter: x-frame-options: SAMEORIGIN
flutter: x-content-type-options: nosniff
flutter: Response Text:
flutter: {"data":[{"id":"d5de6a8f8f5f1cfe51bc","type":"survey","attributes":{"title":"Scarlett Bangkok","description":"We'd love ot hear from you!","thank_email_above_threshold":"<span style=\"font-family:arial,helvetica,sans-serif\"><span style=\"font-size:14px\">Dear {name},<br /><br />Thank you for visiting Scarlett Wine Bar & Restaurant at Pullman Bangkok Hotel G and for taking the time to complete our guest feedback survey!<br /><br />Your feedback is very important to us and each survey is read individually by the management and owners shortly after it is sent. We discuss comments and suggestions at our daily meetings and use them to constantly improve our services.<br /><br />We would very much appreciate it if you could take a few more moments and review us on TripAdvisor regarding your recent visit. By <a href=\"https://www.tripadvisor.com/Restaurant_Review-g293916-d2629404-Reviews-Scarlett_Wine_Bar_Restaurant-Bangkok.html\">clicking here</a> you will be directed to our page.<…>
flutter:
flutter: [Instance of 'SurveyInfo', Instance of 'SurveyInfo', Instance of 'SurveyInfo', Instance of 'SurveyInfo', Instance of 'SurveyInfo']
https://github.com/markgravity/flutter-survey/issues/15
What happened
There is a case that response returns a list and ApiService should convert each item to a model object and put it into a
List
Proof Of Work