Skip to content

Latest commit

 

History

History
37 lines (34 loc) · 1.91 KB

File metadata and controls

37 lines (34 loc) · 1.91 KB

AGENTS.md - Flutter IPTV Player Project Guide

Build & Development Commands

  • flutter pub get - Install dependencies
  • flutter run - Run app in debug mode
  • flutter build apk - Build Android APK
  • flutter build ios - Build iOS app
  • flutter build web - Build web version
  • flutter build windows - Build Windows app
  • flutter build macos - Build macOS app
  • flutter build linux - Build Linux app
  • flutter test - Run all tests
  • flutter test test/specific_test.dart - Run single test file
  • dart run build_runner build - Generate code (Drift database)
  • dart run build_runner watch - Watch and regenerate code
  • flutter gen-l10n - Generate localization files
  • flutter analyze - Run static analysis
  • flutter format . - Format all Dart files

Code Style Guidelines

  • Follow Flutter/Dart official conventions using flutter_lints
  • Use camelCase for variables/functions, PascalCase for classes/types
  • Private members use underscore prefix (_variable)
  • Import order: dart/flutter → package imports → relative imports
  • Prefer single quotes, const constructors, async/await patterns
  • Use null safety (? and ! operators appropriately)
  • Error handling with try-catch and proper error messages
  • Use Provider pattern for state management, Drift for database
  • Testing with flutter_test framework and mockito for mocking

Localization (i18n)

  • IMPORTANT: app_localizations_*.dart files are auto-generated by Flutter i18n
  • Only edit .arb files in lib/l10n/ directory (e.g., app_en.arb, app_tr.arb)
  • After modifying .arb files, run flutter gen-l10n to regenerate localization files
  • Supported languages: English (en), Turkish (tr), Spanish (es), French (fr), German (de), Portuguese (pt), Russian (ru), Hindi (hi), Arabic (ar), Chinese (zh)
  • Add new translations to ALL language .arb files for consistency
  • Do NOT manually edit generated app_localizations*.dart or app_localizations.dart files