Skip to content

Design patterns in Dart (for educational purposes)

License

Notifications You must be signed in to change notification settings

mehoffer/DesignPatterns

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Design Patterns in Dart

Build Status Coverage Status

Design Patterns examples written in Dart using TDD and mocking objects techniques (thanks to Mockito).

Layout

  • 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/.

Build (assuming Dart env is up and running)

$ git clone https://github.com/mehoffer/DesignPatterns.git
$ cd DesignPatterns
$ dart run build_runner build
$ dart test
$ dart run example/decorator.dart

Build (using official Dart image via docker)

$ 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

Contributing

You want to contribute to this project?

Wow, thanks! So please just fork it and send me a pull request.

You like it and/or want to clone it?

Wow, thanks! So please just star it.

References