setString method

  1. @override
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

@override
Future<bool> setString(String key, String value) => update(key, value);