@ -1,8 +1,10 @@
import ' package:easy_localization/src/public_ext.dart ' ;
import ' package:flutter/material.dart ' ;
import ' package:flutter_svg/flutter_svg.dart ' ;
import ' package:mohem_flutter_app/classes/colors.dart ' ;
import ' package:mohem_flutter_app/extensions/int_extensions.dart ' ;
import ' package:mohem_flutter_app/extensions/string_extensions.dart ' ;
import ' package:mohem_flutter_app/extensions/widget_extensions.dart ' ;
import ' package:mohem_flutter_app/generated/locale_keys.g.dart ' ;
import ' package:mohem_flutter_app/widgets/circular_step_progress_bar.dart ' ;
@ -106,7 +108,22 @@ class _TodayAttendanceScreenState extends State<TodayAttendanceScreen> {
child: Column (
crossAxisAlignment: CrossAxisAlignment . start ,
mainAxisSize: MainAxisSize . min ,
children: [ " Mark " . tr ( ) . toText12 ( ) , " Attendance " . tr ( ) . toText24 ( ) , " Select the method to mark the attendance " . tr ( ) . toText12 ( color: Color ( 0xff535353 ) ) , 24. height ] ,
children: [
" Mark " . tr ( ) . toText12 ( ) ,
" Attendance " . tr ( ) . toText24 ( ) ,
" Select the method to mark the attendance " . tr ( ) . toText12 ( color: Color ( 0xff535353 ) ) ,
24. height ,
GridView (
physics: const NeverScrollableScrollPhysics ( ) ,
shrinkWrap: true ,
padding: EdgeInsets . zero ,
gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount ( crossAxisCount: 3 , childAspectRatio: 1 / 1 , crossAxisSpacing: 8 , mainAxisSpacing: 8 ) ,
children: < Widget > [
attendanceMethod ( " NFC " , " assets/images/nfc.svg " , ( ) { } ) ,
attendanceMethod ( " Wifi " , " assets/images/wufu.svg " , ( ) { } ) ,
] ,
)
] ,
) ,
) ,
/ / Positioned (
@ -135,6 +152,21 @@ class _TodayAttendanceScreenState extends State<TodayAttendanceScreen> {
) ;
}
Widget attendanceMethod ( String title , String image , VoidCallback onPress ) = > Container (
padding: const EdgeInsets . only ( left: 10 , right: 10 , top: 14 , bottom: 14 ) ,
decoration: BoxDecoration (
borderRadius: BorderRadius . circular ( 15 ) ,
gradient: const LinearGradient ( transform: GradientRotation ( . 64 ) , begin: Alignment . topRight , end: Alignment . bottomRight , colors: [
MyColors . gradiantEndColor ,
MyColors . gradiantStartColor ,
] ) ,
) ,
child: Column (
crossAxisAlignment: CrossAxisAlignment . start ,
children: [ Expanded ( child: SvgPicture . asset ( image ) ) , title . toText17 ( isBold: true , color: Colors . white ) ] ,
) ,
) . onPress ( onPress ) ;
Widget commonStatusView ( String title , String time ) = > Expanded (
child: Column ( mainAxisSize: MainAxisSize . min , crossAxisAlignment: CrossAxisAlignment . start , children: [
title . toText12 ( color: Colors . white ) ,