Closed zqiangliu closed 5 years ago
OK, this must be flutter specific, I'm not seeing it on the VM itself, as a test could you import the mqtt client with a prefix, i.e. import 'package:mqtt_client/mqtt_client.dart' as mqtt;', you would then need to update your code to use the prefix when needed(analyser should tell you this) and see if the error goes away.
ConnectionState has now been renamed to MqttConnectionState to avoid any name clashes, client re-published at 5.0.0, please retest
when using ConnectionState.connected enum , got this error: The name 'ConnectionState' is defined in libraries 'package:flutter/src/widgets/async.dart' and 'package:mqtt_client/mqtt_client.dart'
Is there something wrong ?
import 'package:flutter/material.dart'; import 'dart:async'; import 'package:mqtt_client/mqtt_client.dart';