login_card.dart 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. import 'package:flutter/material.dart';
  2. class CardLogin extends StatelessWidget {
  3. bool passwordInvisible = true;
  4. CardLogin({super.key});
  5. @override
  6. Widget build(BuildContext context) {
  7. return Container(
  8. width: double.infinity,
  9. padding: EdgeInsets.only(bottom: 1),
  10. decoration: BoxDecoration(
  11. color: Colors.white,
  12. borderRadius: BorderRadius.circular(8),
  13. boxShadow: [
  14. BoxShadow(
  15. offset: const Offset(0, 10),
  16. blurRadius: 15,
  17. color: const Color(0xFFDADADA).withOpacity(0.15),
  18. ),
  19. BoxShadow(
  20. offset: const Offset(0, -10),
  21. blurRadius: 10,
  22. color: const Color(0xFFDADADA).withOpacity(0.15),
  23. ),
  24. ],
  25. ),
  26. child: Padding(
  27. padding: EdgeInsets.only(left: 16, right: 16, top: 16),
  28. child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
  29. Text("Login", style: TextStyle(fontSize: 45, letterSpacing: .6)),
  30. SizedBox(
  31. height: 30,
  32. ),
  33. Text(
  34. "Username",
  35. style: TextStyle(fontSize: 26),
  36. ),
  37. TextField(
  38. decoration: InputDecoration(
  39. hintText: "Username",
  40. hintStyle: TextStyle(color: Colors.grey, fontSize: 12),
  41. )),
  42. SizedBox(
  43. height: 30,
  44. ),
  45. Text("Password", style: TextStyle(fontSize: 26)),
  46. TextFormField(
  47. obscureText: true,
  48. decoration: InputDecoration(
  49. hintText: "********",
  50. hintStyle: TextStyle(color: Colors.grey, fontSize: 12),
  51. suffixIcon: IconButton(
  52. icon: Icon(passwordInvisible
  53. ? Icons.visibility_off
  54. : Icons.visibility),
  55. onPressed: () {},
  56. ),
  57. ),
  58. ),
  59. SizedBox(
  60. height: 35,
  61. )
  62. ]),
  63. ),
  64. );
  65. }
  66. }