📲 FlutterFlow Overview
Build true native iOS & Android apps với FlutterFlow.
FlutterFlow là gì?
Native Apps, No Code
FlutterFlow builds on Flutter (Google's framework):
- True native performance
- Single codebase → iOS + Android
- Export Flutter code
- Firebase integration
When to Use FlutterFlow
Good For ✅
- Native mobile apps
- High-performance apps
- Complex UI/animations
- Apps for App Store/Play Store
- Firebase-based apps
Less Ideal ❌
- Web-only apps (use Bubble)
- Simple data apps (use Glide)
- Quick prototypes
- Heavy backend logic
Getting Started
Step 1: Create Project
Text
11. flutterflow.io → Sign up22. Create New Project33. Choose blank hoặc template44. Name your appStep 2: Firebase Setup
Text
1FlutterFlow + Firebase:21. Create Firebase project32. Connect in FlutterFlow settings43. Auto-configures:5 - Authentication6 - Firestore (database)7 - Storage8 - Cloud FunctionsInterface Overview
Text
1┌────────────────────────────────────────────┐2│ Widget Tree │ CANVAS │ Properties │3│ ──────────│ ┌──────┐ │ ──────────── │4│ Page │ │Phone │ │ Widget config │5│ └─Column │ │UI │ │ Styling │6│ └─Row │ │ │ │ Actions │7│ └─Text │ └──────┘ │ Conditions │8├────────────────────────────────────────────┤9│ [Pages] [Components] [Firestore] [API] │10└────────────────────────────────────────────┘Core Concepts
Widget Tree
Text
1Everything is a Widget:2 3Page (Scaffold)4└─ Column5 ├─ Container (Header)6 │ └─ Text ("Welcome")7 ├─ ListView8 │ └─ ListTile (repeating)9 └─ Button10 └─ Text ("Submit")Layout Widgets
Text
1Column - Vertical stack2Row - Horizontal stack3Stack - Layered (z-index)4Container - Box with styling5ListView - Scrollable list6GridView - Grid layout7Wrap - Auto-wrap itemsCommon Widgets
Text
1Display:2- Text3- Image4- Icon5- Video Player6 7Input:8- TextField9- Dropdown10- Checkbox11- Slider12- Date Picker13 14Interactive:15- Button16- IconButton17- Card18- ListTileBuilding UI
Step-by-Step
Text
11. Add Column to page22. Inside Column, add Container (header)33. Add Text widget for title44. Add ListView for content55. Style each widget66. Test in previewStyling
Text
1Every widget has:2- Padding/Margin3- Colors (fill, border)4- Border radius5- Shadows6- Alignment7- Size constraintsResponsive Design
Text
1FlutterFlow responsive options:2- Min/Max width3- Expand/Shrink4- Breakpoints (mobile/tablet/desktop)5- Responsive visibilityFirestore Database
Data Structure
Text
1Firestore = NoSQL2 3Collections → Documents → Fields4 5users (collection)6├─ userId1 (document)7│ ├─ name: "John"8│ ├─ email: "john@..."9│ └─ created: timestamp10└─ userId2 (document)11 └─ ...Create Schema
Text
11. Firestore tab in FlutterFlow22. Add Collection (e.g., "products")33. Define fields:4 - name (String)5 - price (Double)6 - image (ImagePath)7 - category (Reference to categories)Query Data
Text
1Backend Query:2Collection: products3Filters:4 - category == selected_category5 - price < 1006Order: price (ascending)7Limit: 20Display Data
Text
11. Add ListView widget22. Backend Query → products33. Inside: ListTile44. Bind data: item.name, item.priceActions
Types of Actions
Text
1Navigation:2- Navigate to page3- Navigate back4- Open drawer5 6Data:7- Create document8- Update document9- Delete document10 11UI:12- Show snackbar13- Show dialog14- Update state15 16Custom:17- Call API18- Run custom code19- Firebase functionAction Flow
Text
1Example - Submit Button:2 31. Validate form42. If valid:5 - Create document in Firestore6 - Show success message7 - Navigate to home83. If invalid:9 - Show error messageAuthentication
Setup
Text
11. Firebase Console → Authentication22. Enable providers (Email, Google, Apple)33. FlutterFlow → Auth settings44. Configure sign-in methodsAuth Pages
Text
1FlutterFlow provides:2- Sign Up page3- Login page 4- Forgot Password5- Phone verification6 7Customize UI, logic auto-handledProtected Pages
Text
1Page settings:2- Requires authentication: Yes3- Entry page: Login page4- Auth user collection: usersState Management
Page State
Text
1Store temporary data per page:2 31. Add Page State variable42. Type: String, Int, List, etc.53. Update via actions64. Use in conditionalsApp State
Text
1Global state across app:2 31. Add App State variable42. Accessible from any page53. Use for:6 - User preferences7 - Shopping cart8 - Selected filtersPreview & Test
Run Mode
Text
11. Click "Test" button22. Choose:3 - Web preview4 - Run on device (debug)53. Test all flowsDebug
Text
1- Action flow debugger2- Console logs3- Network inspector4- State viewerBest Practices
FlutterFlow Tips
- Plan widget tree - Sketch first
- Use components - Reusable widgets
- Name everything - Widget names
- Test often - Run mode
- Firebase rules - Security
- Export code - Backup
Bài Tập
Practice
- Create FlutterFlow project
- Setup Firebase connection
- Build simple profile page:
- Profile image
- Name, email display
- Edit button
- Sign out button
- Test in preview
Tiếp theo: Bài 5 - OpenAI API in No-Code
