getDevicesInfo method
Implementation
Future<List<BluetoothInfo>?> getDevicesInfo(BuildContext context) async {
final List<BluetoothInfo> listResult =
await PrintBluetoothThermal.pairedBluetooths;
if (listResult.isEmpty) {
showDialog(
context: context,
builder: (BuildContext context) {
return const AlertDialog(
title: Text("Nenhum dispositivo vinculado"),
content: Text(
"Acesse as configurações, ative o bluetooth e conecte a impressora."),
);
},
);
}
return listResult;
}