'How to place maxlines 0/500 inside a border of textFiled and to left in Flutter?

class TextFieldWidget extends StatelessWidget {
  const TextFieldWidget({
    Key? key,
  }) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return TextField(
      minLines: 6,
      keyboardType: TextInputType.multiline,
      maxLines: null,
      maxLength: 500,
      decoration: InputDecoration(
        hintText: 'Write a description about your property',
        fillColor: Colors.white,
        border: OutlineInputBorder(
          borderSide: const BorderSide(color: Colors.black54, width: 1.0),
          borderRadius: BorderRadius.circular(25.0),
        ),
        focusedBorder: OutlineInputBorder(
          borderSide: const BorderSide(color: Colors.black54, width: 1.0),
          borderRadius: BorderRadius.circular(25.0),
        ),
      ),
    );
  }
}

I want to place the text 0/500 inside of a border of textfield and to the left. How to do that? I have attached an image.

Desired output

enter image description here

Currently it looks like this

enter image description here



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source