Home

Awesome

<div align="center"> <img src="https://i.ibb.co/9ZhjNCj/icons8-module-96.png?raw=true" width="100px" alt="Blockchain Logo"/> </div> <h3 align="center">This project is meant for those with a basic knowledge of Ethereum and smart contracts, who have some knowledge of the Flutter framework but are new to mobile dapps.</h3> <div align="center"> <img src="README_Images/Flutter_and_Blockchain.jpg?raw=true" alt="Flutter and Blockchain Logo"/> </div> <div align="center">

Flutter and Blockchain

</div>

Table of Contents

Setting up the development environment

Truffle is the most popular development framework for Ethereum with a mission to make your life a whole lot easier. But before we install truffle make sure to install node .

Once we have node installed, we only need one command to install Truffle: npm install -g truffle

We will also be using Ganache, a personal blockchain for Ethereum development you can use to deploy smart contracts, develop applications, and run tests. You can download Ganache by navigating to http://truffleframework.com/ganache and clicking the “Download” button.

Directory Structure

<div align="center"> <img src="README_Images/directory_structure.png?raw=true" width="30%" alt="Directory Structure"/> </div>

Compiling and Migrating Smart Contract

Compilation

In the terminal, make sure you are in the root of the directory that contains the flutter and truffle project, Run the following command: truffle compile

You should see output similar to the following:

<div align="center"> <img src="README_Images/truffle_compile_output.png?raw=true" width="70%" alt="Truffle Compile"/> </div>

Migration

Before we can migrate our contract to the blockchain, we need to have a blockchain running. We’re going to use Ganache, a personal blockchain for Ethereum development you can use to deploy contracts, develop applications, and run tests. If you haven’t already, download Ganache and double-click the icon to launch the application. This will generate a blockchain running locally on port 7545.

<div align="center"> <img src="README_Images/ganache.png?raw=true" width="70%" alt="Ganache"/> </div>

You should see output similar to the following:

<div align="center"> <img src="README_Images/truffle_migrate.png?raw=true" width="70%" alt="Ganache"/> </div>

Testing the Smart Contract

<div align="center"> <img src="README_Images/truffle_test.png?raw=true" width="70%" alt="truffle test"/> </div>

Contract Linking

📁 project(eg. helloworld,bidder,...)
    📁 lib
        🎯 contract_linking.dart
          - Update _rpcUrl, _wsUrl, _privateKey as per your needs.
<div align="center"> <img src="README_Images/rpc_url.png?raw=true" width="70%" alt="truffle test"/> </div> <div align="center"> <img src="README_Images/private_key.png?raw=true" width="70%" alt="truffle test"/> </div>

DAPPS

Hello World DappPopulation Dapp
<img src="hello_world/screenshot/Screenshot_1.png?raw=true" width="340px"/><img src="population/screenshot/population.gif?raw=true" width="320px"/>
BidderMinter
<img src="bidder/screenshot/bidder.gif?raw=true" width="280px"/><img src="minter/Screenshot/minter.gif?raw=true" width="340px"/>
Cat AdoptionElection
<img src="cat_adoption/screenshot/catAdoption.gif?raw=true" width="340px"/><img src="elections/screenshots/Screenshot_1.png?raw=true" width="300px"/>

Tutorials

Contributing:

<h3 align="center">Show some ❤ and star the repo to support the project</h3>