简体   繁体   English

使用 Flutter 和 web3 开发 Dapp 的问题

[英]Problems with Dapp Development with Flutter and web3

需要澄清一下Dapp开发中的一个疑问,在用flutter做手机app的时候可以用web3连接钱包和区块链吗?

[Edit 2021-12-02] I just found this https://pub.dev/packages/flutter_web3 , it is web only but seems to be compatible with WalletConnect QR codes connection, so it is probably worth a try. [Edit 2021-12-02]我刚刚找到了这个https://pub.dev/packages/flutter_web3 ,它只是网络,但似乎与 WalletConnect 二维码连接兼容,所以可能值得一试。

Original answer:原答案:

I believe you can check out flutter_web3_provider but it only works for web.我相信您可以查看flutter_web3_provider但它仅适用于网络。

I believe you can also use WalletConnect to support mobile wallets like these ones , but I haven't found a wrapper/implementation for flutter so you would need to implement that.我相信你也可以使用WalletConnect来支持像这些这样的移动钱包,但我还没有找到 flutter 的包装器/实现,所以你需要实现它。 But the good news is you would be able to use it in native apps.但好消息是您可以在本机应用程序中使用它。 I see there is a react-native implementation so hopefully somebody will write the flutter implementation soon.我看到有一个 react-native 实现,所以希望有人能尽快编写 flutter 实现。 You can support/like the request here .您可以支持/喜欢这里的请求。

Also you can directly sign and send transactions to an RPC server (a more direct gate to the blockchain) using web3dart , but of course you would need to ask for and/or store the user's private key, which is probably not what you want.您也可以使用web3dart直接签署交易并将其发送到 RPC 服务器(更直接的区块链门),但当然您需要请求和/或存储用户的私钥,这可能不是您想要的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM