Search code examples
androidflutteroauth-2.0

Flutter: how can i get device_id and device_token in flutter 2.5.3?


I want to get device information such as device_id and device_token for google and facebook sign-in, so that i can get data for the next dashboard-page as in following code

Body:{
  "token": "string",
  "device_info": {
    "device_token": "lfkjklfl", <---- //this field i need 
    "device_id": "jgkfjdgkfjdlgfd"
  }
} 

i have used this device_info package for getting token, but their is no token type in this package


Solution

  • device_token only you can get via firebase messaging.