diff --git a/assets/images/abhiyaan_logo.png b/assets/images/abhiyaan_logo.png index caaaa95..9684ec9 100644 Binary files a/assets/images/abhiyaan_logo.png and b/assets/images/abhiyaan_logo.png differ diff --git a/assets/images/abhiyaan_logo1.png b/assets/images/abhiyaan_logo1.png new file mode 100644 index 0000000..caaaa95 Binary files /dev/null and b/assets/images/abhiyaan_logo1.png differ diff --git a/lib/ui/views/auth/auth_view.dart b/lib/ui/views/auth/auth_view.dart index 137d1c5..03038aa 100644 --- a/lib/ui/views/auth/auth_view.dart +++ b/lib/ui/views/auth/auth_view.dart @@ -32,7 +32,9 @@ class AuthView extends StatelessWidget { children: [ Image( width: double.infinity.w, - image: Image.asset(AssetImagePath.logoImg).image, + image: const AssetImage( + 'assets/images/abhiyaan_logo1.png', + ), ), Image(image: Image.asset(AssetImagePath.login).image), ], diff --git a/lib/ui/views/auth/register/register_view.dart b/lib/ui/views/auth/register/register_view.dart index aff16f7..95433f0 100644 --- a/lib/ui/views/auth/register/register_view.dart +++ b/lib/ui/views/auth/register/register_view.dart @@ -33,36 +33,65 @@ class RegisterView extends StatelessWidget { child: Column( children: [ Container( - margin: const EdgeInsets.symmetric( - horizontal: 30, vertical: 50), - width: 320.w, - child: Image.asset( - AssetImagePath.logoImg, - ), - ).animate(delay: 200.ms).fadeIn( + decoration: BoxDecoration( + boxShadow: [ + BoxShadow( + color: context.colorScheme.primary, + spreadRadius: -45, + blurRadius: 70.0, // Adjust for desired fade + ), + ], + ), + child: SizedBox( + width: 200.w, + height: 200.h, + child: Image.asset( + AssetImagePath.logoImg, + ), + )).animate(delay: 100.ms).fadeIn( delay: 100.ms, curve: Curves.easeInOut, duration: 700.ms, ), - 30.verticalSpace, + Text("Abhiyaan", + textAlign: TextAlign.center, + style: FontThemeClass().header( + context, + )).animate(delay: 100.ms).fadeIn( + delay: 200.ms, + curve: Curves.easeInOut, + duration: 500.ms, + ), + Text("Connect with Students, Teachers & Alumni", + textAlign: TextAlign.center, + style: FontThemeClass().body( + context, + color: context.colorScheme.secondaryText, + fontWeight: FontWeight.w500, + )).animate(delay: 200.ms).fadeIn( + delay: 100.ms, + curve: Curves.easeInOut, + duration: 500.ms, + ), + 40.verticalSpace, TextFormField( keyboardType: TextInputType.emailAddress, cursorColor: context.colorScheme.accentColor, controller: model.emailIdTextController, decoration: InputDecoration( contentPadding: const EdgeInsets.symmetric( - horizontal: 15, vertical: 15) + horizontal: 30, vertical: 15) .r, border: OutlineInputBorder( borderRadius: BorderRadius.all( - const Radius.circular(15).r, + const Radius.circular(150).r, ), borderSide: BorderSide.none, ), fillColor: context.colorScheme.card, filled: true, focusColor: context.colorScheme.card, - hintText: 'Student Email ID', + hintText: 'Email ID', errorText: model.isEmailIdValid ? null : model.emailIdErrorText, hintStyle: model.fontTheme.caption( @@ -82,18 +111,18 @@ class RegisterView extends StatelessWidget { controller: model.userNameController, decoration: InputDecoration( contentPadding: const EdgeInsets.symmetric( - horizontal: 15, vertical: 15) + horizontal: 30, vertical: 15) .r, border: OutlineInputBorder( borderRadius: BorderRadius.all( - const Radius.circular(15).r, + const Radius.circular(150).r, ), borderSide: BorderSide.none, ), fillColor: context.colorScheme.card, filled: true, focusColor: context.colorScheme.card, - hintText: 'Enter Username', + hintText: 'Username', errorText: model.isEmailIdValid ? null : model.emailIdErrorText, hintStyle: model.fontTheme.caption( @@ -115,11 +144,11 @@ class RegisterView extends StatelessWidget { obscureText: model.isCreatePasswordVisible ? false : true, decoration: InputDecoration( contentPadding: const EdgeInsets.symmetric( - horizontal: 15, vertical: 15) + horizontal: 30, vertical: 15) .r, border: OutlineInputBorder( borderRadius: BorderRadius.all( - const Radius.circular(15).r, + const Radius.circular(150).r, ), borderSide: BorderSide.none), fillColor: context.colorScheme.card, @@ -160,11 +189,11 @@ class RegisterView extends StatelessWidget { obscureText: model.isConfirmPasswordVisible ? false : true, decoration: InputDecoration( contentPadding: const EdgeInsets.symmetric( - horizontal: 15, vertical: 15) + horizontal: 30, vertical: 15) .r, border: OutlineInputBorder( borderRadius: BorderRadius.all( - const Radius.circular(15).r, + const Radius.circular(150).r, ), borderSide: BorderSide.none, ), diff --git a/lib/ui/views/auth/sign_in/sign_in_view.dart b/lib/ui/views/auth/sign_in/sign_in_view.dart index 93634ba..46b604e 100644 --- a/lib/ui/views/auth/sign_in/sign_in_view.dart +++ b/lib/ui/views/auth/sign_in/sign_in_view.dart @@ -27,240 +27,290 @@ class SignInView extends StatelessWidget { body: SafeArea( child: Padding( padding: const EdgeInsets.only( - left: 20, - right: 20, top: 40, - bottom: 10, ).r, child: Column( children: [ Padding( - padding: const EdgeInsets.symmetric(vertical: 90).r, - child: SizedBox( - width: 320.w, - child: Image.asset( - AssetImagePath.logoImg, - ), - ).animate(delay: 100.ms).fadeIn( - delay: 100.ms, - curve: Curves.easeInOut, - duration: 500.ms, + padding: const EdgeInsets.only( + left: 20, + right: 20, + ).r, + child: Column( + children: [ + Container( + decoration: BoxDecoration( + boxShadow: [ + BoxShadow( + color: context.colorScheme.primary, + spreadRadius: -45, + blurRadius: + 70.0, // Adjust for desired fade + ), + ], + ), + child: SizedBox( + width: 200.w, + height: 200.h, + child: Image.asset( + AssetImagePath.logoImg, + ), + )).animate(delay: 100.ms).fadeIn( + delay: 100.ms, + curve: Curves.easeInOut, + duration: 500.ms, + ), + Text("Abhiyaan", + textAlign: TextAlign.center, + style: FontThemeClass().header( + context, + )).animate(delay: 100.ms).fadeIn( + delay: 100.ms, + curve: Curves.easeInOut, + duration: 500.ms, + ), + Text("Connect with Students, Teachers & Alumni", + textAlign: TextAlign.center, + style: FontThemeClass().body( + context, + color: context.colorScheme.secondaryText, + fontWeight: FontWeight.w500, + )).animate(delay: 300.ms).fadeIn( + delay: 100.ms, + curve: Curves.easeInOut, + duration: 500.ms, + ), + SizedBox( + height: 50.h, ), - ), - TextFormField( - cursorColor: context.colorScheme.accentColor, - controller: model.emailIdTextController, - decoration: InputDecoration( - contentPadding: const EdgeInsets.symmetric( - horizontal: 15, - vertical: 15, - ).r, - border: OutlineInputBorder( - borderRadius: BorderRadius.all( - const Radius.circular(15).r, + TextFormField( + cursorColor: context.colorScheme.accentColor, + controller: model.emailIdTextController, + decoration: InputDecoration( + contentPadding: const EdgeInsets.symmetric( + horizontal: 30, + vertical: 15, + ).r, + border: OutlineInputBorder( + borderRadius: BorderRadius.all( + const Radius.circular(150).r, + ), + borderSide: BorderSide.none, + ), + fillColor: context.colorScheme.card, + filled: true, + focusColor: context.colorScheme.card, + hintText: 'Email ID', + hintStyle: model.fontTheme.caption( + context, + color: context.colorScheme.secondaryText, + fontWeight: FontWeight.w500, + ), + ), + ).animate(delay: 100.ms).fadeIn( + delay: 100.ms, + curve: Curves.easeInOut, + duration: 500.ms, + ), + SizedBox( + height: 15.h, ), - borderSide: BorderSide.none, - ), - fillColor: context.colorScheme.card, - filled: true, - focusColor: context.colorScheme.card, - hintText: 'Student Email ID', - hintStyle: model.fontTheme.caption( - context, - color: context.colorScheme.secondaryText, - fontWeight: FontWeight.w500, - ), - ), - ).animate(delay: 300.ms).fadeIn( - delay: 100.ms, - curve: Curves.easeInOut, - duration: 500.ms, - ), - SizedBox( - height: 15.h, - ), - TextFormField( - cursorColor: context.colorScheme.accentColor, - controller: model.passwordTextController, - obscureText: model.isPasswordVisible ? false : true, - decoration: InputDecoration( - contentPadding: const EdgeInsets.symmetric( - horizontal: 15, vertical: 15) - .r, - border: OutlineInputBorder( - borderRadius: BorderRadius.all( - const Radius.circular(15).r, + TextFormField( + cursorColor: context.colorScheme.accentColor, + controller: model.passwordTextController, + obscureText: model.isPasswordVisible ? false : true, + decoration: InputDecoration( + contentPadding: const EdgeInsets.symmetric( + horizontal: 30, vertical: 15) + .r, + border: OutlineInputBorder( + borderRadius: BorderRadius.all( + const Radius.circular(150).r, + ), + borderSide: BorderSide.none), + fillColor: context.colorScheme.card, + filled: true, + focusColor: Colors.white, + suffixIcon: InkWell( + splashColor: Colors.transparent, + onTap: () { + model.togglePasswordVisibility(); + }, + child: model.isPasswordVisible + ? Icon( + Icons.visibility_off, + color: + context.colorScheme.secondaryText, + ) + : Icon( + Icons.visibility, + color: + context.colorScheme.secondaryText, + ), + ), + hintText: 'Password', + hintStyle: model.fontTheme.caption( + context, + color: context.colorScheme.secondaryText, + fontWeight: FontWeight.w500, + ), + errorText: model.isPasswordValid + ? null + : model.passwordErrorText, ), - borderSide: BorderSide.none), - fillColor: context.colorScheme.card, - filled: true, - focusColor: Colors.white, - suffixIcon: InkWell( - splashColor: Colors.transparent, - onTap: () { - model.togglePasswordVisibility(); - }, - child: model.isPasswordVisible - ? Icon( - Icons.visibility_off, - color: context.colorScheme.secondaryText, - ) - : Icon( - Icons.visibility, - color: context.colorScheme.secondaryText, + ).animate(delay: 300.ms).fadeIn( + delay: 100.ms, + curve: Curves.easeInOut, + duration: 500.ms, + ), + InkWell( + onTap: () { + FocusScope.of(context).requestFocus(FocusNode()); + model.changePassword(context); + }, + child: Align( + alignment: Alignment.centerRight, + child: Padding( + padding: EdgeInsetsDirectional.only(top: 10.r), + child: Text( + 'Forgot password?', + style: FontThemeClass().caption( + context, + color: context.colorScheme.accentColor, + fontWeight: FontWeight.w500, + ), ), - ), - hintText: 'Password', - hintStyle: model.fontTheme.caption( - context, - color: context.colorScheme.secondaryText, - fontWeight: FontWeight.w500, - ), - errorText: model.isPasswordValid - ? null - : model.passwordErrorText, - ), - ).animate(delay: 300.ms).fadeIn( - delay: 100.ms, - curve: Curves.easeInOut, - duration: 500.ms, - ), - InkWell( - onTap: () { - FocusScope.of(context).requestFocus(FocusNode()); - model.changePassword(context); - }, - child: Align( - alignment: Alignment.centerRight, - child: Padding( - padding: EdgeInsetsDirectional.only(top: 10.r), - child: Text( - 'Forgot password?', - style: FontThemeClass().caption( - context, - color: context.colorScheme.accentColor, - fontWeight: FontWeight.w500, + ), ), - ), - ), + ).animate(delay: 400.ms).fadeIn( + delay: 100.ms, + curve: Curves.easeInOut, + duration: 500.ms, + ), + ], ), - ).animate(delay: 400.ms).fadeIn( - delay: 100.ms, - curve: Curves.easeInOut, - duration: 500.ms, - ), - Padding( - padding: EdgeInsetsDirectional.only(top: 10.r), - child: TextButton( - onPressed: () async { - await model.login( - model.emailIdTextController.text, - model.passwordTextController.text, - context, - ); - }, - style: ButtonStyle( - minimumSize: const WidgetStatePropertyAll( - Size(double.infinity, 50)), - backgroundColor: WidgetStatePropertyAll( - context.colorScheme.accentColor), - shape: WidgetStatePropertyAll( - RoundedRectangleBorder( - borderRadius: BorderRadius.circular(40.0).r, - ), - ), - ), - child: Text( - 'Sign In', - style: FontThemeClass().title2( - context, - color: context.colorScheme.white, - fontWeight: FontWeight.w600, - ), - ), + ), + const Spacer(), + ClipRRect( + borderRadius: BorderRadius.only( + topLeft: Radius.circular(30.r), + topRight: Radius.circular(30.r), ), - ).animate(delay: 500.ms).fadeIn( - delay: 100.ms, - curve: Curves.easeInOut, - duration: 500.ms, - ), - model.showRegister - ? Padding( - padding: EdgeInsetsDirectional.only(top: 15.r), - child: RichText( - text: TextSpan( - text: 'Don\'t have an account? ', - style: FontThemeClass().caption( - context, - color: context.colorScheme.secondaryText, - fontWeight: FontWeight.w500, - ), - children: [ - TextSpan( - text: 'Register Now', - style: FontThemeClass().caption( - context, - color: context.colorScheme.accentColor, - fontWeight: FontWeight.w500, + child: Container( + width: double.infinity, + color: context.colorScheme + .darkScaffold, // Change this to inverse of scaffold + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Padding( + padding: const EdgeInsets.only( + left: 20, + right: 20, + top: 20, + bottom: 0, + ).r, + child: TextButton( + onPressed: () async { + await model.login( + model.emailIdTextController.text, + model.passwordTextController.text, + context, + ); + }, + style: ButtonStyle( + minimumSize: const WidgetStatePropertyAll( + Size(double.infinity, 50)), + backgroundColor: WidgetStatePropertyAll( + context.colorScheme.accentColor), + shape: WidgetStatePropertyAll( + RoundedRectangleBorder( + borderRadius: + BorderRadius.circular(40.0).r, ), - recognizer: TapGestureRecognizer() - ..onTap = () { - model.toRegisterPage(context); - }, ), - ], + ), + child: Text( + 'Sign In', + style: FontThemeClass().title2( + context, + color: context.colorScheme.white, + fontWeight: FontWeight.w600, + ), + ), ), - ), - ).animate(delay: 600.ms).fadeIn( - delay: 100.ms, - curve: Curves.easeInOut, - duration: 500.ms, - ) - : Container(), - model.showRegister ? const Spacer() : 10.verticalSpace, - Padding( - padding: EdgeInsetsDirectional.only(top: 10.r), - child: InkWell( - onTap: () => model.navigateToHelpSupport(), - child: RichText( - text: TextSpan( - text: 'Problem with Sign In? ', - style: FontThemeClass().caption( - context, - color: context.colorScheme.secondaryText, - fontWeight: FontWeight.w500, - ), - children: [ - TextSpan( - text: 'Report Issue', - style: FontThemeClass().caption( - context, - color: context.colorScheme.accentColor, - fontWeight: FontWeight.w500, + ).animate(delay: 500.ms).fadeIn( + delay: 100.ms, + curve: Curves.easeInOut, + duration: 500.ms, + ), + model.showRegister ?Padding( + padding: EdgeInsetsDirectional.only( + top: 10.r, bottom: 10.r), + child: RichText( + text: TextSpan( + text: 'New Here? ', + style: FontThemeClass().caption( + context, + color: context.colorScheme + .white, // Change this to inverse of primaryText + fontWeight: FontWeight.w500, + ), + children: [ + TextSpan( + text: 'Sign Up', + style: FontThemeClass().caption( + context, + color: context.colorScheme.accentColor, + fontWeight: FontWeight.w500, + ), + recognizer: TapGestureRecognizer() + ..onTap = () { + model.toRegisterPage(context); + }, + ), + ], ), ), - ], - ), + ):30.verticalSpace, + Padding( + padding: EdgeInsetsDirectional.only( + top: 10.r, bottom: 20.r), + child: RichText( + text: TextSpan( + text: + 'By Continuing, you agree Terms of Service & ', + style: FontThemeClass().caption( + context, + color: context.colorScheme + .white, // Change this to inverse of primaryText + fontWeight: FontWeight.w500, + ), + children: [ + TextSpan( + text: 'Privacy Policy', + style: FontThemeClass().caption( + context, + color: context.colorScheme.accentColor, + fontWeight: FontWeight.w500, + ), + recognizer: TapGestureRecognizer() + ..onTap = () { + model.navigateToPrivacyPolicy(); + }, + ), + ], + ), + ), + ), + ], ), ), - ).animate(delay: 700.ms).fadeIn( + ).animate(delay: 600.ms).fadeIn( delay: 100.ms, curve: Curves.easeInOut, - duration: 500.ms, - ), - model.showRegister ? 10.verticalSpace : const Spacer(), - Container( - alignment: Alignment.center, - child: Text( - 'Abhiyaan v1.0.5', - textAlign: TextAlign.center, - style: FontThemeClass().caption( - context, - color: context.colorScheme.secondaryText, - fontWeight: FontWeight.w500, + duration: 700.ms, ), - ), - ), ], ), ), diff --git a/lib/ui/views/auth/sign_in/sign_in_view_model.dart b/lib/ui/views/auth/sign_in/sign_in_view_model.dart index bbc93e4..8d36966 100644 --- a/lib/ui/views/auth/sign_in/sign_in_view_model.dart +++ b/lib/ui/views/auth/sign_in/sign_in_view_model.dart @@ -112,4 +112,11 @@ class SignInViewModel extends BaseViewModel { externalUrlHandler.launchEmail("technicalteam.bvcoenm@gmail.com"); // Navigation } + + void navigateToPrivacyPolicy() { + _analyticsService.logEvent( + eventName: "Privacy_policy", value: "Privacy policy button clicked"); + UrlLauncher externalUrlHandler = UrlLauncher(); + externalUrlHandler.launchURL("https://abhiyaan.tech/privacy-policy"); + } }