vatom_wallet_sdk 0.0.3 copy "vatom_wallet_sdk: ^0.0.3" to clipboard
vatom_wallet_sdk: ^0.0.3 copied to clipboard

outdated

Vatom Wallet SDK for flutter.

example/vatom_wallet_sdk_example.dart

import 'package:flutter/material.dart';
import 'package:vatom_wallet_sdk/vatom_wallet_sdk.dart';

// import 'package:my_app/gradient_color.dart';

main() {
  final vatomKey = GlobalKey<VatomWalletState>();
  final VatomConfig vatomConfig = VatomConfig(
    features: VatomConfigFeatures(
      scanner: ScannerFeatures(enabled: false),
      vatom: VatomFeatures(
        hideTokenActions: true,
        disableNewTokenToast: true,
      ),
    ),
  );

  final VatomWallet wallet = VatomWallet(
    key: vatomKey,
    accessToken: "ACCESS_TOKEN",
    config: vatomConfig,
  );

  runApp(
    MaterialApp(
      home: Scaffold(
        body: SafeArea(
          child: Column(
            children: [
              Expanded(
                child: wallet,
              ),
              Row(
                children: [
                  ElevatedButton(
                    onPressed: () async {
                      // await vatomKey.currentState?.openCommunity('sahMOa1qQR',
                      //     roomId: '!EcINyJyITqdmqVEAVe%3Avatom.com');
                      var tabs = await vatomKey.currentState?.getCurrentUser();
                      print(tabs?.toJson());
                    },
                    child: Text('getCurrentUser'),
                  ),
                  ElevatedButton(
                    onPressed: () async {
                      await vatomKey.currentState?.navigateToTab("Connect");
                    },
                    child: Text('Connect'),
                  ),
                  ElevatedButton(
                    onPressed: () async {
                      await vatomKey.currentState?.navigateToTab("Home");
                    },
                    child: Text('Home'),
                  ),
                ],
              ),
            ],
          ),
        ),
      ),
    ),
  );
}
// export 'package:vatom_wallet_sdk/VatomClasses.dart';
// export 'package:vatom_wallet_sdk/VatomWallet.dart' show VatomWallet;