setString method

Future<bool> setString(
  1. String key,
  2. String value
)

Saves a string value to persistent storage in the background.

Note: Due to limitations in Android's SharedPreferences, values cannot start with any one of the following:

  • 'VGhpcyBpcyB0aGUgcHJlZml4IGZvciBhIGxpc3Qu'
  • 'VGhpcyBpcyB0aGUgcHJlZml4IGZvciBCaWdJbnRlZ2Vy'
  • 'VGhpcyBpcyB0aGUgcHJlZml4IGZvciBEb3VibGUu'

Implementation

Future<bool> setString(String key, String value) =>
    _setValue('String', key, value);