Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
5d9983a1
Unverified
Commit
5d9983a1
authored
Oct 10, 2023
by
Kostia Sokolovskyi
Committed by
GitHub
Oct 10, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
RenderAnnotatedRegion should dispose created layers. (#136086)
parent
eec3f060
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
12 deletions
+12
-12
proxy_box.dart
packages/flutter/lib/src/rendering/proxy_box.dart
+10
-0
date_picker_theme_test.dart
packages/flutter/test/material/date_picker_theme_test.dart
+2
-12
No files found.
packages/flutter/lib/src/rendering/proxy_box.dart
View file @
5d9983a1
...
@@ -4989,6 +4989,7 @@ class RenderAnnotatedRegion<T extends Object> extends RenderProxyBox {
...
@@ -4989,6 +4989,7 @@ class RenderAnnotatedRegion<T extends Object> extends RenderProxyBox {
RenderBox
?
child
,
RenderBox
?
child
,
})
:
_value
=
value
,
})
:
_value
=
value
,
_sized
=
sized
,
_sized
=
sized
,
_layerHandle
=
LayerHandle
<
AnnotatedRegionLayer
<
T
>>(),
super
(
child
);
super
(
child
);
/// A value which can be retrieved using [Layer.find].
/// A value which can be retrieved using [Layer.find].
...
@@ -5013,6 +5014,8 @@ class RenderAnnotatedRegion<T extends Object> extends RenderProxyBox {
...
@@ -5013,6 +5014,8 @@ class RenderAnnotatedRegion<T extends Object> extends RenderProxyBox {
markNeedsPaint
();
markNeedsPaint
();
}
}
final
LayerHandle
<
AnnotatedRegionLayer
<
T
>>
_layerHandle
;
@override
@override
final
bool
alwaysNeedsCompositing
=
true
;
final
bool
alwaysNeedsCompositing
=
true
;
...
@@ -5024,6 +5027,13 @@ class RenderAnnotatedRegion<T extends Object> extends RenderProxyBox {
...
@@ -5024,6 +5027,13 @@ class RenderAnnotatedRegion<T extends Object> extends RenderProxyBox {
size:
sized
?
size
:
null
,
size:
sized
?
size
:
null
,
offset:
sized
?
offset
:
null
,
offset:
sized
?
offset
:
null
,
);
);
_layerHandle
.
layer
=
layer
;
context
.
pushLayer
(
layer
,
super
.
paint
,
offset
);
context
.
pushLayer
(
layer
,
super
.
paint
,
offset
);
}
}
@override
void
dispose
()
{
_layerHandle
.
layer
=
null
;
super
.
dispose
();
}
}
}
packages/flutter/test/material/date_picker_theme_test.dart
View file @
5d9983a1
...
@@ -552,12 +552,7 @@ void main() {
...
@@ -552,12 +552,7 @@ void main() {
await
gesture
.
moveTo
(
tester
.
getCenter
(
find
.
text
(
'18'
)));
await
gesture
.
moveTo
(
tester
.
getCenter
(
find
.
text
(
'18'
)));
await
tester
.
pumpAndSettle
();
await
tester
.
pumpAndSettle
();
expect
(
inkFeatures
,
paints
..
circle
(
color:
datePickerTheme
.
rangeSelectionOverlayColor
?.
resolve
(<
MaterialState
>{})));
expect
(
inkFeatures
,
paints
..
circle
(
color:
datePickerTheme
.
rangeSelectionOverlayColor
?.
resolve
(<
MaterialState
>{})));
},
});
leakTrackingTestConfig:
const
LeakTrackingTestConfig
(
// TODO(ksokolovskyi): remove after fixing
// https://github.com/flutter/flutter/issues/136036
notDisposedAllowList:
<
String
,
int
?>
{
'AnnotatedRegionLayer<SystemUiOverlayStyle>'
:
2
},
));
testWidgetsWithLeakTracking
(
'Dividers use DatePickerThemeData.dividerColor'
,
(
WidgetTester
tester
)
async
{
testWidgetsWithLeakTracking
(
'Dividers use DatePickerThemeData.dividerColor'
,
(
WidgetTester
tester
)
async
{
Future
<
void
>
showPicker
(
WidgetTester
tester
,
Size
size
)
async
{
Future
<
void
>
showPicker
(
WidgetTester
tester
,
Size
size
)
async
{
...
@@ -902,10 +897,5 @@ void main() {
...
@@ -902,10 +897,5 @@ void main() {
..
circle
(
color:
rangeSelectionOverlayColor
.
resolve
(<
MaterialState
>{
MaterialState
.
pressed
})),
..
circle
(
color:
rangeSelectionOverlayColor
.
resolve
(<
MaterialState
>{
MaterialState
.
pressed
})),
);
);
}
}
},
});
leakTrackingTestConfig:
const
LeakTrackingTestConfig
(
// TODO(ksokolovskyi): remove after fixing
// https://github.com/flutter/flutter/issues/136036
notDisposedAllowList:
<
String
,
int
?>
{
'AnnotatedRegionLayer<SystemUiOverlayStyle>'
:
2
},
));
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment