title: How to store device info in shared preference in flutter
body: <p>in this question i want to store device info into shared preferences becuase i want to access device info anywhere from application. Hope you understand the question. your small help can made my day :)</p>
  
  <p>Here is some code i've tried</p>
  
  <pre><code>      Future deviceinfo() async {
          if (Platform.isAndroid) {
            AndroidDeviceInfo androidInfo = await deviceInfo.androidInfo;
            print("Hey Android User");
            print('Running on ${androidInfo.id}');
            print('Running on ${androidInfo.isPhysicalDevice}');
            print('Running on ${androidInfo.fingerprint}');
  //Here in this line error
            SharedPreferences devicepref = await SharedPreferences.getInstance();
            devicepref.setString('deviceinfo', androidInfo);
          } else if (Platform.isIOS) {
            IosDeviceInfo iosInfo = await deviceInfo.iosInfo;
            print("Hey IOS User");
            print('Running on ${iosInfo.utsname.machine}');
          }
        }
  </code></pre>