Sonnat Project
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.

57 lines
1.7 KiB

10 months ago
  1. import 'package:flutter/material.dart';
  2. import 'package:sonnat/core/extensions/context_extension.dart';
  3. import 'package:sonnat/core/language/translator.dart';
  4. import 'package:sonnat/core/utils/app_constants.dart';
  5. class AuthorCommentWidget extends StatefulWidget {
  6. final TextEditingController controller;
  7. const AuthorCommentWidget({super.key, required this.controller});
  8. @override
  9. State<AuthorCommentWidget> createState() => _AuthorCommentWidgetState();
  10. }
  11. class _AuthorCommentWidgetState extends State<AuthorCommentWidget> {
  12. @override
  13. Widget build(BuildContext context) {
  14. return SizedBox(
  15. height: 49 * context.height / AppConstants.instance.appHeight,
  16. child: TextFormField(
  17. autofocus: false,
  18. maxLength: 300,
  19. controller: widget.controller,
  20. maxLines: 10,
  21. minLines: 4,
  22. style: const TextStyle(
  23. color: Color(0xff8D95AB),
  24. fontSize: 10,
  25. ),
  26. decoration: InputDecoration(
  27. fillColor: Colors.transparent,
  28. contentPadding: const EdgeInsets.symmetric(
  29. vertical: 15,
  30. horizontal: 18,
  31. ),
  32. hintText: Translator.translate('full_name'),
  33. filled: true,
  34. counterText: '',
  35. hintStyle: const TextStyle(
  36. color: Color(0xff8D95AB),
  37. fontSize: 10,
  38. ),
  39. enabledBorder: OutlineInputBorder(
  40. borderRadius: BorderRadius.circular(19),
  41. borderSide: const BorderSide(color: Color(0xff636E88)),
  42. ),
  43. focusedBorder: OutlineInputBorder(
  44. borderRadius: BorderRadius.circular(19),
  45. borderSide: const BorderSide(color: Color(0xff636E88)),
  46. ),
  47. ),
  48. ),
  49. );
  50. }
  51. }