Byeongjin Kang
6fdcb0a511
feat: Add alignmentOffset to DropdownMenu ( #151731 )
...
Changes:
- Introduced `alignmentOffset` property to `DropdownMenu` to allow adjustment of menu alignment.
- Updated the `MenuAnchor` widget to utilize the new `alignmentOffset` property.
- Default value for `alignmentOffset` is `Offset.zero`, meaning no additional spacing by default.
Motivation:
- This PR closes #151524
- @nate-thegrate, please let me know if I need to make changes in order for this PR to be merged
The motivation behind this change is to provide developers with more control over the spacing between the `MenuAnchor` and `dropdownMenuEntries` in the `DropdownMenu` widget. This enhancement allows for better alignment and customization of the dropdown menu appearance.
| before | after |
| :---: | :---: |
| <img width="372" alt="Screenshot 2024-07-14 at 8 03 14â¯PM" src="https://github.com/user-attachments/assets/4a45b843-7fa4-44fd-843c-c7209c6f57ae "> | <img width="364" alt="Screenshot 2024-07-14 at 8 03 27â¯PM" src="https://github.com/user-attachments/assets/12e8b857-aefb-4aaf-a310-4a002abcbc2f "> |
Initially, it was suggested to use a `SizedBox` to introduce spacing. However, upon further examination of the source code, it was discovered that the `DropdownMenuEntries` are rendered on the screen via an `OverlayPortal`. This necessitated leveraging the existing `alignmentOffset` property within the `MenuAnchor` for a more seamless and effective alignment adjustment.
2024-07-24 21:17:06 +00:00
..
2024-04-09 19:35:07 +00:00
2024-06-13 19:28:21 +00:00
2023-12-15 14:13:31 -08:00
2023-12-15 14:13:31 -08:00
2023-12-15 14:13:31 -08:00
2024-04-09 19:35:07 +00:00
2024-01-31 16:13:17 +00:00
2023-12-15 14:13:31 -08:00
2024-01-31 16:13:17 +00:00
2023-12-15 14:13:31 -08:00
2024-07-01 17:06:54 +00:00
2024-01-24 16:49:18 +00:00
2024-07-08 21:01:56 +00:00
2024-04-25 10:32:45 -07:00
2024-04-25 10:32:45 -07:00
2024-05-28 16:35:29 -07:00
2024-05-28 16:35:29 -07:00
2024-07-01 23:36:32 +00:00
2024-02-28 13:55:50 -08:00
2024-06-21 14:48:41 -07:00
2024-03-19 17:58:13 +00:00
2024-05-29 18:46:04 +00:00
2024-02-28 13:55:50 -08:00
2024-01-19 18:29:07 +00:00
2023-12-15 14:13:31 -08:00
2024-03-19 17:58:13 +00:00
2023-12-15 14:13:31 -08:00
2024-06-12 20:05:10 +00:00
2024-06-12 20:05:10 +00:00
2024-05-09 16:31:54 -06:00
2024-07-22 09:53:40 -07:00
2024-07-17 14:06:13 +00:00
2024-07-08 21:01:56 +00:00
2024-05-10 23:37:05 +00:00
2024-06-13 19:28:21 +00:00
2024-05-10 23:37:05 +00:00
2024-06-13 19:28:21 +00:00
2024-06-20 06:44:11 -07:00
2024-06-14 00:07:48 +00:00
2024-04-01 09:42:51 +00:00
2024-05-28 16:35:29 -07:00
2024-07-08 21:01:56 +00:00
2024-05-30 17:53:03 +00:00
2024-06-12 20:05:10 +00:00
2023-12-15 14:13:31 -08:00
2023-12-15 14:13:31 -08:00
2023-12-15 14:13:31 -08:00
2024-07-09 19:55:47 +00:00
2024-05-10 22:08:59 +00:00
2023-12-15 14:13:31 -08:00
2023-12-15 14:13:31 -08:00
2024-07-08 21:01:56 +00:00
2024-06-12 20:05:10 +00:00
2024-05-15 18:37:07 +00:00
2024-04-08 20:47:13 +00:00
2024-07-24 21:17:06 +00:00
2024-02-28 13:55:50 -08:00
2024-06-27 10:52:48 -07:00
2024-06-12 20:05:10 +00:00
2024-02-28 13:55:50 -08:00
2024-06-12 20:05:10 +00:00
2024-06-12 20:05:10 +00:00
2024-07-17 14:06:13 +00:00
2024-01-22 11:13:31 +00:00
2024-06-12 20:05:10 +00:00
2024-02-28 13:55:50 -08:00
2024-06-13 19:28:21 +00:00
2023-12-15 14:13:31 -08:00
2023-12-15 14:13:31 -08:00
2024-01-24 16:13:26 +00:00
2023-12-15 14:13:31 -08:00
2024-06-12 20:05:10 +00:00
2024-03-19 17:58:13 +00:00
2023-12-15 14:13:31 -08:00
2023-12-15 14:13:31 -08:00
2024-06-12 20:05:10 +00:00
2024-04-24 11:56:32 +00:00
2023-12-15 14:13:31 -08:00
2024-07-15 07:09:09 +00:00
2024-04-09 19:35:07 +00:00
2024-02-07 02:44:21 +00:00
2024-04-09 19:35:07 +00:00
2024-06-12 20:05:10 +00:00
2024-06-13 19:28:21 +00:00
2024-07-08 21:01:56 +00:00
2024-07-17 21:48:29 +00:00
2024-06-12 20:05:10 +00:00
2024-03-19 17:58:16 +00:00
2024-02-21 08:59:24 +00:00
2024-04-03 15:49:38 -07:00
2024-06-12 20:05:10 +00:00
2023-12-15 14:13:31 -08:00
2024-03-19 17:58:13 +00:00
2023-12-15 14:13:31 -08:00
2024-07-11 19:25:18 +00:00
2023-12-20 22:05:29 +00:00
2024-07-11 19:25:18 +00:00
2023-12-20 22:05:29 +00:00
2024-03-11 23:04:57 +00:00
2024-06-12 20:05:10 +00:00
2024-03-19 17:58:13 +00:00
2024-06-12 20:05:10 +00:00
2024-03-19 17:58:13 +00:00
2024-06-12 20:05:10 +00:00
2024-05-28 16:35:29 -07:00
2024-06-12 20:05:10 +00:00
2024-02-28 13:55:50 -08:00
2024-05-28 16:35:29 -07:00
2024-03-13 18:07:59 +00:00
2024-05-28 16:35:29 -07:00
2024-05-28 16:35:29 -07:00
2023-12-15 14:13:31 -08:00
2024-07-16 20:27:11 +00:00
2024-06-20 19:18:21 +00:00
2024-03-27 16:43:10 -07:00
2024-05-20 17:43:03 +00:00
2024-07-17 14:06:13 +00:00
2024-07-19 21:01:10 +00:00
2024-03-19 17:58:13 +00:00
2024-05-28 16:35:29 -07:00
2024-06-12 20:05:10 +00:00
2024-01-05 21:28:07 +00:00
2024-06-12 20:05:10 +00:00
2024-06-17 19:53:04 +00:00
2023-12-15 14:13:31 -08:00
2024-03-13 16:31:50 +00:00
2024-03-19 17:58:13 +00:00
2024-05-29 00:20:18 +00:00
2024-03-19 17:58:13 +00:00
2024-07-08 21:01:56 +00:00
2024-01-17 22:49:04 +00:00
2024-06-12 20:05:10 +00:00
2024-04-24 11:56:32 +00:00
2024-04-24 09:06:17 -07:00
2024-07-15 07:09:09 +00:00
2024-07-15 07:09:09 +00:00
2024-07-01 23:36:32 +00:00
2023-12-15 14:13:31 -08:00
2023-12-15 14:13:31 -08:00
2024-04-15 16:06:07 +00:00
2024-03-28 01:20:55 +00:00
2024-07-17 14:06:13 +00:00
2024-07-16 20:25:09 +00:00
2024-07-16 20:25:09 +00:00
2024-05-07 20:54:09 +00:00
2023-12-15 14:13:31 -08:00
2023-12-15 14:13:31 -08:00
2024-07-12 09:37:29 +00:00
2024-04-17 07:59:07 +00:00
2024-06-12 20:05:10 +00:00
2024-02-28 13:55:50 -08:00
2023-12-15 14:13:31 -08:00
2023-12-15 14:13:31 -08:00
2023-12-15 14:13:31 -08:00
2023-12-15 14:13:31 -08:00
2024-07-08 21:01:56 +00:00
2023-12-15 14:13:31 -08:00
2024-06-18 17:52:21 +00:00
2023-12-15 14:13:31 -08:00
2023-12-15 14:13:31 -08:00
2024-03-01 06:40:47 +00:00
2023-12-15 14:13:31 -08:00
2024-06-17 19:53:04 +00:00
2023-12-15 14:13:31 -08:00
2024-02-28 13:55:50 -08:00
2024-07-08 21:01:56 +00:00
2024-03-19 17:58:13 +00:00
2024-07-11 16:51:35 +00:00
2024-06-12 20:05:10 +00:00
2023-12-15 14:13:31 -08:00
2024-05-18 10:41:56 -07:00
2024-02-23 19:02:22 +00:00
2023-12-15 14:13:31 -08:00
2024-03-28 01:20:55 +00:00
2024-06-12 20:05:10 +00:00
2024-02-21 00:34:11 +00:00
2023-12-15 14:13:31 -08:00