phantom_connect 0.0.4 copy "phantom_connect: ^0.0.4" to clipboard
phantom_connect: ^0.0.4 copied to clipboard

outdated

A flutter plugin to connect phantom wallet from Mobile Application.

example/main.dart

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

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  MyApp({super.key});

  // Initialize the PhantomConnect object
  final PhantomConnect phantomConnect = PhantomConnect(
    appUrl: "https://solana.com",
    deepLink: "samepl://exampledeeplink.io",
  );

  void connect() {
    Uri connectUrl = phantomConnect.generateConnectUri(
        cluster: 'devnet', redirect: '/onConnect');
    // Open the url using url_launcher
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      home: SafeArea(
        child: Scaffold(
          body: Center(
            child: ElevatedButton(
              onPressed: () => connect(),
              child: const Text("Connect"),
            ),
          ),
        ),
      ),
    );
  }
}
8
likes
0
pub points
36%
popularity

Publisher

verified publisherstrawhat.xyz

A flutter plugin to connect phantom wallet from Mobile Application.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, pinenacl, solana

More

Packages that depend on phantom_connect