Conversation
…base-arch-structure
| @@ -0,0 +1,27 @@ | |||
| import 'package:flutter_blue/flutter_blue.dart'; | |||
|
|
|||
| abstract class BluetoothStates {} | |||
There was a problem hiding this comment.
Justement, à y repenser, FlutterBlue ne devrait normalement pas être importé dans les blocs. Ce package devrait être utilisé pour aller chercher l'information dans une méthode d'une repository. Ce repository pourra alors retourner un objet du domaine qui est en lien avec la carte d'acquisition choisie.
Pour la liste des prospects de devices, on pourrait probablement juste renvoyer une dataclass ProspectDevice de List IDeviceRepository::discover(). C'est alors cette méthode discover qui pourrait utiliser flutter blue et scan les devices. Finalement, notre couche applicative pourra utiliser la méthode pour obtenir la list des ProspectDevice qui sera affiché. Lorsqu'on en sélectionne un, on peut ensuite l'utiliser dans la méthode Device IDeviceRepository::connect(ProspectDevice prospectDevice). Device correspondra alors à un objet du modèle avec son comportement.
WilliamHarvey97
left a comment
There was a problem hiding this comment.
L'app ne roule pas sur l'emulateur
Unhandled Exception: PlatformException(bluetooth_unavailable, the device does not have bluetooth, null, null)
… perform formating on dart files.
…fmt as dart formatter
…nto repository, and small formatting changes)
generic entity extending equatable with unique id
Looking for feedback on basically anything you think should be changed. (Naming convention, structure, order of functions, bloc implementation.