Design Patterns examples written in Dart using TDD and mocking objects techniques as well as KISS.
example/
: design patterns to build/run (e.g.$ dart run example/builder.dart
)lib/
: design patterns to import from a dart file (e.g.import 'package:dp/builder.dart';
)test/
: design patterns to test (e.g.$ dart test test/builder_test.dart
)tool/
: tools that may be useful when commiting to this repo
Each design pattern has its corresponding file in the directories example/
, lib/
and test/
.
$ git clone https://github.com/TheDesignPatterns/Dart.git
$ cd Dart
$ dart run build_runner build
$ dart test
$ dart run example/decorator.dart
$ git clone https://github.com/TheDesignPatterns/Dart.git
$ cd Dart
$ podman run -it -v $PWD:/Dart -w /Dart docker.io/library/dart
From inside the running container:
$ dart run build_runner build
$ dart test
$ dart run example/decorator.dart
That's nice! So please just fork it and send me a pull request.
Be the first to star it!