2018-09-18 01:07:12 +00:00
|
|
|
//
|
|
|
|
// InAppBrowserOptions.swift
|
2019-11-29 15:59:18 +00:00
|
|
|
// flutter_inappwebview
|
2018-09-18 01:07:12 +00:00
|
|
|
//
|
|
|
|
// Created by Lorenzo on 17/09/18.
|
|
|
|
//
|
|
|
|
|
|
|
|
import Foundation
|
|
|
|
|
|
|
|
@objcMembers
|
2020-05-29 17:56:03 +00:00
|
|
|
public class InAppBrowserOptions: Options<InAppBrowserWebViewController> {
|
2018-09-20 00:48:24 +00:00
|
|
|
|
2018-09-18 01:07:12 +00:00
|
|
|
var hidden = false
|
|
|
|
var toolbarTop = true
|
2018-09-21 01:41:04 +00:00
|
|
|
var toolbarTopBackgroundColor = ""
|
2018-10-21 22:41:39 +00:00
|
|
|
var toolbarTopFixedTitle = ""
|
2018-09-23 23:53:22 +00:00
|
|
|
var hideUrlBar = false
|
|
|
|
|
2018-09-18 01:07:12 +00:00
|
|
|
var toolbarBottom = true
|
2018-09-21 01:41:04 +00:00
|
|
|
var toolbarBottomBackgroundColor = ""
|
2018-09-18 01:07:12 +00:00
|
|
|
var toolbarBottomTranslucent = true
|
2018-09-23 23:53:22 +00:00
|
|
|
var closeButtonCaption = ""
|
|
|
|
var closeButtonColor = ""
|
2018-09-18 01:07:12 +00:00
|
|
|
var presentationStyle = 0 //fullscreen
|
|
|
|
var transitionStyle = 0 //crossDissolve
|
2018-09-23 23:53:22 +00:00
|
|
|
var spinner = true
|
2018-09-18 01:07:12 +00:00
|
|
|
|
2018-09-20 00:48:24 +00:00
|
|
|
override init(){
|
|
|
|
super.init()
|
|
|
|
}
|
|
|
|
|
2020-05-29 17:56:03 +00:00
|
|
|
override func getRealOptions(obj: InAppBrowserWebViewController?) -> [String: Any?] {
|
|
|
|
var realOptions: [String: Any?] = toMap()
|
|
|
|
if let inAppBrowserWebViewController = obj {
|
|
|
|
realOptions["presentationStyle"] = inAppBrowserWebViewController.modalPresentationStyle.rawValue
|
|
|
|
realOptions["transitionStyle"] = inAppBrowserWebViewController.modalTransitionStyle.rawValue
|
|
|
|
}
|
|
|
|
return realOptions
|
|
|
|
}
|
2018-09-18 01:07:12 +00:00
|
|
|
}
|