Merge pull request #1774 from Hixie/exports

Clean up imports and exports.
This commit is contained in:
Ian Hickson
2016-02-11 00:12:42 -08:00
123 changed files with 346 additions and 492 deletions

View File

@@ -6,7 +6,6 @@ library fitness;
import 'package:playfair/playfair.dart' as playfair;
import 'package:flutter/material.dart';
import 'package:flutter/painting.dart';
import 'package:gcm/gcm.dart' as gcm;
import 'user_data.dart';

View File

@@ -2,7 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'package:flutter/animation.dart';
import 'package:flutter/material.dart';
class ProgressIndicatorDemo extends StatefulComponent {

View File

@@ -3,7 +3,7 @@
// found in the LICENSE file.
import 'dart:async';
import 'dart:ui' as ui;
import 'dart:ui' as ui show Image;
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_sprites/flutter_sprites.dart';

View File

@@ -3,10 +3,7 @@
import 'dart:math';
import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';
import 'package:flutter/painting.dart';
import 'package:flutter/rendering.dart';
import 'package:flutter/services.dart';
// Classic minesweeper-inspired game. The mouse controls are standard

View File

@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'dart:ui' as ui;
import 'package:flutter/rendering.dart';
class _BaselinePainter extends CustomPainter {
@@ -29,7 +27,7 @@ class _BaselinePainter extends CustomPainter {
path.lineTo(w, h);
paint = new Paint()
..color = const Color(0xFFFF9000)
..style = ui.PaintingStyle.stroke
..style = PaintingStyle.stroke
..strokeWidth = 1.5;
canvas.drawPath(path, paint);
@@ -39,7 +37,7 @@ class _BaselinePainter extends CustomPainter {
path.lineTo(w, baseline);
paint = new Paint()
..color = const Color(0xFF00FF90)
..style = ui.PaintingStyle.stroke
..style = PaintingStyle.stroke
..strokeWidth = 1.5;
canvas.drawPath(path, paint);
}

View File

@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'dart:ui' as ui;
import 'package:flutter/rendering.dart';
void main() {
@@ -15,7 +13,7 @@ void main() {
additionalConstraints: new BoxConstraints.tightFor(height: 100.0),
child: new RenderDecoratedBox(
decoration: new BoxDecoration(
backgroundColor: new ui.Color(0xFFFFFF00)
backgroundColor: const Color(0xFFFFFF00)
)
)
)
@@ -27,12 +25,12 @@ void main() {
child: new RenderDecoratedBox(
decoration: new BoxDecoration(
border: new Border(
top: new BorderSide(color: new ui.Color(0xFFF00000), width: 5.0),
right: new BorderSide(color: new ui.Color(0xFFFF9000), width: 10.0),
bottom: new BorderSide(color: new ui.Color(0xFFFFF000), width: 15.0),
left: new BorderSide(color: new ui.Color(0xFF00FF00), width: 20.0)
top: new BorderSide(color: const Color(0xFFF00000), width: 5.0),
right: new BorderSide(color: const Color(0xFFFF9000), width: 10.0),
bottom: new BorderSide(color: const Color(0xFFFFF000), width: 15.0),
left: new BorderSide(color: const Color(0xFF00FF00), width: 20.0)
),
backgroundColor: new ui.Color(0xFFDDDDDD)
backgroundColor: const Color(0xFFDDDDDD)
)
)
)
@@ -43,7 +41,7 @@ void main() {
additionalConstraints: new BoxConstraints.tightFor(height: 100.0),
child: new RenderDecoratedBox(
decoration: new BoxDecoration(
backgroundColor: new ui.Color(0xFFFFFF00)
backgroundColor: const Color(0xFFFFFF00)
)
)
)
@@ -54,7 +52,7 @@ void main() {
additionalConstraints: new BoxConstraints.tightFor(height: 100.0),
child: new RenderDecoratedBox(
decoration: new BoxDecoration(
backgroundColor: new ui.Color(0xFFFFFF00)
backgroundColor: const Color(0xFFFFFF00)
)
)
)
@@ -65,7 +63,7 @@ void main() {
additionalConstraints: new BoxConstraints.tightFor(height: 100.0),
child: new RenderDecoratedBox(
decoration: new BoxDecoration(
backgroundColor: new ui.Color(0xFFFFFF00)
backgroundColor: const Color(0xFFFFFF00)
)
)
)

View File

@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'dart:ui' as ui;
import 'package:flutter/rendering.dart';
import 'lib/solid_color_box.dart';
@@ -11,11 +9,11 @@ RenderBox buildFlexExample() {
RenderFlex flexRoot = new RenderFlex(direction: FlexDirection.vertical);
RenderDecoratedBox root = new RenderDecoratedBox(
decoration: new BoxDecoration(backgroundColor: const ui.Color(0xFF000000)),
decoration: new BoxDecoration(backgroundColor: const Color(0xFF000000)),
child: flexRoot
);
void addFlexChildSolidColor(RenderFlex parent, ui.Color backgroundColor, { int flex: 0 }) {
void addFlexChildSolidColor(RenderFlex parent, Color backgroundColor, { int flex: 0 }) {
RenderSolidColorBox child = new RenderSolidColorBox(backgroundColor);
parent.add(child);
final FlexParentData childParentData = child.parentData;
@@ -23,13 +21,13 @@ RenderBox buildFlexExample() {
}
// Yellow bar at top
addFlexChildSolidColor(flexRoot, const ui.Color(0xFFFFFF00), flex: 1);
addFlexChildSolidColor(flexRoot, const Color(0xFFFFFF00), flex: 1);
// Turquoise box
flexRoot.add(new RenderSolidColorBox(const ui.Color(0x7700FFFF), desiredSize: new ui.Size(100.0, 100.0)));
flexRoot.add(new RenderSolidColorBox(const Color(0x7700FFFF), desiredSize: new Size(100.0, 100.0)));
var renderDecoratedBlock = new RenderDecoratedBox(
decoration: new BoxDecoration(backgroundColor: const ui.Color(0xFFFFFFFF))
decoration: new BoxDecoration(backgroundColor: const Color(0xFFFFFFFF))
);
flexRoot.add(new RenderPadding(padding: const EdgeDims.all(10.0), child: renderDecoratedBlock));
@@ -37,11 +35,11 @@ RenderBox buildFlexExample() {
var row = new RenderFlex(direction: FlexDirection.horizontal);
// Purple and blue cells
addFlexChildSolidColor(row, const ui.Color(0x77FF00FF), flex: 1);
addFlexChildSolidColor(row, const ui.Color(0xFF0000FF), flex: 2);
addFlexChildSolidColor(row, const Color(0x77FF00FF), flex: 1);
addFlexChildSolidColor(row, const Color(0xFF0000FF), flex: 2);
var decoratedRow = new RenderDecoratedBox(
decoration: new BoxDecoration(backgroundColor: const ui.Color(0xFF333333)),
decoration: new BoxDecoration(backgroundColor: const Color(0xFF333333)),
child: row
);

View File

@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'dart:ui' as ui;
import 'dart:ui' as ui show Image, window;
import 'dart:math' as math;
import 'dart:typed_data';

View File

@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'dart:ui' as ui;
import 'package:flutter/rendering.dart';
import 'lib/solid_color_box.dart';
@@ -14,16 +12,16 @@ RenderTransform transformBox;
void main() {
RenderFlex flexRoot = new RenderFlex(direction: FlexDirection.vertical);
void addFlexChildSolidColor(RenderFlex parent, ui.Color backgroundColor, { int flex: 0 }) {
void addFlexChildSolidColor(RenderFlex parent, Color backgroundColor, { int flex: 0 }) {
RenderSolidColorBox child = new RenderSolidColorBox(backgroundColor);
parent.add(child);
final FlexParentData childParentData = child.parentData;
childParentData.flex = flex;
}
addFlexChildSolidColor(flexRoot, const ui.Color(0xFFFF00FF), flex: 1);
addFlexChildSolidColor(flexRoot, const ui.Color(0xFFFFFF00), flex: 2);
addFlexChildSolidColor(flexRoot, const ui.Color(0xFF00FFFF), flex: 1);
addFlexChildSolidColor(flexRoot, const Color(0xFFFF00FF), flex: 1);
addFlexChildSolidColor(flexRoot, const Color(0xFFFFFF00), flex: 2);
addFlexChildSolidColor(flexRoot, const Color(0xFF00FFFF), flex: 1);
transformBox = new RenderTransform(child: flexRoot, transform: new Matrix4.identity());

View File

@@ -2,16 +2,14 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'dart:ui' as ui;
import 'package:flutter/rendering.dart';
void main() {
RenderDecoratedBox green = new RenderDecoratedBox(
decoration: new BoxDecoration(backgroundColor: const ui.Color(0xFF00FF00))
decoration: new BoxDecoration(backgroundColor: const Color(0xFF00FF00))
);
RenderConstrainedBox box = new RenderConstrainedBox(
additionalConstraints: new BoxConstraints.tight(const ui.Size(200.0, 200.0)),
additionalConstraints: new BoxConstraints.tight(const Size(200.0, 200.0)),
child: green
);

View File

@@ -5,29 +5,18 @@
library stocks;
import 'dart:async';
import 'dart:collection';
import 'dart:math' as math;
import 'dart:ui' as ui;
import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';
import 'package:flutter/painting.dart';
import 'package:flutter/rendering.dart';
import 'package:flutter/scheduler.dart';
import 'package:flutter/rendering.dart' show debugPaintSizeEnabled;
import 'package:intl/intl.dart';
import 'stock_data.dart';
import 'i18n/stock_messages_all.dart';
part 'stock_arrow.dart';
part 'stock_home.dart';
part 'stock_list.dart';
part 'stock_menu.dart';
part 'stock_row.dart';
part 'stock_settings.dart';
part 'stock_strings.dart';
part 'stock_symbol_viewer.dart';
part 'stock_types.dart';
import 'stock_data.dart';
import 'stock_home.dart';
import 'stock_settings.dart';
import 'stock_strings.dart';
import 'stock_symbol_viewer.dart';
import 'stock_types.dart';
class StocksApp extends StatefulComponent {
StocksAppState createState() => new StocksAppState();
@@ -94,7 +83,7 @@ class StocksAppState extends State<StocksApp> {
return null;
}
Future<LocaleQueryData> _onLocaleChanged(ui.Locale locale) async {
Future<LocaleQueryData> _onLocaleChanged(Locale locale) async {
String localeString = locale.toString();
await initializeMessages(localeString);
Intl.defaultLocale = localeString;

View File

@@ -2,7 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
part of stocks;
import 'dart:math' as math;
import 'package:flutter/material.dart';
class StockArrowPainter extends CustomPainter {
StockArrowPainter({ this.color, this.percentChange });
@@ -34,11 +36,11 @@ class StockArrowPainter extends CustomPainter {
path.lineTo(centerX + w, arrowY + h);
path.lineTo(centerX - w, arrowY + h);
path.close();
paint.style = ui.PaintingStyle.fill;
paint.style = PaintingStyle.fill;
canvas.drawPath(path, paint);
// Draw a circle that circumscribes the arrow.
paint.style = ui.PaintingStyle.stroke;
paint.style = PaintingStyle.stroke;
canvas.drawCircle(new Point(centerX, centerY), r, paint);
}

View File

@@ -2,7 +2,17 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
part of stocks;
import 'dart:collection';
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart' show debugDumpRenderTree, debugDumpLayerTree, debugDumpSemanticsTree;
import 'stock_data.dart';
import 'stock_list.dart';
import 'stock_menu.dart';
import 'stock_strings.dart';
import 'stock_symbol_viewer.dart';
import 'stock_types.dart';
typedef void ModeUpdater(StockMode mode);

View File

@@ -2,7 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
part of stocks;
import 'package:flutter/material.dart';
import 'stock_data.dart';
import 'stock_row.dart';
class StockList extends StatelessComponent {
StockList({ Key key, this.keySalt, this.stocks, this.onOpen, this.onShow, this.onAction }) : super(key: key);

View File

@@ -2,7 +2,11 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
part of stocks;
import 'dart:async';
import 'dart:ui' as ui show window;
import 'package:flutter/material.dart';
import 'package:flutter/scheduler.dart' show timeDilation;
enum _MenuItems { autorefresh, autorefreshCheckbox, refresh, speedUp, speedDown }

View File

@@ -2,7 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
part of stocks;
import 'package:flutter/material.dart';
import 'stock_data.dart';
import 'stock_arrow.dart';
enum StockRowPartKind { arrow }

View File

@@ -2,7 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
part of stocks;
import 'package:flutter/material.dart';
import 'stock_types.dart';
class StockSettings extends StatefulComponent {
const StockSettings(this.configuration, this.updater);

View File

@@ -1,4 +1,9 @@
part of stocks;
// 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:intl/intl.dart';
import 'package:flutter/widgets.dart';
// Wrappers for strings that are shown in the UI. The strings can be
// translated for different locales using the Dart intl package.

View File

@@ -2,7 +2,11 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
part of stocks;
import 'package:flutter/material.dart';
import 'stock_data.dart';
import 'stock_arrow.dart';
import 'stock_row.dart';
class StockSymbolView extends StatelessComponent {
StockSymbolView({ this.stock });

View File

@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
part of stocks;
enum StockMode { optimistic, pessimistic }
enum BackupMode { enabled, disabled }

View File

@@ -2,11 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'dart:ui' as ui;
import 'package:flutter/material.dart';
import 'package:flutter/painting.dart';
import 'package:flutter/rendering.dart';
import 'package:flutter/rendering.dart' show debugDumpRenderTree;
class CardModel {
CardModel(this.value, this.height) {
@@ -394,7 +391,7 @@ class CardCollectionState extends State<CardCollection> {
});
}
ui.Shader _createShader(Rect bounds) {
Shader _createShader(Rect bounds) {
return new LinearGradient(
begin: bounds.topLeft,
end: bounds.bottomLeft,

View File

@@ -3,11 +3,8 @@
// found in the LICENSE file.
import 'dart:math' as math;
import 'dart:ui' as ui;
import 'package:flutter/material.dart';
import 'package:flutter/painting.dart';
import 'package:flutter/rendering.dart';
class ExampleDragTarget extends StatefulComponent {
ExampleDragTargetState createState() => new ExampleDragTargetState();
@@ -144,7 +141,7 @@ class DashOutlineCirclePainter extends CustomPainter {
final double radius = size.shortestSide / 2.0;
final Paint paint = new Paint()
..color = const Color(0xFF000000)
..style = ui.PaintingStyle.stroke
..style = PaintingStyle.stroke
..strokeWidth = radius / 10.0;
final Path path = new Path();
final Rect box = Point.origin & size;

View File

@@ -2,7 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
import 'dart:ui' as ui;
import 'dart:ui' as ui show window;
import 'package:flutter/widgets.dart';
import 'package:flutter/material.dart';

View File

@@ -2,7 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'package:flutter/animation.dart';
import 'package:flutter/material.dart';
const double _kHeight = 150.0;

View File

@@ -2,7 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'package:flutter/painting.dart';
import 'package:flutter/material.dart';
void main() {

View File

@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'dart:ui' as ui;
import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
@@ -36,7 +34,7 @@ class _MarkerPainter extends CustomPainter {
paint
..color = const Color(0xFFFFFFFF)
..style = ui.PaintingStyle.stroke
..style = PaintingStyle.stroke
..strokeWidth = 1.0;
if (type == MarkerType.topLeft) {
canvas.drawLine(new Point(r, r), new Point(r + r - 1.0, r), paint);

View File

@@ -3,7 +3,6 @@
// found in the LICENSE file.
import 'package:flutter/material.dart';
import 'package:flutter/painting.dart';
class CardModel {
CardModel(this.value, this.size, this.color);

View File

@@ -1,7 +1,8 @@
// Copyright (c) 2016, the Flutter project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
import 'dart:ui' as ui;
import 'dart:ui' as ui show window;
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';

View File

@@ -2,9 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'package:flutter/animation.dart';
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
final List<Map<int, Color>> _kColors = <Map<int, Color>>[
Colors.amber,

View File

@@ -2,15 +2,13 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'dart:ui' as ui;
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
import 'package:flutter_rendering_examples/solid_color_box.dart';
// Solid colour, RenderObject version
void addFlexChildSolidColor(RenderFlex parent, ui.Color backgroundColor, { int flex: 0 }) {
void addFlexChildSolidColor(RenderFlex parent, Color backgroundColor, { int flex: 0 }) {
RenderSolidColorBox child = new RenderSolidColorBox(backgroundColor);
parent.add(child);
FlexParentData childParentData = child.parentData;
@@ -92,9 +90,9 @@ void main() {
attachWidgetTreeToRenderTree(proxy);
RenderFlex flexRoot = new RenderFlex(direction: FlexDirection.vertical);
addFlexChildSolidColor(flexRoot, const ui.Color(0xFFFF00FF), flex: 1);
addFlexChildSolidColor(flexRoot, const Color(0xFFFF00FF), flex: 1);
flexRoot.add(proxy);
addFlexChildSolidColor(flexRoot, const ui.Color(0xFF0000FF), flex: 1);
addFlexChildSolidColor(flexRoot, const Color(0xFF0000FF), flex: 1);
transformBox = new RenderTransform(child: flexRoot, transform: new Matrix4.identity());
RenderPadding root = new RenderPadding(padding: new EdgeDims.all(80.0), child: transformBox);

View File

@@ -15,5 +15,4 @@ export 'src/animation/animations.dart';
export 'src/animation/curves.dart';
export 'src/animation/forces.dart';
export 'src/animation/listener_helpers.dart';
export 'src/animation/ticker.dart';
export 'src/animation/tween.dart';

View File

@@ -17,7 +17,6 @@ export 'src/painting/box_painter.dart';
export 'src/painting/colors.dart';
export 'src/painting/decoration.dart';
export 'src/painting/edge_dims.dart';
export 'src/painting/shadows.dart';
export 'src/painting/text_editing.dart';
export 'src/painting/text_painter.dart';
export 'src/painting/text_style.dart';

View File

@@ -12,3 +12,4 @@
library scheduler;
export 'src/scheduler/scheduler.dart';
export 'src/scheduler/ticker.dart';

View File

@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'dart:ui' show Color, Size, Rect, VoidCallback, lerpDouble;
import 'dart:ui' show Color, Size, Rect, VoidCallback;
/// The direction in which an animation is running.
enum AnimationDirection {

View File

@@ -3,15 +3,15 @@
// found in the LICENSE file.
import 'dart:async';
import 'dart:ui' show VoidCallback, lerpDouble;
import 'dart:ui' as ui show lerpDouble;
import 'package:flutter/scheduler.dart';
import 'package:newton/newton.dart';
import 'animation.dart';
import 'curves.dart';
import 'forces.dart';
import 'listener_helpers.dart';
import 'ticker.dart';
/// A controller for an animation.
///
@@ -20,7 +20,7 @@ import 'ticker.dart';
/// bounds of the animation and can drive an animation using a physics
/// simulation.
class AnimationController extends Animation<double>
with EagerListenerMixin, LocalListenersMixin, LocalAnimationStatusListenersMixin {
with AnimationEagerListenerMixin, AnimationLocalListenersMixin, AnimationLocalStatusListenersMixin {
/// Creates an animation controller.
///
@@ -257,7 +257,7 @@ class _RepeatingSimulation extends Simulation {
double x(double timeInSeconds) {
assert(timeInSeconds >= 0.0);
final double t = (timeInSeconds / _periodInSeconds) % 1.0;
return lerpDouble(min, max, t);
return ui.lerpDouble(min, max, t);
}
double dx(double timeInSeconds) => 1.0;

View File

@@ -63,7 +63,7 @@ class AlwaysStoppedAnimation extends Animation<double> {
/// Implements most of the [Animation] interface, by deferring its behavior to a
/// given [parent] Animation. To implement an [Animation] that proxies to a
/// parent, this class plus implementing "T get value" is all that is necessary.
abstract class ProxyAnimatedMixin<T> {
abstract class AnimationWithParentMixin<T> {
/// The animation whose value this animation will proxy.
///
/// This animation must remain the same for the lifetime of this object. If
@@ -87,7 +87,7 @@ abstract class ProxyAnimatedMixin<T> {
/// object, and then later change the animation from which the proxy receieves
/// its value.
class ProxyAnimation extends Animation<double>
with LazyListenerMixin, LocalListenersMixin, LocalAnimationStatusListenersMixin {
with AnimationLazyListenerMixin, AnimationLocalListenersMixin, AnimationLocalStatusListenersMixin {
ProxyAnimation([Animation<double> animation]) {
_parent = animation;
if (_parent == null) {
@@ -158,7 +158,7 @@ class ProxyAnimation extends Animation<double>
/// 0.0 because the tween does not change the status or direction of the
/// animation.
class ReverseAnimation extends Animation<double>
with LazyListenerMixin, LocalAnimationStatusListenersMixin {
with AnimationLazyListenerMixin, AnimationLocalStatusListenersMixin {
ReverseAnimation(this.parent);
/// The animation whose value and direction this animation is reversing.
@@ -211,7 +211,7 @@ class ReverseAnimation extends Animation<double>
/// [CurvedAnimation] is useful when you wish to apply a [Curve] and you already
/// have the underlying animation object. If you don't yet have an animation and
/// want to apply a [Curve] to a [Tween], consider using [CurveTween].
class CurvedAnimation extends Animation<double> with ProxyAnimatedMixin<double> {
class CurvedAnimation extends Animation<double> with AnimationWithParentMixin<double> {
CurvedAnimation({
this.parent,
this.curve: Curves.linear,
@@ -283,7 +283,7 @@ enum _TrainHoppingMode { minimize, maximize }
/// removed, it exposes a [dispose()] method. Call this method to shut this
/// object down.
class TrainHoppingAnimation extends Animation<double>
with EagerListenerMixin, LocalListenersMixin, LocalAnimationStatusListenersMixin {
with AnimationEagerListenerMixin, AnimationLocalListenersMixin, AnimationLocalStatusListenersMixin {
TrainHoppingAnimation(this._currentTrain, this._nextTrain, { this.onSwitchedTrain }) {
assert(_currentTrain != null);
if (_nextTrain != null) {

View File

@@ -12,7 +12,7 @@ abstract class _ListenerMixin {
}
/// A mixin that helps listen to another object only when this object has registered listeners.
abstract class LazyListenerMixin implements _ListenerMixin {
abstract class AnimationLazyListenerMixin implements _ListenerMixin {
int _listenerCounter = 0;
void didRegisterListener() {
assert(_listenerCounter >= 0);
@@ -33,7 +33,7 @@ abstract class LazyListenerMixin implements _ListenerMixin {
/// A mixin that replaces the didRegisterListener/didUnregisterListener contract
/// with a dispose contract.
abstract class EagerListenerMixin implements _ListenerMixin {
abstract class AnimationEagerListenerMixin implements _ListenerMixin {
void didRegisterListener() { }
void didUnregisterListener() { }
@@ -43,7 +43,7 @@ abstract class EagerListenerMixin implements _ListenerMixin {
/// A mixin that implements the addListener/removeListener protocol and notifies
/// all the registered listeners when notifyListeners is invoked.
abstract class LocalListenersMixin extends _ListenerMixin {
abstract class AnimationLocalListenersMixin extends _ListenerMixin {
final List<VoidCallback> _listeners = <VoidCallback>[];
void addListener(VoidCallback listener) {
didRegisterListener();
@@ -63,7 +63,7 @@ abstract class LocalListenersMixin extends _ListenerMixin {
/// A mixin that implements the addStatusListener/removeStatusListener protocol
/// and notifies all the registered listeners when notifyStatusListeners is
/// invoked.
abstract class LocalAnimationStatusListenersMixin extends _ListenerMixin {
abstract class AnimationLocalStatusListenersMixin extends _ListenerMixin {
final List<AnimationStatusListener> _statusListeners = <AnimationStatusListener>[];
void addStatusListener(AnimationStatusListener listener) {
didRegisterListener();

View File

@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'dart:ui' show Color, Size, Rect, VoidCallback, lerpDouble;
import 'dart:ui' show Color, Size, Rect, VoidCallback;
import 'animation.dart';
import 'animations.dart';
@@ -28,7 +28,7 @@ abstract class Animatable<T> {
}
}
class _AnimatedEvaluation<T> extends Animation<T> with ProxyAnimatedMixin<double> {
class _AnimatedEvaluation<T> extends Animation<T> with AnimationWithParentMixin<double> {
_AnimatedEvaluation(this.parent, this._evaluatable);
/// The animation from which this value is derived.

View File

@@ -3,7 +3,7 @@
// found in the LICENSE file.
import 'dart:typed_data';
import 'dart:ui' as ui;
import 'dart:ui' as ui show window;
import 'package:flutter/services.dart';
import 'package:mojo/bindings.dart' as mojo_bindings;

View File

@@ -4,9 +4,6 @@
import 'dart:async';
import 'package:flutter/animation.dart';
import 'package:flutter/painting.dart';
import 'package:flutter/rendering.dart';
import 'package:flutter/widgets.dart';
import 'colors.dart';

View File

@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'dart:ui' as ui;
import 'dart:ui' as ui show Gradient;
import 'package:flutter/rendering.dart';
import 'package:flutter/widgets.dart';
@@ -122,23 +122,24 @@ class _RenderCheckbox extends RenderToggleable {
// Create an inner rectangle to cover inside of rectangle. This is needed to avoid
// painting artefacts caused by overlayed paintings.
Rect innerRect = rect.deflate(1.0);
ui.RRect rrect = new ui.RRect.fromRectXY(
rect, _kEdgeRadius, _kEdgeRadius);
RRect rrect = new RRect.fromRectXY(rect, _kEdgeRadius, _kEdgeRadius);
// Outline of the empty rrect
paint.style = ui.PaintingStyle.stroke;
paint.style = PaintingStyle.stroke;
canvas.drawRRect(rrect, paint);
// Radial gradient that changes size
if (!position.isDismissed) {
paint
..style = ui.PaintingStyle.fill
..style = PaintingStyle.fill
..shader = new ui.Gradient.radial(
new Point(_kEdgeSize / 2.0, _kEdgeSize / 2.0),
_kEdgeSize * (_kMidpoint - position.value) * 8.0, <Color>[
const Color(0x00000000),
inactiveColor
]);
_kEdgeSize * (_kMidpoint - position.value) * 8.0,
<Color>[
const Color(0x00000000),
inactiveColor
]
);
canvas.drawRect(innerRect, paint);
}
@@ -149,24 +150,22 @@ class _RenderCheckbox extends RenderToggleable {
// First draw a rounded rect outline then fill inner rectangle with the active color
paint
..color = activeColor.withAlpha((t * 255).floor())
..style = ui.PaintingStyle.stroke;
..style = PaintingStyle.stroke;
canvas.drawRRect(rrect, paint);
paint.style = ui.PaintingStyle.fill;
paint.style = PaintingStyle.fill;
canvas.drawRect(innerRect, paint);
}
// White inner check
paint
..color = const Color(0xFFFFFFFF)
..style = ui.PaintingStyle.stroke;
..style = PaintingStyle.stroke;
Path path = new Path();
Point start = new Point(_kEdgeSize * 0.15, _kEdgeSize * 0.45);
Point mid = new Point(_kEdgeSize * 0.4, _kEdgeSize * 0.7);
Point end = new Point(_kEdgeSize * 0.85, _kEdgeSize * 0.25);
Point lerp(Point p1, Point p2, double t) =>
new Point(p1.x * (1.0 - t) + p2.x * t, p1.y * (1.0 - t) + p2.y * t);
Point drawStart = lerp(start, mid, 1.0 - t);
Point drawEnd = lerp(mid, end, t);
Point drawStart = Point.lerp(start, mid, 1.0 - t);
Point drawEnd = Point.lerp(mid, end, t);
path.moveTo(offsetX + drawStart.x, offsetY + drawStart.y);
path.lineTo(offsetX + mid.x, offsetY + mid.y);
path.lineTo(offsetX + drawEnd.x, offsetY + drawEnd.y);

View File

@@ -2,7 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'package:flutter/painting.dart';
import 'package:flutter/widgets.dart';
import 'constants.dart';

View File

@@ -4,7 +4,6 @@
import 'dart:async';
import 'package:flutter/animation.dart';
import 'package:flutter/widgets.dart';
import 'colors.dart';

View File

@@ -2,7 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'package:flutter/animation.dart';
import 'package:flutter/widgets.dart';
import 'colors.dart';

View File

@@ -4,9 +4,6 @@
import 'dart:async';
import 'package:flutter/animation.dart';
import 'package:flutter/painting.dart';
import 'package:flutter/rendering.dart';
import 'package:flutter/widgets.dart';
import 'debug.dart';

View File

@@ -4,7 +4,6 @@
import 'dart:math' as math;
import 'package:flutter/animation.dart';
import 'package:flutter/widgets.dart';
import 'debug.dart';

View File

@@ -2,7 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'package:flutter/animation.dart';
import 'package:flutter/widgets.dart';
import 'icon_theme.dart';

View File

@@ -2,7 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'dart:ui' as ui;
import 'dart:ui' as ui show lerpDouble;
import 'dart:ui' show hashValues;
enum IconThemeColor { white, black }
@@ -28,7 +29,7 @@ class IconThemeData {
return color == typedOther.color && opacity == typedOther.opacity;
}
int get hashCode => ui.hashValues(color, opacity);
int get hashCode => hashValues(color, opacity);
String toString() => '$color';
}

View File

@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'package:flutter/animation.dart';
import 'package:flutter/rendering.dart';
import 'package:flutter/services.dart';
import 'package:flutter/widgets.dart';
import 'package:sky_services/editing/editing.mojom.dart' as mojom;
@@ -13,7 +11,6 @@ import 'debug.dart';
import 'icon.dart';
import 'theme.dart';
export 'package:flutter/rendering.dart' show ValueChanged;
export 'package:sky_services/editing/editing.mojom.dart' show KeyboardType;
/// A material design text input field.

View File

@@ -4,8 +4,6 @@
import 'dart:math' as math;
import 'package:flutter/animation.dart';
import 'package:flutter/painting.dart';
import 'package:flutter/rendering.dart';
import 'package:flutter/widgets.dart';
import 'package:vector_math/vector_math_64.dart';

View File

@@ -3,7 +3,7 @@
// found in the LICENSE file.
import 'dart:async';
import 'dart:ui' as ui;
import 'dart:ui' as ui show WindowPadding, window;
import 'package:flutter/rendering.dart';
import 'package:flutter/services.dart';
@@ -12,6 +12,8 @@ import 'package:flutter/widgets.dart';
import 'page.dart';
import 'theme.dart';
export 'dart:ui' show Locale;
const TextStyle _errorTextStyle = const TextStyle(
color: const Color(0xD0FF0000),
fontFamily: 'monospace',
@@ -38,7 +40,7 @@ class RouteArguments {
}
typedef Widget RouteBuilder(RouteArguments args);
typedef Future<LocaleQueryData> LocaleChangedCallback(ui.Locale locale);
typedef Future<LocaleQueryData> LocaleChangedCallback(Locale locale);
class MaterialApp extends StatefulComponent {
MaterialApp({
@@ -152,7 +154,7 @@ class _MaterialAppState extends State<MaterialApp> implements BindingObserver {
});
}
void didChangeLocale(ui.Locale locale) {
void didChangeLocale(Locale locale) {
if (config.onLocaleChanged != null) {
config.onLocaleChanged(locale).then((LocaleQueryData data) {
if (mounted)
@@ -161,7 +163,7 @@ class _MaterialAppState extends State<MaterialApp> implements BindingObserver {
}
}
void didChangeAppLifecycleState(ui.AppLifecycleState state) { }
void didChangeAppLifecycleState(AppLifecycleState state) { }
final HeroController _heroController = new HeroController();

View File

@@ -4,7 +4,6 @@
import 'dart:async';
import 'package:flutter/animation.dart';
import 'package:flutter/widgets.dart';
class _MaterialPageTransition extends AnimatedComponent {

View File

@@ -4,7 +4,6 @@
import 'dart:async';
import 'package:flutter/animation.dart';
import 'package:flutter/widgets.dart';
import 'ink_well.dart';

View File

@@ -3,9 +3,7 @@
// found in the LICENSE file.
import 'dart:math' as math;
import 'dart:ui' as ui;
import 'package:flutter/animation.dart';
import 'package:flutter/widgets.dart';
import 'theme.dart';
@@ -86,7 +84,7 @@ class _LinearProgressIndicatorPainter extends CustomPainter {
void paint(Canvas canvas, Size size) {
Paint paint = new Paint()
..color = backgroundColor
..style = ui.PaintingStyle.fill;
..style = PaintingStyle.fill;
canvas.drawRect(Point.origin & size, paint);
paint.color = valueColor;
@@ -155,7 +153,7 @@ class _CircularProgressIndicatorPainter extends CustomPainter {
Paint paint = new Paint()
..color = valueColor
..strokeWidth = _kCircularProgressIndicatorStrokeWidth
..style = ui.PaintingStyle.stroke;
..style = PaintingStyle.stroke;
if (value != null) {
double angle = value.clamp(0.0, 1.0) * _kSweep;

View File

@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'dart:ui' as ui;
import 'package:flutter/rendering.dart';
import 'package:flutter/widgets.dart';
@@ -116,13 +114,13 @@ class _RenderRadio extends RenderToggleable {
// Outer circle
Paint paint = new Paint()
..color = Color.lerp(inactiveColor, radioColor, position.value)
..style = ui.PaintingStyle.stroke
..style = PaintingStyle.stroke
..strokeWidth = 2.0;
canvas.drawCircle(center, _kOuterRadius, paint);
// Inner circle
if (!position.isDismissed) {
paint.style = ui.PaintingStyle.fill;
paint.style = PaintingStyle.fill;
canvas.drawCircle(center, _kInnerRadius * position.value, paint);
}
}

View File

@@ -6,8 +6,6 @@ import 'dart:async';
import 'dart:collection';
import 'dart:math' as math;
import 'package:flutter/animation.dart';
import 'package:flutter/rendering.dart';
import 'package:flutter/widgets.dart';
import 'bottom_sheet.dart';

View File

@@ -4,8 +4,6 @@
import 'dart:async';
import 'package:flutter/animation.dart';
import 'package:flutter/rendering.dart';
import 'package:flutter/widgets.dart';
const double _kMinScrollbarThumbLength = 18.0;

View File

@@ -2,9 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'package:flutter/animation.dart';
import 'package:flutter/gestures.dart';
import 'package:flutter/painting.dart';
import 'package:flutter/rendering.dart';
import 'package:flutter/widgets.dart';

View File

@@ -2,7 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'package:flutter/animation.dart';
import 'package:flutter/widgets.dart';
import 'flat_button.dart';

View File

@@ -2,10 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'dart:ui' as ui;
import 'package:flutter/gestures.dart';
import 'package:flutter/painting.dart';
import 'package:flutter/rendering.dart';
import 'package:flutter/widgets.dart';
@@ -194,13 +191,13 @@ class _RenderSwitch extends RenderToggleable {
size.width - 2.0 * trackHorizontalPadding,
_kTrackHeight
);
ui.RRect trackRRect = new ui.RRect.fromRectXY(
trackRect, _kTrackRadius, _kTrackRadius);
RRect trackRRect = new RRect.fromRectXY(trackRect, _kTrackRadius, _kTrackRadius);
canvas.drawRRect(trackRRect, paint);
Offset thumbOffset = new Offset(
offset.dx + kRadialReactionRadius + position.value * _trackInnerLength,
offset.dy + size.height / 2.0);
offset.dy + size.height / 2.0
);
paintRadialReaction(canvas, thumbOffset);

View File

@@ -6,7 +6,6 @@ import 'dart:async';
import 'dart:math' as math;
import 'package:newton/newton.dart';
import 'package:flutter/animation.dart';
import 'package:flutter/rendering.dart';
import 'package:flutter/widgets.dart';

View File

@@ -2,7 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'package:flutter/animation.dart';
import 'package:flutter/widgets.dart';
import 'theme_data.dart';

View File

@@ -4,10 +4,7 @@
import 'dart:math' as math;
import 'package:flutter/animation.dart';
import 'package:flutter/painting.dart';
import 'package:flutter/rendering.dart';
import 'package:flutter/services.dart';
import 'package:flutter/services.dart' show HapticFeedbackType, userFeedback;
import 'package:flutter/widgets.dart';
import 'colors.dart';

View File

@@ -5,9 +5,6 @@
import 'dart:async';
import 'dart:math' as math;
import 'package:flutter/animation.dart';
import 'package:flutter/painting.dart';
import 'package:flutter/rendering.dart';
import 'package:flutter/widgets.dart';
import 'colors.dart';

View File

@@ -2,7 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'package:flutter/animation.dart';
import 'package:flutter/widgets.dart';
import 'colors.dart';

View File

@@ -3,21 +3,51 @@
// found in the LICENSE file.
export 'dart:ui' show
BlurStyle,
Canvas,
Color,
ColorFilter,
FilterQuality,
FontStyle,
FontWeight,
ImageShader,
LayerDrawLooperBuilder,
MaskFilter,
Offset,
Paint,
PaintingStyle,
Path,
Point,
RRect,
RSTransform,
Rect,
Shader,
Size,
StrokeCap,
TextAlign,
TextBaseline,
TextDecoration,
TextDecorationStyle,
TextDirection,
TileMode,
TransferMode,
VertexMode,
VoidCallback,
hashValues,
hashList;
// Intentionally not exported:
// - Image, decodeImageFromDataPipe, decodeImageFromList:
// We use ui.* to make it very explicit that these are low-level image APIs.
// Generally, higher layers provide more reasonable APIs around images.
// - lerpDouble:
// Hopefully this will eventually become Double.lerp.
// - Paragraph, ParagraphBuilder, ParagraphStyle, TextBox:
// These are low-level text primitives. Use this package's TextPainter API.
// - Picture, PictureRecorder, Scene, SceneBuilder:
// These are low-level primitives. Generally, the rendering layer makes these moot.
// - Gradient:
// Use this package's higher-level Gradient API instead.
// - window, WindowPadding
// These are generally wrapped by other APIs so we always refer to them directly
// as ui.* to avoid making them seem like high-level APIs.

View File

@@ -3,7 +3,7 @@
// found in the LICENSE file.
import 'dart:math' as math;
import 'dart:ui' as ui;
import 'dart:ui' as ui show Image, Gradient, lerpDouble;
import 'package:flutter/services.dart';
@@ -238,7 +238,7 @@ class BoxShadow {
/// A 2D gradient.
abstract class Gradient {
const Gradient();
ui.Shader createShader();
Shader createShader();
}
/// A 2D linear gradient.
@@ -248,7 +248,7 @@ class LinearGradient extends Gradient {
this.end,
this.colors,
this.stops,
this.tileMode: ui.TileMode.clamp
this.tileMode: TileMode.clamp
});
/// The point at which stop 0.0 of the gradient is placed.
@@ -269,9 +269,9 @@ class LinearGradient extends Gradient {
final List<double> stops;
/// How this gradient should tile the plane.
final ui.TileMode tileMode;
final TileMode tileMode;
ui.Shader createShader() {
Shader createShader() {
return new ui.Gradient.linear(<Point>[begin, end], this.colors, this.stops, this.tileMode);
}
@@ -320,7 +320,7 @@ class RadialGradient extends Gradient {
this.radius,
this.colors,
this.stops,
this.tileMode: ui.TileMode.clamp
this.tileMode: TileMode.clamp
});
/// The center of the gradient.
@@ -343,9 +343,9 @@ class RadialGradient extends Gradient {
final List<double> stops;
/// How this gradient should tile the plane.
final ui.TileMode tileMode;
final TileMode tileMode;
ui.Shader createShader() {
Shader createShader() {
return new ui.Gradient.radial(center, radius, colors, stops, tileMode);
}
@@ -869,7 +869,7 @@ class BoxDecoration extends Decoration {
double shortestSide = rect.shortestSide;
// In principle, we should use shortestSide / 2.0, but we don't want to
// run into floating point rounding errors. Instead, we just use
// shortestSide and let ui.Canvas do any remaining clamping.
// shortestSide and let Canvas do any remaining clamping.
return borderRadius > shortestSide ? shortestSide : borderRadius;
}
@@ -879,7 +879,7 @@ class BoxDecoration extends Decoration {
switch (shape) {
case BoxShape.rectangle:
if (borderRadius != null) {
ui.RRect bounds = new ui.RRect.fromRectXY(Point.origin & size, borderRadius, borderRadius);
RRect bounds = new RRect.fromRectXY(Point.origin & size, borderRadius, borderRadius);
return bounds.contains(position);
}
return true;
@@ -938,7 +938,7 @@ class _BoxDecorationPainter extends BoxPainter {
return hasUniformWidth;
}
void _paintBox(ui.Canvas canvas, Rect rect, Paint paint) {
void _paintBox(Canvas canvas, Rect rect, Paint paint) {
switch (_decoration.shape) {
case BoxShape.circle:
assert(_decoration.borderRadius == null);
@@ -951,30 +951,30 @@ class _BoxDecorationPainter extends BoxPainter {
canvas.drawRect(rect, paint);
} else {
double radius = _decoration.getEffectiveBorderRadius(rect);
canvas.drawRRect(new ui.RRect.fromRectXY(rect, radius, radius), paint);
canvas.drawRRect(new RRect.fromRectXY(rect, radius, radius), paint);
}
break;
}
}
void _paintShadows(ui.Canvas canvas, Rect rect) {
void _paintShadows(Canvas canvas, Rect rect) {
if (_decoration.boxShadow == null)
return;
for (BoxShadow boxShadow in _decoration.boxShadow) {
final Paint paint = new Paint()
..color = boxShadow.color
..maskFilter = new ui.MaskFilter.blur(ui.BlurStyle.normal, boxShadow._blurSigma);
..maskFilter = new MaskFilter.blur(BlurStyle.normal, boxShadow._blurSigma);
final Rect bounds = rect.shift(boxShadow.offset).inflate(boxShadow.spreadRadius);
_paintBox(canvas, bounds, paint);
}
}
void _paintBackgroundColor(ui.Canvas canvas, Rect rect) {
void _paintBackgroundColor(Canvas canvas, Rect rect) {
if (_decoration.backgroundColor != null || _decoration.gradient != null)
_paintBox(canvas, rect, _backgroundPaint);
}
void _paintBackgroundImage(ui.Canvas canvas, Rect rect) {
void _paintBackgroundImage(Canvas canvas, Rect rect) {
final BackgroundImage backgroundImage = _decoration.backgroundImage;
if (backgroundImage == null)
return;
@@ -993,7 +993,7 @@ class _BoxDecorationPainter extends BoxPainter {
);
}
void _paintBorder(ui.Canvas canvas, Rect rect) {
void _paintBorder(Canvas canvas, Rect rect) {
if (_decoration.border == null)
return;
@@ -1056,19 +1056,19 @@ class _BoxDecorationPainter extends BoxPainter {
canvas.drawPath(path, paint);
}
void _paintBorderWithRadius(ui.Canvas canvas, Rect rect) {
void _paintBorderWithRadius(Canvas canvas, Rect rect) {
assert(_hasUniformBorder);
assert(_decoration.shape == BoxShape.rectangle);
Color color = _decoration.border.top.color;
double width = _decoration.border.top.width;
double radius = _decoration.getEffectiveBorderRadius(rect);
ui.RRect outer = new ui.RRect.fromRectXY(rect, radius, radius);
ui.RRect inner = new ui.RRect.fromRectXY(rect.deflate(width), radius - width, radius - width);
RRect outer = new RRect.fromRectXY(rect, radius, radius);
RRect inner = new RRect.fromRectXY(rect.deflate(width), radius - width, radius - width);
canvas.drawDRRect(outer, inner, new Paint()..color = color);
}
void _paintBorderWithCircle(ui.Canvas canvas, Rect rect) {
void _paintBorderWithCircle(Canvas canvas, Rect rect) {
assert(_hasUniformBorder);
assert(_decoration.shape == BoxShape.circle);
assert(_decoration.borderRadius == null);
@@ -1078,14 +1078,14 @@ class _BoxDecorationPainter extends BoxPainter {
Paint paint = new Paint()
..color = _decoration.border.top.color
..strokeWidth = width
..style = ui.PaintingStyle.stroke;
..style = PaintingStyle.stroke;
Point center = rect.center;
double radius = (rect.shortestSide - width) / 2.0;
canvas.drawCircle(center, radius, paint);
}
/// Paint the box decoration into the given location on the given canvas
void paint(ui.Canvas canvas, Rect rect) {
void paint(Canvas canvas, Rect rect) {
_paintShadows(canvas, rect);
_paintBackgroundColor(canvas, rect);
_paintBackgroundImage(canvas, rect);

View File

@@ -2,8 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'dart:ui' as ui;
import 'basic_types.dart';
import 'edge_dims.dart';
export 'edge_dims.dart' show EdgeDims;
@@ -16,14 +15,14 @@ abstract class Decoration {
EdgeDims get padding => null;
Decoration lerpFrom(Decoration a, double t) => this;
Decoration lerpTo(Decoration b, double t) => b;
bool hitTest(ui.Size size, ui.Point position) => true;
bool hitTest(Size size, Point position) => true;
bool get needsListeners => false;
void addChangeListener(ui.VoidCallback listener) { assert(false); }
void removeChangeListener(ui.VoidCallback listener) { assert(false); }
void addChangeListener(VoidCallback listener) { assert(false); }
void removeChangeListener(VoidCallback listener) { assert(false); }
BoxPainter createBoxPainter();
String toString([String prefix = '']) => '$prefix$runtimeType';
}
abstract class BoxPainter {
void paint(ui.Canvas canvas, ui.Rect rect);
void paint(Canvas canvas, Rect rect);
}

View File

@@ -2,8 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'dart:ui' as ui;
import 'dart:ui' show hashValues;
import 'dart:ui' as ui show lerpDouble;
import 'basic_types.dart';
/// An immutable set of offsets in each of the four cardinal directions.
///
@@ -50,13 +51,13 @@ class EdgeDims {
double get vertical => top + bottom;
/// The size that this EdgeDims would occupy with an empty interior.
ui.Size get collapsedSize => new ui.Size(horizontal, vertical);
Size get collapsedSize => new Size(horizontal, vertical);
/// An EdgeDims with top and bottom as well as left and right flipped.
EdgeDims get flipped => new EdgeDims.TRBL(bottom, left, top, right);
ui.Rect inflateRect(ui.Rect rect) {
return new ui.Rect.fromLTRB(rect.left - left, rect.top - top, rect.right + right, rect.bottom + bottom);
Rect inflateRect(Rect rect) {
return new Rect.fromLTRB(rect.left - left, rect.top - top, rect.right + right, rect.bottom + bottom);
}
EdgeDims operator -(EdgeDims other) {

View File

@@ -1,29 +0,0 @@
// 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 'dart:ui' as ui;
/// A helper class to build a [ui.DrawLooper] for drawing shadows
class ShadowDrawLooperBuilder {
ui.LayerDrawLooperBuilder _builder = new ui.LayerDrawLooperBuilder();
/// Adds a shadow with the given parameters.
void addShadow(ui.Offset offset, ui.Color color, double blur) {
_builder.addLayerOnTop(
new ui.DrawLooperLayerInfo()
..setPaintBits(ui.PaintBits.all)
..setOffset(offset)
..setColorMode(ui.TransferMode.src),
new ui.Paint()
..color = color
..maskFilter = new ui.MaskFilter.blur(ui.BlurStyle.normal, blur)
);
}
/// Returns the draw looper built for the added shadows
ui.DrawLooper build() {
_builder.addLayerOnTop(new ui.DrawLooperLayerInfo(), new ui.Paint());
return _builder.build();
}
}

View File

@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'dart:ui' as ui;
import 'dart:ui' as ui show Paragraph, ParagraphBuilder, ParagraphStyle, TextBox;
import 'basic_types.dart';
import 'text_editing.dart';
@@ -212,7 +212,7 @@ class TextPainter {
}
/// Paints the text onto the given canvas at the given offset.
void paint(ui.Canvas canvas, ui.Offset offset) {
void paint(Canvas canvas, Offset offset) {
assert(!_needsLayout && "Please call layout() before paint() to position the text before painting it." is String);
_paragraph.paint(canvas, offset);
}
@@ -223,7 +223,7 @@ class TextPainter {
return null;
ui.TextBox box = boxes[0];
double caretEnd = box.end;
double dx = box.direction == ui.TextDirection.rtl ? caretEnd : caretEnd - caretPrototype.width;
double dx = box.direction == TextDirection.rtl ? caretEnd : caretEnd - caretPrototype.width;
return new Offset(dx, 0.0);
}
@@ -233,7 +233,7 @@ class TextPainter {
return null;
ui.TextBox box = boxes[0];
double caretStart = box.start;
double dx = box.direction == ui.TextDirection.rtl ? caretStart - caretPrototype.width : caretStart;
double dx = box.direction == TextDirection.rtl ? caretStart - caretPrototype.width : caretStart;
return new Offset(dx, 0.0);
}

View File

@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'dart:ui' as ui;
import 'dart:ui' as ui show ParagraphStyle, TextStyle, lerpDouble;
import 'basic_types.dart';

View File

@@ -2,19 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
export 'dart:ui' show
Canvas,
Color,
ColorFilter,
Offset,
Paint,
Path,
Point,
Rect,
Size,
TransferMode,
VoidCallback;
typedef void ValueChanged<T>(T value);
/// A BitField over an enum (or other class whose values implement "index").

View File

@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'dart:ui' as ui;
import 'dart:ui' as ui show window;
import 'package:flutter/gestures.dart';
import 'package:flutter/scheduler.dart';

View File

@@ -3,19 +3,15 @@
// found in the LICENSE file.
import 'dart:math' as math;
import 'dart:ui' as ui;
import 'dart:ui' show hashValues;
import 'dart:ui' as ui show lerpDouble;
import 'package:flutter/animation.dart';
import 'package:flutter/gestures.dart';
import 'package:flutter/painting.dart';
import 'package:vector_math/vector_math_64.dart';
import 'debug.dart';
import 'object.dart';
export 'package:flutter/painting.dart' show EdgeDims, FractionalOffset, TextBaseline;
// This class should only be used in debug builds
class _DebugSize extends Size {
_DebugSize(Size source, this._owner, this._canBeUsedByParent): super.copy(source);
@@ -837,7 +833,7 @@ abstract class RenderBox extends RenderObject {
void debugPaintSize(PaintingContext context, Offset offset) {
assert(() {
Paint paint = new Paint()
..style = ui.PaintingStyle.stroke
..style = PaintingStyle.stroke
..strokeWidth = 1.0
..color = debugPaintSizeColor;
context.canvas.drawRect((offset & size).deflate(0.5), paint);
@@ -847,7 +843,7 @@ abstract class RenderBox extends RenderObject {
void debugPaintBaselines(PaintingContext context, Offset offset) {
assert(() {
Paint paint = new Paint()
..style = ui.PaintingStyle.stroke
..style = PaintingStyle.stroke
..strokeWidth = 0.25;
Path path;
// ideographic baseline

View File

@@ -5,7 +5,6 @@
import 'dart:async';
import 'dart:convert' show JSON;
import 'dart:developer' as developer;
import 'dart:ui' as ui;
import 'package:flutter/painting.dart';
import 'package:flutter/rendering.dart';
@@ -18,35 +17,35 @@ export 'package:flutter/services.dart' show debugPrint;
bool debugPaintSizeEnabled = false;
/// The color to use when painting RenderObject bounds.
ui.Color debugPaintSizeColor = const ui.Color(0xFF00FFFF);
Color debugPaintSizeColor = const Color(0xFF00FFFF);
/// The color to use when painting some boxes that just add space (e.g. an empty
/// RenderConstrainedBox or RenderPadding).
ui.Color debugPaintSpacingColor = const ui.Color(0x90909090);
Color debugPaintSpacingColor = const Color(0x90909090);
/// The color to use when painting RenderPadding edges.
ui.Color debugPaintPaddingColor = const ui.Color(0x900090FF);
Color debugPaintPaddingColor = const Color(0x900090FF);
/// The color to use when painting RenderPadding edges.
ui.Color debugPaintPaddingInnerEdgeColor = const ui.Color(0xFF0090FF);
Color debugPaintPaddingInnerEdgeColor = const Color(0xFF0090FF);
/// The color to use when painting the arrows used to show RenderPositionedBox alignment.
ui.Color debugPaintArrowColor = const ui.Color(0xFFFFFF00);
Color debugPaintArrowColor = const Color(0xFFFFFF00);
/// Causes each RenderBox to paint a line at each of its baselines.
bool debugPaintBaselinesEnabled = false;
/// The color to use when painting alphabetic baselines.
ui.Color debugPaintAlphabeticBaselineColor = const ui.Color(0xFF00FF00);
Color debugPaintAlphabeticBaselineColor = const Color(0xFF00FF00);
/// The color ot use when painting ideographic baselines.
ui.Color debugPaintIdeographicBaselineColor = const ui.Color(0xFFFFD000);
Color debugPaintIdeographicBaselineColor = const Color(0xFFFFD000);
/// Causes each Layer to paint a box around its bounds.
bool debugPaintLayerBordersEnabled = false;
/// The color to use when painting Layer borders.
ui.Color debugPaintLayerBordersColor = const ui.Color(0xFFFF9800);
Color debugPaintLayerBordersColor = const Color(0xFFFF9800);
/// Causes RenderBox objects to flash while they are being tapped.
bool debugPaintPointersEnabled = false;
@@ -55,7 +54,7 @@ bool debugPaintPointersEnabled = false;
int debugPaintPointersColorValue = 0x00BBBB;
/// The color to use when painting RenderError boxes in checked mode.
ui.Color debugErrorBoxColor = const ui.Color(0xFFFF0000);
Color debugErrorBoxColor = const Color(0xFFFF0000);
/// Overlay a rotating set of colors when repainting layers in checked mode.
bool debugEnableRepaintRainbox = false;

View File

@@ -2,14 +2,13 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'dart:ui' as ui;
import 'dart:ui' as ui show Paragraph, ParagraphBuilder, ParagraphStyle, TextBox;
import 'package:flutter/gestures.dart';
import 'package:flutter/painting.dart';
import 'basic_types.dart';
import 'box.dart';
import 'object.dart';
import 'paragraph.dart';
const _kCaretGap = 1.0; // pixels
const _kCaretHeightOffset = 2.0; // pixels

View File

@@ -2,9 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'dart:ui' as ui;
import 'package:flutter/painting.dart';
import 'dart:ui' as ui show Image;
import 'box.dart';
import 'object.dart';

View File

@@ -2,16 +2,15 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'dart:ui' as ui;
import 'dart:ui' as ui show Picture, SceneBuilder;
import 'dart:ui' show Offset;
import 'package:flutter/painting.dart';
import 'package:vector_math/vector_math_64.dart';
import 'package:mojo_services/mojo/ui/layouts.mojom.dart' as mojom;
import 'basic_types.dart';
import 'debug.dart';
export 'basic_types.dart';
/// A composited layer
///
/// During painting, the render tree generates a tree of composited layers that
@@ -317,7 +316,7 @@ class ClipRRectLayer extends ContainerLayer {
ClipRRectLayer({ this.clipRRect });
/// The rounded-rect to clip in the parent's coordinate system
ui.RRect clipRRect;
RRect clipRRect;
// TODO(abarth): Why is the rounded-rect in the parent's coordinate system
// instead of in the coordinate system of this layer?
@@ -403,7 +402,7 @@ class ShaderMaskLayer extends ContainerLayer {
ShaderMaskLayer({ this.shader, this.maskRect, this.transferMode });
/// The shader to apply to the children.
ui.Shader shader;
Shader shader;
/// The size of the shader.
Rect maskRect;

View File

@@ -3,7 +3,7 @@
// found in the LICENSE file.
import 'dart:developer';
import 'dart:ui' as ui;
import 'dart:ui' as ui show PictureRecorder;
import 'package:flutter/gestures.dart';
import 'package:flutter/painting.dart';
@@ -18,8 +18,8 @@ import 'node.dart';
import 'semantics.dart';
import 'binding.dart';
export 'layer.dart';
export 'package:flutter/gestures.dart' show HitTestEntry, HitTestResult;
export 'package:flutter/painting.dart';
/// Base class for data associated with a [RenderObject] by its parent.
///
@@ -163,7 +163,7 @@ class PaintingContext {
canvas.drawRect(_paintBounds, new Paint()..color = debugCurrentRepaintColor.toColor());
if (debugPaintLayerBordersEnabled) {
Paint paint = new Paint()
..style = ui.PaintingStyle.stroke
..style = PaintingStyle.stroke
..strokeWidth = 1.0
..color = debugPaintLayerBordersColor;
canvas.drawRect(_paintBounds, paint);
@@ -223,9 +223,9 @@ class PaintingContext {
/// This function will call painter synchronously with a painting context that
/// is clipped by the given clip. The given clip should not incorporate the
/// painting offset.
void pushClipRRect(bool needsCompositing, Offset offset, Rect bounds, ui.RRect clipRRect, PaintingContextCallback painter) {
void pushClipRRect(bool needsCompositing, Offset offset, Rect bounds, RRect clipRRect, PaintingContextCallback painter) {
Rect offsetBounds = bounds.shift(offset);
ui.RRect offsetClipRRect = clipRRect.shift(offset);
RRect offsetClipRRect = clipRRect.shift(offset);
if (needsCompositing) {
_stopRecordingIfNeeded();
ClipRRectLayer clipLayer = new ClipRRectLayer(clipRRect: offsetClipRRect);
@@ -305,7 +305,7 @@ class PaintingContext {
///
/// This function will call painter synchronously with a painting context that
/// will be masked with the given shader.
void pushShaderMask(Offset offset, ui.Shader shader, Rect maskRect, TransferMode transferMode, PaintingContextCallback painter) {
void pushShaderMask(Offset offset, Shader shader, Rect maskRect, TransferMode transferMode, PaintingContextCallback painter) {
_stopRecordingIfNeeded();
ShaderMaskLayer shaderLayer = new ShaderMaskLayer(
shader: shader,

View File

@@ -2,24 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'package:flutter/painting.dart';
import 'box.dart';
import 'object.dart';
import 'semantics.dart';
export 'package:flutter/painting.dart' show
FontStyle,
FontWeight,
PlainTextSpan,
StyledTextSpan,
TextAlign,
TextBaseline,
TextDecoration,
TextDecorationStyle,
TextSpan,
TextStyle;
/// A render object that displays a paragraph of text
class RenderParagraph extends RenderBox {

View File

@@ -2,12 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'dart:ui' as ui;
import 'package:flutter/painting.dart';
import 'package:flutter/gestures.dart';
import 'package:vector_math/vector_math_64.dart';
import 'basic_types.dart';
import 'box.dart';
import 'debug.dart';
import 'object.dart';
@@ -19,7 +17,6 @@ export 'package:flutter/gestures.dart' show
PointerMoveEvent,
PointerUpEvent,
PointerCancelEvent;
export 'package:flutter/painting.dart' show Decoration, BoxDecoration;
/// A base class for render objects that resemble their children.
///
@@ -642,7 +639,7 @@ class RenderOpacity extends RenderProxyBox {
}
}
typedef ui.Shader ShaderCallback(Rect bounds);
typedef Shader ShaderCallback(Rect bounds);
class RenderShaderMask extends RenderProxyBox {
RenderShaderMask({ RenderBox child, ShaderCallback shaderCallback, TransferMode transferMode })
@@ -805,7 +802,7 @@ class RenderClipRRect extends RenderProxyBox {
void paint(PaintingContext context, Offset offset) {
if (child != null) {
Rect rect = Point.origin & size;
ui.RRect rrect = new ui.RRect.fromRectXY(rect, xRadius, yRadius);
RRect rrect = new RRect.fromRectXY(rect, xRadius, yRadius);
context.pushClipRRect(needsCompositing, offset, rect, rrect, super.paint);
}
}

View File

@@ -3,9 +3,6 @@
// found in the LICENSE file.
import 'dart:math' as math;
import 'dart:ui' as ui;
import 'package:flutter/painting.dart';
import 'box.dart';
import 'debug.dart';
@@ -300,7 +297,7 @@ class RenderPositionedBox extends RenderShiftedBox {
if (child != null && !child.size.isEmpty) {
Path path;
paint = new Paint()
..style = ui.PaintingStyle.stroke
..style = PaintingStyle.stroke
..strokeWidth = 1.0
..color = debugPaintArrowColor;
path = new Path();

View File

@@ -3,9 +3,8 @@
// found in the LICENSE file.
import 'dart:developer';
import 'dart:ui' as ui;
import 'dart:ui' as ui show Scene, SceneBuilder, window;
import 'package:flutter/painting.dart';
import 'package:flutter/scheduler.dart';
import 'package:vector_math/vector_math_64.dart';

View File

@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'dart:ui' as ui;
import 'dart:ui' as ui show window;
import 'package:vector_math/vector_math_64.dart';

View File

@@ -5,11 +5,14 @@
import 'dart:async';
import 'dart:collection';
import 'dart:developer';
import 'dart:ui' as ui;
import 'dart:ui' as ui show window;
import 'dart:ui' show VoidCallback;
import 'package:collection/collection.dart';
import 'package:flutter/services.dart';
export 'dart:ui' show VoidCallback;
/// Slows down animations by this factor to help in development.
double timeDilation = 1.0;
@@ -32,7 +35,7 @@ SchedulerExceptionHandler debugSchedulerExceptionHandler;
///
/// Combines the task and its priority.
class _TaskEntry {
final ui.VoidCallback task;
final VoidCallback task;
final int priority;
const _TaskEntry(this.task, this.priority);
@@ -110,7 +113,7 @@ abstract class Scheduler extends BindingBase {
bool _hasRequestedABeginFrameCallback = false;
/// Schedules the given [task] with the given [priority].
void scheduleTask(ui.VoidCallback task, Priority priority) {
void scheduleTask(VoidCallback task, Priority priority) {
bool isFirstTask = _taskQueue.isEmpty;
_taskQueue.add(new _TaskEntry(task, priority._value));
if (isFirstTask)

View File

@@ -4,7 +4,7 @@
import 'dart:async';
import 'package:flutter/scheduler.dart';
import 'scheduler.dart';
typedef TickerCallback(Duration elapsed);

View File

@@ -4,7 +4,7 @@
import 'dart:async';
import 'dart:typed_data';
import 'dart:ui' as ui;
import 'dart:ui' as ui show Image, decodeImageFromDataPipe, decodeImageFromList;
import 'package:mojo/core.dart' show MojoDataPipeConsumer;

View File

@@ -3,7 +3,7 @@
// found in the LICENSE file.
import 'dart:async';
import 'dart:ui' as ui;
import 'dart:ui' as ui show Image;
import 'print.dart';

View File

@@ -2,72 +2,46 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'dart:ui' as ui;
import 'dart:ui' as ui show Image;
import 'package:flutter/rendering.dart';
import 'package:flutter/services.dart';
import 'framework.dart';
export 'package:flutter/animation.dart';
export 'package:flutter/painting.dart';
export 'package:flutter/rendering.dart' show
BackgroundImage,
Border,
BorderSide,
Axis,
BoxConstraints,
BoxDecoration,
BoxShadow,
BoxShape,
Canvas,
Color,
ColorFilter,
CustomClipper,
CustomPainter,
Decoration,
DecorationPosition,
EdgeDims,
FixedColumnCountGridDelegate,
FlexAlignItems,
FlexDirection,
FlexJustifyContent,
FixedColumnCountGridDelegate,
FontStyle,
FontWeight,
FractionalOffset,
Gradient,
FractionalOffsetTween,
GridDelegate,
HitTestBehavior,
ImageFit,
ImageRepeat,
InputEvent,
LinearGradient,
Matrix4,
MaxTileWidthGridDelegate,
Offset,
MultiChildLayoutDelegate,
OneChildLayoutDelegate,
Paint,
Path,
Painter,
PaintingContext,
PlainTextSpan,
Point,
PointerCancelEvent,
PointerCancelEventListener,
PointerDownEvent,
PointerDownEventListener,
PointerEvent,
PointerMoveEvent,
PointerMoveEventListener,
PointerUpEvent,
RadialGradient,
Rect,
Axis,
Size,
StyledTextSpan,
TextAlign,
TextBaseline,
TextDecoration,
TextDecorationStyle,
TextSpan,
TextStyle,
TransferMode,
PointerUpEventListener,
RelativeRect,
ShaderCallback,
ValueChanged,
ViewportAnchor,
VoidCallback;
ViewportAnchor;
// PAINTING NODES

View File

@@ -2,8 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'dart:ui' as ui;
import 'dart:developer';
import 'dart:ui' as ui show window;
import 'dart:ui' show AppLifecycleState, Locale;
import 'package:flutter/gestures.dart';
import 'package:flutter/rendering.dart';
@@ -12,11 +13,13 @@ import 'package:flutter/services.dart';
import 'framework.dart';
export 'dart:ui' show AppLifecycleState, Locale;
class BindingObserver {
bool didPopRoute() => false;
void didChangeMetrics() { }
void didChangeLocale(ui.Locale locale) { }
void didChangeAppLifecycleState(ui.AppLifecycleState state) { }
void didChangeLocale(Locale locale) { }
void didChangeAppLifecycleState(AppLifecycleState state) { }
}
/// A concrete binding for applications based on the Widgets framework.
@@ -69,7 +72,7 @@ class WidgetFlutterBinding extends BindingBase with Scheduler, Gesturer, MojoShe
dispatchLocaleChanged(ui.window.locale);
}
void dispatchLocaleChanged(ui.Locale locale) {
void dispatchLocaleChanged(Locale locale) {
for (BindingObserver observer in _observers)
observer.didChangeLocale(locale);
}
@@ -82,7 +85,7 @@ class WidgetFlutterBinding extends BindingBase with Scheduler, Gesturer, MojoShe
activity.finishCurrentActivity();
}
void handleAppLifecycleStateChanged(ui.AppLifecycleState state) {
void handleAppLifecycleStateChanged(AppLifecycleState state) {
for (BindingObserver observer in _observers)
observer.didChangeAppLifecycleState(state);
}

View File

@@ -3,10 +3,6 @@
// found in the LICENSE file.
import 'dart:math' as math;
import 'dart:ui' as ui;
import 'package:flutter/painting.dart';
import 'package:flutter/rendering.dart';
import 'basic.dart';
import 'framework.dart';
@@ -37,7 +33,7 @@ class _CheckedModeBannerPainter extends CustomPainter {
void paint(Canvas canvas, Size size) {
final Paint paintShadow = new Paint()
..color = const Color(0x7F000000)
..maskFilter = new ui.MaskFilter.blur(ui.BlurStyle.normal, kShadowBlur);
..maskFilter = new MaskFilter.blur(BlurStyle.normal, kShadowBlur);
final Paint paintBanner = new Paint()
..color = kColor;
canvas

View File

@@ -2,10 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'dart:ui' as ui;
import 'package:flutter/animation.dart';
import 'basic.dart';
import 'transitions.dart';
import 'framework.dart';
@@ -186,7 +182,7 @@ class _DismissableState extends State<Dismissable> {
_dismissController.value = _dragExtent.abs() / _size.width;
}
bool _isFlingGesture(ui.Offset velocity) {
bool _isFlingGesture(Offset velocity) {
double vx = velocity.dx;
double vy = velocity.dy;
if (_directionIsYAxis) {
@@ -215,7 +211,7 @@ class _DismissableState extends State<Dismissable> {
return false;
}
void _handleDragEnd(ui.Offset velocity) {
void _handleDragEnd(Offset velocity) {
if (!_isActive || _dismissController.isAnimating)
return;
setState(() {

View File

@@ -4,9 +4,8 @@
import 'dart:async';
import 'package:flutter/rendering.dart' show RenderEditableLine;
import 'package:sky_services/editing/editing.mojom.dart' as mojom;
import 'package:flutter/painting.dart';
import 'package:flutter/rendering.dart';
import 'basic.dart';
import 'framework.dart';

View File

@@ -4,8 +4,6 @@
import 'dart:async';
import 'package:flutter/animation.dart';
import 'basic.dart';
import 'framework.dart';

View File

@@ -8,7 +8,7 @@ import 'dart:collection';
import 'package:flutter/rendering.dart';
export 'dart:ui' show hashValues, hashList;
export 'package:flutter/rendering.dart' show debugPrint;
export 'package:flutter/rendering.dart' show RenderObject, RenderBox, debugPrint;
// KEYS

View File

@@ -4,8 +4,6 @@
import 'dart:collection';
import 'package:flutter/animation.dart';
import 'package:flutter/rendering.dart';
import 'package:flutter/scheduler.dart';
import 'basic.dart';

View File

@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'package:flutter/animation.dart';
import 'basic.dart';
import 'framework.dart';

View File

@@ -4,8 +4,7 @@
import 'dart:async';
import 'package:flutter/animation.dart';
import 'package:flutter/rendering.dart';
import 'package:flutter/rendering.dart' show RenderStack;
import 'basic.dart';
import 'framework.dart';
@@ -110,7 +109,9 @@ class MimicOverlayEntry {
RenderBox stack = context.ancestorRenderObjectOfType(const TypeMatcher<RenderStack>());
// TODO(abarth): Handle the case where the transform here isn't just a translation.
Point localPosition = stack == null ? globalPosition: stack.globalToLocal(globalPosition);
// TODO(ianh): We should probably be getting the overlay's render object rather than looking for a RenderStack.
assert(stack != null);
Point localPosition = stack.globalToLocal(globalPosition);
return new Positioned(
left: localPosition.x,
top: localPosition.y,

View File

@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'package:flutter/animation.dart';
import 'basic.dart';
import 'framework.dart';
import 'gesture_detector.dart';

Some files were not shown because too many files have changed in this diff Show More