Insert Single Pages from Digia Studio
In your main.dart
, initialize the DigiaUIClient like this instead of DUIApp.
DigiaUIClient.init(
accessKey: "your_project_id",
flavorInfo: Staging(),
environment: 'development',
baseUrl: 'https://app.digia.tech/api/v1',
networkConfiguration: NetworkConfiguration(
defaultHeaders: {},
timeout: 30,
),
);
The params are similar to DUIApp, defined here. Also initialize the DUIFactory by calling its intialize method.
DUIFactory().initialize();
This will initialize the DigiaUIClient and DUIFactory. Now to create Pages, we can use DUIFactory's methods:
DUIFactory().createPage(
'your_page_name',
{
// This is the Map of Page Parameters
'variable': 'value',
},
);
The createPage method takes 2 parameters:
pageId
pageId
type : string
required : true
This is the name of your Page that you can get from Digia Studio.
pageArgs
pageArgs
type: Map<String, Object?>?
required: true
This is the Map of Page Parameters that you can pass from your App to Digia's Page.
Last updated