fix a checked mode issues with preferences.dart
Merge pull request #3509 from devoncarew/devoncarew_prefs_types

fix a checked mode issues with preferences.dart