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
7fcaf093
Commit
7fcaf093
authored
Jun 15, 2016
by
Eric Seidel
Committed by
GitHub
Jun 15, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4573 from eseidelGoogle/switch
Fix the switch to match the Material Design spec.
parents
0d21e69b
3ee2f6f7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
switch.dart
packages/flutter/lib/src/material/switch.dart
+2
-2
No files found.
packages/flutter/lib/src/material/switch.dart
View file @
7fcaf093
...
...
@@ -158,7 +158,7 @@ class _SwitchRenderObjectWidget extends LeafRenderObjectWidget {
}
const
double
_kTrackHeight
=
14.0
;
const
double
_kTrackWidth
=
29
.0
;
const
double
_kTrackWidth
=
33
.0
;
const
double
_kTrackRadius
=
_kTrackHeight
/
2.0
;
const
double
_kThumbRadius
=
10.0
;
const
double
_kSwitchWidth
=
_kTrackWidth
-
2
*
_kTrackRadius
+
2
*
kRadialReactionRadius
;
...
...
@@ -355,7 +355,7 @@ class _RenderSwitch extends RenderToggleable {
}
// The thumb contracts slightly during the animation
double
inset
=
2
.0
-
(
currentPosition
-
0.5
).
abs
()
*
2.0
;
double
inset
=
1
.0
-
(
currentPosition
-
0.5
).
abs
()
*
2.0
;
double
radius
=
_kThumbRadius
-
inset
;
Rect
thumbRect
=
new
Rect
.
fromLTRB
(
thumbPosition
.
x
+
offset
.
dx
-
radius
,
thumbPosition
.
y
+
offset
.
dy
-
radius
,
...
...
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