Flutter Advanced
I. Giới thiệu khóa học:
Khóa học Flutter Advanced được thiết kế nhằm nâng cao năng lực lập trình Flutter cho các lập trình viên mobile đã có kinh nghiệm, phục vụ trong công tác phát triển các sản phẩm mobile banking và ứng dụng doanh nghiệp. Chương trình tập trung vào các chủ đề nâng cao mà lập trình viên Flutter cần nắm vững để xây dựng ứng dụng production-grade: Clean Architecture, quản lý state phức tạp, tối ưu hiệu năng, xử lý offline/realtime, tích hợp native và quy trình CI/CD.
Khóa học kết hợp lý thuyết và thực hành chuyên sâu, với các bài tập và case study gắn liền với ngữ cảnh phát triển ứng dụng mobile banking: bảo mật giao dịch, xử lý offline khi mất kết nối, push notification, biometric authentication và tuân thủ các tiêu chuẩn bảo mật trong lĩnh vực tài chính.
II. Thời lượng: 40 giờ (5 ngày)
III. Hình thức đào tạo:
Đào tạo trực tiếp tại lớp học, đào tạo online tương tác với giảng viên, đào tạo kết hợp online và trực tiếp tại lớp học, đào tạo tại văn phòng khách hàng theo yêu cầu
IV. Mục tiêu khóa học:
- Thiết kế kiến trúc ứng dụng Flutter theo Clean Architecture, tách biệt rõ ràng các layer: Presentation, Domain và Data.
- Áp dụng các giải pháp quản lý state nâng cao (Bloc/Cubit, Riverpod) cho ứng dụng phức tạp với nhiều luồng dữ liệu.
- Tối ưu hiệu năng ứng dụng Flutter: giảm rebuild không cần thiết, xử lý danh sách lớn, tối ưu rendering và memory.
- Xây dựng custom widget, animation nâng cao và adaptive/responsive UI cho nhiều kích thước màn hình.
- Triển khai networking layer chuyên nghiệp với Dio, xử lý interceptor, retry, caching và error handling thống nhất.
- Thiết kế ứng dụng Offline First với local database (Hive/Isar/Drift) và cơ chế sync khi có kết nối trở lại.
- Tích hợp native platform thông qua Platform Channels (MethodChannel, EventChannel) và xử lý background tasks.
- Xây dựng chiến lược testing toàn diện (unit, widget, integration, golden test) và thiết lập CI/CD pipeline cho Flutter.
- Chuẩn bị ứng dụng cho production: code signing, obfuscation, crash reporting, analytics và release management.
V. Đối tượng tham gia:
- Mobile Developers đã có kinh nghiệm phát triển ứng dụng Flutter và muốn nâng cao kỹ năng lên mức chuyên sâu.
- Frontend/Mobile Engineers đang phụ trách phát triển ứng dụng mobile banking hoặc ứng dụng doanh nghiệp.
- Technical Leads phụ trách đội mobile cần nắm vững kiến trúc và best practices cho Flutter ở quy mô production.
- Developers đã biết Flutter cơ bản (widget, navigation, state management cơ bản) và muốn chuyển sang production-level.
VI. Điều kiện tiên quyết:
- Tối thiểu 3 năm kinh nghiệm trong phát triển phần mềm.
- Đã có kinh nghiệm thực tế phát triển ứng dụng Flutter (hiểu widget tree, StatefulWidget, navigation, basic state management).
- Nắm vững Dart language: async/await, Stream, Generics, Extension, Mixin.
- Hiểu biết cơ bản về RESTful API, JSON serialization và HTTP networking.
- Đã từng publish hoặc tham gia phát triển ít nhất 1 ứng dụng Flutter hoàn chỉnh.
- Lưu ý: Khóa học không dạy lại Flutter căn bản.
VII. Nội dung khóa học:
Phần I. Clean Architecture & Advanced State Management
1. Bài 1. Clean Architecture trong Flutter
Nội dung:
- Tại sao cần kiến trúc rõ ràng cho ứng dụng Flutter quy mô lớn?
- Clean Architecture layers: Presentation, Domain, Data – nguyên tắc dependency rule.
- Entity, Use Case, Repository pattern trong Flutter.
- Dependency Injection với GetIt / Injectable: quản lý dependency graph.
- Cấu trúc project theo feature-first vs layer-first: ưu nhược điểm.
- Separation of Concerns: tách business logic khỏi UI và framework.
- Error handling thống nhất: Either pattern (dartz/fpdart), Failure classes.
Thực hành / hoạt động:
- Refactor một ứng dụng Flutter monolithic sang Clean Architecture.
- Thiết kế Domain layer: Entity, Use Case, Repository interface cho module Authentication.
- Thiết kế Data layer: Remote Data Source (API), Local Data Source (Cache), Repository implementation.
- Cấu hình Dependency Injection với GetIt cho toàn bộ project.
2. Bài 2. Advanced State Management
Nội dung:
- So sánh các giải pháp state management: Provider, Riverpod, Bloc/Cubit, GetX – khi nào dùng gì?
- Bloc pattern deep-dive: Event, State, Bloc, BlocProvider, BlocBuilder, BlocListener, BlocConsumer.
- Cubit vs Bloc: khi nào chọn Cubit, khi nào cần full Bloc với Events.
- Multi-Bloc coordination: BlocListener, MultiBlocProvider, inter-bloc communication.
- Riverpod advanced: StateNotifier, AsyncValue, family modifier, autoDispose.
- State management cho complex forms: validation, dirty tracking, nested forms.
- Quản lý authentication state xuyên suốt ứng dụng: token refresh, session expiry, force logout.
Thực hành / hoạt động:
- Xây dựng Authentication flow hoàn chỉnh với Bloc: Login → Token storage → Auto-refresh → Logout.
- Xử lý complex form với multiple Blocs: form validation, submission, error display.
- Thiết kế state cho màn hình transaction history với pagination, filter và pull-to-refresh.
Phần II. Performance Optimization & Advanced UI
3. Bài 3. Flutter Performance Optimization
Nội dung:
- Flutter rendering pipeline: Build → Layout → Paint → Composite.
- Xác định và giải quyết unnecessary rebuilds: const constructors, keys, shouldRebuild.
- Widget rebuild optimization: RepaintBoundary, ValueListenableBuilder, Selector.
- ListView optimization: ListView.builder, cacheExtent, itemExtent, addAutomaticKeepAlives.
- Image optimization: caching (cached_network_image), memory management, resize, precache.
- Memory profiling: DevTools, memory leaks detection, dispose pattern.
- Flutter DevTools: Performance overlay, Timeline, CPU profiler, Widget inspector.
- Isolates và compute() cho heavy computation: JSON parsing, image processing, encryption.
- Shader compilation jank: SkSL warm-up, impeller engine.
Thực hành / hoạt động:
- Profile ứng dụng mẫu bằng Flutter DevTools, xác định bottleneck.
- Tối ưu màn hình danh sách giao dịch (10,000+ items) với lazy loading và caching.
- Sử dụng Isolate để parse large JSON response mà không block UI thread.
- Fix memory leak trong ứng dụng có Stream subscription và controller.
4. Bài 4. Advanced UI & Custom Widgets
Nội dung:
- CustomPainter và Canvas API: vẽ chart, graph, custom shapes.
- Animation nâng cao: AnimationController, Tween, CurvedAnimation, staggered animations.
- Hero animation, page transition animation, shared element transition.
- Implicit vs Explicit animations: khi nào dùng gì?
- Slivers deep-dive: CustomScrollView, SliverAppBar, SliverList, SliverGrid, SliverPersistentHeader.
- Responsive/Adaptive UI: LayoutBuilder, MediaQuery, multi-platform design patterns.
- Theming nâng cao: dynamic theme switching, custom design system, design tokens.
- Accessibility (a11y): Semantics, screen reader support, contrast ratios.
Thực hành / hoạt động:
- Xây dựng custom chart widget (line chart/pie chart) bằng CustomPainter cho dashboard tài chính.
- Tạo animated transaction card với staggered animation và Hero transition.
- Xây dựng collapsible header với SliverAppBar cho màn hình account detail.
- Thiết kế responsive layout chạy tốt trên phone và tablet.
Phần III. Networking, Offline First & Realtime
5. Bài 5. Networking & API Integration
Nội dung:
- Dio deep-dive: BaseOptions, Interceptors, CancelToken, FormData, multipart upload.
- Interceptor patterns: Auth interceptor (token attach, 401 handling, token refresh), Logging interceptor, Retry interceptor.
- Error handling thống nhất: DioException mapping to domain Failure types.
- API response caching: ETag, Cache-Control, local cache strategy.
- Certificate Pinning: bảo mật connection cho ứng dụng banking.
- Code generation: json_serializable, freezed cho immutable data classes, retrofit cho type-safe API client.
- Pagination patterns: cursor-based, offset-based, infinite scroll implementation.
Thực hành / hoạt động:
- Xây dựng networking layer hoàn chỉnh với Dio: base client, auth interceptor, error interceptor, retry logic.
- Implement token refresh flow: 401 → refresh token → retry original request → force logout nếu refresh fail.
- Thiết kế API client type-safe với retrofit + freezed cho module transaction.
6. Bài 6. Offline First & Realtime
Nội dung:
- Offline First architecture: tại sao quan trọng cho mobile banking?
- Local database options: Hive (key-value), Isar (NoSQL), Drift/Floor (SQL) – so sánh và khi nào dùng gì?
- Sync strategies: optimistic update, conflict resolution, queue-based sync.
- Connectivity monitoring: Connectivity Plus, graceful degradation khi mất kết nối.
- WebSocket integration: real-time price updates, notification, chat.
- Firebase Realtime Database / Firestore: realtime sync patterns.
- Server-Sent Events (SSE) và long polling: alternatives cho WebSocket.
- Push Notification: FCM setup, notification channels, local notifications, deep linking từ notification.
Thực hành / hoạt động:
- Thiết kế offline-first transaction draft: tạo giao dịch offline → queue → sync khi online.
- Implement real-time exchange rate update bằng WebSocket.
- Xử lý push notification: nhận notification → parse payload → navigate đến đúng màn hình.
- Thiết kế conflict resolution cho trường hợp dữ liệu thay đổi cả offline và server.
Phần IV. Native Integration & Background Processing
7. Bài 7. Platform Channels & Native Integration
Nội dung:
- Platform Channels: MethodChannel, EventChannel, BasicMessageChannel.
- Gọi native code (Kotlin/Swift) từ Flutter và ngược lại.
- Pigeon: type-safe platform channel code generation.
- Biometric authentication: fingerprint, Face ID integration qua local_auth.
- Camera & Image Picker: chụp ảnh CCCD/CMND, scan QR code cho thanh toán.
- File system access: đọc/ghi file, download management, share files.
- Device info, package info, permission handling.
- Deep linking & App Links: Universal Links (iOS), App Links (Android), routing từ URL.
Thực hành / hoạt động:
- Implement biometric authentication flow cho ứng dụng banking.
- Tạo QR code scanner cho chức năng thanh toán QR.
- Viết Platform Channel để gọi native crypto library cho transaction signing.
- Thiết kế deep linking: mở ứng dụng từ link thanh toán hoặc notification.
8. Bài 8. Background Processing & Platform Services
Nội dung:
- Background processing trong Flutter: WorkManager, background_fetch.
- Background tasks cho banking: sync giao dịch pending, refresh token, update exchange rate.
- Foreground service: long-running tasks, progress notification.
- Secure Storage: flutter_secure_storage, Keychain (iOS), EncryptedSharedPreferences (Android).
- App lifecycle management: AppLifecycleState, xử lý resume/pause/detached.
- Local authentication & session management: auto-lock, timeout, biometric re-verify.
- In-app update: force update, flexible update strategies.
- Multi-flavor / Multi-environment: dev, staging, production builds.
Thực hành / hoạt động:
- Thiết kế background sync service: đồng bộ giao dịch pending khi có kết nối.
- Implement Secure Storage cho token, PIN, sensitive data.
- Thiết kế session management: auto-lock sau 5 phút inactive, biometric unlock.
- Cấu hình multi-flavor build: dev (mock API), staging, production.
Phần V. Testing, CI/CD & Production Readiness
9. Bài 9. Testing Strategies trong Flutter
Nội dung:
- Testing pyramid trong Flutter: Unit Test → Widget Test → Integration Test.
- Unit testing: mockito, mocktail, testing Use Cases và Repositories.
- Widget testing: WidgetTester, pump, find, expect, testing UI components.
- Bloc testing: bloc_test package, testing Events → States transitions.
- Integration testing: integration_test package, end-to-end flow testing.
- Golden testing: screenshot comparison testing cho UI regression.
- Test coverage: thu thập và phân tích code coverage, coverage thresholds.
- Test doubles: Mock, Fake, Stub – khi nào dùng gì?
Thực hành / hoạt động:
- Viết unit test cho Use Case và Repository (mocking remote/local data source).
- Viết widget test cho login form: validation, button states, error display.
- Viết Bloc test cho authentication flow: LoginEvent → Loading → Success/Failure.
- Viết integration test cho flow: Login → Home → Transaction list → Transaction detail.
10. Bài 10. CI/CD & Production Readiness
Nội dung:
- CI/CD cho Flutter: GitHub Actions, GitLab CI, Codemagic, Bitrise.
- Automated pipeline: lint → test → build → deploy.
- Code signing: iOS certificates/provisioning profiles, Android keystore.
- App distribution: TestFlight (iOS), Firebase App Distribution, Internal Testing Track (Google Play).
- Obfuscation và code shrinking: --obfuscate, --split-debug-info.
- Crash reporting: Firebase Crashlytics, Sentry integration.
- Analytics: Firebase Analytics, custom event tracking, user flow analysis.
- Release management: versioning strategy, changelogs, staged rollout.
- App Store / Play Store submission checklist và review guidelines.
- Security checklist cho mobile banking: OWASP MASVS, root/jailbreak detection, screenshot prevention, SSL pinning.
Thực hành / hoạt động:
- Thiết lập CI/CD pipeline với GitHub Actions: lint → test → build APK/IPA.
- Cấu hình Firebase Crashlytics và upload dSYM/mapping file.
- Cấu hình obfuscation và split-debug-info cho release build.
- Review security checklist: kiểm tra ứng dụng theo OWASP Mobile Top 10.
- Thảo luận quy trình release management trong môi trường ngân hàng.
Học trực tuyến
Học tại Hồ Chí Minh
Học tại Hà Nội



