#include "../utils/flutter.h" #include "webview_environment_settings.h" namespace flutter_inappwebview_plugin { WebViewEnvironmentSettings::WebViewEnvironmentSettings(const flutter::EncodableMap& map) : browserExecutableFolder(get_optional_fl_map_value(map, "browserExecutableFolder")), userDataFolder(get_optional_fl_map_value(map, "userDataFolder")), additionalBrowserArguments(get_optional_fl_map_value(map, "additionalBrowserArguments")), allowSingleSignOnUsingOSPrimaryAccount(get_optional_fl_map_value(map, "allowSingleSignOnUsingOSPrimaryAccount")), language(get_optional_fl_map_value(map, "language")), targetCompatibleBrowserVersion(get_optional_fl_map_value(map, "targetCompatibleBrowserVersion")) {} flutter::EncodableMap WebViewEnvironmentSettings::toEncodableMap() const { return flutter::EncodableMap{ {"browserExecutableFolder", make_fl_value(browserExecutableFolder)}, {"userDataFolder", make_fl_value(userDataFolder)}, {"additionalBrowserArguments", make_fl_value(additionalBrowserArguments)}, {"allowSingleSignOnUsingOSPrimaryAccount", make_fl_value(allowSingleSignOnUsingOSPrimaryAccount)}, {"language", make_fl_value(language)}, {"targetCompatibleBrowserVersion", make_fl_value(targetCompatibleBrowserVersion)} }; } }