anchor.diff:        });
       });
   
  -    beaconBroadcast.getAdvertisingStateChange().listen((isAdvertising) {
  +    _isAdvertisingSubscription = beaconBroadcast.getAdvertisingStateChange().listen((isAdvertising) {
         setState(() {
           _isAdvertising = isAdvertising;
         });
       });
  -    
  -    //uuidTimer = Timer.periodic(Duration(seconds: 1), (Timer t) => changeUUID());
     }
   
     @override
  
positive.code: class _BeaconViewState extends State<BeaconView> {
  
    var _isTransmissionSupported;
    var _isAdvertising;
    String broadcastingState = "Currently not broadcasting";
    BeaconBroadcast beaconBroadcast;
    var beaconUuid = 'null';
    Duration uuidDuration;
    var uuidTimer;
  
    @override
    void initState () {
      super.initState();
      print("Enter beacon");
  
      checkTime();
      beaconBroadcast = BeaconBroadcast();
  
negative.code:     var difference = DateTime.now().difference(DateTime.parse(previousTime)).inSeconds;
      print(difference);
      if (difference > 10) {
        changeUUID();
        prefs.setString('previousTime', DateTime.now().toString());
      }
  
    }
  
    void _startBroadcast () {
      if (_isAdvertising)
        return null;
  
      beaconBroadcast
        .setUUID(beaconUuid)
        .setMajorId(1)
        .setMinorId(100)
        .setIdentifier('com.example.myDevice')
        .setLayout(BeaconBroadcast.ALTBEACON_LAYOUT)
        .start();
  
      print(beaconUuid);
    }
  
    void _stopBroadcast () => beaconBroadcast.stop();
  
    void changeUUID () {
      beaconUuid = Uuid().v4();
      beaconUuid = "00000000" + beaconUuid.substring(8);
      setState(() {});
    }
  
  