Docs

Integrating a pub.dev Package

Add the Grovs SDK to your Flutter project from pub.dev.

Flutter uses pub.dev as its package registry. Follow these steps to integrate the Grovs SDK into your Flutter project.

1

Add the Grovs package

Use the flutter pub add command to install the Grovs SDK:

Bash
flutter pub add grovs_flutter_plugin:^1.0.1

This automatically updates your pubspec.yaml and fetches the dependency.

You can also manually edit pubspec.yaml and add the package under dependencies, then run flutter pub get.

2

Verify in pubspec.yaml

Open pubspec.yaml and confirm that grovs_flutter_plugin is listed under dependencies:

YAML
dependencies:
  flutter:
    sdk: flutter
  grovs_flutter_plugin: ^1.0.1
3

Import the package in your Dart code

In your Dart files where you need to use Grovs:

Dart
import 'package:grovs_flutter_plugin/grovs_flutter_plugin.dart';
4

Run the app

Build and run your Flutter project on your target platform:

Bash
flutter run -d ios

Flutter packages that include native code (like Grovs) may require additional platform-specific configuration. Check the SDK documentation for iOS and Android setup requirements.