diff --git a/lib/new_ui/colors.dart b/lib/new_ui/colors.dart index 50f119f..046d9cd 100644 --- a/lib/new_ui/colors.dart +++ b/lib/new_ui/colors.dart @@ -5,6 +5,8 @@ import 'package:flutter/material.dart'; const commonbgblack = Color(0xff18191b); const commonbgLightblack = Color(0xff242527); const commonbgLLightblack = Color(0xff323232); +const commonbgL3ightblack = Color(0xff444444); +const commonbgL4ightblack = Color(0xff555555); const cardcolorblue = Color(0xff0077b6); const oldDateSelectBlue = Color(0xff2196F3); const cardlightblue = Color(0xff90e0ef); diff --git a/lib/new_ui/screens/attendance_screen/widgets/attendance_subject_widget.dart b/lib/new_ui/screens/attendance_screen/widgets/attendance_subject_widget.dart index a83ae26..a9b2fd6 100644 --- a/lib/new_ui/screens/attendance_screen/widgets/attendance_subject_widget.dart +++ b/lib/new_ui/screens/attendance_screen/widgets/attendance_subject_widget.dart @@ -7,6 +7,8 @@ class AttendanceSubjectWidget extends StatelessWidget { @override Widget build(BuildContext context) { + var size = MediaQuery.of(context).size; + return Card( child: Container( decoration: BoxDecoration( @@ -27,26 +29,23 @@ class AttendanceSubjectWidget extends StatelessWidget { style: TextStyle(color: Colors.white, fontSize: 20, fontWeight: FontWeight.bold), ), SizedBox(width: 5,), + ], + ), + const SizedBox(height: 10,), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ Text( '5/10', - style: TextStyle(color: Colors.white, fontSize: 12), + style: TextStyle(color: Colors.white, fontSize: 14), ), - Expanded( - child: Row( - mainAxisAlignment: MainAxisAlignment.end, - children: [ - Text( - '50%', - style: TextStyle(color: Colors.white, fontSize: 16), - ), - ], - ), + Text( + '50%', + style: TextStyle(color: Colors.white, fontSize: 14), ), ], ), const SizedBox(height: 10,), - const Text("Not accepted", style: TextStyle(color: Colors.white, fontSize: 12),), - const SizedBox(height: 10,), LinearProgressIndicator( value: attendance, backgroundColor: Colors.white, @@ -56,24 +55,47 @@ class AttendanceSubjectWidget extends StatelessWidget { Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - // ElevatedButton( - // onPressed: (){}, - // child: const Text('Present', style: TextStyle(color: Colors.white),), - // style: ElevatedButton.styleFrom( - // backgroundColor: Colors.green, - // shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(20)), - // ), - // ), - // ElevatedButton( - // onPressed: (){}, - // child: const Text('Absent', style: TextStyle(color: Colors.white),), - // style: ElevatedButton.styleFrom( - // backgroundColor: Colors.red, - // shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(20)), - // ), - // ), + ElevatedButton( + onPressed: (){}, + child: const Text('Present', style: TextStyle(color: Colors.white),), + style: ElevatedButton.styleFrom( + backgroundColor: commonbgL3ightblack, + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(5)), + ), + ), + ElevatedButton( + onPressed: (){}, + child: Transform( + alignment: Alignment.center, + transform: Matrix4.identity()..scale(-1.0, 1.0, 1.0), // Flip horizontally + child: Icon(Icons.refresh_outlined, color: Colors.white), + ) + , + style: ElevatedButton.styleFrom( + backgroundColor: commonbgL3ightblack, + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(5)), + ), + ), + ElevatedButton( + onPressed: (){}, + child: const Text('Absent', style: TextStyle(color: Colors.white),), + style: ElevatedButton.styleFrom( + backgroundColor: commonbgL3ightblack, + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(5)), + ), + ), + ], - ) + ), + const SizedBox(height: 10,), + Center( + child: Container( + height: 1, + width: size.width*0.88, + color: commonbgL4ightblack, + ), + ), + const SizedBox(height: 10,), ], ), ),