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
ee0a15d4
Unverified
Commit
ee0a15d4
authored
Sep 06, 2023
by
Polina Cherkasova
Committed by
GitHub
Sep 06, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MinimumTextContrastGuideline should dispose image. (#133861)
parent
195dca02
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
+5
-2
color_scheme_test.dart
packages/flutter/test/material/color_scheme_test.dart
+2
-1
accessibility.dart
packages/flutter_test/lib/src/accessibility.dart
+3
-1
No files found.
packages/flutter/test/material/color_scheme_test.dart
View file @
ee0a15d4
...
...
@@ -6,6 +6,7 @@ import 'dart:typed_data';
import
'package:flutter/material.dart'
;
import
'package:flutter_test/flutter_test.dart'
;
import
'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart'
;
import
'../image_data.dart'
;
...
...
@@ -443,7 +444,7 @@ void main() {
);
});
testWidgets
(
'generated scheme "on" colors meet a11y contrast guidelines'
,
(
WidgetTester
tester
)
async
{
testWidgets
WithLeakTracking
(
'generated scheme "on" colors meet a11y contrast guidelines'
,
(
WidgetTester
tester
)
async
{
final
ColorScheme
colors
=
ColorScheme
.
fromSeed
(
seedColor:
Colors
.
teal
);
Widget
label
(
String
text
,
Color
textColor
,
Color
background
)
{
...
...
packages/flutter_test/lib/src/accessibility.dart
View file @
ee0a15d4
...
...
@@ -329,7 +329,9 @@ class MinimumTextContrastGuideline extends AccessibilityGuideline {
// the last transform layer.
final
double
ratio
=
1
/
renderView
.
flutterView
.
devicePixelRatio
;
image
=
await
layer
.
toImage
(
renderView
.
paintBounds
,
pixelRatio:
ratio
);
return
image
.
toByteData
();
final
ByteData
?
data
=
await
image
.
toByteData
();
image
.
dispose
();
return
data
;
},
);
...
...
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