
Flutter dApp Template using Sophon
September 25, 2026
Sophon is a free, open-source Flutter template designed by Nuxify for medium- to large-sized dApp development that adheres to the Flirt Template modular architecture. It also has a built-in option to establish a connection with an external wallet like MetaMask, which keeps the session alive even if the app is closed.
Introduction
Hello, fellow Flutter fans đź’™!
We at Nuxify love using Flutter.
Due to its amazing cross-platform support, near native speed, and large community, we have chosen it as our main framework for mobile development.
We have a couple of apps on production built on our open-source template. We'd love to share them with the community.
The template can be found at https://github.com/Nuxify/sophon
Architecture
Given that this template is constructed using the Flirt framework, its architecture is quite similar to that of the Flirt template (read more about Flirt here). However, this project also includes a few extra directories and files.
The location of all ABI files for smart contracts should be in lib/core/infrastructures/contracts/<environment>/*.abi.json.
Depending on your needs, the environment will either be a staging folder or a production folder. Just be sure to include the ABI contract you require in your pubspec.yaml file.

A new file called web3_config.dart has been added to the lib/configs folder. Required configuration objects, including DeployedContract are contained in this file. This section of the code can be changed to function with your own smart contract.
You can notice auxiliary files like web3 utils.dart and web3_contract.dart in the lib/internal folder.
You can easily manage function name add/update, if there are any changes to your smart contract by listing all of the function names in web3_contract.dart.
How to use
In order to fully utilize the template, we need to follow these steps: This step provides a simple guide for the user to configure the project to their own needs.
Create an .env file and provide the necessary data inside your .env. Environment variables can be found here.
Place your smart contract ABI inside
lib/contracts/<environment>/<*.abi.json>and load your file inpubspec.yaml.

Navigate to
lib/configs/web3_config.dart.

In this part of the code, we need the ABI file path and the smart contract address. Then we provide the smart contract title. This function will return an object DeployedContract that will later be needed inside our main driver function.After opening the template, start with running the
make compilecommand. This will fetch all required libraries and generate needed files.
After that, you may now run the app with flutter run.
Transaction Web3Cubit
The transaction and activity of Sophon templates are managed by this cubit service. To employ the cubit, two things were needed (Web3Client and DeployedContract). Interacting with the contract requires the web3client. DeployedContract is a subclass of the ABI file and is based on the provided ABI, making it simpler to call methods in contracts. These cubit's functions include fetchGreeting, updateGreeting, closeConnection, and initializeProvider.
For this template, we use Greeter Smart Contract. This smart contract only consists of two functions, greet and setGreeting. The greet function will only return the latest greeting value and will not have any argument required. setGreeting will update the greeting’s value and requires a string to work with.
initializeProvider - This function will initialize all necessary objects such as walletConnect, provider, wallet connect credentials, and also the sender’s address. In this function, it also initializes a periodic timer to fetch new greetings function in 5 seconds.
closeConnection - This function will kill the session of wallet connect object and will also cancel the periodic timer.
fetchGreeting - This function will simply call the contracts function
greetand later on emits the latest greet value.updateGreeting - This function will receive a string parameter and will call the setGreeting function of an ABI that updates the greet value.
Conclusion
This template was specifically designed to make it simple to scale medium-to large-sized decentralized systems using flutter. Bloc state management could be too heavy a solution if you're trying to create a simple program with few moving pieces.
If you're looking for a lighter state management solution, try looking into the provider package, recommended by Flutter itself.
Nuxify is a software development company based in the Philippines. We specialize in web development, mobile development, and Web3.0.
If you have any further questions, don't hesitate to open an issue at Github.
Happy coding!