dvote 0.5.26 copy "dvote: ^0.5.26" to clipboard
dvote: ^0.5.26 copied to clipboard

outdated

Flutter plugin to allow native mobile apps to interact with Vocdoni decentralized votes.

example/lib/main.dart

import 'package:flutter/material.dart';

import "./wallets.dart";
import "./signatures.dart";
import "./hashing.dart";
import "./encryption.dart";
import "./metadata.dart";
import "./vote.dart";

void main() async {
  runApp(MaterialApp(
    title: 'DVote Flutter',
    home: ExampleApp(),
  ));
}

class ExampleApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('DVote Flutter'),
      ),
      body: ListView(
        children: <Widget>[
          Card(
            child: ListTile(
              leading: FlutterLogo(size: 72.0),
              title: Text('HD Wallet'),
              subtitle: Text(
                  'Create random seed phrases and compute their private/public key'),
              isThreeLine: true,
              onTap: () => Navigator.push(context,
                  MaterialPageRoute(builder: (context) => WalletScreen())),
            ),
          ),
          Card(
            child: ListTile(
              leading: FlutterLogo(size: 72.0),
              title: Text('ECDSA Signature'),
              subtitle:
                  Text('Signing and verifying signatures against a public key'),
              isThreeLine: true,
              onTap: () => Navigator.push(context,
                  MaterialPageRoute(builder: (context) => SigningScreen())),
            ),
          ),
          Card(
            child: ListTile(
              leading: FlutterLogo(size: 72.0),
              title: Text('Hashing'),
              subtitle: Text(
                  'Generating hashes that are efficient to use on a ZK circuit'),
              isThreeLine: true,
              onTap: () => Navigator.push(context,
                  MaterialPageRoute(builder: (context) => HashingScreen())),
            ),
          ),
          Card(
            child: ListTile(
              leading: FlutterLogo(size: 72.0),
              title: Text('AES Encryption'),
              subtitle: Text('Encrypting and decrypting payloads'),
              isThreeLine: true,
              onTap: () => Navigator.push(context,
                  MaterialPageRoute(builder: (context) => EncryptionScreen())),
            ),
          ),
          Card(
            child: ListTile(
              leading: FlutterLogo(size: 72.0),
              title: Text('Metadata'),
              subtitle: Text(
                  'Fetching Entity and Voting Process metadata using DVote and Web3 gateways'),
              isThreeLine: true,
              onTap: () => Navigator.push(context,
                  MaterialPageRoute(builder: (context) => MetadataScreen())),
            ),
          ),
          Card(
            child: ListTile(
              leading: FlutterLogo(size: 72.0),
              title: Text('Voting'),
              subtitle:
                  Text('Requesting census proofs and packaging the envelope'),
              isThreeLine: true,
              onTap: () => Navigator.push(context,
                  MaterialPageRoute(builder: (context) => VoteScreen())),
            ),
          ),
        ],
      ),
    );
  }
}
2
likes
0
pub points
0%
popularity

Publisher

unverified uploader

Flutter plugin to allow native mobile apps to interact with Vocdoni decentralized votes.

Homepage
Repository (GitLab)
View/report issues

Documentation

Documentation

License

unknown (LICENSE)

Dependencies

convert, flutter, http, protobuf, web3dart, web_socket_channel

More

Packages that depend on dvote