already_have_an_account_check.dart 1.0 KB

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