already_have_an_account_check.dart 931 B

1234567891011121314151617181920212223242526272829303132333435
  1. import 'package:flutter/material.dart';
  2. import 'package:flutter_auth/models/config.dart';
  3. class AlreadyHaveAnAccountCheck extends StatelessWidget {
  4. final bool login;
  5. final Function? press;
  6. const AlreadyHaveAnAccountCheck({
  7. Key? key,
  8. this.login = true,
  9. required this.press,
  10. }) : super(key: key);
  11. @override
  12. Widget build(BuildContext context) {
  13. return Row(
  14. mainAxisAlignment: MainAxisAlignment.center,
  15. children: <Widget>[
  16. Text(
  17. login ? "Don’t have an Account ? " : "Already have an Account ? ",
  18. style: const TextStyle(color: kPrimaryColor),
  19. ),
  20. GestureDetector(
  21. onTap: press as void Function()?,
  22. child: Text(
  23. login ? "Sign Up" : "Sign In",
  24. style: const TextStyle(
  25. color: kPrimaryColor,
  26. fontWeight: FontWeight.bold,
  27. ),
  28. ),
  29. )
  30. ],
  31. );
  32. }
  33. }