mainContainer method
- BuildContext context
Implementation
Widget mainContainer(BuildContext context) {
return ResponsiveGridRow(
children: [
ResponsiveGridCol(
lg: 12,
md: 12,
sm: 12,
xs: 12,
child: Obx(
() => AutofillGroup(
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Obx(() => showFlash.value
? Container(
child:PWAWidget(),
)
: SizedBox.shrink()),
SizedBox(height: context.x < 460 ?80:52,),
GestureDetector(
child: Image.asset(
'assets/neopass-logo-light-flat-2-curved.png',
width:context.x < 460?154: 256,
height:context.x < 460?31: 55,
),
onTap: (){
goto(Routes.LANDING);
},
),
2.h.SpaceX,
RichText(
textAlign: TextAlign.center,
text: TextSpan(
style: TextStyle(
fontSize: context.x > 1300
? 44
: context.x > 576
? 32
: 28,
fontWeight: FontWeight.w400,
fontFamily: "DMSerif",
color: ColorHelper.neutralDark,
height: 1.2,
),
children: [
WidgetSpan(
child: Text(
'${controller.signinSignupTab.value == "SIGN-IN" ? "Access with" : "Apply for"} your ',
style: TextStyle(
fontSize: context.x > 1300
? 42
: context.x > 576
? 32
: 28,
fontWeight: FontWeight.w400,
height: 1.2,
fontFamily: "DMSerif",
color: ColorHelper.primaryColor1,
),
),
),
WidgetSpan(
child: GradientText('PASS',
style: TextStyle(
fontSize: context.x > 1300
? 42
: context.x > 576
? 32
: 28,
fontWeight: FontWeight.w400,
height: 1.2,
fontFamily: "DMSerif"),
gradientDirection: GradientDirection.ltr,
colors: ColorHelper.gradientTextColors),
),
]),
),
8.SpaceX,
Text(
"NEOPASS Club: The Sky is no more our limit.\nMembers Only Club - by invitation.",
textAlign: TextAlign.center,
style: TextStyle(
fontSize: context.x < 900 ? 15 : 20,
color: ColorHelper.grey05,
fontWeight: FontWeight.w400),
),
32.SpaceX,
Obx(() => Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
signinSignUptab("SIGN-IN"),
12.SpaceY,
signinSignUptab("SIGN-UP"),
],
)),
controller.signinSignupTab.value == 'SIGN-IN'
? 32.SpaceX
: 16.SpaceX,
controller.signinSignupTab.value == 'SIGN-IN'
? _signinFields(context)
: _signupFields(context),
32.SpaceX,
Row(
children: [
Expanded(
child: Container(
height: 1,
color: ColorHelper.genericBorderColor,
),
),
const Padding(
padding: EdgeInsets.symmetric(horizontal: 6),
child: Text(
'Or',
style: const TextStyle(
fontWeight: FontWeight.w400,
fontSize: 18,
color: Colors.black),
),
),
Expanded(
child: Container(
height: 1,
color: ColorHelper.genericBorderColor,
),
),
],
),
32.SpaceX,
Padding(
padding: const EdgeInsets.symmetric(horizontal: 6),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
_appleButton('Sign-${controller.signinSignupTab.value ==
"SIGN-UP"? 'Up': 'In'} with Apple'),
13.SpaceY,
_googleButton( 'Sign-${controller.signinSignupTab.value ==
"SIGN-UP"? 'Up': 'In'} In with Google')
],
),
),
32.SpaceX,
controller.signinSignupTab.value == 'SIGN-IN'
? Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
'${"Don’t have an account yet?".tr} ',
style: const TextStyle(
color: ColorHelper.neutralMediumText,
fontSize: 18,
fontWeight: FontWeight.w400),
),
InkWell(
onTap: () async {
controller.clearLoginFields();
controller.signinSignupTab.value =
"SIGN-UP";
},
child: const Text(
"Sign-Up",
style: TextStyle(
color: ColorHelper.primaryColor2,
fontSize: 18,
fontWeight: FontWeight.w400),
),
),
],
)
: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
'${"Already have an account? ".tr} ',
style: const TextStyle(
color: ColorHelper.neutralMediumText,
fontSize: 18,
fontWeight: FontWeight.w400),
),
InkWell(
onTap: () {
controller.signinSignupTab.value =
"SIGN-IN";
},
child: const Text(
"Sign-In",
style: TextStyle(
color: ColorHelper.primaryColor2,
fontSize: 18,
fontWeight: FontWeight.w400),
),
),
],
),
SizedBox(
height: controller.signinSignupTab.value == 'SIGN-IN'?context.x<460?28:200: 51,
),
],
),
),
),
),
],
);
}