Other functions
toJsonString
Convert lua table to json string
Arguments
- table:
dynamic
the table to convert
Return String
local jsonString = toJsonString(table)
openDeepLink
Open a deep link (other app)
Arguments
- url:
String
the url to open
Return `void
openDeepLink('https://www.instagram.com/')
openSnackBar
Open a snack bar with given config
Arguments
- config:
SnackBarConfig
the config
Return void
openSnackBar({ ['message'] = 'Hello World!', ['duration'] = 3, ['color'] = 'red' })
openPopup
Open a popup bar with given onSuccess call and config
Arguments
- onSuccess:
String
the function to call when the popup is with success action - config:
popupConfig
the same config as described in Button component
Return void
openPopup(
'on_success_fn()',
{
['title'] = 'My Title',
['content'] = 'My content',
['on_cancel'] = 'on_cancel_fn()',
['actions'] = {
{ ['text'] = 'OK', ['action'] = 'ok'},
{ ['text'] = 'Cancel', ['action'] = 'cancel'},
{ ['text'] = 'nope', ['action'] = 'quit' }
}
})
Table
Function Name | Description | First Argument | Second Argument | Return |
---|---|---|---|---|
toJsonString | Convert lua table to json string | table: the table to convert | String | |
openDeepLink | Open a deep link | url:the url to open | Void | |
openSnackBar | Open a snack bar with given config | config: the config | Void | |
openPopup | Open a popup bar with given onSuccess call and config | onSuccess: the function to call when the popup is with success action | config: the same config as described in Button component | Void |