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