regularização do tamanho dos widgets
This commit is contained in:
@@ -73,6 +73,8 @@ class _TeacherHeroWidgetState extends State<TeacherHeroWidget> {
|
|||||||
_classStats.fold(0, (sum, stats) => sum + stats.activeQuizzes);
|
_classStats.fold(0, (sum, stats) => sum + stats.activeQuizzes);
|
||||||
int get uploadedContent =>
|
int get uploadedContent =>
|
||||||
_classStats.fold(0, (sum, stats) => sum + stats.totalContent);
|
_classStats.fold(0, (sum, stats) => sum + stats.totalContent);
|
||||||
|
int get studentsNeedingSupport =>
|
||||||
|
_classStats.fold(0, (sum, stats) => sum + stats.studentsNeedingSupport.length);
|
||||||
double get classAverageProgress {
|
double get classAverageProgress {
|
||||||
if (_classStats.isEmpty) return 0.0;
|
if (_classStats.isEmpty) return 0.0;
|
||||||
final totalProgress = _classStats.fold(
|
final totalProgress = _classStats.fold(
|
||||||
@@ -254,24 +256,35 @@ class _TeacherHeroWidgetState extends State<TeacherHeroWidget> {
|
|||||||
const SizedBox(height: 20),
|
const SizedBox(height: 20),
|
||||||
|
|
||||||
// Stats Grid
|
// Stats Grid
|
||||||
Row(
|
IntrinsicHeight(
|
||||||
children: [
|
child: Row(
|
||||||
Expanded(
|
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||||
child: _buildStatCard(
|
children: [
|
||||||
icon: Icons.quiz,
|
Expanded(
|
||||||
value: '$activeQuizzes',
|
child: _buildStatCard(
|
||||||
label: 'Quizzes Ativos',
|
icon: Icons.quiz,
|
||||||
|
value: '$activeQuizzes',
|
||||||
|
label: 'Quizzes Ativos',
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
const SizedBox(width: 12),
|
||||||
const SizedBox(width: 12),
|
Expanded(
|
||||||
Expanded(
|
child: _buildStatCard(
|
||||||
child: _buildStatCard(
|
icon: Icons.upload_file,
|
||||||
icon: Icons.upload_file,
|
value: '$uploadedContent',
|
||||||
value: '$uploadedContent',
|
label: 'Conteúdos',
|
||||||
label: 'Conteúdos',
|
),
|
||||||
),
|
),
|
||||||
),
|
const SizedBox(width: 12),
|
||||||
],
|
Expanded(
|
||||||
|
child: _buildStatCard(
|
||||||
|
icon: Icons.warning_amber,
|
||||||
|
value: '$studentsNeedingSupport',
|
||||||
|
label: 'Precisam Apoio',
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user