title: Problems with Compose BasicTextField:
body: <p>Now I have a custom Compose input box. BasicTextField, but I can’t center the input font anyway. I can only offset in the x direction through the offset property of the Box.</p>
  <p>The reason for customizing the input box is because I need a fixed height input box and font size. But the text field cannot be input when the height is not enough.</p>
  <p>Please help me, I prefer to use TextField to write input boxes with a fixed height. But no suitable solution was found on the site.</p>
  <p>Here is my custom code:</p>
  <pre class="lang-kotlin prettyprint-override"><code>@Composable
  fun InputEditText(
      value: String,
      modifier: Modifier,
      onValueChange: (String) -&gt; Unit,
      contentTextStyle: TextStyle,
      hintTextStyle: TextStyle,
      placeHolderString: String = &quot;&quot;,
      enabled: Boolean = true,
      readOnly: Boolean = false,
      singleLine: Boolean = false,
      maxLines: Int = Int.MAX_VALUE,
      offsetDp: Dp = 10.dp,
      keyboardOptions: KeyboardOptions = KeyboardOptions.Default,
      keyboardActions: KeyboardActions = KeyboardActions.Default,
      cursorColor: Color = Color.Black,
  ) {
      BasicTextField(
          value = value,
          onValueChange = onValueChange,
          modifier = modifier,
          textStyle = contentTextStyle,
          decorationBox = {innerTextField -&gt;
              Box(
                  modifier = Modifier
                      .fillMaxWidth()
                      .offset(x = offsetDp),
                  contentAlignment = Alignment.CenterStart,
              ) {
                  if (value.isEmpty()) {
                      Text(
                          text = placeHolderString,
                          color = hintTextStyle.color,
                          fontSize = hintTextStyle.fontSize
                      )
                  }
  
                  innerTextField()
  
              }
          },
          enabled = enabled,
          readOnly = readOnly,
          singleLine = singleLine,
          maxLines = maxLines,
          keyboardOptions = keyboardOptions,
          keyboardActions = keyboardActions,
          cursorBrush = SolidColor(cursorColor)
      )
  }
  </code></pre>