import 'package:flutter/material.dart'; import 'package:flutter_auth/models/config.dart'; /// Description: 账户是否已注册,注册了显示登录 /// Time : 08/24/2023 Thursday /// Author : liuyuqi.gov@msn.cn class AlreadyHaveAnAccountCheck extends StatelessWidget { /// 账户是否已登录 final bool login; /// 跳转 final Function? press; const AlreadyHaveAnAccountCheck({ Key? key, this.login = true, required this.press, }) : super(key: key); @override Widget build(BuildContext context) { return Row( mainAxisAlignment: MainAxisAlignment.center, children: [ Text( login ? "还没账户 ? " : "已有账户 ? ", style: const TextStyle(color: kPrimaryColor), ), GestureDetector( onTap: press as void Function()?, child: Text( login ? "注册" : "登录", style: const TextStyle( color: kPrimaryColor, fontWeight: FontWeight.bold, ), ), ) ], ); } }