/fluttourII

A Flutter project template

Primary LanguageDart

Build Status

A Flutter project template, an upgrade version of fluttour

  • Flutter (Channel stable, 3.0.2)
  • Dart 2.17.3
  • Cocoapods 1.11.3
  • flutter_bloc: State management package.
  • dio: A powerful Http client for Dart.
  • mockito: A mock framework with APIs for Fakes, Mocks, behavior verification, and stubbing.

Run App with a specific environment.

  • Development: flutter run -t lib/main_dev.dart
  • Production: flutter run -t lib/main_prod.dart
.
├── README.md
├── {project_name}
│   ├── asssets
│   │   ├── fonts
│   │   ├── icons
│   │   ├── images
│   │   └── locales
│   └── lib
│       ├── config
│       │   ├── app_config.dart
│       │   ├── app_config_type.dart
│       │   ├── app_secure_config.dart
│       │   └── app_secure_config_type.dart
│       ├── data
│       │   ├── api
│       │   │   ├── api_client
│       │   │   │   ├── error
│       │   │   │   │   └── error.dart 
│       │   │   │   ├── interceptor
│       │   │   │   │   ├── curl_log.dart
│       │   │   │   │   └── query.dart
│       │   │   │   ├── api_client.dart
│       │   │   │   ├── api_client_type.dart
│       │   │   │   └── api_client_type.g.dart 
│       │   │   ├── request
│       │   │   │   └── dummy_request.dart
│       │   │   └── response
│       │   │       ├── dummy_response.dart
│       │   │       └── dummy_response.g.dart
│       │   ├── datasource
│       │   │   └── dummy
│       │   │       ├── dummy_datasource.dart
│       │   │       └── dummy_datasource_type.dart
│       │   └── repository
│       │   │   └── dummy
│       │   │       ├── dummy_repository.dart
│       │   │       └── dummy_repository_type.dart
│       ├── di
│       │   ├── client_module.dart
│       │   ├── config_module.dart
│       │   ├── datasource_module.dart
│       │   ├── repository_module.dart
│       │   └── usecase_module.dart
│       ├── domain
│       │   ├── model
│       │   │   ├── empty.dart
│       │   │   └── dummy.dart
│       │   ├── translator
│       │   │   └── dummy_translator.dart
│       │   └── usecase
│       │       └── dummy
│       │           ├── dummy_usecase.dart
│       │           └── dummy_usecase_type.dart
│       ├── environment
│       │   ├── development
│       │   │   └── development_env.dart
│       │   ├── production
│       │   │   └── production_env.dart
│       │   └── environment.dart
│       ├── presentation
│       │   ├── dummy
│       │   │   ├── dummy_page.dart
│       │   │   └── dummy_bloc.dart
│       ├── router
│       │   ├── gen_route.dart
│       │   ├── named_route.dart
│       │   ├── navigation_controller.dart
│       │   └── routes.dart
│       ├── util
│       │   ├── assets
│       │   │   ├── app_color.dart
│       │   │   ├── app_icon.dart
│       │   │   ├── app_image.dart
│       │   │   ├── app_locale.dart
│       │   │   └── app_text.dart
│       │   ├── extension
│       │   ├── widget
│       │   ├── app_global.dart
│       │   ├── app_mixin.dart
│       │   ├── app_router.dart
│       │   └── util.dart
│       ├── main.dart
│       ├── main_dev.dart
│       ├── main_prod.dart
│       └── my_app.dart
└── test
    ├── domain
    │   └── usecase
    │   │   └── dummy
    │   │       ├── dummy_usecase_test.dart
    │   │       └── dummy_usecase_test.mocks.dart
    └── mock
        └── dummy_response_mock.dart
  group('describes what component you are testing', () {
    test('describes the purpose of the test or the current state of an object', () {
    
      // stub a mock method before interacting
      when('mock.doMock()').thenAnswer((_) => 'stub');
      
      // the expected result of the test
      expect('actual', 'matcher');
    });
  });
  • Make sure flutter pub get before you run the app.