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