Skip to main content

Other functions

toJsonString

Convert lua table to json string

Arguments

  • table: dynamic the table to convert

Return String

local jsonString = toJsonString(table)

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

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 NameDescriptionFirst ArgumentSecond ArgumentReturn
toJsonStringConvert lua table to json stringtable: the table to convertString
openDeepLinkOpen a deep linkurl:the url to openVoid
openSnackBarOpen a snack bar with given configconfig: the configVoid
openPopupOpen a popup bar with given onSuccess call and configonSuccess: the function to call when the popup is with success actionconfig: the same config as described in Button componentVoid