dvote 0.5.32 dvote: ^0.5.32 copied to clipboard
Flutter plugin to allow native mobile apps to interact with Vocdoni decentralized votes.
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())),
),
),
],
),
);
}
}