Add Shard to your pubspec.yaml file:
dependencies:
flutter:
sdk: flutter
shard: ^2.0.0-dev.1
^2.0.0-dev.1 constraint opts into the 2.0 development release. Pin an exact version (for example shard: 2.0.0-dev.1) if you prefer stability.Run the following command to install the package:
flutter pub get
Import Shard in your Dart files:
import 'package:shard/shard.dart';
Test utilities live in a separate import that you use from your tests:
import 'package:shard/shard_test.dart';
Timer-based tests (debounce/throttle) pair well with the fake_async dev dependency.
Follow the docs in this order for a step-by-step experience:
Next: Quick Start to build your first shard. See also: Core Concepts for the fundamentals.