> ## Documentation Index
> Fetch the complete documentation index at: https://bkey.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Installation

> Add bmoni_embedded_wallets_cards to your Flutter project.

## Add the dependency

```yaml pubspec.yaml theme={null}
dependencies:
  bmoni_embedded_wallets_cards: ^0.0.1
```

```bash theme={null}
flutter pub get
```

***

## Peer dependencies

`bmoni_embedded_wallets_cards` depends on:

| Package            | Why                                                        |
| ------------------ | ---------------------------------------------------------- |
| `bkey_uikit`       | UI primitives (`BMoniWalletCard`, colours, typography)     |
| `flutter_riverpod` | `StateNotifier`-based notifiers                            |
| `dartz`            | `Either<EmbeddedFailure, T>` for functional error handling |
| `equatable`        | Value equality on models                                   |
| `json_annotation`  | JSON serialisation (generated, no manual setup needed)     |

All of these are pulled in automatically as transitive dependencies.

***

## Riverpod setup

If you aren't already using Riverpod, wrap your app root:

```dart theme={null}
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:bkey_uikit/bkey_uikit.dart';

void main() {
  runApp(
    const ProviderScope(
      child: EmbeddedWalletsApp(),
    ),
  );
}

class EmbeddedWalletsApp extends StatelessWidget {
  const EmbeddedWalletsApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      theme: BMoniTheme.darkTheme(),
      home: const WalletsScreen(),
    );
  }
}
```

***

## Import

```dart theme={null}
import 'package:bmoni_embedded_wallets_cards/bmoni_embedded_wallets_cards.dart';
```

This single barrel exports everything: models, contracts, failures, notifiers, and widgets.

***

## Run the example

A full Riverpod-wired example with in-memory fake data sources is in the `example/` directory:

```bash theme={null}
cd example
flutter pub get
flutter run
```

It demonstrates:

* A swipeable `EmbeddedWalletCard` carousel with show/hide balance
* An `EmbeddedWalletTransactionsSection` that follows the active wallet
* Pull-to-refresh fanning out across list, balance, and transaction notifiers
* In-memory `EmbeddedWalletReadDataSource`, `EmbeddedWalletStorage`, and `EmbeddedWalletBalanceCache` that run without a backend
