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
606abc91
Unverified
Commit
606abc91
authored
Aug 19, 2020
by
Masayuki Ono (mono)
Committed by
GitHub
Aug 19, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix title color of license detail page (#63249)
parent
430e3cf0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
114 additions
and
1 deletion
+114
-1
about.dart
packages/flutter/lib/src/material/about.dart
+5
-1
about_test.dart
packages/flutter/test/material/about_test.dart
+109
-0
No files found.
packages/flutter/lib/src/material/about.dart
View file @
606abc91
...
...
@@ -917,7 +917,11 @@ class _PackageLicensePageState extends State<_PackageLicensePage> {
if
(
widget
.
scrollController
==
null
)
{
page
=
Scaffold
(
appBar:
AppBar
(
title:
_PackageLicensePageTitle
(
title
,
subtitle
,
theme
.
primaryTextTheme
),
title:
_PackageLicensePageTitle
(
title
,
subtitle
,
theme
.
appBarTheme
.
textTheme
??
theme
.
primaryTextTheme
,
),
),
body:
Center
(
child:
Material
(
...
...
packages/flutter/test/material/about_test.dart
View file @
606abc91
...
...
@@ -234,6 +234,115 @@ void main() {
expect
(
find
.
text
(
'Another license'
),
findsOneWidget
);
},
skip:
isBrowser
);
// https://github.com/flutter/flutter/issues/54385
testWidgets
(
'_PackageLicensePage title style without AppBarTheme'
,
(
WidgetTester
tester
,
)
async
{
LicenseRegistry
.
addLicense
(()
{
return
Stream
<
LicenseEntry
>.
fromIterable
(<
LicenseEntry
>[
const
LicenseEntryWithLineBreaks
(<
String
>[
'AAA'
],
'BBB'
),
]);
});
const
TextStyle
titleTextStyle
=
TextStyle
(
fontSize:
20
,
color:
Colors
.
black
,
inherit:
false
,
);
const
TextStyle
subtitleTextStyle
=
TextStyle
(
fontSize:
15
,
color:
Colors
.
red
,
inherit:
false
,
);
await
tester
.
pumpWidget
(
MaterialApp
(
theme:
ThemeData
(
primaryTextTheme:
const
TextTheme
(
headline6:
titleTextStyle
,
subtitle2:
subtitleTextStyle
,
),
),
home:
const
Center
(
child:
LicensePage
(),
),
),
);
await
tester
.
pumpAndSettle
();
// Check for packages.
expect
(
find
.
text
(
'AAA'
),
findsOneWidget
);
// Check license is displayed after entering into license page for 'AAA'.
await
tester
.
tap
(
find
.
text
(
'AAA'
));
await
tester
.
pumpAndSettle
(
const
Duration
(
milliseconds:
100
));
// Check for titles style.
final
Text
title
=
tester
.
widget
(
find
.
text
(
'AAA'
));
expect
(
title
.
style
,
titleTextStyle
);
final
Text
subtitle
=
tester
.
widget
(
find
.
text
(
'1 license.'
));
expect
(
subtitle
.
style
,
subtitleTextStyle
);
},
skip:
isBrowser
);
// https://github.com/flutter/flutter/issues/54385
testWidgets
(
'_PackageLicensePage title style with AppBarTheme'
,
(
WidgetTester
tester
,
)
async
{
LicenseRegistry
.
addLicense
(()
{
return
Stream
<
LicenseEntry
>.
fromIterable
(<
LicenseEntry
>[
const
LicenseEntryWithLineBreaks
(<
String
>[
'AAA'
],
'BBB'
),
]);
});
const
TextStyle
titleTextStyle
=
TextStyle
(
fontSize:
20
,
color:
Colors
.
black
,
);
const
TextStyle
subtitleTextStyle
=
TextStyle
(
fontSize:
15
,
color:
Colors
.
red
,
);
await
tester
.
pumpWidget
(
MaterialApp
(
theme:
ThemeData
(
// Not used because appBarTheme is prioritized.
primaryTextTheme:
const
TextTheme
(
headline6:
TextStyle
(
fontSize:
12
,
color:
Colors
.
grey
,
),
subtitle2:
TextStyle
(
fontSize:
10
,
color:
Colors
.
grey
,
),
),
appBarTheme:
const
AppBarTheme
(
textTheme:
TextTheme
(
headline6:
titleTextStyle
,
subtitle2:
subtitleTextStyle
,
),
),
),
home:
const
Center
(
child:
LicensePage
(),
),
),
);
await
tester
.
pumpAndSettle
();
// Check for packages.
expect
(
find
.
text
(
'AAA'
),
findsOneWidget
);
// Check license is displayed after entering into license page for 'AAA'.
await
tester
.
tap
(
find
.
text
(
'AAA'
));
await
tester
.
pumpAndSettle
(
const
Duration
(
milliseconds:
100
));
// Check for titles style.
final
Text
title
=
tester
.
widget
(
find
.
text
(
'AAA'
));
expect
(
title
.
style
,
titleTextStyle
);
final
Text
subtitle
=
tester
.
widget
(
find
.
text
(
'1 license.'
));
expect
(
subtitle
.
style
,
subtitleTextStyle
);
},
skip:
isBrowser
);
// https://github.com/flutter/flutter/issues/54385
testWidgets
(
'LicensePage respects the notch'
,
(
WidgetTester
tester
)
async
{
const
double
safeareaPadding
=
27.0
;
...
...
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