solana_kit_wallet_ui 0.1.3
solana_kit_wallet_ui: ^0.1.3 copied to clipboard
Responsive Material, Cupertino, and adaptive wallet UI for Solana Kit.
solana_kit_wallet_ui #
Responsive Material, Cupertino, and adaptive wallet UI for Solana Kit. The defaults are production-ready, but every visible layer can be replaced without forking the package.
Installation #
dependencies:
solana_kit_wallet_ui: ^0.1.0
Adaptive defaults #
import 'package:flutter/widgets.dart';
import 'package:solana_kit_wallet_adapter/solana_kit_wallet_adapter.dart';
import 'package:solana_kit_wallet_ui/adaptive.dart';
Widget buildWalletButton(WalletController walletController) =>
AdaptiveWalletButton(controller: walletController);
The adaptive entrypoint uses Cupertino presentation on iOS and macOS, and Material presentation elsewhere. Pass style when an application deliberately uses one design language on every platform.
Material and Cupertino entrypoints #
import 'package:flutter/widgets.dart';
import 'package:solana_kit_wallet_adapter/solana_kit_wallet_adapter.dart';
import 'package:solana_kit_wallet_ui/material.dart';
Widget buildWalletButton(WalletController walletController) =>
MaterialWalletButton(controller: walletController);
import 'package:flutter/widgets.dart';
import 'package:solana_kit_wallet_adapter/solana_kit_wallet_adapter.dart';
import 'package:solana_kit_wallet_ui/cupertino.dart';
Widget buildWalletButton(WalletController walletController) =>
CupertinoWalletButton(controller: walletController);
Compact viewports use a bottom sheet or Cupertino popup. Large viewports use a constrained dialog and a two-column wallet grid. All interactive defaults have at least a 44 logical-pixel target.
Customize or bring your own widgets #
Use WalletUiTheme for copy and geometry, or replace individual pieces with builder, headerBuilder, tileBuilder, and emptyBuilder. For complete visual ownership, observe WalletController directly and build any widget tree you prefer. WalletPickerContent is also public for embedding the responsive discovery surface in an application-specific shell.
Key APIs #
AdaptiveWalletButtonandshowAdaptiveWalletPickerMaterialWalletButtonandshowMaterialWalletPickerCupertinoWalletButtonandshowCupertinoWalletPickerWalletPickerContentandWalletAvatarWalletUiTheme,WalletUiThemeData, andWalletUiPaletteWalletUiKeysfor stable integration-test selectors