gerenciamento e criação de turmas junto de correções na tela de professores
This commit is contained in:
@@ -404,6 +404,43 @@ This document tracks the overall progress of the AI Study Assistant project deve
|
||||
|
||||
### **Last 24 Hours:**
|
||||
|
||||
- ✅ **ETAPA 2: Classes List Display** - Teachers can now view their created classes
|
||||
- New `TeacherClassesListWidget` component
|
||||
- "As Minhas Turmas" section added to Teacher Dashboard
|
||||
- Real-time Firestore stream with `StreamBuilder`
|
||||
- Query: `.where('teacherId', isEqualTo: currentUser.uid).orderBy('createdAt', descending: true)`
|
||||
- **CORREÇÃO**: O erro anterior foi tentar usar `GridView` horizontal para um layout que exige colunas fixas de 2 cards
|
||||
- **SOLUÇÃO**: Usar `ListView.builder` com `scrollDirection: Axis.horizontal`
|
||||
- Cada item do ListView é uma `Column` com 2 cards (índice * 2 e índice * 2 + 1)
|
||||
- Cards mantêm exatamente o mesmo tamanho da lista vertical original
|
||||
- Layout: Card 1, 3, 5... (top row) | Card 2, 4, 6... (bottom row)
|
||||
- Scroll horizontal para visualizar todas as turmas
|
||||
- Padding entre colunas: 12 pixels
|
||||
- Altura do SizedBox: 280 pixels (suficiente para 2 cards + spacing)
|
||||
- Empty state: "Ainda não criaste nenhuma turma."
|
||||
- Loading state with `CircularProgressIndicator`
|
||||
- Cards styled with white background, rounded corners, and subtle shadow
|
||||
|
||||
- ✅ **Fixed Pixel Overflow Issues** - Teacher Dashboard cards
|
||||
- Replaced fixed `height: 150` with `BoxConstraints(minHeight: 135, maxHeight: 160)`
|
||||
- Fixed overflow in "Criar Turma" card
|
||||
- Fixed overflow in "Upload Conteúdo" card
|
||||
- Cards now adapt better to different screen sizes
|
||||
|
||||
- ✅ **Unified Quick Action Cards Text Style**
|
||||
- "Upload Conteúdo" and "Criar Quiz" cards now have same text alignment as "Criar Turma"
|
||||
- All cards use `Column` with `crossAxisAlignment: CrossAxisAlignment.start` for text
|
||||
- Subtitle text now supports 2 lines with `maxLines: 2` and proper line height (1.2)
|
||||
- Consistent fontSize (16 for title, 12 for subtitle) across all cards
|
||||
- "Criar Quiz" subtitle updated to "Avaliações interativas" for better description
|
||||
|
||||
- ✅ **ETAPA 1: Class Creation Feature** - Teacher can now create classes
|
||||
- Added "Criar Turma" button in Teacher Dashboard
|
||||
- Dialog for entering class name
|
||||
- Auto-generates 6-character random code (A-Z, 0-9)
|
||||
- Saves to Firestore `classes` collection with name, teacherId, code, createdAt
|
||||
- Success/error feedback via SnackBar
|
||||
|
||||
- ✅ Fixed dashboard overflow issue in QuickAccessWidget
|
||||
|
||||
- ✅ Implemented responsive layout with IntrinsicHeight and Flexible
|
||||
|
||||
Reference in New Issue
Block a user