Flutter blue plus not working as expected

I am implementing Bluetooth feature into my app. I am able to scan the on bluetooth devices and show them on screen. and when i off the device it will remove the device from list and not display on screen. but while doing so. it showing the scanningForDeviceText(), after 5 sec then disappered then again display devices then again this text. so my devices list not display stable. after every after 5 sec it scan so it beacomes zero so it goes to my else condition how can i tackle this.
here is my code:

 super.initState();
    progressDialog = ProgressDialog(context: context);
    flutterBlue = FlutterBluePlus();
    _adapterStateStateSubscription =
        FlutterBluePlus.adapterState.listen((state) {
      _adapterState = state;
      if (mounted) {
        setState(() {});
      }
          _handleBluetoothStateChange();
    });
    _setupBluetoothSubscriptions();
      startContinuousScan();
     @override
    void dispose() {
    _adapterStateStateSubscription.cancel();
    _scanResultsSubscription.cancel();
    _isScanningSubscription.cancel();
      FlutterBluePlus.stopScan();  // Stop scanning when disposing
    super.dispose();
     }

      void _handleBluetoothStateChange() {
     if (_adapterState != BluetoothAdapterState.on) {
    setState(() {
      scanResults.clear();  // Clear scan results when Bluetooth is off
    });
  }
  _checkBluetoothPermission();
}

Future startContinuousScan() async {
  while (true) {
    try {
      int divisor = Platform.isAndroid ? 8 : 1;
      await FlutterBluePlus.startScan(
          timeout: const Duration(seconds: 5),
          continuousUpdates: true,
          continuousDivisor: divisor);
      await Future.delayed(const Duration(seconds: 5));
      await FlutterBluePlus.stopScan();
    } catch (e) {
      // customToastMessage(toastMessage: e.toString());
       }
        }
     }
    void _setupBluetoothSubscriptions() {
    _scanResultsSubscription = FlutterBluePlus.scanResults.listen((results) {
      scanResults = results;
      if (mounted) {
        setState(() {});
      }
    }, onError: (e) {});

    _isScanningSubscription = FlutterBluePlus.isScanning.listen((state) {
      isScanning = state;
      if (mounted) {
        setState(() {});
      }
    });
  }
scanResults.isNotEmpty
                                  ? SizedBox(
                                    height: 300,
                                    child: ListView.builder(
                                        itemCount: scanResults.length,
                                        itemBuilder: (context, index) {
                                          final result = scanResults[index];
                                          if (result.device.name.startsWith("NT") ||
                                              result.device.name.startsWith("TW")) {
                                            return ListTile(
                                              onTap: () async {
                                                await _checkLocationPermission();
                                                if (doctorLinkedDeviceIdList.contains(result.device.name) ||
                                                doctorLinkedDeviceIdList.contains("*")) {
                                              Navigator.pushNamed(context, '/NadiDisplayScreen', arguments: {
                                                'device': result.device,
                                                'patientDetails': patientDetails,
                                                'medicalId': medicalId,
                                                'appointmentForPatient': appointmentForPatient,
                                              });
                                            } else {
                                              showDialog(
                                                barrierDismissible: false,
                                                context: context,
                                                builder: (_) => CustomAlertDialog(
                                                  content: SizedBox(
                                                    width: 310.0,
                                                    height: 220.0,
                                                    child: Column(
                                                      children: [
                                                        Center(
                                                          child: Image.asset(
                                                            'assets/logos/linke_device.gif',
                                                            width: 84.0,
                                                            height: 84.0,
                                                          ),
                                                        ),
                                                        const SizedBox(height: 8.0),
                                                        Text(
                                                          "Select linked device.",
                                                          style: (screenWidth > 600) ? TabPopupMainTextStyle() : PopupMainTextStyle(),
                                                          textAlign: TextAlign.center,
                                                        ),
                                                        const SizedBox(height: 8.0),
                                                        Text(
                                                          "${result.device.name} is not linked with you.",
                                                          style: (screenWidth > 600) ? TabPopupSubTextStyle() : PopupSubTextStyle(),
                                                          textAlign: TextAlign.center,
                                                        ),
                                                        Text(
                                                          "Select linked device & take nadi.",
                                                          style: (screenWidth > 600) ? TabPopupSubTextStyle() : PopupSubTextStyle(),
                                                          textAlign: TextAlign.center,
                                                        ),
                                                      ],
                                                    ),
                                                  ),
                                                ),
                                              );
                                              Future.delayed(const Duration(seconds: 3), () {
                                                Navigator.pop(context);
                                              });
                                            }
                                          },
                                          leading: Image.asset(
                                            'assets/bottom_navbar_icon/nadi.png',
                                            width: 40.0,
                                            height: 40.0,
                                            color: ColorConstants.textgreen,
                                          ),
                                          title: Text(
                                            result.device.name,
                                            style: (screenWidth > 600)
                                                ? TabDeviceNameForNadiPariksha()
                                                : DeviceNameForNadiPariksha(),
                                          ),
                                          subtitle: Flex(
                                            direction: Axis.horizontal,
                                            children: [
                                              Expanded(
                                                flex: 1,
                                                child: Text(
                                                  result.device.id.toString(),
                                                ),
                                              ),
                                            ],
                                          ),
                                        );
                                      } else {
                                        return Container();
                                      }
                                    },
                                  ),
                              )
                              : scanningForDeviceText(),

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật