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
Hide 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> {
new
Input
(
key:
weightKey
,
placeholder:
'Enter weight'
,
keyboardType:
KeyboardType
.
NUMBER
,
keyboardType:
KeyboardType
.
number
,
onChanged:
_handleWeightChanged
),
],
...
...
examples/fitness/lib/settings.dart
View file @
df78ec2b
...
...
@@ -63,7 +63,7 @@ class SettingsFragmentState extends State<SettingsFragment> {
content:
new
Input
(
key:
weightGoalKey
,
placeholder:
'Goal weight in lbs'
,
keyboardType:
KeyboardType
.
NUMBER
,
keyboardType:
KeyboardType
.
number
,
onChanged:
_handleGoalWeightChanged
),
actions:
<
Widget
>[
...
...
examples/mine_digger/lib/main.dart
View file @
df78ec2b
...
...
@@ -113,7 +113,7 @@ class MineDiggerState extends State<MineDigger> {
probe
(
ix
,
iy
);
},
onLongPress:
()
{
userFeedback
.
performHapticFeedback
(
HapticFeedbackType
.
LONG_PRESS
);
userFeedback
.
performHapticFeedback
(
HapticFeedbackType
.
longPress
);
flag
(
ix
,
iy
);
},
child:
new
Listener
(
...
...
examples/raw/hello_world.dart
View file @
df78ec2b
...
...
@@ -57,10 +57,10 @@ void handlePointerPacket(ByteData serializedPacket) {
PointerPacket
packet
=
PointerPacket
.
deserialize
(
message
);
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
);
ui
.
window
.
scheduleFrame
();
}
else
if
(
pointer
.
type
==
PointerType
.
UP
)
{
}
else
if
(
pointer
.
type
==
PointerType
.
up
)
{
color
=
new
ui
.
Color
.
fromARGB
(
255
,
0
,
255
,
0
);
ui
.
window
.
scheduleFrame
();
}
...
...
examples/raw/spinning_image.dart
View file @
df78ec2b
...
...
@@ -88,7 +88,7 @@ void handlePointerPacket(ByteData serializedPacket) {
PointerPacket
packet
=
PointerPacket
.
deserialize
(
message
);
for
(
Pointer
pointer
in
packet
.
pointers
)
{
if
(
pointer
.
type
==
PointerType
.
UP
)
{
if
(
pointer
.
type
==
PointerType
.
up
)
{
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 {
);
PointerPacket
packet
=
PointerPacket
.
deserialize
(
message
);
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
);
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 {
assert
(
_pointerKindMap
.
containsKey
(
datum
.
kind
));
PointerDeviceKind
kind
=
_pointerKindMap
[
datum
.
kind
];
switch
(
datum
.
type
)
{
case
PointerType
.
DOWN
:
case
PointerType
.
down
:
assert
(!
_pointers
.
containsKey
(
datum
.
pointer
));
_PointerState
state
=
_pointers
.
putIfAbsent
(
datum
.
pointer
,
...
...
@@ -84,7 +84,7 @@ class PointerEventConverter {
tilt:
datum
.
tilt
);
break
;
case
PointerType
.
MOVE
:
case
PointerType
.
move
:
// If the service starts supporting hover pointers, then it must also
// start sending us ADDED and REMOVED data points.
// See also: https://github.com/flutter/flutter/issues/720
...
...
@@ -114,14 +114,14 @@ class PointerEventConverter {
tilt:
datum
.
tilt
);
break
;
case
PointerType
.
UP
:
case
PointerType
.
CANCEL
:
case
PointerType
.
up
:
case
PointerType
.
cancel
:
assert
(
_pointers
.
containsKey
(
datum
.
pointer
));
_PointerState
state
=
_pointers
[
datum
.
pointer
];
assert
(
state
.
down
);
assert
(
position
==
state
.
lastPosition
);
state
.
setUp
();
if
(
datum
.
type
==
PointerType
.
UP
)
{
if
(
datum
.
type
==
PointerType
.
up
)
{
yield
new
PointerUpEvent
(
timeStamp:
timeStamp
,
pointer:
state
.
pointer
,
...
...
@@ -175,9 +175,9 @@ class PointerEventConverter {
}
static
const
Map
<
PointerKind
,
PointerDeviceKind
>
_pointerKindMap
=
const
<
PointerKind
,
PointerDeviceKind
>{
PointerKind
.
TOUCH
:
PointerDeviceKind
.
touch
,
PointerKind
.
MOUSE
:
PointerDeviceKind
.
mouse
,
PointerKind
.
STYLUS
:
PointerDeviceKind
.
stylus
,
PointerKind
.
INVERTED_STYLUS
:
PointerDeviceKind
.
invertedStylus
,
PointerKind
.
touch
:
PointerDeviceKind
.
touch
,
PointerKind
.
mouse
:
PointerDeviceKind
.
mouse
,
PointerKind
.
stylus
:
PointerDeviceKind
.
stylus
,
PointerKind
.
invertedStylus
:
PointerDeviceKind
.
invertedStylus
,
};
}
packages/flutter/lib/src/material/date_picker.dart
View file @
df78ec2b
...
...
@@ -40,14 +40,14 @@ class _DatePickerState extends State<DatePicker> {
_DatePickerMode
_mode
=
_DatePickerMode
.
day
;
void
_handleModeChanged
(
_DatePickerMode
mode
)
{
userFeedback
.
performHapticFeedback
(
HapticFeedbackType
.
VIRTUAL_KEY
);
userFeedback
.
performHapticFeedback
(
HapticFeedbackType
.
virtualKey
);
setState
(()
{
_mode
=
mode
;
});
}
void
_handleYearChanged
(
DateTime
dateTime
)
{
userFeedback
.
performHapticFeedback
(
HapticFeedbackType
.
VIRTUAL_KEY
);
userFeedback
.
performHapticFeedback
(
HapticFeedbackType
.
virtualKey
);
setState
(()
{
_mode
=
_DatePickerMode
.
day
;
});
...
...
@@ -56,7 +56,7 @@ class _DatePickerState extends State<DatePicker> {
}
void
_handleDayChanged
(
DateTime
dateTime
)
{
userFeedback
.
performHapticFeedback
(
HapticFeedbackType
.
VIRTUAL_KEY
);
userFeedback
.
performHapticFeedback
(
HapticFeedbackType
.
virtualKey
);
if
(
config
.
onChanged
!=
null
)
config
.
onChanged
(
dateTime
);
}
...
...
packages/flutter/lib/src/material/input.dart
View file @
df78ec2b
...
...
@@ -21,7 +21,7 @@ class Input extends Scrollable {
this
.
hideText
:
false
,
this
.
isDense
:
false
,
this
.
onChanged
,
this
.
keyboardType
:
KeyboardType
.
TEXT
,
this
.
keyboardType
:
KeyboardType
.
text
,
this
.
onSubmitted
})
:
super
(
key:
key
,
...
...
packages/flutter/lib/src/material/time_picker.dart
View file @
df78ec2b
...
...
@@ -110,7 +110,7 @@ class _TimePickerState extends State<TimePicker> {
_TimePickerMode
_mode
=
_TimePickerMode
.
hour
;
void
_handleModeChanged
(
_TimePickerMode
mode
)
{
userFeedback
.
performHapticFeedback
(
HapticFeedbackType
.
VIRTUAL_KEY
);
userFeedback
.
performHapticFeedback
(
HapticFeedbackType
.
virtualKey
);
setState
(()
{
_mode
=
mode
;
});
...
...
packages/flutter/lib/src/services/shell.dart
View file @
df78ec2b
...
...
@@ -62,13 +62,13 @@ class _Shell {
ServiceProviderProxy
services
=
new
ServiceProviderProxy
.
unbound
();
_shell
.
connectToApplication
(
url
,
services
,
null
);
var
pipe
=
new
core
.
MojoMessagePipe
();
core
.
MojoMessagePipe
pipe
=
new
core
.
MojoMessagePipe
();
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
();
}
void
connectToService
(
String
url
,
Object
proxy
)
{
void
connectToService
(
String
url
,
bindings
.
ProxyBase
proxy
)
{
if
(
overrideConnectToService
!=
null
&&
overrideConnectToService
(
url
,
proxy
))
return
;
_connectToService
(
url
,
proxy
);
...
...
packages/flutter/lib/src/widgets/drag_target.dart
View file @
df78ec2b
...
...
@@ -126,7 +126,7 @@ class LongPressDraggable<T> extends DraggableBase<T> {
gestureArena:
Gesturer
.
instance
.
gestureArena
,
longTapDelay:
kLongPressTimeout
,
onLongTapDown:
(
Point
position
,
int
pointer
)
{
userFeedback
.
performHapticFeedback
(
HapticFeedbackType
.
VIRTUAL_KEY
);
userFeedback
.
performHapticFeedback
(
HapticFeedbackType
.
virtualKey
);
starter
(
position
,
pointer
);
}
);
...
...
packages/flutter/pubspec.yaml
View file @
df78ec2b
...
...
@@ -8,8 +8,8 @@ dependencies:
collection
:
'
>=1.1.3
<2.0.0'
intl
:
'
>=0.12.4+2
<0.13.0'
material_design_icons
:
'
>=0.0.3
<0.1.0'
sky_engine
:
0.0.8
3
sky_services
:
0.0.8
3
sky_engine
:
0.0.8
4
sky_services
:
0.0.8
4
vector_math
:
'
>=1.4.5
<2.0.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:mojo/bindings.dart'
as
bindings
;
// Tests can use ServiceMocker to register replacement implementations
// of Mojo services.
...
...
@@ -10,12 +11,12 @@ class _ServiceMocker {
// Map of interface names to mock implementations.
Map
<
String
,
Object
>
_interfaceMock
=
new
Map
<
String
,
Object
>();
bool
_connectToService
(
String
url
,
dynamic
proxy
)
{
Object
mock
=
_interfaceMock
[
proxy
.
impl
.
n
ame
];
bool
_connectToService
(
String
url
,
bindings
.
ProxyBase
proxy
)
{
Object
mock
=
_interfaceMock
[
proxy
.
serviceN
ame
];
if
(
mock
!=
null
)
{
// Replace the proxy's implementation of the service interface with the
// mock.
proxy
.
ptr
=
mock
;
// mock.
The mojom bindings put the "ptr" field on all proxies.
(
proxy
as
dynamic
)
.
ptr
=
mock
;
return
true
;
}
else
{
return
false
;
...
...
packages/flutter/test/widget/input_test.dart
View file @
df78ec2b
...
...
@@ -29,7 +29,7 @@ class MockKeyboard implements KeyboardService {
void
main
(
)
{
MockKeyboard
mockKeyboard
=
new
MockKeyboard
();
serviceMocker
.
registerMockService
(
KeyboardServiceName
,
mockKeyboard
);
serviceMocker
.
registerMockService
(
KeyboardService
.
service
Name
,
mockKeyboard
);
test
(
'Editable text has consistent width'
,
()
{
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