Fix cursor is not centered when cursorHeight is set (non-Apple platforms). (#145829)
## Description
This PRs fixes the cursor vertical position when a custom cursor height is set on non-Apple platforms (on Apple platforms the cursor is already centered) .
| Before | After |
|--------|--------|
|  |  |
<details><summary>Code sample used for the screenshots (cursorHeight 18, font size 16, line height 2)</summary>
```dart
import 'package:flutter/material.dart';
void main() async {
runApp(
const MaterialApp(
title: 'Flutter Demo',
home: MyApp(),
),
);
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return const Scaffold(
body: Center(
child: TextField(
cursorHeight: 18,
style: TextStyle(fontSize: 16, height: 2),
),
),
);
}
}
```
</details>
## Related Issue
Fixes https://github.com/flutter/flutter/issues/143480
## Tests
Adds 2 tests, updates 1.