import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/routes.dart'; import 'package:flutter/material.dart'; import 'package:hexcolor/hexcolor.dart'; /* *@author: Elham Rababah *@Date:4/7/2020 *@param: *@return: *@desc: Verification Methods widget */ class VerificationMethods extends StatelessWidget { MainAxisAlignment spaceBetweenMethods =MainAxisAlignment.spaceBetween; @override Widget build(BuildContext context) { // if(!SizeConfig.isMobile) { // spaceBetweenMethods = MainAxisAlignment.spaceAround; // } return Container( width: SizeConfig.realScreenWidth * 0.90, child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( "Please choose one of the Following option to verify", style: TextStyle( fontSize: 3.5 * SizeConfig.textMultiplier, ), ), SizedBox( height: 40, ), Container( width: SizeConfig.realScreenWidth * 80, child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ Row( mainAxisAlignment: spaceBetweenMethods, children: [ buildVerificationMethod(context, 'assets/images/verification_fingerprint_icon.png', 'Fingerprint', () {}), buildVerificationMethod(context, 'assets/images/verification_faceid_icon.png', 'Face ID', () {}), ], ), SizedBox( height: 40, ), Row( mainAxisAlignment: spaceBetweenMethods, children: [ buildVerificationMethod(context, 'assets/images/verification_whatsapp_icon.png', 'WhatsApp', () {}), buildVerificationMethod(context, 'assets/images/verification_sms_icon.png', 'SMS', () {}), ], ) ], ), ), SizedBox( height: SizeConfig.heightMultiplier * 2, ) ], ), ); } /* *@author: Elham Rababah *@Date:07/4/2020 *@param: url , dec, fun *@return: InkWell widget *@desc: Build Verification Method */ InkWell buildVerificationMethod(context,url, dec, fun) { return InkWell( onTap: (){ Navigator.of(context).pushNamed(VERIFY_ACCOUNT); }, child: Container( // height: SizeConfig.heightMultiplier *2, height: SizeConfig.heightMultiplier * 19, width: SizeConfig.widthMultiplier * 37, padding: EdgeInsets.all(10), decoration: BoxDecoration( border: Border.all( width: 1, color: Hexcolor( '#CCCCCC') // <--- border width here ), borderRadius: BorderRadius.all(Radius.circular(10))), child: Column( children: [ Container( margin: EdgeInsetsDirectional.only( top: SizeConfig.heightMultiplier * 0.5), child: Image.asset( url, height: SizeConfig.heightMultiplier * 10, fit: BoxFit.cover, ), ), SizedBox( height: 10, ), Text(dec, style: TextStyle(fontSize:SizeConfig.textMultiplier*2 ),) ], ), ), ); } }