Add App Constants
Constant files are used in app for easy access to the value which is to be used globally throughout the app. Create, delete constant files and add constants to it in your app and use it wherever you want to easily.
How to setup constants
Go to Constant from the screen dashboard on the left hand.
Now click on
Add constant to add a new constant file to your application.
Add an appropriate file name for your constant file and click
As your file is now created add your constants in it, for that, you need to add the following to create a constant.
|Name||Provide an appropriate name for constant,|
only alphanumeric values with _ are allowed, and not starting with number
|Data type||Select a data type based on the value of your constant,|
|Value||Assign a value to added constant.|
Similarly, you can add multiple constants to your file. Also, you can add multiple constant files by clicking on the ➕ icon as shown below;
Once you have added the constants click on
Save. To delete a constant click ❌ and to delete a constant file click
At this stage, you have successfully added constants to your application.
Got a question? Ask here.