diff --git a/lib/common_widget/round_button.dart b/lib/common_widget/round_button.dart index 5eae22a..d243c38 100644 --- a/lib/common_widget/round_button.dart +++ b/lib/common_widget/round_button.dart @@ -2,7 +2,7 @@ import 'package:flutter/material.dart'; import '../common/colo_extension.dart'; -enum RoundButtonType { bgGradient, bgSGradient , textGradient } +enum RoundButtonType { bgGradient, bgSGradient, textGradient } class RoundButton extends StatelessWidget { final String title; @@ -18,7 +18,7 @@ class RoundButton extends StatelessWidget { this.type = RoundButtonType.bgGradient, this.fontSize = 16, this.elevation = 1, - this.fontWeight=FontWeight.w700, + this.fontWeight = FontWeight.w700, required this.onPressed}); @override @@ -26,10 +26,13 @@ class RoundButton extends StatelessWidget { return Container( decoration: BoxDecoration( gradient: LinearGradient( - colors: type == RoundButtonType.bgSGradient ? TColor.secondaryG : TColor.primaryG, - ), + colors: type == RoundButtonType.bgSGradient + ? TColor.secondaryG + : TColor.primaryG, + ), borderRadius: BorderRadius.circular(25), - boxShadow: type == RoundButtonType.bgGradient || type == RoundButtonType.bgSGradient + boxShadow: type == RoundButtonType.bgGradient || + type == RoundButtonType.bgSGradient ? const [ BoxShadow( color: Colors.black26, @@ -43,11 +46,16 @@ class RoundButton extends StatelessWidget { shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(25)), textColor: TColor.primaryColor1, minWidth: double.maxFinite, - elevation: type == RoundButtonType.bgGradient || type == RoundButtonType.bgSGradient ? 0 : elevation, - color: type == RoundButtonType.bgGradient || type == RoundButtonType.bgSGradient + elevation: type == RoundButtonType.bgGradient || + type == RoundButtonType.bgSGradient + ? 0 + : elevation, + color: type == RoundButtonType.bgGradient || + type == RoundButtonType.bgSGradient ? Colors.transparent : TColor.white, - child: type == RoundButtonType.bgGradient || type == RoundButtonType.bgSGradient + child: type == RoundButtonType.bgGradient || + type == RoundButtonType.bgSGradient ? Text(title, style: TextStyle( color: TColor.white, @@ -65,11 +73,11 @@ class RoundButton extends StatelessWidget { }, child: Text(title, style: TextStyle( - color: TColor.primaryColor1, + color: TColor.primaryColor1, fontSize: fontSize, fontWeight: fontWeight)), ), ), ); } -} \ No newline at end of file +} diff --git a/lib/view/login/web/web_login_view.dart b/lib/view/login/web/web_login_view.dart index 4cf8cd2..ceecf45 100644 --- a/lib/view/login/web/web_login_view.dart +++ b/lib/view/login/web/web_login_view.dart @@ -2,12 +2,6 @@ import 'package:flutter/material.dart'; import 'package:flutter_svg/svg.dart'; import 'package:smartfit_app_mobile/modele/utile/login_user.dart'; import 'package:smartfit_app_mobile/view/main_tab/main_tab_view.dart'; -import 'package:provider/provider.dart'; -import 'package:smartfit_app_mobile/modele/api/i_data_strategy.dart'; -import 'package:smartfit_app_mobile/modele/api/request_api.dart'; -import 'package:smartfit_app_mobile/modele/user.dart'; -import 'package:smartfit_app_mobile/view/activity/list_activity.dart'; -import 'package:smartfit_app_mobile/view/page_test.dart'; import 'package:smartfit_app_mobile/common/colo_extension.dart'; import 'package:smartfit_app_mobile/common_widget/round_button.dart'; import 'package:smartfit_app_mobile/common_widget/round_text_field.dart'; @@ -82,11 +76,14 @@ class _WebLoginView extends State { body: SingleChildScrollView( child: SafeArea( child: Container( - height: media.height * 0.9, padding: const EdgeInsets.symmetric(horizontal: 20), + height: media.height, child: Column( crossAxisAlignment: CrossAxisAlignment.center, children: [ + SizedBox( + height: media.width * 0.03, + ), Text( "Bienvenue", style: TextStyle(color: TColor.gray, fontSize: 16), @@ -98,9 +95,6 @@ class _WebLoginView extends State { fontSize: 20, fontWeight: FontWeight.w700), ), - SizedBox( - height: media.width * 0.05, - ), SizedBox( height: media.width * 0.04, ), @@ -131,6 +125,9 @@ class _WebLoginView extends State { fit: BoxFit.contain, ))), ), + SizedBox( + height: media.width * 0.01, + ), Row( mainAxisAlignment: MainAxisAlignment.center, children: [ @@ -207,59 +204,6 @@ class _WebLoginView extends State { SizedBox( height: media.width * 0.04, ), - Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - GestureDetector( - onTap: () {}, - child: Container( - width: 50, - height: 50, - alignment: Alignment.center, - decoration: BoxDecoration( - color: TColor.white, - border: Border.all( - width: 1, - color: TColor.gray.withOpacity(0.4), - ), - borderRadius: BorderRadius.circular(15), - ), - child: Image.asset( - "assets/img/google.png", - width: 20, - height: 20, - ), - ), - ), - SizedBox( - width: media.width * 0.04, - ), - GestureDetector( - onTap: () {}, - child: Container( - width: 50, - height: 50, - alignment: Alignment.center, - decoration: BoxDecoration( - color: TColor.white, - border: Border.all( - width: 1, - color: TColor.gray.withOpacity(0.4), - ), - borderRadius: BorderRadius.circular(15), - ), - child: Image.asset( - "assets/img/suunto.png", - width: 35, - height: 35, - ), - ), - ) - ], - ), - SizedBox( - height: media.width * 0.04, - ), TextButton( onPressed: () { Navigator.pop(context);