Atualização do quiz e videos(incompleto)
This commit is contained in:
@@ -5,7 +5,6 @@ import 'package:flutter/material.dart';
|
||||
import 'package:image_picker/image_picker.dart';
|
||||
import 'package:lottie/lottie.dart';
|
||||
import 'dart:async';
|
||||
import 'package:youtube_player_flutter/youtube_player_flutter.dart';
|
||||
import 'dart:math' as math;
|
||||
import 'dart:io';
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
@@ -413,8 +412,8 @@ class _RiskArcGauge extends StatelessWidget {
|
||||
builder: (context, value, _) {
|
||||
final shown = (value * 100).round();
|
||||
return SizedBox(
|
||||
width: 178,
|
||||
height: 94,
|
||||
width: 120,
|
||||
height: 60,
|
||||
child: Stack(
|
||||
alignment: Alignment.center,
|
||||
children: [
|
||||
@@ -424,7 +423,7 @@ class _RiskArcGauge extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
bottom: 8,
|
||||
bottom: 4,
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
@@ -432,17 +431,17 @@ class _RiskArcGauge extends StatelessWidget {
|
||||
'$shown%',
|
||||
style: const TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 26,
|
||||
fontSize: 20,
|
||||
fontWeight: FontWeight.w900,
|
||||
height: 1,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 4),
|
||||
const SizedBox(height: 2),
|
||||
Text(
|
||||
'Risco de Má Oclusão',
|
||||
'',
|
||||
style: TextStyle(
|
||||
color: Colors.white.withValues(alpha: 0.92),
|
||||
fontSize: 9,
|
||||
fontSize: 8,
|
||||
fontWeight: FontWeight.w900,
|
||||
),
|
||||
),
|
||||
@@ -464,10 +463,10 @@ class _RiskArcGaugePainter extends CustomPainter {
|
||||
|
||||
@override
|
||||
void paint(Canvas canvas, Size size) {
|
||||
final rect = Rect.fromLTWH(16, 12, size.width - 32, size.height * 1.55);
|
||||
final rect = Rect.fromLTWH(10, 8, size.width - 20, size.height * 1.7);
|
||||
const startAngle = math.pi;
|
||||
const sweepAngle = math.pi;
|
||||
final strokeWidth = size.width * 0.14;
|
||||
final strokeWidth = size.width * 0.12;
|
||||
|
||||
final backgroundPaint = Paint()
|
||||
..color = Colors.white.withValues(alpha: 0.72)
|
||||
@@ -652,7 +651,7 @@ class _VideoLibraryCard extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final item = VideoScreen.library.isEmpty ? null : VideoScreen.library.first;
|
||||
const Object? item = null;
|
||||
|
||||
return Material(
|
||||
color: Colors.white,
|
||||
@@ -685,7 +684,9 @@ class _VideoLibraryCard extends StatelessWidget {
|
||||
child: Stack(
|
||||
fit: StackFit.expand,
|
||||
children: [
|
||||
_VideoThumbnail(url: item.url),
|
||||
Container(
|
||||
color: const Color(0xFF2F9E94).withValues(alpha: 0.14),
|
||||
),
|
||||
Container(
|
||||
decoration: BoxDecoration(
|
||||
gradient: LinearGradient(
|
||||
@@ -767,27 +768,6 @@ class _VideoLibraryCard extends StatelessWidget {
|
||||
}
|
||||
}
|
||||
|
||||
class _VideoThumbnail extends StatelessWidget {
|
||||
const _VideoThumbnail({required this.url});
|
||||
|
||||
final String url;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final id = YoutubePlayer.convertUrlToId(url);
|
||||
final thumb = id == null ? null : 'https://img.youtube.com/vi/$id/0.jpg';
|
||||
if (thumb == null) {
|
||||
return Container(color: Colors.white.withValues(alpha: 0.12));
|
||||
}
|
||||
return Image.network(
|
||||
thumb,
|
||||
fit: BoxFit.cover,
|
||||
errorBuilder: (context, error, stackTrace) =>
|
||||
Container(color: Colors.white.withValues(alpha: 0.12)),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class _PerfilTab extends StatefulWidget {
|
||||
const _PerfilTab({
|
||||
required this.selectedChildIndex,
|
||||
|
||||
Reference in New Issue
Block a user