Flutter Firebase Powiadomienie Token

//Add this to get the notification token of the user in flutter firebase app  

  if (GetStorage().read('token') == null) {
      final _firebaseMessaging = FirebaseMessaging.instance;
      _firebaseMessaging.getToken().then((value) async {
        //save that token to database                                 
        //await Database(uid: currentUser!.uid).createToken(token: '$value');
        GetStorage().write("token", '$value');
      });
    }
Niraj Kafle