bloc_test
bloc을 테스트하기 쉽게 만들어주는 테스트 라이브러리입니다. bloc 상태 관리 패키지와 함께 사용하도록 설계되었습니다.
Flutter용 테스트 가능하고 유지보수 및 확장성이 뛰어난 아키텍처를 보여주는 간단한 앱입니다. 이 프로젝트에서는 flutter_bloc, get_it, hive, REST API 등 다양한 기술 스택을 사용합니다.
bloc을 테스트하기 쉽게 만들어주는 테스트 라이브러리입니다. bloc 상태 관리 패키지와 함께 사용하도록 설계되었습니다.
Dart에서의 함수형 프로그래밍. 효율적인 불변 데이터 구조, 모나드, 렌즈 및 기타 FP 도구를 사용하여 Dart 코드를 정제하세요.
Injectable은 get_it용 편리한 코드 생성기입니다. Angular DI, Guice DI, inject.dart에서 영감을 받았습니다.
Injectable은 get_it용 편리한 코드 생성기입니다. Angular DI, Guice DI, inject.dart에서 영감을 받았습니다.
프리티 디오 로거는 네트워크 호출을 예쁘고 읽기 쉬운 형식으로 로깅하는 디오 인터셉터입니다.
스트림을 변환하고 조작하는 데 사용할 수 있는 유틸리티 모음입니다.
^8.1.0^3.2.3^1.0.5^0.10.1^4.0.6^2.0.5{"sdk":"flutter"}^8.1.1{"sdk":"flutter"}^1.1.6^1.2.3^7.2.0^6.0.0^2.2.3^1.1.0^2.1.0^0.17.0^4.7.0^0.1.0^1.1.1^2.1.0^6.1.7^9.1.0^2.3.3^0.11.0{"sdk":"flutter"}^1.1.6^2.0.0^2.1.3^6.5.4^0.3.0아래는 영문 원문 스냅샷입니다. 최신 내용은 GitHub에서 확인하세요.
example workflow codecov Flutter version License: MIT
A simple app to demonstrate a testable, maintainable, and scalable architecture for flutter. flutter_bloc, hive, and REST API are some of the tech stacks used in this project.
| albums | artist |
|---|---|
| top_albums | album_detail |
For the app to work, you need to provide your own last.fm API key by issuing here.
Once you get your API key, you can run or build the app by using the following command:
# Run
$ flutter run --dart-define=API_KEY=PUT_YOUR_API_KEY_HERE
# Build
$ flutter build --dart-define=API_KEY=PUT_YOUR_API_KEY_HERE
To run all unit and widget tests use the following command:
$ flutter test --coverage --test-randomize-ordering-seed random
To remove generated files from the coverage report, use the following command:
# install remove_from_coverage package
$ pub global activate remove_from_coverage
# remove `.g.dart` and `.config.dart` files from the coverage report
$ pub global run remove_from_coverage:remove_from_coverage -f coverage/lcov.info -r '.g.dart', '.config.dart'
To view the generated coverage report you can use lcov.
# Generate Coverage Report
$ genhtml coverage/lcov.info -o coverage/
# Open Coverage Report
$ open coverage/index.html
This project relies on flutter_localizations and follows the official internationalization guide for Flutter.
app_en.arb file at lib/config/l10n/arb/app_en.arb.{
"@@locale": "en",
"appName": "LastFM",
"@appName": {
"description": "The application name"
}
}
{
"@@locale": "en",
"appName": "LastFM",
"@appName": {
"description": "The application name"
},
"albums": "Albums",
"@albums": {
"description": "Text shown in the AppBar of AlbumsScreen"
},
}
import 'package:some_app/l10n/l10n.dart';
@override
Widget build(BuildContext context) {
final l10n = context.l10n;
return Text(l10n.albums);
}
Update the CFBundleLocalizations array in the Info.plist at ios/Runner/Info.plist to include the new locale.
...
<key>CFBundleLocalizations</key>
<array>
<string>en</string>
<string>am</string>
</array>
...
lib/config/l10n/arb.├── l10n
│ ├── arb
│ │ ├── app_en.arb
│ │ └── app_am.arb
.arb file:app_en.arb
{
"@@locale": "en",
"appName": "LastFM",
"@appName": {
"description": "The application name"
},
}
app_am.arb
{
"@@locale": "am",
"appName": "የመጨረሻ ኤፍ ኤም",
"@appName": {
"description": "የመተግበሪያ ስም"
},
}
Thanks to all the people who created and are maintaining these awesome packages used in this project.
| Maintainers | Packages |
|---|---|
| Felix Angelov | bloc & flutter_bloc, equatable, mocktail |
| Thomas Burkhart | get_it |
| Milad akarie | injectable |
| Chris Sells | go_router |
| Very Good Ventures | For their awesome README template |
| And everyone else | dio, hive, and many more... |
You can file features requests (not intending to add new features, but I will try to add based on requests), bugs or any questions at the issue tracker.
And don't forget to give a star if you find this repo helpful, or you have learned something from it!