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
d547103f
Commit
d547103f
authored
Aug 26, 2015
by
Collin Jackson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move ClipRRect logic from Card to Material (fixes rounded corners on top of date picker dialog)
parent
1a15cb2d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
9 deletions
+16
-9
card.dart
packages/flutter/lib/widgets/card.dart
+1
-5
material.dart
packages/flutter/lib/widgets/material.dart
+15
-4
No files found.
packages/flutter/lib/widgets/card.dart
View file @
d547103f
...
...
@@ -23,11 +23,7 @@ class Card extends Component {
color:
color
,
type:
MaterialType
.
card
,
level:
2
,
child:
new
ClipRRect
(
xRadius:
edges
[
MaterialType
.
card
],
yRadius:
edges
[
MaterialType
.
card
],
child:
child
)
child:
child
)
);
}
...
...
packages/flutter/lib/widgets/material.dart
View file @
d547103f
...
...
@@ -48,6 +48,20 @@ class Material extends Component {
}
Widget
build
()
{
Widget
contents
=
child
;
if
(
child
!=
null
)
{
contents
=
new
DefaultTextStyle
(
style:
Theme
.
of
(
this
).
text
.
body1
,
child:
contents
);
if
(
edges
[
type
]
!=
null
)
{
contents
=
new
ClipRRect
(
xRadius:
edges
[
type
],
yRadius:
edges
[
type
],
child:
contents
);
}
}
return
new
AnimatedContainer
(
behavior:
implicitlyAnimate
(
const
Duration
(
milliseconds:
200
)),
decoration:
new
BoxDecoration
(
...
...
@@ -56,10 +70,7 @@ class Material extends Component {
boxShadow:
level
==
0
?
null
:
shadows
[
level
],
shape:
type
==
MaterialType
.
circle
?
Shape
.
circle
:
Shape
.
rectangle
),
child:
child
==
null
?
null
:
new
DefaultTextStyle
(
style:
Theme
.
of
(
this
).
text
.
body1
,
child:
child
)
child:
contents
);
}
}
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