feat: adjust the loading
This commit is contained in:
parent
1555ce5558
commit
c2d838d17d
|
@ -21,8 +21,7 @@ class QuizPlayView extends GetView<QuizPlayController> {
|
|||
return _buildCountdownScreen(context);
|
||||
}
|
||||
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
return ListView(
|
||||
children: [
|
||||
_buildCustomAppBar(context),
|
||||
const SizedBox(height: 20),
|
||||
|
@ -58,7 +57,7 @@ class QuizPlayView extends GetView<QuizPlayController> {
|
|||
height: 120,
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
color: AppColors.primaryBlue.withOpacity(0.1),
|
||||
color: AppColors.primaryBlue.withValues(alpha: 0.1),
|
||||
border: Border.all(
|
||||
color: AppColors.primaryBlue,
|
||||
width: 4,
|
||||
|
@ -67,15 +66,15 @@ class QuizPlayView extends GetView<QuizPlayController> {
|
|||
child: Center(
|
||||
child: AnimatedSwitcher(
|
||||
duration: const Duration(milliseconds: 300),
|
||||
child: Text(
|
||||
controller.prepareDuration.toString(),
|
||||
key: ValueKey(controller.prepareDuration.value),
|
||||
style: TextStyle(
|
||||
fontSize: 48,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: AppColors.primaryBlue,
|
||||
),
|
||||
),
|
||||
child: Obx(() => Text(
|
||||
controller.prepareDuration.toString(),
|
||||
key: ValueKey(controller.prepareDuration.value),
|
||||
style: TextStyle(
|
||||
fontSize: 48,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: AppColors.primaryBlue,
|
||||
),
|
||||
)),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -113,7 +112,7 @@ class QuizPlayView extends GetView<QuizPlayController> {
|
|||
borderRadius: BorderRadius.circular(16),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: Colors.black.withOpacity(0.05),
|
||||
color: Colors.black.withValues(alpha: 0.05),
|
||||
blurRadius: 10,
|
||||
offset: const Offset(0, 2),
|
||||
),
|
||||
|
@ -122,10 +121,7 @@ class QuizPlayView extends GetView<QuizPlayController> {
|
|||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
IconButton(
|
||||
onPressed: () => Get.back(),
|
||||
icon: const Icon(Icons.arrow_back_ios, color: Colors.black87),
|
||||
),
|
||||
const SizedBox(width: 48), // Placeholder for balance
|
||||
Text(
|
||||
context.tr('quiz_play_title'),
|
||||
style: const TextStyle(
|
||||
|
@ -137,7 +133,7 @@ class QuizPlayView extends GetView<QuizPlayController> {
|
|||
Container(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 6),
|
||||
decoration: BoxDecoration(
|
||||
color: AppColors.primaryBlue.withOpacity(0.1),
|
||||
color: AppColors.primaryBlue.withValues(alpha: 0.1),
|
||||
borderRadius: BorderRadius.circular(20),
|
||||
),
|
||||
child: Row(
|
||||
|
@ -204,7 +200,7 @@ class QuizPlayView extends GetView<QuizPlayController> {
|
|||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(4),
|
||||
gradient: LinearGradient(
|
||||
colors: [AppColors.primaryBlue, AppColors.primaryBlue.withOpacity(0.7)],
|
||||
colors: [AppColors.primaryBlue, AppColors.primaryBlue.withValues(alpha: 0.7)],
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -245,7 +241,7 @@ class QuizPlayView extends GetView<QuizPlayController> {
|
|||
key: ValueKey(controller.currentIndex.value),
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 8),
|
||||
decoration: BoxDecoration(
|
||||
color: AppColors.primaryBlue.withOpacity(0.1),
|
||||
color: AppColors.primaryBlue.withValues(alpha: 0.1),
|
||||
borderRadius: BorderRadius.circular(20),
|
||||
),
|
||||
child: Text(
|
||||
|
@ -286,7 +282,7 @@ class QuizPlayView extends GetView<QuizPlayController> {
|
|||
borderRadius: BorderRadius.circular(16),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: Colors.black.withOpacity(0.05),
|
||||
color: Colors.black.withValues(alpha: 0.05),
|
||||
blurRadius: 15,
|
||||
offset: const Offset(0, 5),
|
||||
),
|
||||
|
@ -361,7 +357,7 @@ class QuizPlayView extends GetView<QuizPlayController> {
|
|||
borderRadius: BorderRadius.circular(16),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: Colors.black.withOpacity(0.05),
|
||||
color: Colors.black.withValues(alpha: 0.05),
|
||||
blurRadius: 15,
|
||||
offset: const Offset(0, 5),
|
||||
),
|
||||
|
@ -452,7 +448,7 @@ class QuizPlayView extends GetView<QuizPlayController> {
|
|||
onTap: () => controller.onChooseTOF(value),
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
color: isSelected ? color.withOpacity(0.1) : Colors.white,
|
||||
color: isSelected ? color.withValues(alpha: 0.1) : Colors.white,
|
||||
borderRadius: BorderRadius.circular(20),
|
||||
border: Border.all(
|
||||
color: isSelected ? color : Colors.grey.shade300,
|
||||
|
@ -513,7 +509,7 @@ class QuizPlayView extends GetView<QuizPlayController> {
|
|||
decoration: BoxDecoration(
|
||||
gradient: isEnabled
|
||||
? LinearGradient(
|
||||
colors: [AppColors.primaryBlue, AppColors.primaryBlue.withOpacity(0.8)],
|
||||
colors: [AppColors.primaryBlue, AppColors.primaryBlue.withValues(alpha: 0.8)],
|
||||
)
|
||||
: null,
|
||||
color: !isEnabled ? Colors.grey.shade300 : null,
|
||||
|
|
Loading…
Reference in New Issue