CKT String|Colors
This commit is contained in:
@@ -1,12 +1,14 @@
|
||||
import 'dart:ui';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import '../colors/app_colors.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:video_player/video_player.dart';
|
||||
import 'package:youtube_player_flutter/youtube_player_flutter.dart';
|
||||
|
||||
import '../watched_videos_prefs.dart';
|
||||
import '../widgets/app_gradients.dart';
|
||||
import '../colors/app_gradients.dart';
|
||||
import '../strings/video_strings.dart';
|
||||
import '../widgets/entrance.dart';
|
||||
import '../widgets/liquid_waves_background.dart';
|
||||
import '../widgets/pill_snackbar.dart';
|
||||
@@ -36,83 +38,80 @@ class VideoData {
|
||||
final List<VideoData> videoList = [
|
||||
VideoData(
|
||||
id: 1,
|
||||
title: 'Episódio 1',
|
||||
description: 'Qual a Influência do nariz entupido na má oclusão',
|
||||
title: VideoStrings.episodeTitle(1),
|
||||
description: VideoStrings.episodeDescriptions[0],
|
||||
youtubeId: 'PJ58CZv4ECw',
|
||||
),
|
||||
VideoData(
|
||||
id: 2,
|
||||
title: 'Episódio 2',
|
||||
description: 'Qual a Influência das alergias sazionais na má oclusão',
|
||||
title: VideoStrings.episodeTitle(2),
|
||||
description: VideoStrings.episodeDescriptions[1],
|
||||
youtubeId: 'y4_kWmZtAtg',
|
||||
),
|
||||
VideoData(
|
||||
id: 3,
|
||||
title: 'Episódio 3',
|
||||
description: 'Qual a Influência das Otites frequentes na má oclusão',
|
||||
title: VideoStrings.episodeTitle(3),
|
||||
description: VideoStrings.episodeDescriptions[2],
|
||||
youtubeId: 'nD75Y5PuKTo',
|
||||
),
|
||||
VideoData(
|
||||
id: 4,
|
||||
title: 'Episódio 4',
|
||||
description: 'Qual a Influência das Amigdalites recorrentes na má oclusão',
|
||||
title: VideoStrings.episodeTitle(4),
|
||||
description: VideoStrings.episodeDescriptions[3],
|
||||
youtubeId: 'yvFllWYeuLw',
|
||||
),
|
||||
VideoData(
|
||||
id: 5,
|
||||
title: 'Episódio 5',
|
||||
description:
|
||||
'Qual a Influência das Bronquiolites recorrentes na má oclusão',
|
||||
title: VideoStrings.episodeTitle(5),
|
||||
description: VideoStrings.episodeDescriptions[4],
|
||||
youtubeId: 'DnhUa-T8_Ps',
|
||||
),
|
||||
VideoData(
|
||||
id: 6,
|
||||
title: 'Episódio 6',
|
||||
description: 'Qual a Influência dos problemas respitatórios na má oclusão',
|
||||
title: VideoStrings.episodeTitle(6),
|
||||
description: VideoStrings.episodeDescriptions[5],
|
||||
youtubeId: 'zKt_iwkrjvo',
|
||||
),
|
||||
VideoData(
|
||||
id: 7,
|
||||
title: 'Episódio 7',
|
||||
description:
|
||||
'Qual a Influência das interrupções respiratórias na má oclusão',
|
||||
title: VideoStrings.episodeTitle(7),
|
||||
description: VideoStrings.episodeDescriptions[6],
|
||||
youtubeId: 'NpmQ2brap5A',
|
||||
),
|
||||
VideoData(
|
||||
id: 8,
|
||||
title: 'Episódio 8',
|
||||
description: 'Qual a Influência do ressonar na má oclusão',
|
||||
title: VideoStrings.episodeTitle(8),
|
||||
description: VideoStrings.episodeDescriptions[7],
|
||||
youtubeId: 'Wj3KYw9pBi0',
|
||||
),
|
||||
VideoData(
|
||||
id: 9,
|
||||
title: 'Episódio 9',
|
||||
description:
|
||||
'Qual a Influência de acordar com saliva seca na boca ou na almofada na saúde oral',
|
||||
title: VideoStrings.episodeTitle(9),
|
||||
description: VideoStrings.episodeDescriptions[8],
|
||||
youtubeId: 'bOm9t61cT_U',
|
||||
),
|
||||
VideoData(
|
||||
id: 10,
|
||||
title: 'Episódio 10',
|
||||
description: 'Qual a Influência da respiração oral na má oclusão',
|
||||
title: VideoStrings.episodeTitle(10),
|
||||
description: VideoStrings.episodeDescriptions[9],
|
||||
youtubeId: 'fAitMizbcms',
|
||||
),
|
||||
VideoData(
|
||||
id: 11,
|
||||
title: 'Episódio 11',
|
||||
description: 'Qual a influência do uso exagerado da chupeta na má oclusão',
|
||||
title: VideoStrings.episodeTitle(11),
|
||||
description: VideoStrings.episodeDescriptions[10],
|
||||
youtubeId: '6sYoBUjks_I',
|
||||
),
|
||||
VideoData(
|
||||
id: 12,
|
||||
title: 'Episódio 12',
|
||||
description: 'Qual a influência do uso exagerado da chupeta na má oclusão',
|
||||
title: VideoStrings.episodeTitle(12),
|
||||
description: VideoStrings.episodeDescriptions[11],
|
||||
youtubeId: 'eznKrErQbHo',
|
||||
),
|
||||
VideoData(
|
||||
id: 13,
|
||||
title: 'Episódio 13',
|
||||
description: 'Qual a influência do hábito de chuchar o dedo na má oclusão',
|
||||
title: VideoStrings.episodeTitle(13),
|
||||
description: VideoStrings.episodeDescriptions[12],
|
||||
youtubeId: 'VO9CNqHRdeM',
|
||||
),
|
||||
];
|
||||
@@ -176,7 +175,7 @@ Future<void> showVideoPlayerDialog(
|
||||
}) {
|
||||
if (video.youtubeId != null) {
|
||||
if (video.youtubeId!.isEmpty) {
|
||||
showPillSnackBar(context, 'Vídeo ainda não disponível');
|
||||
showPillSnackBar(context, VideoStrings.videoNotAvailable);
|
||||
return Future.value();
|
||||
}
|
||||
return Navigator.of(context).push<void>(
|
||||
@@ -199,8 +198,8 @@ class VideoScreen extends StatefulWidget {
|
||||
/// guardar localmente quais episódios ela já assistiu até ao fim.
|
||||
final String? scopeId;
|
||||
|
||||
static const Color _teal = Color(0xFF2F9E94);
|
||||
static const Color _accentPink = Color(0xFFFF55A7);
|
||||
static const Color _teal = AppColors.teal;
|
||||
static const Color _accentPink = AppColors.pink;
|
||||
|
||||
@override
|
||||
State<VideoScreen> createState() => _VideoScreenState();
|
||||
@@ -253,7 +252,7 @@ class _VideoScreenState extends State<VideoScreen> {
|
||||
elevation: 0,
|
||||
scrolledUnderElevation: 0,
|
||||
title: const Text(
|
||||
'Vídeos Educativos',
|
||||
VideoStrings.pageTitle,
|
||||
style: TextStyle(fontWeight: FontWeight.w900),
|
||||
),
|
||||
),
|
||||
@@ -262,7 +261,7 @@ class _VideoScreenState extends State<VideoScreen> {
|
||||
body: Stack(
|
||||
clipBehavior: Clip.none,
|
||||
children: [
|
||||
Positioned.fill(child: Container(color: const Color(0xFFFAFAF7))),
|
||||
Positioned.fill(child: Container(color: AppColors.background)),
|
||||
const LiquidWavesBackground(),
|
||||
SafeArea(
|
||||
child: Padding(
|
||||
@@ -285,7 +284,7 @@ class _VideoScreenState extends State<VideoScreen> {
|
||||
child: TextField(
|
||||
controller: _searchController,
|
||||
decoration: InputDecoration(
|
||||
hintText: 'Pesquisar vídeos...',
|
||||
hintText: VideoStrings.searchHint,
|
||||
prefixIcon: const Icon(
|
||||
Icons.search,
|
||||
color: VideoScreen._teal,
|
||||
@@ -307,7 +306,7 @@ class _VideoScreenState extends State<VideoScreen> {
|
||||
child: _filteredVideos.isEmpty
|
||||
? Center(
|
||||
child: Text(
|
||||
'Nenhum vídeo encontrado',
|
||||
VideoStrings.noVideosFound,
|
||||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w600,
|
||||
@@ -546,7 +545,7 @@ class _VideoButton extends StatelessWidget {
|
||||
fit: StackFit.expand,
|
||||
children: [
|
||||
ColoredBox(
|
||||
color: const Color(0xFFFFE6F1),
|
||||
color: AppColors.pinkBackground,
|
||||
child: VideoThumbnail(
|
||||
video: video,
|
||||
borderRadius: 0,
|
||||
@@ -593,7 +592,7 @@ class _VideoButton extends StatelessWidget {
|
||||
borderRadius: BorderRadius.circular(999),
|
||||
),
|
||||
child: Text(
|
||||
'EP. ${video.id}',
|
||||
VideoStrings.episodeBadge(video.id),
|
||||
style: const TextStyle(
|
||||
color: Colors.white,
|
||||
fontWeight: FontWeight.w800,
|
||||
@@ -731,7 +730,7 @@ class _YoutubePlayerPageState extends State<_YoutubePlayerPage>
|
||||
child: Scaffold(
|
||||
backgroundColor: value.isFullScreen
|
||||
? Colors.black
|
||||
: const Color(0xFFFAFAF7),
|
||||
: AppColors.background,
|
||||
appBar: value.isFullScreen
|
||||
? null
|
||||
: PreferredSize(
|
||||
@@ -808,7 +807,7 @@ class _YoutubePlayerPageState extends State<_YoutubePlayerPage>
|
||||
MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
const Text(
|
||||
'Próximos',
|
||||
VideoStrings.nextVideos,
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.w900,
|
||||
fontSize: 15,
|
||||
@@ -835,7 +834,7 @@ class _YoutubePlayerPageState extends State<_YoutubePlayerPage>
|
||||
vertical: 2,
|
||||
),
|
||||
child: Text(
|
||||
'Ver mais',
|
||||
VideoStrings.seeMore,
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.w800,
|
||||
fontSize: 13,
|
||||
@@ -1033,7 +1032,7 @@ class _VideoPlayerDialogState extends State<_VideoPlayerDialog> {
|
||||
setState(() {
|
||||
_isInitialized = false;
|
||||
});
|
||||
showPillSnackBar(context, 'Erro ao carregar vídeo: $e');
|
||||
showPillSnackBar(context, VideoStrings.errorLoadingVideo(e));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1188,7 +1187,7 @@ class _VideoControlsState extends State<_VideoControls> {
|
||||
Icons.replay_10_rounded,
|
||||
color: Colors.white,
|
||||
),
|
||||
tooltip: 'Retroceder 10s',
|
||||
tooltip: VideoStrings.rewind10s,
|
||||
onPressed: () => _seekBy(const Duration(seconds: -10)),
|
||||
),
|
||||
IconButton(
|
||||
@@ -1211,7 +1210,7 @@ class _VideoControlsState extends State<_VideoControls> {
|
||||
Icons.forward_10_rounded,
|
||||
color: Colors.white,
|
||||
),
|
||||
tooltip: 'Avançar 10s',
|
||||
tooltip: VideoStrings.forward10s,
|
||||
onPressed: () => _seekBy(const Duration(seconds: 10)),
|
||||
),
|
||||
IconButton(
|
||||
@@ -1294,7 +1293,7 @@ class _FullscreenVideoPlayerState extends State<_FullscreenVideoPlayer> {
|
||||
setState(() {
|
||||
_isInitialized = false;
|
||||
});
|
||||
showPillSnackBar(context, 'Erro ao carregar vídeo: $e');
|
||||
showPillSnackBar(context, VideoStrings.errorLoadingVideo(e));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user