compile with latest Dart

- move samples outside of lib folder
- refactor conditionals