CKT 1.0.1
This commit is contained in:
@@ -80,9 +80,6 @@ class QuizQuestionScreen extends StatefulWidget {
|
||||
this.suggestedVideoPath,
|
||||
this.suggestedYoutubeId,
|
||||
this.suggestedVideoTitle,
|
||||
this.category,
|
||||
this.categoryIcon,
|
||||
this.fallbackIcon,
|
||||
this.fallbackColor,
|
||||
this.answerImageAspectRatio,
|
||||
});
|
||||
@@ -114,14 +111,8 @@ class QuizQuestionScreen extends StatefulWidget {
|
||||
/// retrato, para a postura).
|
||||
final double? answerImageAspectRatio;
|
||||
|
||||
/// Rótulo pequeno do tema da pergunta (ex.: "Avaliação facial"), mostrado
|
||||
/// num badge acima da imagem/pergunta.
|
||||
final String? category;
|
||||
final IconData? categoryIcon;
|
||||
|
||||
/// Usados só quando [questionImagePaths] está vazio: em vez de o bloco de
|
||||
/// imagem colapsar, mostra-se um bloco colorido com este ícone.
|
||||
final IconData? fallbackIcon;
|
||||
/// Usado só quando [questionImagePaths] está vazio: em vez de o bloco de
|
||||
/// imagem colapsar, mostra-se um bloco colorido com o ícone da app.
|
||||
final Color? fallbackColor;
|
||||
|
||||
@override
|
||||
@@ -265,44 +256,6 @@ class _QuizQuestionScreenState extends State<QuizQuestionScreen> {
|
||||
],
|
||||
),
|
||||
),
|
||||
if ((widget.category ?? '').isNotEmpty)
|
||||
Padding(
|
||||
padding: const EdgeInsets.fromLTRB(16, 8, 16, 0),
|
||||
child: Align(
|
||||
alignment: Alignment.centerLeft,
|
||||
child: Container(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 12,
|
||||
vertical: 6,
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white.withValues(alpha: 0.75),
|
||||
borderRadius: BorderRadius.circular(999),
|
||||
),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
if (widget.categoryIcon != null) ...[
|
||||
Icon(
|
||||
widget.categoryIcon,
|
||||
size: 15,
|
||||
color: const Color(0xFF2F9E94),
|
||||
),
|
||||
const SizedBox(width: 6),
|
||||
],
|
||||
Text(
|
||||
widget.category!,
|
||||
style: const TextStyle(
|
||||
fontWeight: FontWeight.w800,
|
||||
fontSize: 12,
|
||||
color: Color(0xFF2F9E94),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: LayoutBuilder(
|
||||
builder: (context, constraints) {
|
||||
@@ -343,10 +296,6 @@ class _QuizQuestionScreenState extends State<QuizQuestionScreen> {
|
||||
.questionImagePaths,
|
||||
)
|
||||
: _FallbackIconBlock(
|
||||
icon:
|
||||
widget.fallbackIcon ??
|
||||
Icons
|
||||
.info_outline_rounded,
|
||||
color:
|
||||
widget.fallbackColor ??
|
||||
const Color(0xFF2F9E94),
|
||||
@@ -1148,22 +1097,22 @@ class _QuestionReferenceImages extends StatelessWidget {
|
||||
/// relevante ao tema, sem ocupar a largura toda (esse destaque é reservado
|
||||
/// para as perguntas que realmente têm imagem).
|
||||
class _FallbackIconBlock extends StatelessWidget {
|
||||
const _FallbackIconBlock({required this.icon, required this.color});
|
||||
const _FallbackIconBlock({required this.color});
|
||||
|
||||
final IconData icon;
|
||||
final Color color;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Center(
|
||||
child: Container(
|
||||
width: 52,
|
||||
height: 52,
|
||||
width: 72,
|
||||
height: 72,
|
||||
padding: const EdgeInsets.all(11),
|
||||
decoration: BoxDecoration(
|
||||
color: color,
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
),
|
||||
child: Icon(icon, size: 26, color: Colors.white),
|
||||
child: Image.asset('assets/quiz-icon.png', fit: BoxFit.contain),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user