Checklist Reference Guide #
Detailed guide for Feature Complete and PR Review checklists.
1. Feature Complete Verification Details #
1.1 Structure Verification #
Domain Layer
Item Verification Criteria Severity
Entity definition Freezed used, immutable objects đ´
Repository Interface I prefix, defined in Domain layer đ´
UseCase implementation Either pattern, Failure handling đ´
Failure class Domain-specific Failure defined đĄ
Unit tests UseCase tests written đĄ
// â
Entity example
@freezed
class User with _$User {
const factory User ( {
required int id,
required String name,
} ) = _User ;
}
// â
Repository Interface example
abstract interface class IUserRepository {
Future < Either < Failure , User >> getUser ( int id) ;
}
// â
UseCase example (Optional Constructor Injection)
class GetUserUseCase {
const GetUserUseCase ( [ IUserRepository ? repository] )
: _repository = repository ?? const UserRepository ( ) ;
final IUserRepository _repository;
Future < Either < Failure , User >> call ( GetUserParams params) async {
return _repository. getUser ( params. id) ;
}
}
Data Layer
Item Verification Criteria Severity
Repository implementation Interface implemented, const constructor đ´
Serverpod Mixin Network logic separated đĄ
Local Database Drift DAO pattern đĄ
DTO â Entity mapper toEntity(), toDto() đĄ
Caching strategy SWR or Cache-First đĄ
Presentation Layer
Item Verification Criteria Severity
Page widget Screen-level widget đ´
Reusable Widget Components extracted đĄ
BLoC/Cubit State management implemented đ´
Event/State Freezed Union Type đ´
Widget tests Key UI tested đĄ
1.2 Code Generation #
# Code generation commands
melos run generate: { feature_name}
# Or full build
melos run build
Generation verification items:
File Pattern Description
*.freezed.dartFreezed generated code
*.g.dartJSON serialization generated code
*_router.dartAuto_route generated code
*_database.g.dartDrift generated code
1.3 Testing #
Unit Tests (UseCase)
test ( 'should return user when repository succeeds' , ( ) async {
// Arrange
when ( ( ) => mockRepository. getUser ( any ( ) ) )
. thenAnswer ( ( _) async => Right ( testUser) ) ;
// Act
final result = await useCase ( GetUserParams ( id: 1 ) ) ;
// Assert
expect ( result, Right ( testUser) ) ;
verify ( ( ) => mockRepository. getUser ( 1 ) ) . called ( 1 ) ;
} ) ;
BLoC Tests (Direct Mock UseCase Injection)
blocTest < HomeBloC , HomeState > (
'emits [loading, loaded] when LoadUser succeeds' ,
setUp: ( ) {
when ( ( ) => mockGetUserUseCase ( any ( ) ) )
. thenAnswer ( ( _) async => Right ( testUser) ) ;
} ,
build: ( ) => HomeBloC ( getUserUseCase: mockGetUserUseCase) , // â
Direct mock injection
act: ( bloc) => bloc. add ( LoadUser ( id: 1 ) ) ,
expect: ( ) => [ HomeLoading ( ) , HomeLoaded ( testUser) ] ,
) ;
Test Commands
# Single feature test
flutter test feature/ { type} / { feature_name} / test/
# Coverage report
melos run test: with - html- coverage
Coverage target : 80% or above
2. PR Review Verification Details #
Item Verification Criteria
Title format type(scope): gitmoji description
Issue link Closes #123 or Fixes #123
Labels feature, bugfix, refactor, etc.
Title examples:
feat ( auth) : ⨠Add social login feature
fix ( home) : đ Fix feed infinite scroll bug
refactor ( store) : âťď¸ Optimize product list query
2.2 Change Scope #
Verification Item Description
Purpose clarity Change purpose identifiable from PR description
Single purpose One PR = one feature/fix
Change scope Only necessary files changed
No unnecessary changes No unrelated formatting, whitespace changes
2.3 Code Quality #
Architecture Verification
â
Correct dependency direction:
Presentation â Domain â Data
â Incorrect dependency:
Presentation â Data ( bypassing Domain )
Feature A â Feature B ( direct reference)
Naming Convention
Type Rule Example
Classes PascalCase UserRepository
Variables/Functions camelCase getUserData()
Constants SCREAMING_SNAKE MAX_RETRY_COUNT
Files snake_case user_repository.dart
2.4 State Management Verification #
// â
Correct BLoC pattern
@freezed
class HomeEvent with _$HomeEvent {
const factory HomeEvent . loadUser ( int id) = LoadUser ;
}
@freezed
class HomeState with _$HomeState {
const factory HomeState . initial ( ) = _Initial ;
const factory HomeState . loading ( ) = _Loading ;
const factory HomeState . loaded ( User user) = _Loaded ;
const factory HomeState . error ( Failure failure) = _Error ;
}
Verification items:
2.5 Security Verification #
Verification Item Risk Level How to Check
Hardcoded secrets đ´ Search for API keys, tokens
Sensitive info logging đ´ Check print, log statements
Input validation đĄ Check user input handling
# Secret search
grep - r " api_key \| secret \| password \| token " -- include= " *.dart "
Verification Item How to Check
N+1 queries Check DB calls inside loops
Unnecessary re-renders buildWhen, BlocSelector usage
Image optimization cacheWidth, cacheHeight applied
Caching strategy SWR, Cache-First applied
3. CI/CD Verification #
# Check PR status
gh pr checks [ PR_NUMBER ]
# View PR in browser
gh pr view [ PR_NUMBER ] -- web
Check Item Description
Build iOS/Android build successful
Test All tests passing
Lint Static analysis passing
Coverage Coverage threshold met
4. Troubleshooting #
Build Failures #
Symptom Cause Solution
Freezed error Code not generated melos run build
Import error Circular reference Fix dependency direction
Type error DTO/Entity mismatch Check mapper
Test Failures #
Symptom Cause Solution
Mock error registerFallbackValue missing Check test setUp
State mismatch BLoC test setup error Check build() function
Widget error Required widget wrapping missing Wrap with MaterialApp
Static Analysis Errors #
# Run analysis
melos run analyze
# Formatting
melos run format
Error Type Solution
unused_import Remove import
prefer_const Add const
avoid_print Use Logger