Taha Tesser
ba719bc588
Fix CalendarDatePicker
day selection shape and overlay (#144317)
fixes [`DatePickerDialog` date entry hover background and ink splash have different radius](https://github.com/flutter/flutter/issues/141350)
fixes [Ability to customize DatePicker day selection background and overlay shape](https://github.com/flutter/flutter/issues/144220)
### Code sample
<details>
<summary>expand to view the code sample</summary>
```dart
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
body: Center(
child: Builder(builder: (context) {
return FilledButton(
onPressed: () {
showDatePicker(
context: context,
initialDate: DateTime.now(),
firstDate: DateTime.utc(2010),
lastDate: DateTime.utc(2030),
);
},
child: const Text('Show Date picker'),
);
}),
),
),
);
}
}
```
</details>
### Material DatePicker states specs

### Day selection overlay
| Before | After |
| --------------- | --------------- |
| <img src="https://github.com/flutter/flutter/assets/48603081/b529d38d-0232-494b-8bf2-55d28420a245" /> | <img src="https://github.com/flutter/flutter/assets/48603081/c4799559-a7ef-45fd-aed9-aeb386370580" /> |
### Hover, pressed, highlight preview
| Before | After |
| --------------- | --------------- |
| <video src="https://github.com/flutter/flutter/assets/48603081/8edde82a-7f39-4482-afab-183e1bce5991" /> | <video src="https://github.com/flutter/flutter/assets/48603081/04e1502e-67a4-4b33-973d-463067d70151" /> |
### Using `DatePickerThemeData.dayShape` to customize day selection background and overlay shape
| Before | After |
| --------------- | --------------- |
| <img src="https://github.com/flutter/flutter/assets/48603081/a0c85f58-a69b-4e14-a45d-41e580ceedce" /> | <img src="https://github.com/flutter/flutter/assets/48603081/db67cee1-d28d-4168-98b8-fd7a9cb70cda" /> |
### Example preview

2024-03-01 12:44:29 +00:00
..
2023-04-04 20:34:29 +00:00
2022-07-29 07:17:06 +00:00
2022-10-25 07:27:06 +00:00
2024-02-28 13:55:50 -08:00
2023-12-11 22:54:13 +00:00
2023-05-22 16:55:21 +00:00
2023-11-27 17:26:37 +00:00
2022-11-30 02:08:21 +00:00
2024-02-12 17:08:20 +00:00
2024-02-28 13:55:50 -08:00
2023-02-06 09:02:37 +00:00
2024-02-13 20:30:53 +00:00
2023-02-23 19:43:21 +00:00
2024-02-28 13:55:50 -08:00
2023-09-28 01:42:16 +00:00
2023-11-30 20:07:00 +00:00
2024-03-01 12:44:29 +00:00
2023-04-18 23:00:03 +00:00
2023-04-04 20:34:29 +00:00
2023-07-17 18:24:49 +00:00
2023-03-29 19:58:58 +00:00
2023-09-18 08:33:14 +00:00
2023-11-28 23:57:10 +00:00
2023-08-21 20:13:22 +00:00
2023-12-06 16:40:24 +00:00
2023-11-28 23:57:10 +00:00
2022-07-29 07:17:06 +00:00
2023-08-29 17:31:02 +00:00
2023-11-30 20:07:00 +00:00
2023-04-04 20:34:29 +00:00
2023-11-30 20:07:00 +00:00
2023-09-01 00:02:04 +00:00
2024-02-07 13:57:21 +00:00
2023-06-01 16:21:42 -07:00
2023-10-18 20:13:08 +00:00
2023-07-11 09:30:05 +00:00
2023-07-17 18:24:49 +00:00
2024-01-12 22:10:25 +00:00
2023-11-28 23:57:10 +00:00
2023-03-22 21:12:22 +00:00
2023-08-15 00:55:07 +00:00
2023-11-20 15:24:41 -08:00
2022-10-25 07:27:08 +00:00
2023-11-28 23:57:10 +00:00
2023-02-03 16:27:43 +00:00
2023-04-04 20:34:29 +00:00
2023-05-05 16:39:11 +00:00
2024-02-07 10:26:27 +00:00
2023-09-08 09:40:49 +00:00
2023-05-24 13:12:47 -07:00
2024-01-03 21:26:02 +00:00
2022-12-01 00:00:19 +00:00
2023-11-28 23:57:10 +00:00
2024-01-12 16:35:08 +00:00
2023-11-07 10:26:23 -08:00
2023-02-06 09:02:37 +00:00
2023-06-02 01:05:31 +00:00
2024-02-02 01:48:17 +00:00
2023-04-04 20:34:29 +00:00
2023-07-20 13:12:34 -07:00
2022-12-14 00:09:52 +00:00
2024-02-28 13:55:50 -08:00
2023-12-07 21:20:06 +00:00