Skip to content

Pulling from flutter/master #8

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 14 commits into from
Jul 25, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .analysis_options
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ linter:
- prefer_adjacent_string_concatenation
- prefer_collection_literals
# - prefer_conditional_assignment # not yet tested
- prefer_const_constructors
# - prefer_const_constructors # https://github.com/dart-lang/linter/issues/752
# - prefer_constructors_over_static_methods # not yet tested
- prefer_contains
# - prefer_expression_function_bodies # conflicts with https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#consider-using--for-short-functions-and-methods
Expand Down
2 changes: 1 addition & 1 deletion .analysis_options_repo
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ linter:
- prefer_adjacent_string_concatenation
- prefer_collection_literals
# - prefer_conditional_assignment # not yet tested
- prefer_const_constructors
# - prefer_const_constructors # https://github.com/dart-lang/linter/issues/752
# - prefer_constructors_over_static_methods # not yet tested
- prefer_contains
# - prefer_expression_function_bodies # conflicts with https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#consider-using--for-short-functions-and-methods
Expand Down
2 changes: 1 addition & 1 deletion bin/internal/dart-sdk.version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.25.0-dev.4.0
1.25.0-dev.7.0
2 changes: 1 addition & 1 deletion bin/internal/engine.version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5fcfb995bbce72b5f1ee807121f51a3c0280c8b4
3a12bc092d58528dce40e7378b29d0a14c952ec0
9 changes: 2 additions & 7 deletions bin/internal/update_dart_sdk.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,8 @@ if (Test-Path $dartSdkPath) {
}
New-Item $dartSdkPath -force -type directory | Out-Null
$dartSdkZip = "$cachePath\dart-sdk.zip"
# TODO(goderbauer): remove (slow and backwards-incompatible) appveyor work around
if (Test-Path Env:\APPVEYOR) {
curl $dartSdkUrl -OutFile $dartSdkZip
} else {
Import-Module BitsTransfer
Start-BitsTransfer -Source $dartSdkUrl -Destination $dartSdkZip
}
Import-Module BitsTransfer
Start-BitsTransfer -Source $dartSdkUrl -Destination $dartSdkZip

Write-Host "Unzipping Dart SDK..."
If (Get-Command 7z -errorAction SilentlyContinue) {
Expand Down
13 changes: 13 additions & 0 deletions bin/internal/update_dart_sdk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ set -e
FLUTTER_ROOT="$(dirname "$(dirname "$(dirname "${BASH_SOURCE[0]}")")")"

DART_SDK_PATH="$FLUTTER_ROOT/bin/cache/dart-sdk"
DART_SDK_PATH_OLD="$DART_SDK_PATH.old"
DART_SDK_STAMP_PATH="$FLUTTER_ROOT/bin/cache/dart-sdk.stamp"
DART_SDK_VERSION=`cat "$FLUTTER_ROOT/bin/internal/dart-sdk.version"`

Expand Down Expand Up @@ -48,6 +49,13 @@ if [ ! -f "$DART_SDK_STAMP_PATH" ] || [ "$DART_SDK_VERSION" != `cat "$DART_SDK_S

DART_SDK_URL="https://storage.googleapis.com/dart-archive/channels/$DART_CHANNEL/raw/$DART_SDK_VERSION/sdk/$DART_ZIP_NAME"

# if the sdk path exists, copy it to a temporary location
if [ -d "$DART_SDK_PATH" ]; then
rm -rf "$DART_SDK_PATH_OLD"
mv "$DART_SDK_PATH" "$DART_SDK_PATH_OLD"
fi

# install the new sdk
rm -rf -- "$DART_SDK_PATH"
mkdir -p -- "$DART_SDK_PATH"
DART_SDK_ZIP="$FLUTTER_ROOT/bin/cache/dart-sdk.zip"
Expand All @@ -64,4 +72,9 @@ if [ ! -f "$DART_SDK_STAMP_PATH" ] || [ "$DART_SDK_VERSION" != `cat "$DART_SDK_S
}
rm -f -- "$DART_SDK_ZIP"
echo "$DART_SDK_VERSION" > "$DART_SDK_STAMP_PATH"

# delete any temporary sdk path
if [ -d "$DART_SDK_PATH_OLD" ]; then
rm -rf "$DART_SDK_PATH_OLD"
fi
fi
2 changes: 1 addition & 1 deletion dev/devicelab/test/adb_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import 'dart:async';

import 'package:test/test.dart';
import 'package:collection/collection.dart';
import 'package:collection/collection.dart' show ListEquality, MapEquality;

import 'package:flutter_devicelab/framework/adb.dart';

Expand Down
1 change: 1 addition & 0 deletions packages/flutter/lib/cupertino.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@ export 'src/cupertino/page.dart';
export 'src/cupertino/scaffold.dart';
export 'src/cupertino/slider.dart';
export 'src/cupertino/switch.dart';
export 'src/cupertino/text_selection.dart';
export 'src/cupertino/thumb_painter.dart';
export 'widgets.dart';
1 change: 1 addition & 0 deletions packages/flutter/lib/foundation.dart
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export 'src/foundation/assertions.dart';
export 'src/foundation/basic_types.dart';
export 'src/foundation/binding.dart';
export 'src/foundation/change_notifier.dart';
export 'src/foundation/collections.dart';
export 'src/foundation/debug.dart';
export 'src/foundation/licenses.dart';
export 'src/foundation/observer_list.dart';
Expand Down
1 change: 1 addition & 0 deletions packages/flutter/lib/gestures.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export 'src/gestures/arena.dart';
export 'src/gestures/binding.dart';
export 'src/gestures/constants.dart';
export 'src/gestures/converter.dart';
export 'src/gestures/debug.dart';
export 'src/gestures/drag.dart';
export 'src/gestures/drag_details.dart';
export 'src/gestures/events.dart';
Expand Down
33 changes: 20 additions & 13 deletions packages/flutter/lib/src/cupertino/button.dart
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,9 @@ class CupertinoButton extends StatefulWidget {
this.color,
this.minSize: 44.0,
this.pressedOpacity: 0.1,
this.borderRadius: const BorderRadius.all(const Radius.circular(8.0)),
@required this.onPressed,
}) : assert(pressedOpacity >= 0.0 && pressedOpacity <= 1.0);
}) : assert(pressedOpacity == null || (pressedOpacity >= 0.0 && pressedOpacity <= 1.0));

/// The widget below this widget in the tree.
///
Expand Down Expand Up @@ -83,9 +84,15 @@ class CupertinoButton extends StatefulWidget {
/// The opacity that the button will fade to when it is pressed.
/// The button will have an opacity of 1.0 when it is not pressed.
///
/// This defaults to 0.1.
/// This defaults to 0.1. If null, opacity will not change on pressed if using
/// your own custom effects is desired.
final double pressedOpacity;

/// The radius of the button's corners when it has a background color.
///
/// Defaults to round corners of 8 logical pixels.
final BorderRadius borderRadius;

/// Whether the button is enabled or disabled. Buttons are disabled by default. To
/// enable a button, set its [onPressed] property to a non-null value.
bool get enabled => onPressed != null;
Expand All @@ -112,7 +119,7 @@ class _CupertinoButtonState extends State<CupertinoButton> with SingleTickerProv
void _setTween() {
_opacityTween = new Tween<double>(
begin: 1.0,
end: widget.pressedOpacity,
end: widget.pressedOpacity ?? 1.0,
);
}

Expand Down Expand Up @@ -164,28 +171,28 @@ class _CupertinoButtonState extends State<CupertinoButton> with SingleTickerProv
child: new GestureDetector(
onTap: widget.onPressed,
child: new ConstrainedBox(
constraints: new BoxConstraints(
minWidth: widget.minSize,
minHeight: widget.minSize,
),
constraints: widget.minSize == null
? const BoxConstraints()
: new BoxConstraints(
minWidth: widget.minSize,
minHeight: widget.minSize,
),
child: new FadeTransition(
opacity: _opacityTween.animate(new CurvedAnimation(
parent: _animationController,
curve: Curves.decelerate,
)),
child: new DecoratedBox(
decoration: new BoxDecoration(
borderRadius: const BorderRadius.all(const Radius.circular(8.0)),
borderRadius: widget.borderRadius,
color: backgroundColor != null && !enabled
? _kDisabledBackground
: backgroundColor,
),
child: new Padding(
padding: widget.padding != null
? widget.padding
: backgroundColor != null
? _kBackgroundButtonPadding
: _kButtonPadding,
padding: widget.padding ?? (backgroundColor != null
? _kBackgroundButtonPadding
: _kButtonPadding),
child: new Center(
widthFactor: 1.0,
heightFactor: 1.0,
Expand Down
Loading