bl_wallet_native 0.1.2
bl_wallet_native: ^0.1.2 copied to clipboard
BL Wallet Native Code Plugin
example/lib/main.dart
import 'package:flutter/material.dart';
import 'dart:async';
import 'package:flutter/services.dart';
import 'package:bl_wallet_native/bl_wallet_native.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatefulWidget {
const MyApp({super.key});
@override
State<MyApp> createState() => _MyAppState();
}
class _MyAppState extends State<MyApp> {
String _initTrustWallet = 'Unknown';
final _blWalletNativePlugin = BlWalletNative();
@override
void initState() {
super.initState();
}
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(
title: const Text('BL Wallet Native Plugin'),
),
body: Column(
children: [
ElevatedButton(
onPressed: () async {
await BlWalletNative().init();
},
child: Text("init"),
),
ElevatedButton(
onPressed: () async {
await BlWalletNative().createWallet();
},
child: Text("createWallet"),
),
ElevatedButton(
onPressed: () {
String address = BlWalletNative().getAddress();
print("address: ${address}");
},
child: Text("address"),
),
]
),
)
);
}
}