Desktop and Web support#6
Conversation
| Future<Uint8List> crypt(Uint8List data) async { | ||
| final secretBox = await algorithm.encrypt( | ||
| data, | ||
| secretKey: await algorithm.newSecretKeyFromBytes(_key), |
There was a problem hiding this comment.
Possibly we could call algorithm.newSecretKeyFromBytes(_key) just once in the init function.
omert08
left a comment
There was a problem hiding this comment.
We can't disable scanning for sake of desktop and web support.
|
|
||
|
|
||
| var listWifi = null;/* await prov.startScanWiFi() */; | ||
| /* TODO remove dummy scan result. Scanning is probably impossible on web. |
There was a problem hiding this comment.
Scanning is a matter of sending request to ESP AP and receiving response. Since communication is bidirectional. It should be possible regardless of what platform is using this library.
There was a problem hiding this comment.
I've already restored this code in the later commits (e945759). Scanning works fine on Desktop and Web in the last commit here.
I recommend you only review the overall changes, there were a bunch of automatic formatting changes that I cleaned up later.
|
|
||
|
|
||
| var listWifi = await prov.startScanWiFi(); | ||
| var listWifi = null;/* await prov.startScanWiFi() */; |
There was a problem hiding this comment.
Disabling startScanWiFi is a big move. It's one of the major features of the library.
36de7e4 to
bc05cdb
Compare
|
Squashed and force pushed to avoid confusion. Also tested again using esp-idf v4.4, and flutter: I'm now just getting a white screen and no logs when running the example with Linux desktop is working fine as before. |
Added support for web and linux.
The
example/webandexample/linuxfolders are automatically generated byflutter create example.I've added some files to the gitignore. These were automatically created and do not exist in the repo yet, so I assume they were meant to be ignored.
I've tested both new platforms with esp-idf v4.3.1 using the
provisioning/wifi_prov_mgrexample. It looks good as far as I can see. I was able to complete provisioning on both.Fixes #5