Няма описание
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 3.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. import 'package:flutter/material.dart';
  2. class InputWidgetCurrentPassword extends StatelessWidget {
  3. final String hintText;
  4. InputWidgetCurrentPassword(this.hintText);
  5. @override
  6. Widget build(BuildContext context) {
  7. return Padding(
  8. padding: EdgeInsets.only(bottom: 15),
  9. child: Container(
  10. width: MediaQuery.of(context).size.width,
  11. child: Material(
  12. elevation: 10,
  13. color: Colors.white,
  14. shape: RoundedRectangleBorder(
  15. borderRadius: BorderRadius.all(Radius.circular(10))),
  16. child: Padding(
  17. padding: EdgeInsets.only(left: 5, right: 5),
  18. child: TextFormField(
  19. controller: passwordController,
  20. textInputAction: TextInputAction.next,
  21. obscureText: true,
  22. decoration: InputDecoration(
  23. border: InputBorder.none,
  24. hintText: hintText,
  25. hintStyle: TextStyle(color: Color(0xFFE1E1E1), fontSize: 16)),
  26. ),
  27. ),
  28. ),
  29. ),
  30. );
  31. }
  32. }
  33. class InputWidgetNewPassword extends StatelessWidget {
  34. final String hintText;
  35. InputWidgetNewPassword(this.hintText);
  36. @override
  37. Widget build(BuildContext context) {
  38. return Padding(
  39. padding: EdgeInsets.only(bottom: 15),
  40. child: Container(
  41. width: MediaQuery.of(context).size.width,
  42. child: Material(
  43. elevation: 10,
  44. color: Colors.white,
  45. shape: RoundedRectangleBorder(
  46. borderRadius: BorderRadius.all(Radius.circular(10))),
  47. child: Padding(
  48. padding: EdgeInsets.only(left: 5, right: 5),
  49. child: TextFormField(
  50. controller: newPasswordController,
  51. textInputAction: TextInputAction.next,
  52. obscureText: true,
  53. decoration: InputDecoration(
  54. border: InputBorder.none,
  55. hintText: hintText,
  56. hintStyle: TextStyle(color: Color(0xFFE1E1E1), fontSize: 16)),
  57. ),
  58. ),
  59. ),
  60. ),
  61. );
  62. }
  63. }
  64. class InputWidgetRetypeNewPassword extends StatelessWidget {
  65. final String hintText;
  66. InputWidgetRetypeNewPassword(this.hintText);
  67. @override
  68. Widget build(BuildContext context) {
  69. return Padding(
  70. padding: EdgeInsets.only(bottom: 15),
  71. child: Container(
  72. width: MediaQuery.of(context).size.width,
  73. child: Material(
  74. elevation: 10,
  75. color: Colors.white,
  76. shape: RoundedRectangleBorder(
  77. borderRadius: BorderRadius.all(Radius.circular(10))),
  78. child: Padding(
  79. padding: EdgeInsets.only(left: 5, right: 5),
  80. child: TextFormField(
  81. controller: retypeNewPasswordController,
  82. textInputAction: TextInputAction.done,
  83. obscureText: true,
  84. decoration: InputDecoration(
  85. border: InputBorder.none,
  86. hintText: hintText,
  87. hintStyle: TextStyle(color: Color(0xFFE1E1E1), fontSize: 16)),
  88. ),
  89. ),
  90. ),
  91. ),
  92. );
  93. }
  94. }
  95. TextEditingController passwordController = TextEditingController();
  96. TextEditingController newPasswordController = TextEditingController();
  97. TextEditingController retypeNewPasswordController = TextEditingController();