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
baaa2e67
Commit
baaa2e67
authored
Mar 03, 2017
by
Luke
Committed by
Adam Barth
Mar 03, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adds highlightColor and splashColor to InkResponse and InkWell (#8551)
parent
0403ed46
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
4 deletions
+18
-4
ink_well.dart
packages/flutter/lib/src/material/ink_well.dart
+18
-4
No files found.
packages/flutter/lib/src/material/ink_well.dart
View file @
baaa2e67
...
@@ -41,6 +41,8 @@ class InkResponse extends StatefulWidget {
...
@@ -41,6 +41,8 @@ class InkResponse extends StatefulWidget {
this
.
containedInkWell
:
false
,
this
.
containedInkWell
:
false
,
this
.
highlightShape
:
BoxShape
.
circle
,
this
.
highlightShape
:
BoxShape
.
circle
,
this
.
radius
,
this
.
radius
,
this
.
highlightColor
,
this
.
splashColor
,
})
:
super
(
key:
key
);
})
:
super
(
key:
key
);
/// The widget below this widget in the tree.
/// The widget below this widget in the tree.
...
@@ -71,6 +73,14 @@ class InkResponse extends StatefulWidget {
...
@@ -71,6 +73,14 @@ class InkResponse extends StatefulWidget {
/// The radius of the ink splash.
/// The radius of the ink splash.
final
double
radius
;
final
double
radius
;
/// The highlight color of the ink response. If this property is null then the
/// highlight color of the theme will be used.
final
Color
highlightColor
;
/// The splash color of the ink response. If this property is null then the
/// splash color of the theme will be used.
final
Color
splashColor
;
/// The rectangle to use for the highlight effect and for clipping
/// The rectangle to use for the highlight effect and for clipping
/// the splash effects if [containedInkWell] is true.
/// the splash effects if [containedInkWell] is true.
///
///
...
@@ -116,7 +126,7 @@ class _InkResponseState<T extends InkResponse> extends State<T> {
...
@@ -116,7 +126,7 @@ class _InkResponseState<T extends InkResponse> extends State<T> {
_lastHighlight
=
new
InkHighlight
(
_lastHighlight
=
new
InkHighlight
(
controller:
Material
.
of
(
context
),
controller:
Material
.
of
(
context
),
referenceBox:
referenceBox
,
referenceBox:
referenceBox
,
color:
Theme
.
of
(
context
).
highlightColor
,
color:
config
.
highlightColor
??
Theme
.
of
(
context
).
highlightColor
,
shape:
config
.
highlightShape
,
shape:
config
.
highlightShape
,
rectCallback:
config
.
getRectCallback
(
referenceBox
),
rectCallback:
config
.
getRectCallback
(
referenceBox
),
onRemoved:
()
{
onRemoved:
()
{
...
@@ -143,7 +153,7 @@ class _InkResponseState<T extends InkResponse> extends State<T> {
...
@@ -143,7 +153,7 @@ class _InkResponseState<T extends InkResponse> extends State<T> {
controller:
Material
.
of
(
context
),
controller:
Material
.
of
(
context
),
referenceBox:
referenceBox
,
referenceBox:
referenceBox
,
position:
referenceBox
.
globalToLocal
(
details
.
globalPosition
),
position:
referenceBox
.
globalToLocal
(
details
.
globalPosition
),
color:
Theme
.
of
(
context
).
splashColor
,
color:
config
.
splashColor
??
Theme
.
of
(
context
).
splashColor
,
containedInkWell:
config
.
containedInkWell
,
containedInkWell:
config
.
containedInkWell
,
rectCallback:
config
.
containedInkWell
?
rectCallback
:
null
,
rectCallback:
config
.
containedInkWell
?
rectCallback
:
null
,
radius:
config
.
radius
,
radius:
config
.
radius
,
...
@@ -241,7 +251,9 @@ class InkWell extends InkResponse {
...
@@ -241,7 +251,9 @@ class InkWell extends InkResponse {
GestureTapCallback
onTap
,
GestureTapCallback
onTap
,
GestureTapCallback
onDoubleTap
,
GestureTapCallback
onDoubleTap
,
GestureLongPressCallback
onLongPress
,
GestureLongPressCallback
onLongPress
,
ValueChanged
<
bool
>
onHighlightChanged
ValueChanged
<
bool
>
onHighlightChanged
,
Color
highlightColor
,
Color
splashColor
,
})
:
super
(
})
:
super
(
key:
key
,
key:
key
,
child:
child
,
child:
child
,
...
@@ -250,6 +262,8 @@ class InkWell extends InkResponse {
...
@@ -250,6 +262,8 @@ class InkWell extends InkResponse {
onLongPress:
onLongPress
,
onLongPress:
onLongPress
,
onHighlightChanged:
onHighlightChanged
,
onHighlightChanged:
onHighlightChanged
,
containedInkWell:
true
,
containedInkWell:
true
,
highlightShape:
BoxShape
.
rectangle
highlightShape:
BoxShape
.
rectangle
,
highlightColor:
highlightColor
,
splashColor:
splashColor
,
);
);
}
}
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