This project is sample for MQTT with flutter.
The MQTT client has been used successfully with the MQTT broker(broker.emqx.io)
You can change default settings on mqtt_setting_model.dart file and change another broker.
Also you see the state management Flutter Bloc and Provider samples using for Chat Screen on this project and you can see the using of sqflite
Firstly login with your credential .These informations are used for connection the MQTT server.
HomeBloc(ConnectToServerEvent) is responsible for the open the connection with MQTT.
If you want to use it on more than one device at the same time, you should write different phone numbers. Any verification etc. won't be wanted.
You can subscribe to the topic you want on this screen.
You can review this file for details of mqtt operations.