@ -6,6 +6,8 @@ import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import ' package:diplomaticquarterapp/widgets/text/app_texts_widget.dart ' ;
import ' package:diplomaticquarterapp/widgets/text/app_texts_widget.dart ' ;
import ' package:flutter/cupertino.dart ' ;
import ' package:flutter/cupertino.dart ' ;
import ' package:flutter/material.dart ' ;
import ' package:flutter/material.dart ' ;
import ' package:flutter_svg/svg.dart ' ;
import ' package:diplomaticquarterapp/widgets/habib_logo_widget.dart ' ;
class AddFamilyMemberType extends StatelessWidget {
class AddFamilyMemberType extends StatelessWidget {
static int loginType = 0 ;
static int loginType = 0 ;
@ -14,139 +16,204 @@ class AddFamilyMemberType extends StatelessWidget {
return AppScaffold (
return AppScaffold (
appBarTitle: TranslationBase . of ( context ) . myFamilyFiles ,
appBarTitle: TranslationBase . of ( context ) . myFamilyFiles ,
isShowAppBar: true ,
isShowAppBar: true ,
showNewAppBar: true ,
showNewAppBarTitle: true ,
body: Padding (
body: Padding (
padding: EdgeInsets . all ( 20 ) ,
padding: EdgeInsets . only ( bottom: 20 , left: 21 , right: 21 ) ,
child: Column (
child: Column ( children: [
children: < Widget > [
Expanded (
Expanded (
child: ListView (
flex: 6 ,
padding: EdgeInsets . zero ,
child: Column (
physics: BouncingScrollPhysics ( ) ,
/ / mainAxisAlignment: MainAxisAlignment . spaceBetween ,
children: [
crossAxisAlignment: CrossAxisAlignment . start ,
SizedBox ( height: 12 ) ,
children: < Widget > [
HabibLogoWidget ( ) ,
Image . asset (
SizedBox ( height: 50 ) ,
' assets/images/habib-logo.png ' ,
Text (
height: 80 ,
TranslationBase . of ( context ) . logintypeRadio ,
width: 80 ,
style: TextStyle ( fontSize: 16 , fontWeight: FontWeight . w600 , color: Color ( 0xff2B353E ) , letterSpacing: - 0.64 , height: 23 / 16 ) ,
) ,
) ,
Padding (
GridView (
padding: EdgeInsets . all ( 20 ) ,
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount ( crossAxisCount: 2 , crossAxisSpacing: 13 , mainAxisSpacing: 9 ) ,
child: AppText (
physics: NeverScrollableScrollPhysics ( ) ,
TranslationBase . of ( context ) . registerInfoFamily ,
padding: EdgeInsets . only ( top: 25 ) ,
fontSize: SizeConfig . textMultiplier * 3.5 ,
shrinkWrap: true ,
textAlign: TextAlign . left ,
children: [
) ,
getButton ( context , TranslationBase . of ( context ) . nationalIdNumber , ' assets/images/new/national_id.svg ' , 1 ) ,
) ,
getButton ( context , TranslationBase . of ( context ) . medicalFileNumber , ' assets/images/new/medical_file.svg ' , 2 ) ,
Padding (
] ,
padding: EdgeInsets . all ( 20 ) ,
) ,
child: Row (
SizedBox ( height: 20 ) ,
mainAxisAlignment: MainAxisAlignment . center ,
/ / RichText (
children: < Widget > [
/ / text: TextSpan (
Expanded (
/ / text: TranslationBase . of ( context ) . forgotPassword ,
child: InkWell (
/ / style: TextStyle ( decoration: TextDecoration . underline , fontSize: 12 , fontWeight: FontWeight . w600 , color: Color ( 0xffC9272B ) , letterSpacing: - 0.48 , height: 18 / 12 ) ,
onTap: ( ) = > {
/ / recognizer: TapGestureRecognizer ( ) . . onTap = ( ) = > Navigator . of ( context ) . push ( FadePage ( page: ForgotPassword ( ) ) ) ,
AddFamilyMemberType . loginType = 1 ,
/ / ) ,
Navigator . of ( context )
/ / ) ,
. pushNamed ( ADD_FAMILY_MEMBER )
] ,
} ,
) ,
child: RoundedContainer (
) ,
borderColor: Colors . grey ,
/ / SizedBox (
showBorder: true ,
/ / height: 43 ,
child: Padding (
/ / width: double . infinity ,
padding: EdgeInsets . fromLTRB (
/ / child: FlatButton (
20 , 10 , 20 , 10 ) ,
/ / onPressed: ( ) { } ,
child: Column (
/ / child: Text (
mainAxisAlignment:
/ / TranslationBase . of ( context ) . registerNow ,
MainAxisAlignment . center ,
/ / style: TextStyle ( fontSize: 16 , fontWeight: FontWeight . w600 , color: Colors . white , letterSpacing: - 0.48 ) ,
children: < Widget > [
/ / ) ,
Image . asset (
/ / color: Color ( 0xffD02127 ) ,
' assets/images/id_card_icon.png ' ,
/ / shape: RoundedRectangleBorder (
height: SizeConfig
/ / borderRadius: BorderRadius . circular ( 6 ) ,
. imageSizeMultiplier *
/ / ) ,
12 ,
/ / ) ,
width: SizeConfig
/ / ) ,
. imageSizeMultiplier *
] ) ,
15 ,
) ) ;
) ,
/ / body: Padding (
SizedBox (
/ / padding: EdgeInsets . all ( 20 ) ,
height: 20 ,
/ / child: Column (
) ,
/ / children: < Widget > [
AppText (
/ / Expanded (
TranslationBase . of ( context )
/ / flex: 6 ,
. idNo ,
/ / child: Column (
fontSize: SizeConfig
/ / / / mainAxisAlignment: MainAxisAlignment . spaceBetween ,
. textMultiplier *
/ / crossAxisAlignment: CrossAxisAlignment . start ,
2 ,
/ / children: < Widget > [
)
/ / Image . asset (
] ,
/ / ' assets/images/habib-logo.png ' ,
) ,
/ / height: 80 ,
) ) ) ) ,
/ / width: 80 ,
Expanded (
/ / ) ,
child: InkWell (
/ / Padding (
onTap: ( ) = > {
/ / padding: EdgeInsets . all ( 20 ) ,
AddFamilyMemberType . loginType = 2 ,
/ / child: AppText (
Navigator . of ( context )
/ / TranslationBase . of ( context ) . registerInfoFamily ,
. pushNamed ( ADD_FAMILY_MEMBER )
/ / fontSize: SizeConfig . textMultiplier * 3.5 ,
} ,
/ / textAlign: TextAlign . left ,
child: RoundedContainer (
/ / ) ,
borderColor: Colors . grey ,
/ / ) ,
showBorder: true ,
/ / Padding (
child: Padding (
/ / padding: EdgeInsets . all ( 20 ) ,
padding: EdgeInsets . fromLTRB (
/ / child: Row (
25 , 10 , 25 , 10 ) ,
/ / mainAxisAlignment: MainAxisAlignment . center ,
child: Column (
/ / children: < Widget > [
children: < Widget > [
/ / Expanded (
Image . asset (
/ / child: InkWell (
' assets/images/my_file_white_icon.png ' ,
/ / onTap: ( ) = > { AddFamilyMemberType . loginType = 1 , Navigator . of ( context ) . pushNamed ( ADD_FAMILY_MEMBER ) } ,
height: SizeConfig
/ / child: RoundedContainer (
. imageSizeMultiplier *
/ / borderColor: Colors . grey ,
12 ,
/ / showBorder: true ,
width: SizeConfig
/ / child: Padding (
. imageSizeMultiplier *
/ / padding: EdgeInsets . fromLTRB ( 20 , 10 , 20 , 10 ) ,
15 ,
/ / child: Column (
) ,
/ / mainAxisAlignment: MainAxisAlignment . center ,
SizedBox (
/ / children: < Widget > [
height: 20 ,
/ / Image . asset (
) ,
/ / ' assets/images/id_card_icon.png ' ,
AppText (
/ / height: SizeConfig . imageSizeMultiplier * 12 ,
TranslationBase . of ( context )
/ / width: SizeConfig . imageSizeMultiplier * 15 ,
. fileNo ,
/ / ) ,
fontSize: SizeConfig
/ / SizedBox (
. textMultiplier *
/ / height: 20 ,
2 ,
/ / ) ,
)
/ / AppText (
] ,
/ / TranslationBase . of ( context ) . idNo ,
) ,
/ / fontSize: SizeConfig . textMultiplier * 2 ,
) ) ) )
/ / )
] ,
/ / ] ,
) ) ,
/ / ) ,
Divider (
/ / ) ) ) ) ,
color: Colors . grey ,
/ / Expanded (
height: 2 ,
/ / child: InkWell (
) ,
/ / onTap: ( ) = > { AddFamilyMemberType . loginType = 2 , Navigator . of ( context ) . pushNamed ( ADD_FAMILY_MEMBER ) } ,
] ) ,
/ / child: RoundedContainer (
) ,
/ / borderColor: Colors . grey ,
/ / Expanded (
/ / showBorder: true ,
/ / flex: 2 ,
/ / child: Padding (
/ / child: Column (
/ / padding: EdgeInsets . fromLTRB ( 25 , 10 , 25 , 10 ) ,
/ / mainAxisAlignment: MainAxisAlignment . end ,
/ / child: Column (
/ / children: < Widget > [
/ / children: < Widget > [
/ / Row (
/ / Image . asset (
/ / children: < Widget > [
/ / ' assets/images/my_file_white_icon.png ' ,
/ / Expanded (
/ / height: SizeConfig . imageSizeMultiplier * 12 ,
/ / child: DefaultButton (
/ / width: SizeConfig . imageSizeMultiplier * 15 ,
/ / TranslationBase . of ( context ) . registerNow ,
/ / ) ,
/ / ( ) = > {
/ / SizedBox (
/ / Navigator . of ( context ) . pushNamed (
/ / height: 20 ,
/ / REGISTER ,
/ / ) ,
/ / )
/ / AppText (
/ / } ,
/ / TranslationBase . of ( context ) . fileNo ,
/ / ) )
/ / fontSize: SizeConfig . textMultiplier * 2 ,
/ / ] ,
/ / )
/ / ) ,
/ / ] ,
/ / ] ,
/ / ) ,
/ / ) )
/ / ) ) ) )
] ,
/ / ] ,
) ) ) ;
/ / ) ) ,
/ / Divider (
/ / color: Colors . grey ,
/ / height: 2 ,
/ / ) ,
/ / ] ) ,
/ / ) ,
/ / / / Expanded (
/ / / / flex: 2 ,
/ / / / child: Column (
/ / / / mainAxisAlignment: MainAxisAlignment . end ,
/ / / / children: < Widget > [
/ / / / Row (
/ / / / children: < Widget > [
/ / / / Expanded (
/ / / / child: DefaultButton (
/ / / / TranslationBase . of ( context ) . registerNow ,
/ / / / ( ) = > {
/ / / / Navigator . of ( context ) . pushNamed (
/ / / / REGISTER ,
/ / / / )
/ / / / } ,
/ / / / ) )
/ / / / ] ,
/ / / / ) ,
/ / / / ] ,
/ / / / ) )
/ / ] ,
/ / ) ) ) ;
}
Widget getButton ( BuildContext _context , String _title , String _icon , int _flag ) {
return InkWell (
onTap: ( ) {
AddFamilyMemberType . loginType = _flag ;
Navigator . of ( _context ) . pushNamed ( ADD_FAMILY_MEMBER ) ;
} ,
child: Container (
padding: EdgeInsets . only ( left: 20 , right: 20 , bottom: 15 , top: 28 ) ,
decoration: BoxDecoration (
borderRadius: BorderRadius . circular ( 15 ) ,
color: Colors . white ,
border: Border . all (
color: Color ( 0xffefefef ) ,
width: 1 ,
) ,
) ,
child: Column (
crossAxisAlignment: CrossAxisAlignment . start ,
mainAxisAlignment: MainAxisAlignment . spaceBetween ,
children: < Widget > [
SvgPicture . asset (
_icon ,
height: 38 ,
width: 38 ,
) ,
Text (
_title ,
style: TextStyle ( fontSize: 16 , fontWeight: FontWeight . w600 , color: Color ( 0xff2B353E ) , letterSpacing: - 0.48 , height: 20 / 16 ) ,
) ,
] ,
) ,
) ,
) ;
}
}
}
}