reclaim_flutter_sdk 0.1.1
reclaim_flutter_sdk: ^0.1.1 copied to clipboard
Pre-built widgets library to export user's data with provable authenticity using HTTPS & Reclaim Protocol Zero-knowledge proof technology
example/lib/main.dart
import 'dart:convert';
import 'package:flutter/material.dart';
import 'package:reclaim_flutter_sdk/reclaim_flutter_sdk.dart';
import 'package:example/env/env.dart';
void main() => runApp(const MaterialApp(home: MyApp()));
class MyApp extends StatelessWidget {
const MyApp({
super.key,
});
// ...
@override
Widget build(BuildContext context) {
return Scaffold(
body: Center(
child: InkWell(
onTap: () async {
// Handle inkwell tap
try {
final reclaimVerification = ReclaimVerification(
buildContext: context,
appId: Env.APP_ID,
providerId: Env.PROVIDER_ID,
secret: Env.APP_SECRET,
context: '',
parameters: {"username": "dwik"},
hideLanding: true);
final proofs = await reclaimVerification.startVerification();
print("Proofs: ${jsonEncode(proofs)}");
} catch (error) {
print("Error $error");
}
},
child: const Text('Start Claim'),
)),
);
}
// ...
}