No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

inputWidget.dart 2.7KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. import 'package:flutter/material.dart';
  2. class InputWidgetEmail extends StatelessWidget {
  3. final double topRight;
  4. final double bottomRight;
  5. InputWidgetEmail(this.topRight, this.bottomRight);
  6. @override
  7. Widget build(BuildContext context) {
  8. return Padding(
  9. padding: EdgeInsets.only(right: 40, bottom: 20),
  10. child: Container(
  11. width: MediaQuery.of(context).size.width - 40,
  12. child: Material(
  13. elevation: 10,
  14. color: Colors.white,
  15. shape: RoundedRectangleBorder(
  16. borderRadius: BorderRadius.only(
  17. bottomRight: Radius.circular(bottomRight),
  18. topRight: Radius.circular(topRight))),
  19. child: Padding(
  20. padding: EdgeInsets.only(left: 25, right: 20, top: 10, bottom: 10),
  21. child: TextFormField(
  22. keyboardType: TextInputType.emailAddress,
  23. textInputAction: TextInputAction.next,
  24. decoration: InputDecoration(
  25. border: InputBorder.none,
  26. prefixIcon: Icon(Icons.person),
  27. prefixIconConstraints: BoxConstraints(
  28. minWidth: 40,
  29. minHeight: 40,
  30. ),
  31. hintText: "hris_selfservice@example.com",
  32. hintStyle: TextStyle(color: Color(0xFFE1E1E1), fontSize: 16)),
  33. ),
  34. ),
  35. ),
  36. ),
  37. );
  38. }
  39. }
  40. class InputWidgetPassword extends StatelessWidget {
  41. final double topRight;
  42. final double bottomRight;
  43. InputWidgetPassword(this.topRight, this.bottomRight);
  44. @override
  45. Widget build(BuildContext context) {
  46. return Padding(
  47. padding: EdgeInsets.only(right: 40, bottom: 30),
  48. child: Container(
  49. width: MediaQuery.of(context).size.width - 40,
  50. child: Material(
  51. elevation: 10,
  52. color: Colors.white,
  53. shape: RoundedRectangleBorder(
  54. borderRadius: BorderRadius.only(
  55. bottomRight: Radius.circular(bottomRight),
  56. topRight: Radius.circular(topRight))),
  57. child: Padding(
  58. padding: EdgeInsets.only(left: 25, right: 20, top: 10, bottom: 10),
  59. child: TextFormField(
  60. textInputAction: TextInputAction.done,
  61. obscureText: true,
  62. decoration: InputDecoration(
  63. border: InputBorder.none,
  64. prefixIcon: Icon(Icons.lock),
  65. prefixIconConstraints: BoxConstraints(
  66. minWidth: 40,
  67. minHeight: 40,
  68. ),
  69. hintText: "Password",
  70. hintStyle: TextStyle(color: Color(0xFFE1E1E1), fontSize: 16)),
  71. ),
  72. ),
  73. ),
  74. ),
  75. );
  76. }
  77. }