Skip to content

Latest commit

 

History

History
25 lines (21 loc) · 564 Bytes

getting-started.md

File metadata and controls

25 lines (21 loc) · 564 Bytes

Getting started

Add these dependencies to your pubspec.yaml file:

dependencies:
  chest: ...
  chest_flutter: ... # if you're using Flutter

For an in-depth introduction to Chest, just read the chapters. To get you started, here is an example program that outputs how many times it ran:

void main() async {
  tape.register({
    ...tapers.forDartCore,
  });
  final counter = Chest('counter', ifNew: () => 0);
  await counter.open();
  print('This program ran ${counter.value} times.');
  counter.value++;
  await counter.close();
}