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
df78ec2b
Commit
df78ec2b
authored
Jan 15, 2016
by
Hixie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix framework to match new mojo sdk
The dart bindings changed semantics in a non-compatible way.
parent
b55dfd60
Changes
15
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
33 additions
and
32 deletions
+33
-32
measurement.dart
examples/fitness/lib/measurement.dart
+1
-1
settings.dart
examples/fitness/lib/settings.dart
+1
-1
main.dart
examples/mine_digger/lib/main.dart
+1
-1
hello_world.dart
examples/raw/hello_world.dart
+2
-2
spinning_image.dart
examples/raw/spinning_image.dart
+1
-1
interactive_flex.dart
examples/rendering/interactive_flex.dart
+1
-1
converter.dart
packages/flutter/lib/src/gestures/converter.dart
+9
-9
date_picker.dart
packages/flutter/lib/src/material/date_picker.dart
+3
-3
input.dart
packages/flutter/lib/src/material/input.dart
+1
-1
time_picker.dart
packages/flutter/lib/src/material/time_picker.dart
+1
-1
shell.dart
packages/flutter/lib/src/services/shell.dart
+3
-3
drag_target.dart
packages/flutter/lib/src/widgets/drag_target.dart
+1
-1
pubspec.yaml
packages/flutter/pubspec.yaml
+2
-2
mock_services.dart
packages/flutter/test/services/mock_services.dart
+5
-4
input_test.dart
packages/flutter/test/widget/input_test.dart
+1
-1
No files found.
examples/fitness/lib/measurement.dart
View file @
df78ec2b
...
@@ -142,7 +142,7 @@ class MeasurementFragmentState extends State<MeasurementFragment> {
...
@@ -142,7 +142,7 @@ class MeasurementFragmentState extends State<MeasurementFragment> {
new
Input
(
new
Input
(
key:
weightKey
,
key:
weightKey
,
placeholder:
'Enter weight'
,
placeholder:
'Enter weight'
,
keyboardType:
KeyboardType
.
NUMBER
,
keyboardType:
KeyboardType
.
number
,
onChanged:
_handleWeightChanged
onChanged:
_handleWeightChanged
),
),
],
],
...
...
examples/fitness/lib/settings.dart
View file @
df78ec2b
...
@@ -63,7 +63,7 @@ class SettingsFragmentState extends State<SettingsFragment> {
...
@@ -63,7 +63,7 @@ class SettingsFragmentState extends State<SettingsFragment> {
content:
new
Input
(
content:
new
Input
(
key:
weightGoalKey
,
key:
weightGoalKey
,
placeholder:
'Goal weight in lbs'
,
placeholder:
'Goal weight in lbs'
,
keyboardType:
KeyboardType
.
NUMBER
,
keyboardType:
KeyboardType
.
number
,
onChanged:
_handleGoalWeightChanged
onChanged:
_handleGoalWeightChanged
),
),
actions:
<
Widget
>[
actions:
<
Widget
>[
...
...
examples/mine_digger/lib/main.dart
View file @
df78ec2b
...
@@ -113,7 +113,7 @@ class MineDiggerState extends State<MineDigger> {
...
@@ -113,7 +113,7 @@ class MineDiggerState extends State<MineDigger> {
probe
(
ix
,
iy
);
probe
(
ix
,
iy
);
},
},
onLongPress:
()
{
onLongPress:
()
{
userFeedback
.
performHapticFeedback
(
HapticFeedbackType
.
LONG_PRESS
);
userFeedback
.
performHapticFeedback
(
HapticFeedbackType
.
longPress
);
flag
(
ix
,
iy
);
flag
(
ix
,
iy
);
},
},
child:
new
Listener
(
child:
new
Listener
(
...
...
examples/raw/hello_world.dart
View file @
df78ec2b
...
@@ -57,10 +57,10 @@ void handlePointerPacket(ByteData serializedPacket) {
...
@@ -57,10 +57,10 @@ void handlePointerPacket(ByteData serializedPacket) {
PointerPacket
packet
=
PointerPacket
.
deserialize
(
message
);
PointerPacket
packet
=
PointerPacket
.
deserialize
(
message
);
for
(
Pointer
pointer
in
packet
.
pointers
)
{
for
(
Pointer
pointer
in
packet
.
pointers
)
{
if
(
pointer
.
type
==
PointerType
.
DOWN
)
{
if
(
pointer
.
type
==
PointerType
.
down
)
{
color
=
new
ui
.
Color
.
fromARGB
(
255
,
0
,
0
,
255
);
color
=
new
ui
.
Color
.
fromARGB
(
255
,
0
,
0
,
255
);
ui
.
window
.
scheduleFrame
();
ui
.
window
.
scheduleFrame
();
}
else
if
(
pointer
.
type
==
PointerType
.
UP
)
{
}
else
if
(
pointer
.
type
==
PointerType
.
up
)
{
color
=
new
ui
.
Color
.
fromARGB
(
255
,
0
,
255
,
0
);
color
=
new
ui
.
Color
.
fromARGB
(
255
,
0
,
255
,
0
);
ui
.
window
.
scheduleFrame
();
ui
.
window
.
scheduleFrame
();
}
}
...
...
examples/raw/spinning_image.dart
View file @
df78ec2b
...
@@ -88,7 +88,7 @@ void handlePointerPacket(ByteData serializedPacket) {
...
@@ -88,7 +88,7 @@ void handlePointerPacket(ByteData serializedPacket) {
PointerPacket
packet
=
PointerPacket
.
deserialize
(
message
);
PointerPacket
packet
=
PointerPacket
.
deserialize
(
message
);
for
(
Pointer
pointer
in
packet
.
pointers
)
{
for
(
Pointer
pointer
in
packet
.
pointers
)
{
if
(
pointer
.
type
==
PointerType
.
UP
)
{
if
(
pointer
.
type
==
PointerType
.
up
)
{
imageCache
.
load
(
url2
).
first
.
then
(
handleImageLoad
);
imageCache
.
load
(
url2
).
first
.
then
(
handleImageLoad
);
}
}
}
}
...
...
examples/rendering/interactive_flex.dart
View file @
df78ec2b
...
@@ -60,7 +60,7 @@ class DemoBinding extends BindingBase with Scheduler, Renderer {
...
@@ -60,7 +60,7 @@ class DemoBinding extends BindingBase with Scheduler, Renderer {
);
);
PointerPacket
packet
=
PointerPacket
.
deserialize
(
message
);
PointerPacket
packet
=
PointerPacket
.
deserialize
(
message
);
for
(
Pointer
pointer
in
packet
.
pointers
)
{
for
(
Pointer
pointer
in
packet
.
pointers
)
{
if
(
pointer
.
type
==
PointerType
.
MOVE
)
if
(
pointer
.
type
==
PointerType
.
move
)
image
.
growth
=
math
.
max
(
0.0
,
image
.
growth
+
pointer
.
x
-
touches
[
pointer
.
pointer
].
x
);
image
.
growth
=
math
.
max
(
0.0
,
image
.
growth
+
pointer
.
x
-
touches
[
pointer
.
pointer
].
x
);
touches
[
pointer
.
pointer
]
=
new
Touch
(
pointer
.
x
,
pointer
.
y
);
touches
[
pointer
.
pointer
]
=
new
Touch
(
pointer
.
x
,
pointer
.
y
);
}
}
...
...
packages/flutter/lib/src/gestures/converter.dart
View file @
df78ec2b
...
@@ -42,7 +42,7 @@ class PointerEventConverter {
...
@@ -42,7 +42,7 @@ class PointerEventConverter {
assert
(
_pointerKindMap
.
containsKey
(
datum
.
kind
));
assert
(
_pointerKindMap
.
containsKey
(
datum
.
kind
));
PointerDeviceKind
kind
=
_pointerKindMap
[
datum
.
kind
];
PointerDeviceKind
kind
=
_pointerKindMap
[
datum
.
kind
];
switch
(
datum
.
type
)
{
switch
(
datum
.
type
)
{
case
PointerType
.
DOWN
:
case
PointerType
.
down
:
assert
(!
_pointers
.
containsKey
(
datum
.
pointer
));
assert
(!
_pointers
.
containsKey
(
datum
.
pointer
));
_PointerState
state
=
_pointers
.
putIfAbsent
(
_PointerState
state
=
_pointers
.
putIfAbsent
(
datum
.
pointer
,
datum
.
pointer
,
...
@@ -84,7 +84,7 @@ class PointerEventConverter {
...
@@ -84,7 +84,7 @@ class PointerEventConverter {
tilt:
datum
.
tilt
tilt:
datum
.
tilt
);
);
break
;
break
;
case
PointerType
.
MOVE
:
case
PointerType
.
move
:
// If the service starts supporting hover pointers, then it must also
// If the service starts supporting hover pointers, then it must also
// start sending us ADDED and REMOVED data points.
// start sending us ADDED and REMOVED data points.
// See also: https://github.com/flutter/flutter/issues/720
// See also: https://github.com/flutter/flutter/issues/720
...
@@ -114,14 +114,14 @@ class PointerEventConverter {
...
@@ -114,14 +114,14 @@ class PointerEventConverter {
tilt:
datum
.
tilt
tilt:
datum
.
tilt
);
);
break
;
break
;
case
PointerType
.
UP
:
case
PointerType
.
up
:
case
PointerType
.
CANCEL
:
case
PointerType
.
cancel
:
assert
(
_pointers
.
containsKey
(
datum
.
pointer
));
assert
(
_pointers
.
containsKey
(
datum
.
pointer
));
_PointerState
state
=
_pointers
[
datum
.
pointer
];
_PointerState
state
=
_pointers
[
datum
.
pointer
];
assert
(
state
.
down
);
assert
(
state
.
down
);
assert
(
position
==
state
.
lastPosition
);
assert
(
position
==
state
.
lastPosition
);
state
.
setUp
();
state
.
setUp
();
if
(
datum
.
type
==
PointerType
.
UP
)
{
if
(
datum
.
type
==
PointerType
.
up
)
{
yield
new
PointerUpEvent
(
yield
new
PointerUpEvent
(
timeStamp:
timeStamp
,
timeStamp:
timeStamp
,
pointer:
state
.
pointer
,
pointer:
state
.
pointer
,
...
@@ -175,9 +175,9 @@ class PointerEventConverter {
...
@@ -175,9 +175,9 @@ class PointerEventConverter {
}
}
static
const
Map
<
PointerKind
,
PointerDeviceKind
>
_pointerKindMap
=
const
<
PointerKind
,
PointerDeviceKind
>{
static
const
Map
<
PointerKind
,
PointerDeviceKind
>
_pointerKindMap
=
const
<
PointerKind
,
PointerDeviceKind
>{
PointerKind
.
TOUCH
:
PointerDeviceKind
.
touch
,
PointerKind
.
touch
:
PointerDeviceKind
.
touch
,
PointerKind
.
MOUSE
:
PointerDeviceKind
.
mouse
,
PointerKind
.
mouse
:
PointerDeviceKind
.
mouse
,
PointerKind
.
STYLUS
:
PointerDeviceKind
.
stylus
,
PointerKind
.
stylus
:
PointerDeviceKind
.
stylus
,
PointerKind
.
INVERTED_STYLUS
:
PointerDeviceKind
.
invertedStylus
,
PointerKind
.
invertedStylus
:
PointerDeviceKind
.
invertedStylus
,
};
};
}
}
packages/flutter/lib/src/material/date_picker.dart
View file @
df78ec2b
...
@@ -40,14 +40,14 @@ class _DatePickerState extends State<DatePicker> {
...
@@ -40,14 +40,14 @@ class _DatePickerState extends State<DatePicker> {
_DatePickerMode
_mode
=
_DatePickerMode
.
day
;
_DatePickerMode
_mode
=
_DatePickerMode
.
day
;
void
_handleModeChanged
(
_DatePickerMode
mode
)
{
void
_handleModeChanged
(
_DatePickerMode
mode
)
{
userFeedback
.
performHapticFeedback
(
HapticFeedbackType
.
VIRTUAL_KEY
);
userFeedback
.
performHapticFeedback
(
HapticFeedbackType
.
virtualKey
);
setState
(()
{
setState
(()
{
_mode
=
mode
;
_mode
=
mode
;
});
});
}
}
void
_handleYearChanged
(
DateTime
dateTime
)
{
void
_handleYearChanged
(
DateTime
dateTime
)
{
userFeedback
.
performHapticFeedback
(
HapticFeedbackType
.
VIRTUAL_KEY
);
userFeedback
.
performHapticFeedback
(
HapticFeedbackType
.
virtualKey
);
setState
(()
{
setState
(()
{
_mode
=
_DatePickerMode
.
day
;
_mode
=
_DatePickerMode
.
day
;
});
});
...
@@ -56,7 +56,7 @@ class _DatePickerState extends State<DatePicker> {
...
@@ -56,7 +56,7 @@ class _DatePickerState extends State<DatePicker> {
}
}
void
_handleDayChanged
(
DateTime
dateTime
)
{
void
_handleDayChanged
(
DateTime
dateTime
)
{
userFeedback
.
performHapticFeedback
(
HapticFeedbackType
.
VIRTUAL_KEY
);
userFeedback
.
performHapticFeedback
(
HapticFeedbackType
.
virtualKey
);
if
(
config
.
onChanged
!=
null
)
if
(
config
.
onChanged
!=
null
)
config
.
onChanged
(
dateTime
);
config
.
onChanged
(
dateTime
);
}
}
...
...
packages/flutter/lib/src/material/input.dart
View file @
df78ec2b
...
@@ -21,7 +21,7 @@ class Input extends Scrollable {
...
@@ -21,7 +21,7 @@ class Input extends Scrollable {
this
.
hideText
:
false
,
this
.
hideText
:
false
,
this
.
isDense
:
false
,
this
.
isDense
:
false
,
this
.
onChanged
,
this
.
onChanged
,
this
.
keyboardType
:
KeyboardType
.
TEXT
,
this
.
keyboardType
:
KeyboardType
.
text
,
this
.
onSubmitted
this
.
onSubmitted
})
:
super
(
})
:
super
(
key:
key
,
key:
key
,
...
...
packages/flutter/lib/src/material/time_picker.dart
View file @
df78ec2b
...
@@ -110,7 +110,7 @@ class _TimePickerState extends State<TimePicker> {
...
@@ -110,7 +110,7 @@ class _TimePickerState extends State<TimePicker> {
_TimePickerMode
_mode
=
_TimePickerMode
.
hour
;
_TimePickerMode
_mode
=
_TimePickerMode
.
hour
;
void
_handleModeChanged
(
_TimePickerMode
mode
)
{
void
_handleModeChanged
(
_TimePickerMode
mode
)
{
userFeedback
.
performHapticFeedback
(
HapticFeedbackType
.
VIRTUAL_KEY
);
userFeedback
.
performHapticFeedback
(
HapticFeedbackType
.
virtualKey
);
setState
(()
{
setState
(()
{
_mode
=
mode
;
_mode
=
mode
;
});
});
...
...
packages/flutter/lib/src/services/shell.dart
View file @
df78ec2b
...
@@ -62,13 +62,13 @@ class _Shell {
...
@@ -62,13 +62,13 @@ class _Shell {
ServiceProviderProxy
services
=
new
ServiceProviderProxy
.
unbound
();
ServiceProviderProxy
services
=
new
ServiceProviderProxy
.
unbound
();
_shell
.
connectToApplication
(
url
,
services
,
null
);
_shell
.
connectToApplication
(
url
,
services
,
null
);
var
pipe
=
new
core
.
MojoMessagePipe
();
core
.
MojoMessagePipe
pipe
=
new
core
.
MojoMessagePipe
();
proxy
.
impl
.
bind
(
pipe
.
endpoints
[
0
]);
proxy
.
impl
.
bind
(
pipe
.
endpoints
[
0
]);
services
.
ptr
.
connectToService
(
proxy
.
n
ame
,
pipe
.
endpoints
[
1
]);
services
.
ptr
.
connectToService
(
proxy
.
serviceN
ame
,
pipe
.
endpoints
[
1
]);
services
.
close
();
services
.
close
();
}
}
void
connectToService
(
String
url
,
Object
proxy
)
{
void
connectToService
(
String
url
,
bindings
.
ProxyBase
proxy
)
{
if
(
overrideConnectToService
!=
null
&&
overrideConnectToService
(
url
,
proxy
))
if
(
overrideConnectToService
!=
null
&&
overrideConnectToService
(
url
,
proxy
))
return
;
return
;
_connectToService
(
url
,
proxy
);
_connectToService
(
url
,
proxy
);
...
...
packages/flutter/lib/src/widgets/drag_target.dart
View file @
df78ec2b
...
@@ -126,7 +126,7 @@ class LongPressDraggable<T> extends DraggableBase<T> {
...
@@ -126,7 +126,7 @@ class LongPressDraggable<T> extends DraggableBase<T> {
gestureArena:
Gesturer
.
instance
.
gestureArena
,
gestureArena:
Gesturer
.
instance
.
gestureArena
,
longTapDelay:
kLongPressTimeout
,
longTapDelay:
kLongPressTimeout
,
onLongTapDown:
(
Point
position
,
int
pointer
)
{
onLongTapDown:
(
Point
position
,
int
pointer
)
{
userFeedback
.
performHapticFeedback
(
HapticFeedbackType
.
VIRTUAL_KEY
);
userFeedback
.
performHapticFeedback
(
HapticFeedbackType
.
virtualKey
);
starter
(
position
,
pointer
);
starter
(
position
,
pointer
);
}
}
);
);
...
...
packages/flutter/pubspec.yaml
View file @
df78ec2b
...
@@ -8,8 +8,8 @@ dependencies:
...
@@ -8,8 +8,8 @@ dependencies:
collection
:
'
>=1.1.3
<2.0.0'
collection
:
'
>=1.1.3
<2.0.0'
intl
:
'
>=0.12.4+2
<0.13.0'
intl
:
'
>=0.12.4+2
<0.13.0'
material_design_icons
:
'
>=0.0.3
<0.1.0'
material_design_icons
:
'
>=0.0.3
<0.1.0'
sky_engine
:
0.0.8
3
sky_engine
:
0.0.8
4
sky_services
:
0.0.8
3
sky_services
:
0.0.8
4
vector_math
:
'
>=1.4.5
<2.0.0'
vector_math
:
'
>=1.4.5
<2.0.0'
quiver
:
'
>=0.21.4
<0.22.0'
quiver
:
'
>=0.21.4
<0.22.0'
...
...
packages/flutter/test/services/mock_services.dart
View file @
df78ec2b
import
'package:flutter/src/services/shell.dart'
as
shell
;
import
'package:flutter/src/services/shell.dart'
as
shell
;
import
'package:mojo/bindings.dart'
as
bindings
;
// Tests can use ServiceMocker to register replacement implementations
// Tests can use ServiceMocker to register replacement implementations
// of Mojo services.
// of Mojo services.
...
@@ -10,12 +11,12 @@ class _ServiceMocker {
...
@@ -10,12 +11,12 @@ class _ServiceMocker {
// Map of interface names to mock implementations.
// Map of interface names to mock implementations.
Map
<
String
,
Object
>
_interfaceMock
=
new
Map
<
String
,
Object
>();
Map
<
String
,
Object
>
_interfaceMock
=
new
Map
<
String
,
Object
>();
bool
_connectToService
(
String
url
,
dynamic
proxy
)
{
bool
_connectToService
(
String
url
,
bindings
.
ProxyBase
proxy
)
{
Object
mock
=
_interfaceMock
[
proxy
.
impl
.
n
ame
];
Object
mock
=
_interfaceMock
[
proxy
.
serviceN
ame
];
if
(
mock
!=
null
)
{
if
(
mock
!=
null
)
{
// Replace the proxy's implementation of the service interface with the
// Replace the proxy's implementation of the service interface with the
// mock.
// mock.
The mojom bindings put the "ptr" field on all proxies.
proxy
.
ptr
=
mock
;
(
proxy
as
dynamic
)
.
ptr
=
mock
;
return
true
;
return
true
;
}
else
{
}
else
{
return
false
;
return
false
;
...
...
packages/flutter/test/widget/input_test.dart
View file @
df78ec2b
...
@@ -29,7 +29,7 @@ class MockKeyboard implements KeyboardService {
...
@@ -29,7 +29,7 @@ class MockKeyboard implements KeyboardService {
void
main
(
)
{
void
main
(
)
{
MockKeyboard
mockKeyboard
=
new
MockKeyboard
();
MockKeyboard
mockKeyboard
=
new
MockKeyboard
();
serviceMocker
.
registerMockService
(
KeyboardServiceName
,
mockKeyboard
);
serviceMocker
.
registerMockService
(
KeyboardService
.
service
Name
,
mockKeyboard
);
test
(
'Editable text has consistent width'
,
()
{
test
(
'Editable text has consistent width'
,
()
{
testWidgets
((
WidgetTester
tester
)
{
testWidgets
((
WidgetTester
tester
)
{
...
...
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