getPreferences method
Implementation
Future<Map<String, dynamic>> getPreferences() async {
final prefs = await SharedPreferences.getInstance();
return {
'widget_code': prefs.getString(_keyWidgetCode) ?? '',
'background_color':
Color(prefs.getInt(_keyBackgroundColor) ?? 0xFFFFFFFF),
'app_bar_title': prefs.getString(_keyAppBarTitle) ?? 'Chat With Us',
'app_bar_background_color':
Color(prefs.getInt(_keyAppBarBackgroundColor) ?? 0xFF0000FF),
'app_bar_title_color':
Color(prefs.getInt(_keyAppBarTitleColor) ?? 0xFFFFFFFF),
'app_bar_back_button_color':
Color(prefs.getInt(_keyAppBarBackButtonColor) ?? 0xFFFFFFFF),
};
}