Design Patterns examples written in Dart using TDD and mocking objects techniques (thanks to Mockito).
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
)
Each design pattern has its corresponding file in the directories example/
, lib/
and test/
.
$ git clone https://github.com/mehoffer/DesignPatterns.git
$ cd DesignPatterns
$ dart run build_runner build
$ dart test
$ dart run example/decorator.dart
$ git clone https://github.com/mehoffer/DesignPatterns.git
$ cd DesignPatterns
$ docker run -it -v $PWD:/DP -w /DP dart
From inside the running container:
$ dart run build_runner build
$ dart test
$ dart run example/decorator.dart
Wow, thanks! So please just fork it and send me a pull request.
Wow, thanks! So please just star it.