changed login button

This commit is contained in:
Kima 2024-08-14 12:32:32 +02:00
parent 0f08400d63
commit d70f92d4e5

View File

@ -218,42 +218,78 @@ class LoginScreenState extends State<LoginScreen> {
child: Padding( child: Padding(
padding: const EdgeInsets.symmetric( padding: const EdgeInsets.symmetric(
horizontal: 16), horizontal: 16),
child: FilledButton( child: GestureDetector(
style: ButtonStyle( onTap: () {
shape: WidgetStateProperty.all< final NavigatorState navigator =
RoundedRectangleBorder>( Navigator.of(context);
const RoundedRectangleBorder( navigator
borderRadius: BorderRadius.all( .push(
Radius.circular(12)), MaterialPageRoute(
))), builder: (context) =>
onPressed: () { KretenLoginScreen(
final NavigatorState navigator = onLogin: (String code) {
Navigator.of(context); codeController.text = code;
navigator navigator.pop();
.push( },
MaterialPageRoute(
builder: (context) =>
KretenLoginScreen(
onLogin: (String code) {
codeController.text = code;
navigator.pop();
},
),
), ),
) ),
.then((value) { )
if (codeController.text != "") { .then((value) {
_NewLoginAPI(context: context); if (codeController.text != "") {
} _NewLoginAPI(context: context);
}); }
}, });
child: Text( },
"login".i18n, child: Container(
style: const TextStyle( width:
fontFamily: 'Montserrat', MediaQuery.of(context).size.width *
fontSize: 20, 0.75,
fontWeight: FontWeight.w700), height: 50.0,
)), decoration: BoxDecoration(
// image: const DecorationImage(
// image:
// AssetImage('assets/images/btn_kreten_login.png'),
// fit: BoxFit.scaleDown,
// ),
borderRadius:
BorderRadius.circular(12.0),
color: const Color(0xFF0097C1),
),
padding: const EdgeInsets.only(
top: 5.0,
left: 5.0,
right: 5.0,
bottom: 5.0),
child: Row(
mainAxisAlignment:
MainAxisAlignment.center,
children: [
Image.asset(
'assets/images/btn_kreten_login.png',
),
const SizedBox(
width: 10.0,
),
Container(
width: 1.0,
height: 30.0,
color: Colors.white,
),
const SizedBox(
width: 10.0,
),
Text(
'login_w_kreta_acc'.i18n,
textAlign: TextAlign.center,
style: const TextStyle(
color: Colors.white,
fontWeight: FontWeight.bold,
fontSize: 15.0,
),
),
],
)),
),
), ),
), ),
const SizedBox(height: 8), const SizedBox(height: 8),