feat: clean up environtment
This commit is contained in:
parent
a233c844ca
commit
175f4e6668
|
@ -39,7 +39,7 @@ class QuizItemWAComponent extends StatelessWidget {
|
||||||
borderRadius: BorderRadius.circular(16),
|
borderRadius: BorderRadius.circular(16),
|
||||||
boxShadow: [
|
boxShadow: [
|
||||||
BoxShadow(
|
BoxShadow(
|
||||||
color: Colors.black.withOpacity(0.04),
|
color: Colors.black.withValues(alpha: 0.04),
|
||||||
blurRadius: 6,
|
blurRadius: 6,
|
||||||
offset: const Offset(0, 2),
|
offset: const Offset(0, 2),
|
||||||
),
|
),
|
||||||
|
@ -78,11 +78,11 @@ class QuizItemWAComponent extends StatelessWidget {
|
||||||
Color iconColor = AppColors.shadowPrimary;
|
Color iconColor = AppColors.shadowPrimary;
|
||||||
|
|
||||||
if (isCorrectAnswer) {
|
if (isCorrectAnswer) {
|
||||||
backgroundColor = AppColors.primaryBlue.withOpacity(0.15);
|
backgroundColor = AppColors.primaryBlue.withValues(alpha: 0.15);
|
||||||
icon = LucideIcons.checkCircle2;
|
icon = LucideIcons.checkCircle2;
|
||||||
iconColor = AppColors.primaryBlue;
|
iconColor = AppColors.primaryBlue;
|
||||||
} else if (isUserWrongAnswer) {
|
} else if (isUserWrongAnswer) {
|
||||||
backgroundColor = Colors.red.withOpacity(0.15);
|
backgroundColor = Colors.red.withValues(alpha: 0.15);
|
||||||
icon = LucideIcons.xCircle;
|
icon = LucideIcons.xCircle;
|
||||||
iconColor = Colors.red;
|
iconColor = Colors.red;
|
||||||
}
|
}
|
||||||
|
|
|
@ -65,10 +65,10 @@
|
||||||
// return Card(
|
// return Card(
|
||||||
// elevation: 2,
|
// elevation: 2,
|
||||||
// color: Colors.white,
|
// color: Colors.white,
|
||||||
// shadowColor: AppColors.shadowPrimary.withOpacity(0.2),
|
// shadowColor: AppColors.shadowPrimary.withValues(alpha:0.2),
|
||||||
// shape: RoundedRectangleBorder(
|
// shape: RoundedRectangleBorder(
|
||||||
// borderRadius: BorderRadius.circular(16),
|
// borderRadius: BorderRadius.circular(16),
|
||||||
// side: BorderSide(color: AppColors.accentBlue.withOpacity(0.2)),
|
// side: BorderSide(color: AppColors.accentBlue.withValues(alpha:0.2)),
|
||||||
// ),
|
// ),
|
||||||
// child: Padding(
|
// child: Padding(
|
||||||
// padding: const EdgeInsets.all(20),
|
// padding: const EdgeInsets.all(20),
|
||||||
|
@ -164,10 +164,10 @@
|
||||||
// child: Card(
|
// child: Card(
|
||||||
// elevation: 2,
|
// elevation: 2,
|
||||||
// color: Colors.white,
|
// color: Colors.white,
|
||||||
// shadowColor: AppColors.shadowPrimary.withOpacity(0.2),
|
// shadowColor: AppColors.shadowPrimary.withValues(alpha:0.2),
|
||||||
// shape: RoundedRectangleBorder(
|
// shape: RoundedRectangleBorder(
|
||||||
// borderRadius: BorderRadius.circular(16),
|
// borderRadius: BorderRadius.circular(16),
|
||||||
// side: BorderSide(color: AppColors.accentBlue.withOpacity(0.2)),
|
// side: BorderSide(color: AppColors.accentBlue.withValues(alpha:0.2)),
|
||||||
// ),
|
// ),
|
||||||
// child: Padding(
|
// child: Padding(
|
||||||
// padding: const EdgeInsets.all(20),
|
// padding: const EdgeInsets.all(20),
|
||||||
|
@ -216,7 +216,7 @@
|
||||||
// height: 60,
|
// height: 60,
|
||||||
// decoration: BoxDecoration(
|
// decoration: BoxDecoration(
|
||||||
// shape: BoxShape.circle,
|
// shape: BoxShape.circle,
|
||||||
// color: _getScoreColor(participant.scorePercent).withOpacity(0.1),
|
// color: _getScoreColor(participant.scorePercent).withValues(alpha:0.1),
|
||||||
// border: Border.all(
|
// border: Border.all(
|
||||||
// color: _getScoreColor(participant.scorePercent),
|
// color: _getScoreColor(participant.scorePercent),
|
||||||
// width: 2,
|
// width: 2,
|
||||||
|
|
|
@ -98,7 +98,7 @@
|
||||||
// Container(
|
// Container(
|
||||||
// padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 8),
|
// padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 8),
|
||||||
// decoration: BoxDecoration(
|
// decoration: BoxDecoration(
|
||||||
// color: _getScoreColor(participant.scorePercent).withOpacity(0.1),
|
// color: _getScoreColor(participant.scorePercent).withValues(alpha:0.1),
|
||||||
// borderRadius: BorderRadius.circular(16),
|
// borderRadius: BorderRadius.circular(16),
|
||||||
// border: Border.all(
|
// border: Border.all(
|
||||||
// color: _getScoreColor(participant.scorePercent),
|
// color: _getScoreColor(participant.scorePercent),
|
||||||
|
@ -145,7 +145,7 @@
|
||||||
// height: 28,
|
// height: 28,
|
||||||
// decoration: BoxDecoration(
|
// decoration: BoxDecoration(
|
||||||
// shape: BoxShape.circle,
|
// shape: BoxShape.circle,
|
||||||
// color: answer.isCorrect ? AppColors.primaryBlue.withOpacity(0.1) : AppColors.scorePoor.withOpacity(0.1),
|
// color: answer.isCorrect ? AppColors.primaryBlue.withValues(alpha:0.1) : AppColors.scorePoor.withValues(alpha:0.1),
|
||||||
// ),
|
// ),
|
||||||
// child: Center(
|
// child: Center(
|
||||||
// child: Text(
|
// child: Text(
|
||||||
|
|
|
@ -24,7 +24,7 @@ class JoinRoomController extends GetxController {
|
||||||
Get.snackbar(
|
Get.snackbar(
|
||||||
"Error",
|
"Error",
|
||||||
"Kode room dan nama harus diisi",
|
"Kode room dan nama harus diisi",
|
||||||
backgroundColor: Get.theme.colorScheme.error.withOpacity(0.9),
|
backgroundColor: Get.theme.colorScheme.error.withValues(alpha: 0.9),
|
||||||
colorText: Colors.white,
|
colorText: Colors.white,
|
||||||
);
|
);
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -8,11 +8,12 @@ import 'package:quiz_app/component/global_text_field.dart';
|
||||||
import 'package:quiz_app/feature/join_room/controller/join_room_controller.dart';
|
import 'package:quiz_app/feature/join_room/controller/join_room_controller.dart';
|
||||||
|
|
||||||
class JoinRoomView extends GetView<JoinRoomController> {
|
class JoinRoomView extends GetView<JoinRoomController> {
|
||||||
|
const JoinRoomView({super.key});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
backgroundColor: Colors.white,
|
backgroundColor: Colors.white,
|
||||||
// Menggunakan extendBodyBehindAppBar untuk efek lebih menarik
|
|
||||||
extendBodyBehindAppBar: true,
|
extendBodyBehindAppBar: true,
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
backgroundColor: Colors.transparent,
|
backgroundColor: Colors.transparent,
|
||||||
|
@ -23,7 +24,6 @@ class JoinRoomView extends GetView<JoinRoomController> {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
body: Container(
|
body: Container(
|
||||||
// Background putih bersih
|
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
child: SafeArea(
|
child: SafeArea(
|
||||||
child: SingleChildScrollView(
|
child: SingleChildScrollView(
|
||||||
|
@ -33,7 +33,6 @@ class JoinRoomView extends GetView<JoinRoomController> {
|
||||||
children: [
|
children: [
|
||||||
const SizedBox(height: 20),
|
const SizedBox(height: 20),
|
||||||
|
|
||||||
// Animated Trophy Icon with Hero animation
|
|
||||||
TweenAnimationBuilder<double>(
|
TweenAnimationBuilder<double>(
|
||||||
duration: const Duration(seconds: 1),
|
duration: const Duration(seconds: 1),
|
||||||
tween: Tween(begin: 0.0, end: 1.0),
|
tween: Tween(begin: 0.0, end: 1.0),
|
||||||
|
@ -46,10 +45,10 @@ class JoinRoomView extends GetView<JoinRoomController> {
|
||||||
child: Container(
|
child: Container(
|
||||||
padding: EdgeInsets.all(22),
|
padding: EdgeInsets.all(22),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: AppColors.primaryBlue.withOpacity(0.05),
|
color: AppColors.primaryBlue.withValues(alpha: 0.05),
|
||||||
shape: BoxShape.circle,
|
shape: BoxShape.circle,
|
||||||
border: Border.all(
|
border: Border.all(
|
||||||
color: AppColors.primaryBlue.withOpacity(0.15),
|
color: AppColors.primaryBlue.withValues(alpha: 0.15),
|
||||||
width: 2,
|
width: 2,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -63,7 +62,6 @@ class JoinRoomView extends GetView<JoinRoomController> {
|
||||||
|
|
||||||
const SizedBox(height: 30),
|
const SizedBox(height: 30),
|
||||||
|
|
||||||
// Animated Title
|
|
||||||
TweenAnimationBuilder<double>(
|
TweenAnimationBuilder<double>(
|
||||||
duration: const Duration(milliseconds: 800),
|
duration: const Duration(milliseconds: 800),
|
||||||
tween: Tween(begin: 0.0, end: 1.0),
|
tween: Tween(begin: 0.0, end: 1.0),
|
||||||
|
@ -118,10 +116,8 @@ class JoinRoomView extends GetView<JoinRoomController> {
|
||||||
|
|
||||||
const SizedBox(height: 40),
|
const SizedBox(height: 40),
|
||||||
|
|
||||||
// Animated Card
|
|
||||||
TweenAnimationBuilder<double>(
|
TweenAnimationBuilder<double>(
|
||||||
duration: const Duration(milliseconds: 1000),
|
duration: const Duration(milliseconds: 1000),
|
||||||
// delay: const Duration(milliseconds: 400),
|
|
||||||
tween: Tween(begin: 0.0, end: 1.0),
|
tween: Tween(begin: 0.0, end: 1.0),
|
||||||
builder: (context, value, child) {
|
builder: (context, value, child) {
|
||||||
return Opacity(
|
return Opacity(
|
||||||
|
@ -139,7 +135,7 @@ class JoinRoomView extends GetView<JoinRoomController> {
|
||||||
borderRadius: BorderRadius.circular(24),
|
borderRadius: BorderRadius.circular(24),
|
||||||
boxShadow: [
|
boxShadow: [
|
||||||
BoxShadow(
|
BoxShadow(
|
||||||
color: Colors.grey.withOpacity(0.08),
|
color: Colors.grey.withValues(alpha: 0.08),
|
||||||
blurRadius: 15,
|
blurRadius: 15,
|
||||||
offset: const Offset(0, 5),
|
offset: const Offset(0, 5),
|
||||||
),
|
),
|
||||||
|
@ -167,8 +163,6 @@ class JoinRoomView extends GetView<JoinRoomController> {
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
const SizedBox(height: 25),
|
const SizedBox(height: 25),
|
||||||
|
|
||||||
// Custom text field with better styling
|
|
||||||
Container(
|
Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
|
@ -185,10 +179,7 @@ class JoinRoomView extends GetView<JoinRoomController> {
|
||||||
forceUpperCase: true,
|
forceUpperCase: true,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
||||||
const SizedBox(height: 30),
|
const SizedBox(height: 30),
|
||||||
|
|
||||||
// Button with gradient
|
|
||||||
GlobalButton(
|
GlobalButton(
|
||||||
text: context.tr("join_quiz_now"),
|
text: context.tr("join_quiz_now"),
|
||||||
onPressed: controller.joinRoom,
|
onPressed: controller.joinRoom,
|
||||||
|
|
|
@ -78,7 +78,7 @@ class LibraryView extends GetView<LibraryController> {
|
||||||
borderRadius: BorderRadius.circular(12),
|
borderRadius: BorderRadius.circular(12),
|
||||||
boxShadow: [
|
boxShadow: [
|
||||||
BoxShadow(
|
BoxShadow(
|
||||||
color: Colors.black.withOpacity(0.05),
|
color: Colors.black.withValues(alpha: 0.05),
|
||||||
blurRadius: 6,
|
blurRadius: 6,
|
||||||
offset: const Offset(0, 2),
|
offset: const Offset(0, 2),
|
||||||
),
|
),
|
||||||
|
|
|
@ -139,10 +139,10 @@ class MonitorQuizView extends GetView<MonitorQuizController> {
|
||||||
return Card(
|
return Card(
|
||||||
elevation: 2,
|
elevation: 2,
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
shadowColor: AppColors.shadowPrimary.withOpacity(0.2),
|
shadowColor: AppColors.shadowPrimary.withValues(alpha: 0.2),
|
||||||
shape: RoundedRectangleBorder(
|
shape: RoundedRectangleBorder(
|
||||||
borderRadius: BorderRadius.circular(16),
|
borderRadius: BorderRadius.circular(16),
|
||||||
side: BorderSide(color: AppColors.accentBlue.withOpacity(0.2)),
|
side: BorderSide(color: AppColors.accentBlue.withValues(alpha: 0.2)),
|
||||||
),
|
),
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsets.all(20),
|
padding: const EdgeInsets.all(20),
|
||||||
|
@ -246,9 +246,9 @@ class MonitorQuizView extends GetView<MonitorQuizController> {
|
||||||
width: 130,
|
width: 130,
|
||||||
padding: const EdgeInsets.symmetric(vertical: 10, horizontal: 12),
|
padding: const EdgeInsets.symmetric(vertical: 10, horizontal: 12),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: color.withOpacity(0.08),
|
color: color.withValues(alpha: 0.08),
|
||||||
borderRadius: BorderRadius.circular(8),
|
borderRadius: BorderRadius.circular(8),
|
||||||
border: Border.all(color: color.withOpacity(0.2), width: 1),
|
border: Border.all(color: color.withValues(alpha: 0.2), width: 1),
|
||||||
),
|
),
|
||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
|
|
|
@ -77,7 +77,7 @@ class RoomMakerView extends GetView<RoomMakerController> {
|
||||||
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: 8,
|
blurRadius: 8,
|
||||||
offset: Offset(0, 4),
|
offset: Offset(0, 4),
|
||||||
),
|
),
|
||||||
|
|
Loading…
Reference in New Issue