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
b1a17cb0
Commit
b1a17cb0
authored
Nov 10, 2015
by
Adam Barth
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix remaining analyzer warnings
Constructor tear-offs aren't supported by the analyzer yet.
parent
7ea598d9
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
58 deletions
+18
-58
drag_and_drop.dart
examples/widgets/drag_and_drop.dart
+18
-11
drag_target.dart
packages/flutter/lib/src/widgets/drag_target.dart
+0
-9
playfair_test.dart
packages/playfair/test/playfair_test.dart
+0
-38
No files found.
examples/widgets/drag_and_drop.dart
View file @
b1a17cb0
...
...
@@ -77,11 +77,8 @@ class ExampleDragSource extends StatelessComponent {
Widget
build
(
BuildContext
context
)
{
double
size
=
kDotSize
;
DraggableConstructor
<
Color
>
constructor
=
new
Draggable
<
Color
>
#
;
if
(
heavy
)
{
if
(
heavy
)
size
*=
kHeavyMultiplier
;
constructor
=
new
LongPressDraggable
<
Color
>
#
;
}
Widget
contents
=
new
DefaultTextStyle
(
style:
Theme
.
of
(
context
).
text
.
body1
.
copyWith
(
textAlign:
TextAlign
.
center
),
...
...
@@ -112,13 +109,23 @@ class ExampleDragSource extends StatelessComponent {
anchor
=
DragAnchor
.
child
;
}
return
constructor
(
data:
color
,
child:
contents
,
feedback:
feedback
,
feedbackOffset:
feedbackOffset
,
dragAnchor:
anchor
);
if
(
heavy
)
{
return
new
Draggable
<
Color
>(
data:
color
,
child:
contents
,
feedback:
feedback
,
feedbackOffset:
feedbackOffset
,
dragAnchor:
anchor
);
}
else
{
return
new
LongPressDraggable
<
Color
>(
data:
color
,
child:
contents
,
feedback:
feedback
,
feedbackOffset:
feedbackOffset
,
dragAnchor:
anchor
);
}
}
}
...
...
packages/flutter/lib/src/widgets/drag_target.dart
View file @
b1a17cb0
...
...
@@ -19,15 +19,6 @@ typedef void DragTargetAccept<T>(T data);
typedef
Widget
DragTargetBuilder
<
T
>(
BuildContext
context
,
List
<
T
>
candidateData
,
List
<
dynamic
>
rejectedData
);
typedef
void
DragStartCallback
(
Point
position
,
int
pointer
);
typedef
DraggableBase
<
T
>
DraggableConstructor
<
T
>({
Key
key
,
T
data
,
Widget
child
,
Widget
feedback
,
Offset
feedbackOffset
,
DragAnchor
dragAnchor
});
enum
DragAnchor
{
/// Display the feedback anchored at the position of the original child. If
/// feedback is identical to the child, then this means the feedback will
...
...
packages/playfair/test/playfair_test.dart
deleted
100644 → 0
View file @
7ea598d9
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import
'package:test/test.dart'
;
import
'package:playfair/playfair.dart'
;
import
'test_painting_canvas.dart'
;
void
main
(
)
{
test
(
'test_chart'
,
()
{
ChartData
data
=
new
ChartData
(
startX:
0.0
,
startY:
0.0
,
endX:
10.0
,
endY:
1.0
,
dataSet:
[
const
Point
(
0.0
,
0.0
),
const
Point
(
2.0
,
0.5
),
const
Point
(
5.0
,
0.2
),
const
Point
(
10.0
,
0.9
),
]
);
StringBuffer
buffer
=
new
StringBuffer
();
PaintingCanvas
canvas
=
new
TestPaintingCanvas
(
new
PictureRecorder
(),
const
Size
(
100.0
,
100.0
),
buffer
.
write
);
new
ChartPainter
(
data
).
paint
(
canvas
,
new
Rect
.
fromLTRB
(
0.0
,
0.0
,
100.0
,
100.0
));
// TODO(jackson): Update this to the correct value once Sky packages can test
// See https://github.com/domokit/sky_engine/issues/580
expect
(
buffer
.
toString
(),
equals
(
""
));
});
}
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