File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4545 ` FTypography.extensions ` .
4646
4747
48+ ## 0.21.2
49+
50+ ### ` FSelectMenuTile `
51+ * Fix ` FSelectMenuTile ` rendering an extra border when a custom style is supplied inside a ` FTileGroup ` .
52+
53+
4854## 0.21.1
4955
5056### ` FHeader `
Original file line number Diff line number Diff line change @@ -579,12 +579,11 @@ class _FSelectMenuTileState<T> extends State<FSelectMenuTile<T>> with TickerProv
579579 final inheritedStyle = FTileGroupStyleData .maybeOf (context);
580580
581581 final global = context.theme.selectMenuTileStyle;
582- final selectMenuTileStyle = widget.style (global);
582+ final base = inheritedStyle == null ? global : global.copyWith (tileStyle: inheritedStyle.tileStyles.primary);
583+ final selectMenuTileStyle = widget.style (base );
583584
584585 final menuStyle = selectMenuTileStyle.menuStyle;
585- final tileStyle = widget.style == const .context ()
586- ? (inheritedStyle? .tileStyles.primary ?? global.tileStyle)
587- : selectMenuTileStyle.tileStyle;
586+ final tileStyle = selectMenuTileStyle.tileStyle;
588587
589588 return MultiValueFormField <T >(
590589 key: widget.formFieldKey,
Original file line number Diff line number Diff line change @@ -197,6 +197,44 @@ void main() {
197197 expect (find.text ('Item 2' ), findsOne);
198198 });
199199
200+ testWidgets ('.delta() style inside FTileGroup inherits group tile style' , (tester) async {
201+ // https://github.com/duobaseio/forui/issues/984
202+ // A no-op .delta() should yield the same inner tile style as .context()
203+ // when FSelectMenuTile is nested inside a FTileGroup.
204+ await tester.pumpWidget (
205+ TestScaffold .app (
206+ child: FTileGroup (
207+ label: const Text ('label' ),
208+ children: [
209+ FSelectMenuTile <int >(
210+ title: const Text ('title' ),
211+ menu: const [.tile (title: Text ('1' ), value: 1 )],
212+ ),
213+ ],
214+ ),
215+ ),
216+ );
217+ final contextStyle = tester.widget <FTile >(find.byType (FTile )).style;
218+
219+ await tester.pumpWidget (
220+ TestScaffold .app (
221+ child: FTileGroup (
222+ label: const Text ('label' ),
223+ children: [
224+ FSelectMenuTile <int >(
225+ title: const Text ('title' ),
226+ style: const .delta (),
227+ menu: const [.tile (title: Text ('1' ), value: 1 )],
228+ ),
229+ ],
230+ ),
231+ ),
232+ );
233+ final deltaStyle = tester.widget <FTile >(find.byType (FTile )).style;
234+
235+ expect (deltaStyle, contextStyle);
236+ });
237+
200238 testWidgets ('selecting item in menu closes it' , (tester) async {
201239 await tester.pumpWidget (
202240 TestScaffold .app (
You can’t perform that action at this time.
0 commit comments