Create custom components
All of the existing components can be found in PlutoFramework/Components folder. Feel free to take a look at them and get inspired.
I recommend creating a new folder to keep the components sorted. (Or use an existing folder if relevant)
To keep consistency, please utilise MVVM architecture patterns.

In View.xaml, programme the visual UI using xaml syntax:
We have created these unified interfaces to handle parallel data loading. Feel free to implement them in View.xaml.cs file.
Implement them like this:
If you are curious, these interfaces are called in the PlutoFramework/Model/SubstrateClientModel.cs at the right time.
All of the steps after this point are not mandatory, but it is appreciated if you completed them anyways ^^
Register the new component to CustomLayoutModel
To support the new component in PlutoLayouts, add it to the PlutoFramework/Model/CustomLayoutModel.cs.
Firstly, register the unique component identifier
Keep the ComponentId as short as possible. Each ComponentId used is saved in the Preferences storage which is not very fast and each extra character will slow down your startup loading times.
Register this component id to the default layout.
DEFAULT_PLUTO_LAYOUT defines the layout that will be shown to the user at the startup. Alongside the layout, it also defines to which blockchains to connect to.
Be sure to include your own blockchain.
Now provide the View to your ComponentId in the GetView method.
Lastly, provide the ComponentInfo in the GetComponentInfo method.
Now, your component should be done and compatible with the rest of PlutoFramework.
Last updated