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
..
2024-02-28 13:55:50 -08:00
2023-06-09 11:28:18 +00:00
2023-06-09 11:28:18 +00:00
2024-02-28 13:55:50 -08:00
2024-02-28 13:55:50 -08:00
2024-02-28 13:55:50 -08:00
2023-11-22 20:16:37 +00:00
2023-11-01 23:29:49 +00:00
2023-06-09 11:28:18 +00:00
2024-02-01 00:05:22 +00:00
2024-02-28 13:55:50 -08:00
2024-03-01 12:44:29 +00:00
2022-09-29 09:12:05 -07:00
2023-06-09 11:28:18 +00:00
2024-02-28 13:55:50 -08:00
2023-02-24 06:30:33 -08:00
2023-06-09 11:28:18 +00:00
2024-02-28 13:55:50 -08:00
2024-02-28 13:55:50 -08:00
2024-01-30 16:28:31 -08:00
2024-01-23 09:35:22 +00:00
2023-06-12 14:52:06 +00:00
2024-02-28 13:55:50 -08:00
2023-07-19 22:07:59 +02:00
2023-11-01 23:29:49 +00:00
2024-02-28 13:55:50 -08:00
2023-06-09 11:28:18 +00:00
2024-02-28 13:55:50 -08:00
2023-06-09 11:28:18 +00:00
2022-09-20 14:09:20 -07:00
2024-02-28 13:55:50 -08:00
2023-06-09 11:28:18 +00:00
2024-02-28 13:55:50 -08:00
2023-06-09 11:28:18 +00:00
2023-03-14 17:01:13 +00:00
2023-06-09 11:28:18 +00:00
2023-11-07 10:26:23 -08:00
2024-02-28 13:55:50 -08:00
2024-01-23 09:35:22 +00:00
2023-03-17 10:09:49 -07:00
2024-02-21 10:39:35 +00:00
2024-01-23 09:35:22 +00:00
2023-06-09 11:28:18 +00:00