fix:当搜索到的设备昵称为空时不显示
This commit is contained in:
parent
70d549d04d
commit
ea3dfa2286
@ -105,6 +105,11 @@ class _NearbyLockPageState extends State<NearbyLockPage> with RouteAware {
|
|||||||
|
|
||||||
Widget nearbyLockItem(
|
Widget nearbyLockItem(
|
||||||
String lockTypeIcon, ScanResult scanResult, Function() action) {
|
String lockTypeIcon, ScanResult scanResult, Function() action) {
|
||||||
|
// 如果广播名称为空或空字符串,则不显示该项
|
||||||
|
if (scanResult.advertisementData.advName.isEmpty) {
|
||||||
|
return const SizedBox.shrink();
|
||||||
|
}
|
||||||
|
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
final String? serviceUuid =
|
final String? serviceUuid =
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user