[REQ] Can this tool used for generating flutter mobile api code?
Created by: YLoveX
Use generated api classes for mobile flutter dev
This is my flutter doctor:
[✓] Flutter (Channel beta, v1.6.3, on Mac OS X 10.14.5 18F132, locale en-CN)
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
[✓] iOS toolchain - develop for iOS devices (Xcode 10.3)
[✓] Android Studio (version 3.4)
[✓] VS Code (version 1.36.0)
[✓] Connected device (1 available)
I'm trying to use this tool to generate the api code which give these files.
And when i import these files to flutter project, i want to use api_client to instead of my code. Compiler gives me this :
Compiler message:
file:///Users/xxxx/flutter/.pub-cache/hosted/pub.dartlang.org/http-0.12.0+2/lib/src/browser_client.dart:97:25: Error: Type 'HttpRequest' not found.
void _openHttpRequest(HttpRequest request, String method, String url,
^^^^^^^^^^^
file:///Users/xxxx/flutter/.pub-cache/hosted/pub.dartlang.org/http-0.12.0+2/lib/src/browser_client.dart:32:25: Error: 'HttpRequest' isn't a type.
final _xhrs = new Set<HttpRequest>();
^^^^^^^^^^^
file:///Users/xxxx/flutter/.pub-cache/hosted/pub.dartlang.org/http-0.12.0+2/lib/src/browser_client.dart:46:19: Error: Method not found: 'HttpRequest'.
var xhr = new HttpRequest();
^^^^^^^^^^^
file:///Users/xxxx/flutter/.pub-cache/hosted/pub.dartlang.org/http-0.12.0+2/lib/src/browser_client.dart:57:45: Error: Method not found: 'Blob'.
var blob = xhr.response == null ? new Blob([]) : xhr.response;
^^^^
file:///Users/xxxx/flutter/.pub-cache/hosted/pub.dartlang.org/http-0.12.0+2/lib/src/browser_client.dart:58:24: Error: Method not found: 'FileReader'.
var reader = new FileReader();
I checked the lib, seems the 'dart:html' is not used for flutter mobile development.
Could you add support for mobile? Or maybe i missed something?
Thank you.