some formatting of map, parameters and spaces (#29760)
This commit is contained in:
parent
ecfdd7e1ea
commit
bfa1d25bf9
@ -61,14 +61,15 @@ class RowColumnTraversal extends StatelessWidget {
|
|||||||
/// A Button class that wraps an [IconButton] with a [RowColumnTraversal] to
|
/// A Button class that wraps an [IconButton] with a [RowColumnTraversal] to
|
||||||
/// set its traversal order.
|
/// set its traversal order.
|
||||||
class SpinnerButton extends StatelessWidget {
|
class SpinnerButton extends StatelessWidget {
|
||||||
const SpinnerButton(
|
const SpinnerButton({
|
||||||
{Key key,
|
Key key,
|
||||||
this.onPressed,
|
this.onPressed,
|
||||||
this.icon,
|
this.icon,
|
||||||
this.rowOrder,
|
this.rowOrder,
|
||||||
this.columnOrder,
|
this.columnOrder,
|
||||||
this.field,
|
this.field,
|
||||||
this.increment}) : super(key: key);
|
this.increment,
|
||||||
|
}) : super(key: key);
|
||||||
|
|
||||||
final VoidCallback onPressed;
|
final VoidCallback onPressed;
|
||||||
final IconData icon;
|
final IconData icon;
|
||||||
|
@ -91,7 +91,8 @@ void main() {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
void expectAdjustable(SemanticsNode node, {
|
void expectAdjustable(
|
||||||
|
SemanticsNode node, {
|
||||||
bool hasIncreaseAction = true,
|
bool hasIncreaseAction = true,
|
||||||
bool hasDecreaseAction = true,
|
bool hasDecreaseAction = true,
|
||||||
String label = '',
|
String label = '',
|
||||||
|
@ -16,7 +16,8 @@ class _InputDropdown extends StatelessWidget {
|
|||||||
this.labelText,
|
this.labelText,
|
||||||
this.valueText,
|
this.valueText,
|
||||||
this.valueStyle,
|
this.valueStyle,
|
||||||
this.onPressed }) : super(key: key);
|
this.onPressed,
|
||||||
|
}) : super(key: key);
|
||||||
|
|
||||||
final String labelText;
|
final String labelText;
|
||||||
final String valueText;
|
final String valueText;
|
||||||
|
@ -71,7 +71,8 @@ Animation<T> _getEmphasizedEasingAnimation<T>({
|
|||||||
@required T peak,
|
@required T peak,
|
||||||
@required T end,
|
@required T end,
|
||||||
@required bool isForward,
|
@required bool isForward,
|
||||||
@required Animation<double> parent}) {
|
@required Animation<double> parent,
|
||||||
|
}) {
|
||||||
Curve firstCurve;
|
Curve firstCurve;
|
||||||
Curve secondCurve;
|
Curve secondCurve;
|
||||||
double firstWeight;
|
double firstWeight;
|
||||||
|
@ -50,8 +50,11 @@ class VideoCard extends StatelessWidget {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
Widget fullScreenRoutePageBuilder(BuildContext context,
|
Widget fullScreenRoutePageBuilder(
|
||||||
Animation<double> animation, Animation<double> secondaryAnimation) {
|
BuildContext context,
|
||||||
|
Animation<double> animation,
|
||||||
|
Animation<double> secondaryAnimation,
|
||||||
|
) {
|
||||||
return _buildFullScreenVideo();
|
return _buildFullScreenVideo();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -24,7 +24,8 @@ final Animatable<BorderRadius> _kFrontHeadingBevelRadius = BorderRadiusTween(
|
|||||||
);
|
);
|
||||||
|
|
||||||
class _TappableWhileStatusIs extends StatefulWidget {
|
class _TappableWhileStatusIs extends StatefulWidget {
|
||||||
const _TappableWhileStatusIs(this.status, {
|
const _TappableWhileStatusIs(
|
||||||
|
this.status, {
|
||||||
Key key,
|
Key key,
|
||||||
this.controller,
|
this.controller,
|
||||||
this.child,
|
this.child,
|
||||||
|
@ -57,9 +57,10 @@ class SectorDimensions {
|
|||||||
const SectorDimensions({ this.deltaRadius = 0.0, this.deltaTheta = 0.0 });
|
const SectorDimensions({ this.deltaRadius = 0.0, this.deltaTheta = 0.0 });
|
||||||
|
|
||||||
factory SectorDimensions.withConstraints(
|
factory SectorDimensions.withConstraints(
|
||||||
SectorConstraints constraints,
|
SectorConstraints constraints, {
|
||||||
{ double deltaRadius = 0.0, double deltaTheta = 0.0, }
|
double deltaRadius = 0.0,
|
||||||
) {
|
double deltaTheta = 0.0,
|
||||||
|
}) {
|
||||||
return SectorDimensions(
|
return SectorDimensions(
|
||||||
deltaRadius: constraints.constrainDeltaRadius(deltaRadius),
|
deltaRadius: constraints.constrainDeltaRadius(deltaRadius),
|
||||||
deltaTheta: constraints.constrainDeltaTheta(deltaTheta),
|
deltaTheta: constraints.constrainDeltaTheta(deltaTheta),
|
||||||
@ -554,7 +555,8 @@ class RenderBoxToRenderSectorAdapter extends RenderBox with RenderObjectWithChil
|
|||||||
}
|
}
|
||||||
|
|
||||||
class RenderSolidColor extends RenderDecoratedSector {
|
class RenderSolidColor extends RenderDecoratedSector {
|
||||||
RenderSolidColor(this.backgroundColor, {
|
RenderSolidColor(
|
||||||
|
this.backgroundColor, {
|
||||||
this.desiredDeltaRadius = double.infinity,
|
this.desiredDeltaRadius = double.infinity,
|
||||||
this.desiredDeltaTheta = kTwoPi,
|
this.desiredDeltaTheta = kTwoPi,
|
||||||
}) : super(BoxDecoration(color: backgroundColor));
|
}) : super(BoxDecoration(color: backgroundColor));
|
||||||
|
@ -140,7 +140,7 @@ abstract class BindingBase {
|
|||||||
registerServiceExtension(
|
registerServiceExtension(
|
||||||
name: 'saveCompilationTrace',
|
name: 'saveCompilationTrace',
|
||||||
callback: (Map<String, String> parameters) async {
|
callback: (Map<String, String> parameters) async {
|
||||||
return <String, dynamic> {
|
return <String, dynamic>{
|
||||||
'value': ui.saveCompilationTrace(),
|
'value': ui.saveCompilationTrace(),
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
@ -1045,7 +1045,9 @@ class MessageProperty extends DiagnosticsProperty<void> {
|
|||||||
/// message is stored as the description.
|
/// message is stored as the description.
|
||||||
///
|
///
|
||||||
/// The [name], `message`, and [level] arguments must not be null.
|
/// The [name], `message`, and [level] arguments must not be null.
|
||||||
MessageProperty(String name, String message, {
|
MessageProperty(
|
||||||
|
String name,
|
||||||
|
String message, {
|
||||||
DiagnosticLevel level = DiagnosticLevel.info,
|
DiagnosticLevel level = DiagnosticLevel.info,
|
||||||
}) : assert(name != null),
|
}) : assert(name != null),
|
||||||
assert(message != null),
|
assert(message != null),
|
||||||
@ -1063,7 +1065,9 @@ class StringProperty extends DiagnosticsProperty<String> {
|
|||||||
/// Create a diagnostics property for strings.
|
/// Create a diagnostics property for strings.
|
||||||
///
|
///
|
||||||
/// The [showName], [quoted], and [level] arguments must not be null.
|
/// The [showName], [quoted], and [level] arguments must not be null.
|
||||||
StringProperty(String name, String value, {
|
StringProperty(
|
||||||
|
String name,
|
||||||
|
String value, {
|
||||||
String description,
|
String description,
|
||||||
String tooltip,
|
String tooltip,
|
||||||
bool showName = true,
|
bool showName = true,
|
||||||
@ -1119,7 +1123,8 @@ class StringProperty extends DiagnosticsProperty<String> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
abstract class _NumProperty<T extends num> extends DiagnosticsProperty<T> {
|
abstract class _NumProperty<T extends num> extends DiagnosticsProperty<T> {
|
||||||
_NumProperty(String name,
|
_NumProperty(
|
||||||
|
String name,
|
||||||
T value, {
|
T value, {
|
||||||
String ifNull,
|
String ifNull,
|
||||||
this.unit,
|
this.unit,
|
||||||
@ -1137,7 +1142,8 @@ abstract class _NumProperty<T extends num> extends DiagnosticsProperty<T> {
|
|||||||
level: level,
|
level: level,
|
||||||
);
|
);
|
||||||
|
|
||||||
_NumProperty.lazy(String name,
|
_NumProperty.lazy(
|
||||||
|
String name,
|
||||||
ComputePropertyValueCallback<T> computeValue, {
|
ComputePropertyValueCallback<T> computeValue, {
|
||||||
String ifNull,
|
String ifNull,
|
||||||
this.unit,
|
this.unit,
|
||||||
@ -1190,7 +1196,9 @@ class DoubleProperty extends _NumProperty<double> {
|
|||||||
/// If specified, [unit] describes the unit for the [value] (e.g. px).
|
/// If specified, [unit] describes the unit for the [value] (e.g. px).
|
||||||
///
|
///
|
||||||
/// The [showName] and [level] arguments must not be null.
|
/// The [showName] and [level] arguments must not be null.
|
||||||
DoubleProperty(String name, double value, {
|
DoubleProperty(
|
||||||
|
String name,
|
||||||
|
double value, {
|
||||||
String ifNull,
|
String ifNull,
|
||||||
String unit,
|
String unit,
|
||||||
String tooltip,
|
String tooltip,
|
||||||
@ -1249,7 +1257,9 @@ class IntProperty extends _NumProperty<int> {
|
|||||||
/// Create a diagnostics property for integers.
|
/// Create a diagnostics property for integers.
|
||||||
///
|
///
|
||||||
/// The [showName] and [level] arguments must not be null.
|
/// The [showName] and [level] arguments must not be null.
|
||||||
IntProperty(String name, int value, {
|
IntProperty(
|
||||||
|
String name,
|
||||||
|
int value, {
|
||||||
String ifNull,
|
String ifNull,
|
||||||
bool showName = true,
|
bool showName = true,
|
||||||
String unit,
|
String unit,
|
||||||
@ -1282,7 +1292,9 @@ class PercentProperty extends DoubleProperty {
|
|||||||
/// be sufficient to disambiguate its meaning.
|
/// be sufficient to disambiguate its meaning.
|
||||||
///
|
///
|
||||||
/// The [showName] and [level] arguments must not be null.
|
/// The [showName] and [level] arguments must not be null.
|
||||||
PercentProperty(String name, double fraction, {
|
PercentProperty(
|
||||||
|
String name,
|
||||||
|
double fraction, {
|
||||||
String ifNull,
|
String ifNull,
|
||||||
bool showName = true,
|
bool showName = true,
|
||||||
String tooltip,
|
String tooltip,
|
||||||
@ -1361,7 +1373,8 @@ class FlagProperty extends DiagnosticsProperty<bool> {
|
|||||||
/// be descriptions that make the property name redundant.
|
/// be descriptions that make the property name redundant.
|
||||||
///
|
///
|
||||||
/// The [showName] and [level] arguments must not be null.
|
/// The [showName] and [level] arguments must not be null.
|
||||||
FlagProperty(String name, {
|
FlagProperty(
|
||||||
|
String name, {
|
||||||
@required bool value,
|
@required bool value,
|
||||||
this.ifTrue,
|
this.ifTrue,
|
||||||
this.ifFalse,
|
this.ifFalse,
|
||||||
@ -1456,7 +1469,9 @@ class IterableProperty<T> extends DiagnosticsProperty<Iterable<T>> {
|
|||||||
/// interesting to display.
|
/// interesting to display.
|
||||||
///
|
///
|
||||||
/// The [style], [showName], and [level] arguments must not be null.
|
/// The [style], [showName], and [level] arguments must not be null.
|
||||||
IterableProperty(String name, Iterable<T> value, {
|
IterableProperty(
|
||||||
|
String name,
|
||||||
|
Iterable<T> value, {
|
||||||
Object defaultValue = kNoDefaultValue,
|
Object defaultValue = kNoDefaultValue,
|
||||||
String ifNull,
|
String ifNull,
|
||||||
String ifEmpty = '[]',
|
String ifEmpty = '[]',
|
||||||
@ -1531,7 +1546,9 @@ class EnumProperty<T> extends DiagnosticsProperty<T> {
|
|||||||
/// Create a diagnostics property that displays an enum.
|
/// Create a diagnostics property that displays an enum.
|
||||||
///
|
///
|
||||||
/// The [level] argument must also not be null.
|
/// The [level] argument must also not be null.
|
||||||
EnumProperty(String name, T value, {
|
EnumProperty(
|
||||||
|
String name,
|
||||||
|
T value, {
|
||||||
Object defaultValue = kNoDefaultValue,
|
Object defaultValue = kNoDefaultValue,
|
||||||
DiagnosticLevel level = DiagnosticLevel.info,
|
DiagnosticLevel level = DiagnosticLevel.info,
|
||||||
}) : assert(level != null),
|
}) : assert(level != null),
|
||||||
@ -1575,7 +1592,9 @@ class ObjectFlagProperty<T> extends DiagnosticsProperty<T> {
|
|||||||
///
|
///
|
||||||
/// The [showName] and [level] arguments must not be null. Additionally, at
|
/// The [showName] and [level] arguments must not be null. Additionally, at
|
||||||
/// least one of [ifPresent] and [ifNull] must not be null.
|
/// least one of [ifPresent] and [ifNull] must not be null.
|
||||||
ObjectFlagProperty(String name, T value, {
|
ObjectFlagProperty(
|
||||||
|
String name,
|
||||||
|
T value, {
|
||||||
this.ifPresent,
|
this.ifPresent,
|
||||||
String ifNull,
|
String ifNull,
|
||||||
bool showName = false,
|
bool showName = false,
|
||||||
|
@ -59,7 +59,7 @@ class PointerSignalResolver {
|
|||||||
informationCollector: (StringBuffer information) {
|
informationCollector: (StringBuffer information) {
|
||||||
information.writeln('Event:');
|
information.writeln('Event:');
|
||||||
information.write(' $event');
|
information.write(' $event');
|
||||||
}
|
},
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
_firstRegisteredCallback = null;
|
_firstRegisteredCallback = null;
|
||||||
|
@ -162,7 +162,8 @@ class DataCell {
|
|||||||
/// If the cell has no data, then a [Text] widget with placeholder
|
/// If the cell has no data, then a [Text] widget with placeholder
|
||||||
/// text should be provided instead, and then the [placeholder]
|
/// text should be provided instead, and then the [placeholder]
|
||||||
/// argument should be set to true.
|
/// argument should be set to true.
|
||||||
const DataCell(this.child, {
|
const DataCell(
|
||||||
|
this.child, {
|
||||||
this.placeholder = false,
|
this.placeholder = false,
|
||||||
this.showEditIcon = false,
|
this.showEditIcon = false,
|
||||||
this.onTap,
|
this.onTap,
|
||||||
|
@ -47,15 +47,13 @@ abstract class InteractiveInkFeature extends InkFeature {
|
|||||||
///
|
///
|
||||||
/// Typically causes the ink to propagate faster across the material. By default this
|
/// Typically causes the ink to propagate faster across the material. By default this
|
||||||
/// method does nothing.
|
/// method does nothing.
|
||||||
void confirm() {
|
void confirm() { }
|
||||||
}
|
|
||||||
|
|
||||||
/// Called when the user input that triggered this feature's appearance was canceled.
|
/// Called when the user input that triggered this feature's appearance was canceled.
|
||||||
///
|
///
|
||||||
/// Typically causes the ink to gradually disappear. By default this method does
|
/// Typically causes the ink to gradually disappear. By default this method does
|
||||||
/// nothing.
|
/// nothing.
|
||||||
void cancel() {
|
void cancel() { }
|
||||||
}
|
|
||||||
|
|
||||||
/// The ink's color.
|
/// The ink's color.
|
||||||
Color get color => _color;
|
Color get color => _color;
|
||||||
|
@ -53,7 +53,7 @@ enum MaterialType {
|
|||||||
///
|
///
|
||||||
/// * [MaterialType]
|
/// * [MaterialType]
|
||||||
/// * [Material]
|
/// * [Material]
|
||||||
final Map<MaterialType, BorderRadius> kMaterialEdges = <MaterialType, BorderRadius> {
|
final Map<MaterialType, BorderRadius> kMaterialEdges = <MaterialType, BorderRadius>{
|
||||||
MaterialType.canvas: null,
|
MaterialType.canvas: null,
|
||||||
MaterialType.card: BorderRadius.circular(2.0),
|
MaterialType.card: BorderRadius.circular(2.0),
|
||||||
MaterialType.circle: null,
|
MaterialType.circle: null,
|
||||||
|
@ -466,7 +466,7 @@ class NetworkImage extends ImageProvider<NetworkImage> {
|
|||||||
/// Creates an object that fetches the image at the given URL.
|
/// Creates an object that fetches the image at the given URL.
|
||||||
///
|
///
|
||||||
/// The arguments must not be null.
|
/// The arguments must not be null.
|
||||||
const NetworkImage(this.url, { this.scale = 1.0 , this.headers })
|
const NetworkImage(this.url, { this.scale = 1.0, this.headers })
|
||||||
: assert(url != null),
|
: assert(url != null),
|
||||||
assert(scale != null);
|
assert(scale != null);
|
||||||
|
|
||||||
@ -736,7 +736,8 @@ class ExactAssetImage extends AssetBundleImageProvider {
|
|||||||
/// The [package] argument must be non-null when fetching an asset that is
|
/// The [package] argument must be non-null when fetching an asset that is
|
||||||
/// included in a package. See the documentation for the [ExactAssetImage] class
|
/// included in a package. See the documentation for the [ExactAssetImage] class
|
||||||
/// itself for details.
|
/// itself for details.
|
||||||
const ExactAssetImage(this.assetName, {
|
const ExactAssetImage(
|
||||||
|
this.assetName, {
|
||||||
this.scale = 1.0,
|
this.scale = 1.0,
|
||||||
this.bundle,
|
this.bundle,
|
||||||
this.package,
|
this.package,
|
||||||
|
@ -128,7 +128,8 @@ class AssetImage extends AssetBundleImageProvider {
|
|||||||
/// from the set of images to choose from. The [package] argument must be
|
/// from the set of images to choose from. The [package] argument must be
|
||||||
/// non-null when fetching an asset that is included in package. See the
|
/// non-null when fetching an asset that is included in package. See the
|
||||||
/// documentation for the [AssetImage] class itself for details.
|
/// documentation for the [AssetImage] class itself for details.
|
||||||
const AssetImage(this.assetName, {
|
const AssetImage(
|
||||||
|
this.assetName, {
|
||||||
this.bundle,
|
this.bundle,
|
||||||
this.package,
|
this.package,
|
||||||
}) : assert(assetName != null);
|
}) : assert(assetName != null);
|
||||||
|
@ -265,7 +265,9 @@ class TransformProperty extends DiagnosticsProperty<Matrix4> {
|
|||||||
/// Create a diagnostics property for [Matrix4] objects.
|
/// Create a diagnostics property for [Matrix4] objects.
|
||||||
///
|
///
|
||||||
/// The [showName] and [level] arguments must not be null.
|
/// The [showName] and [level] arguments must not be null.
|
||||||
TransformProperty(String name, Matrix4 value, {
|
TransformProperty(
|
||||||
|
String name,
|
||||||
|
Matrix4 value, {
|
||||||
bool showName = true,
|
bool showName = true,
|
||||||
Object defaultValue = kNoDefaultValue,
|
Object defaultValue = kNoDefaultValue,
|
||||||
DiagnosticLevel level = DiagnosticLevel.info,
|
DiagnosticLevel level = DiagnosticLevel.info,
|
||||||
|
@ -302,7 +302,8 @@ class StrutStyle extends Diagnosticable {
|
|||||||
/// is inherited by being prepended onto the font family names. If
|
/// is inherited by being prepended onto the font family names. If
|
||||||
/// [fontFamilyFallback] is meant to be empty, pass an empty list instead of null.
|
/// [fontFamilyFallback] is meant to be empty, pass an empty list instead of null.
|
||||||
/// This prevents the previous package name from being prepended twice.
|
/// This prevents the previous package name from being prepended twice.
|
||||||
StrutStyle.fromTextStyle(TextStyle textStyle, {
|
StrutStyle.fromTextStyle(
|
||||||
|
TextStyle textStyle, {
|
||||||
String fontFamily,
|
String fontFamily,
|
||||||
List<String> fontFamilyFallback,
|
List<String> fontFamilyFallback,
|
||||||
double fontSize,
|
double fontSize,
|
||||||
|
@ -21,7 +21,8 @@ class ClampedSimulation extends Simulation {
|
|||||||
///
|
///
|
||||||
/// The named arguments specify the ranges for the clamping behavior, as
|
/// The named arguments specify the ranges for the clamping behavior, as
|
||||||
/// applied to [x] and [dx].
|
/// applied to [x] and [dx].
|
||||||
ClampedSimulation(this.simulation, {
|
ClampedSimulation(
|
||||||
|
this.simulation, {
|
||||||
this.xMin = double.negativeInfinity,
|
this.xMin = double.negativeInfinity,
|
||||||
this.xMax = double.infinity,
|
this.xMax = double.infinity,
|
||||||
this.dxMin = double.negativeInfinity,
|
this.dxMin = double.negativeInfinity,
|
||||||
|
@ -18,7 +18,10 @@ class FrictionSimulation extends Simulation {
|
|||||||
/// drag coefficient, a unitless value; the initial position, in the same
|
/// drag coefficient, a unitless value; the initial position, in the same
|
||||||
/// length units as used for [x]; and the initial velocity, in the same
|
/// length units as used for [x]; and the initial velocity, in the same
|
||||||
/// velocity units as used for [dx].
|
/// velocity units as used for [dx].
|
||||||
FrictionSimulation(double drag, double position, double velocity, {
|
FrictionSimulation(
|
||||||
|
double drag,
|
||||||
|
double position,
|
||||||
|
double velocity, {
|
||||||
Tolerance tolerance = Tolerance.defaultTolerance,
|
Tolerance tolerance = Tolerance.defaultTolerance,
|
||||||
}) : _drag = drag,
|
}) : _drag = drag,
|
||||||
_dragLog = math.log(drag),
|
_dragLog = math.log(drag),
|
||||||
|
@ -300,14 +300,14 @@ class RenderEditable extends RenderBox {
|
|||||||
|
|
||||||
final Offset startOffset = _textPainter.getOffsetForCaret(
|
final Offset startOffset = _textPainter.getOffsetForCaret(
|
||||||
TextPosition(offset: _selection.start, affinity: _selection.affinity),
|
TextPosition(offset: _selection.start, affinity: _selection.affinity),
|
||||||
Rect.zero
|
Rect.zero,
|
||||||
);
|
);
|
||||||
|
|
||||||
_selectionStartInViewport.value = visibleRegion.contains(startOffset + effectiveOffset);
|
_selectionStartInViewport.value = visibleRegion.contains(startOffset + effectiveOffset);
|
||||||
|
|
||||||
final Offset endOffset = _textPainter.getOffsetForCaret(
|
final Offset endOffset = _textPainter.getOffsetForCaret(
|
||||||
TextPosition(offset: _selection.end, affinity: _selection.affinity),
|
TextPosition(offset: _selection.end, affinity: _selection.affinity),
|
||||||
Rect.zero
|
Rect.zero,
|
||||||
);
|
);
|
||||||
|
|
||||||
_selectionEndInViewport.value = visibleRegion.contains(endOffset + effectiveOffset);
|
_selectionEndInViewport.value = visibleRegion.contains(endOffset + effectiveOffset);
|
||||||
|
@ -41,7 +41,8 @@ class RenderParagraph extends RenderBox {
|
|||||||
///
|
///
|
||||||
/// The [maxLines] property may be null (and indeed defaults to null), but if
|
/// The [maxLines] property may be null (and indeed defaults to null), but if
|
||||||
/// it is not null, it must be greater than zero.
|
/// it is not null, it must be greater than zero.
|
||||||
RenderParagraph(TextSpan text, {
|
RenderParagraph(
|
||||||
|
TextSpan text, {
|
||||||
TextAlign textAlign = TextAlign.start,
|
TextAlign textAlign = TextAlign.start,
|
||||||
@required TextDirection textDirection,
|
@required TextDirection textDirection,
|
||||||
bool softWrap = true,
|
bool softWrap = true,
|
||||||
|
@ -503,7 +503,7 @@ class _AndroidViewGestureRecognizer extends OneSequenceGestureRecognizer {
|
|||||||
// Before the arena for a pointer is resolved all events are cached here, if we win the arena
|
// Before the arena for a pointer is resolved all events are cached here, if we win the arena
|
||||||
// the cached events are dispatched to the view, if we lose the arena we clear the cache for
|
// the cached events are dispatched to the view, if we lose the arena we clear the cache for
|
||||||
// the pointer.
|
// the pointer.
|
||||||
final Map<int, List<PointerEvent>> cachedEvents = <int, List<PointerEvent>> {};
|
final Map<int, List<PointerEvent>> cachedEvents = <int, List<PointerEvent>>{};
|
||||||
|
|
||||||
// Pointer for which we have already won the arena, events for pointers in this set are
|
// Pointer for which we have already won the arena, events for pointers in this set are
|
||||||
// immediately dispatched to the Android view.
|
// immediately dispatched to the Android view.
|
||||||
|
@ -244,7 +244,7 @@ abstract class RenderAligningShiftedBox extends RenderShiftedBox {
|
|||||||
/// A constructor to be used only when the extending class also has a mixin.
|
/// A constructor to be used only when the extending class also has a mixin.
|
||||||
// TODO(gspencer): Remove this constructor once https://github.com/dart-lang/sdk/issues/31543 is fixed.
|
// TODO(gspencer): Remove this constructor once https://github.com/dart-lang/sdk/issues/31543 is fixed.
|
||||||
@protected
|
@protected
|
||||||
RenderAligningShiftedBox.mixin(AlignmentGeometry alignment,TextDirection textDirection, RenderBox child)
|
RenderAligningShiftedBox.mixin(AlignmentGeometry alignment, TextDirection textDirection, RenderBox child)
|
||||||
: this(alignment: alignment, textDirection: textDirection, child: child);
|
: this(alignment: alignment, textDirection: textDirection, child: child);
|
||||||
|
|
||||||
Alignment _resolvedAlignment;
|
Alignment _resolvedAlignment;
|
||||||
|
@ -773,7 +773,8 @@ class SliverHitTestEntry extends HitTestEntry {
|
|||||||
/// Creates a sliver hit test entry.
|
/// Creates a sliver hit test entry.
|
||||||
///
|
///
|
||||||
/// The [mainAxisPosition] and [crossAxisPosition] arguments must not be null.
|
/// The [mainAxisPosition] and [crossAxisPosition] arguments must not be null.
|
||||||
const SliverHitTestEntry(RenderSliver target, {
|
const SliverHitTestEntry(
|
||||||
|
RenderSliver target, {
|
||||||
@required this.mainAxisPosition,
|
@required this.mainAxisPosition,
|
||||||
@required this.crossAxisPosition,
|
@required this.crossAxisPosition,
|
||||||
}) : assert(mainAxisPosition != null),
|
}) : assert(mainAxisPosition != null),
|
||||||
|
@ -117,7 +117,7 @@ class PlatformViewsService {
|
|||||||
assert(creationParams == null || creationParamsCodec != null);
|
assert(creationParams == null || creationParamsCodec != null);
|
||||||
|
|
||||||
// TODO(amirh): pass layoutDirection once the system channel supports it.
|
// TODO(amirh): pass layoutDirection once the system channel supports it.
|
||||||
final Map<String, dynamic> args = <String, dynamic> {
|
final Map<String, dynamic> args = <String, dynamic>{
|
||||||
'id': id,
|
'id': id,
|
||||||
'viewType': viewType,
|
'viewType': viewType,
|
||||||
};
|
};
|
||||||
@ -520,7 +520,7 @@ class AndroidViewController {
|
|||||||
if (_state == _AndroidViewState.waitingForSize)
|
if (_state == _AndroidViewState.waitingForSize)
|
||||||
return _create(size);
|
return _create(size);
|
||||||
|
|
||||||
await SystemChannels.platform_views.invokeMethod<void>('resize', <String, dynamic> {
|
await SystemChannels.platform_views.invokeMethod<void>('resize', <String, dynamic>{
|
||||||
'id': id,
|
'id': id,
|
||||||
'width': size.width,
|
'width': size.width,
|
||||||
'height': size.height,
|
'height': size.height,
|
||||||
@ -542,7 +542,7 @@ class AndroidViewController {
|
|||||||
if (_state == _AndroidViewState.waitingForSize)
|
if (_state == _AndroidViewState.waitingForSize)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
await SystemChannels.platform_views.invokeMethod<void>('setDirection', <String, dynamic> {
|
await SystemChannels.platform_views.invokeMethod<void>('setDirection', <String, dynamic>{
|
||||||
'id': id,
|
'id': id,
|
||||||
'direction': _getAndroidDirection(layoutDirection),
|
'direction': _getAndroidDirection(layoutDirection),
|
||||||
});
|
});
|
||||||
@ -578,7 +578,7 @@ class AndroidViewController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Future<void> _create(Size size) async {
|
Future<void> _create(Size size) async {
|
||||||
final Map<String, dynamic> args = <String, dynamic> {
|
final Map<String, dynamic> args = <String, dynamic>{
|
||||||
'id': id,
|
'id': id,
|
||||||
'viewType': _viewType,
|
'viewType': _viewType,
|
||||||
'width': size.width,
|
'width': size.width,
|
||||||
@ -642,7 +642,7 @@ class UiKitViewController {
|
|||||||
/// Calling this method releases the delayed events to the embedded UIView and makes it consume
|
/// Calling this method releases the delayed events to the embedded UIView and makes it consume
|
||||||
/// any following touch events for the pointers involved in the active gesture.
|
/// any following touch events for the pointers involved in the active gesture.
|
||||||
Future<void> acceptGesture() {
|
Future<void> acceptGesture() {
|
||||||
final Map<String, dynamic> args = <String, dynamic> {
|
final Map<String, dynamic> args = <String, dynamic>{
|
||||||
'id': id,
|
'id': id,
|
||||||
};
|
};
|
||||||
return SystemChannels.platform_views.invokeMethod('acceptGesture', args);
|
return SystemChannels.platform_views.invokeMethod('acceptGesture', args);
|
||||||
@ -654,7 +654,7 @@ class UiKitViewController {
|
|||||||
/// Calling this method drops the buffered touch events and prevents any future touch events for
|
/// Calling this method drops the buffered touch events and prevents any future touch events for
|
||||||
/// the pointers that are part of the active touch sequence from arriving to the embedded view.
|
/// the pointers that are part of the active touch sequence from arriving to the embedded view.
|
||||||
Future<void> rejectGesture() {
|
Future<void> rejectGesture() {
|
||||||
final Map<String, dynamic> args = <String, dynamic> {
|
final Map<String, dynamic> args = <String, dynamic>{
|
||||||
'id': id,
|
'id': id,
|
||||||
};
|
};
|
||||||
return SystemChannels.platform_views.invokeMethod('rejectGesture', args);
|
return SystemChannels.platform_views.invokeMethod('rejectGesture', args);
|
||||||
|
@ -48,7 +48,8 @@ class Icon extends StatelessWidget {
|
|||||||
/// Creates an icon.
|
/// Creates an icon.
|
||||||
///
|
///
|
||||||
/// The [size] and [color] default to the value given by the current [IconTheme].
|
/// The [size] and [color] default to the value given by the current [IconTheme].
|
||||||
const Icon(this.icon, {
|
const Icon(
|
||||||
|
this.icon, {
|
||||||
Key key,
|
Key key,
|
||||||
this.size,
|
this.size,
|
||||||
this.color,
|
this.color,
|
||||||
|
@ -195,7 +195,8 @@ class Image extends StatefulWidget {
|
|||||||
/// [FilterQuality.none] which corresponds to nearest-neighbor.
|
/// [FilterQuality.none] which corresponds to nearest-neighbor.
|
||||||
///
|
///
|
||||||
/// If [excludeFromSemantics] is true, then [semanticLabel] will be ignored.
|
/// If [excludeFromSemantics] is true, then [semanticLabel] will be ignored.
|
||||||
Image.network(String src, {
|
Image.network(
|
||||||
|
String src, {
|
||||||
Key key,
|
Key key,
|
||||||
double scale = 1.0,
|
double scale = 1.0,
|
||||||
this.semanticLabel,
|
this.semanticLabel,
|
||||||
@ -236,7 +237,8 @@ class Image extends StatefulWidget {
|
|||||||
/// [FilterQuality.none] which corresponds to nearest-neighbor.
|
/// [FilterQuality.none] which corresponds to nearest-neighbor.
|
||||||
///
|
///
|
||||||
/// If [excludeFromSemantics] is true, then [semanticLabel] will be ignored.
|
/// If [excludeFromSemantics] is true, then [semanticLabel] will be ignored.
|
||||||
Image.file(File file, {
|
Image.file(
|
||||||
|
File file, {
|
||||||
Key key,
|
Key key,
|
||||||
double scale = 1.0,
|
double scale = 1.0,
|
||||||
this.semanticLabel,
|
this.semanticLabel,
|
||||||
@ -384,7 +386,8 @@ class Image extends StatefulWidget {
|
|||||||
/// scale is present.
|
/// scale is present.
|
||||||
/// * <https://flutter.io/assets-and-images/>, an introduction to assets in
|
/// * <https://flutter.io/assets-and-images/>, an introduction to assets in
|
||||||
/// Flutter.
|
/// Flutter.
|
||||||
Image.asset(String name, {
|
Image.asset(
|
||||||
|
String name, {
|
||||||
Key key,
|
Key key,
|
||||||
AssetBundle bundle,
|
AssetBundle bundle,
|
||||||
this.semanticLabel,
|
this.semanticLabel,
|
||||||
@ -425,7 +428,8 @@ class Image extends StatefulWidget {
|
|||||||
/// [FilterQuality.none] which corresponds to nearest-neighbor.
|
/// [FilterQuality.none] which corresponds to nearest-neighbor.
|
||||||
///
|
///
|
||||||
/// If [excludeFromSemantics] is true, then [semanticLabel] will be ignored.
|
/// If [excludeFromSemantics] is true, then [semanticLabel] will be ignored.
|
||||||
Image.memory(Uint8List bytes, {
|
Image.memory(
|
||||||
|
Uint8List bytes, {
|
||||||
Key key,
|
Key key,
|
||||||
double scale = 1.0,
|
double scale = 1.0,
|
||||||
this.semanticLabel,
|
this.semanticLabel,
|
||||||
|
@ -23,7 +23,8 @@ class ImageIcon extends StatelessWidget {
|
|||||||
/// Creates an image icon.
|
/// Creates an image icon.
|
||||||
///
|
///
|
||||||
/// The [size] and [color] default to the value given by the current [IconTheme].
|
/// The [size] and [color] default to the value given by the current [IconTheme].
|
||||||
const ImageIcon(this.image, {
|
const ImageIcon(
|
||||||
|
this.image, {
|
||||||
Key key,
|
Key key,
|
||||||
this.size,
|
this.size,
|
||||||
this.color,
|
this.color,
|
||||||
|
@ -844,7 +844,8 @@ class _NestedScrollCoordinator implements ScrollActivityDelegate, ScrollHoldCont
|
|||||||
}
|
}
|
||||||
|
|
||||||
class _NestedScrollController extends ScrollController {
|
class _NestedScrollController extends ScrollController {
|
||||||
_NestedScrollController(this.coordinator, {
|
_NestedScrollController(
|
||||||
|
this.coordinator, {
|
||||||
double initialScrollOffset = 0.0,
|
double initialScrollOffset = 0.0,
|
||||||
String debugLabel,
|
String debugLabel,
|
||||||
}) : super(initialScrollOffset: initialScrollOffset, debugLabel: debugLabel);
|
}) : super(initialScrollOffset: initialScrollOffset, debugLabel: debugLabel);
|
||||||
|
@ -36,11 +36,12 @@ class PerformanceOverlay extends LeafRenderObjectWidget {
|
|||||||
}) : super(key: key);
|
}) : super(key: key);
|
||||||
|
|
||||||
/// Create a performance overlay that displays all available statistics
|
/// Create a performance overlay that displays all available statistics
|
||||||
PerformanceOverlay.allEnabled({ Key key,
|
PerformanceOverlay.allEnabled({
|
||||||
this.rasterizerThreshold = 0,
|
Key key,
|
||||||
this.checkerboardRasterCacheImages = false,
|
this.rasterizerThreshold = 0,
|
||||||
this.checkerboardOffscreenLayers = false })
|
this.checkerboardRasterCacheImages = false,
|
||||||
: optionsMask =
|
this.checkerboardOffscreenLayers = false,
|
||||||
|
}) : optionsMask =
|
||||||
1 << PerformanceOverlayOption.displayRasterizerStatistics.index |
|
1 << PerformanceOverlayOption.displayRasterizerStatistics.index |
|
||||||
1 << PerformanceOverlayOption.visualizeRasterizerStatistics.index |
|
1 << PerformanceOverlayOption.visualizeRasterizerStatistics.index |
|
||||||
1 << PerformanceOverlayOption.displayEngineStatistics.index |
|
1 << PerformanceOverlayOption.displayEngineStatistics.index |
|
||||||
|
@ -224,7 +224,8 @@ class Text extends StatelessWidget {
|
|||||||
/// closest enclosing [DefaultTextStyle].
|
/// closest enclosing [DefaultTextStyle].
|
||||||
///
|
///
|
||||||
/// The [data] parameter must not be null.
|
/// The [data] parameter must not be null.
|
||||||
const Text(this.data, {
|
const Text(
|
||||||
|
this.data, {
|
||||||
Key key,
|
Key key,
|
||||||
this.style,
|
this.style,
|
||||||
this.strutStyle,
|
this.strutStyle,
|
||||||
@ -246,7 +247,8 @@ class Text extends StatelessWidget {
|
|||||||
/// Creates a text widget with a [TextSpan].
|
/// Creates a text widget with a [TextSpan].
|
||||||
///
|
///
|
||||||
/// The [textSpan] parameter must not be null.
|
/// The [textSpan] parameter must not be null.
|
||||||
const Text.rich(this.textSpan, {
|
const Text.rich(
|
||||||
|
this.textSpan, {
|
||||||
Key key,
|
Key key,
|
||||||
this.style,
|
this.style,
|
||||||
this.strutStyle,
|
this.strutStyle,
|
||||||
|
@ -640,7 +640,7 @@ class _TextSelectionHandleOverlayState
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -348,7 +348,7 @@ void main() {
|
|||||||
onPressed: () {
|
onPressed: () {
|
||||||
Navigator.pop<void>(context);
|
Navigator.pop<void>(context);
|
||||||
},
|
},
|
||||||
)
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
@ -14,7 +14,7 @@ void main() {
|
|||||||
final Key targetKey = UniqueKey();
|
final Key targetKey = UniqueKey();
|
||||||
await tester.pumpWidget(
|
await tester.pumpWidget(
|
||||||
MaterialApp(
|
MaterialApp(
|
||||||
routes: <String, WidgetBuilder> {
|
routes: <String, WidgetBuilder>{
|
||||||
'/next': (BuildContext context) {
|
'/next': (BuildContext context) {
|
||||||
return const Text('Next');
|
return const Text('Next');
|
||||||
},
|
},
|
||||||
|
@ -267,7 +267,7 @@ void main() {
|
|||||||
groupValue: 1,
|
groupValue: 1,
|
||||||
onChanged: (int value) { },
|
onChanged: (int value) { },
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -26,7 +26,10 @@ final List<SizedBox> _sizedTabs = <SizedBox>[
|
|||||||
];
|
];
|
||||||
|
|
||||||
Widget _withTheme(
|
Widget _withTheme(
|
||||||
TabBarTheme theme, { List<Widget> tabs = _tabs, bool isScrollable = false }) {
|
TabBarTheme theme, {
|
||||||
|
List<Widget> tabs = _tabs,
|
||||||
|
bool isScrollable = false,
|
||||||
|
}) {
|
||||||
return MaterialApp(
|
return MaterialApp(
|
||||||
theme: ThemeData(tabBarTheme: theme),
|
theme: ThemeData(tabBarTheme: theme),
|
||||||
home: Scaffold(
|
home: Scaffold(
|
||||||
@ -102,7 +105,7 @@ void main() {
|
|||||||
const double indicatorWeight = 2.0; // default value
|
const double indicatorWeight = 2.0; // default value
|
||||||
|
|
||||||
const EdgeInsetsGeometry labelPadding = EdgeInsets.fromLTRB(
|
const EdgeInsetsGeometry labelPadding = EdgeInsets.fromLTRB(
|
||||||
leftPadding, topPadding, rightPadding, bottomPadding
|
leftPadding, topPadding, rightPadding, bottomPadding,
|
||||||
);
|
);
|
||||||
|
|
||||||
const TabBarTheme tabBarTheme = TabBarTheme(labelPadding: labelPadding);
|
const TabBarTheme tabBarTheme = TabBarTheme(labelPadding: labelPadding);
|
||||||
|
@ -741,7 +741,7 @@ class _TextStyleProxy implements TextStyle {
|
|||||||
double wordSpacingFactor = 1.0,
|
double wordSpacingFactor = 1.0,
|
||||||
double wordSpacingDelta = 0.0,
|
double wordSpacingDelta = 0.0,
|
||||||
double heightFactor = 1.0,
|
double heightFactor = 1.0,
|
||||||
double heightDelta = 0.0
|
double heightDelta = 0.0,
|
||||||
}) {
|
}) {
|
||||||
throw UnimplementedError();
|
throw UnimplementedError();
|
||||||
}
|
}
|
||||||
@ -773,7 +773,7 @@ class _TextStyleProxy implements TextStyle {
|
|||||||
Color decorationColor,
|
Color decorationColor,
|
||||||
TextDecorationStyle decorationStyle,
|
TextDecorationStyle decorationStyle,
|
||||||
double decorationThickness,
|
double decorationThickness,
|
||||||
String debugLabel
|
String debugLabel,
|
||||||
}) {
|
}) {
|
||||||
throw UnimplementedError();
|
throw UnimplementedError();
|
||||||
}
|
}
|
||||||
@ -796,7 +796,7 @@ class _TextStyleProxy implements TextStyle {
|
|||||||
FontWeight fontWeight,
|
FontWeight fontWeight,
|
||||||
FontStyle fontStyle,
|
FontStyle fontStyle,
|
||||||
double height,
|
double height,
|
||||||
StrutStyle strutStyle
|
StrutStyle strutStyle,
|
||||||
}) {
|
}) {
|
||||||
throw UnimplementedError();
|
throw UnimplementedError();
|
||||||
}
|
}
|
||||||
|
@ -866,9 +866,15 @@ abstract class _PaintPredicate {
|
|||||||
|
|
||||||
abstract class _DrawCommandPaintPredicate extends _PaintPredicate {
|
abstract class _DrawCommandPaintPredicate extends _PaintPredicate {
|
||||||
_DrawCommandPaintPredicate(
|
_DrawCommandPaintPredicate(
|
||||||
this.symbol, this.name, this.argumentCount, this.paintArgumentIndex,
|
this.symbol,
|
||||||
{ this.color, this.strokeWidth, this.hasMaskFilter, this.style, }
|
this.name,
|
||||||
);
|
this.argumentCount,
|
||||||
|
this.paintArgumentIndex, {
|
||||||
|
this.color,
|
||||||
|
this.strokeWidth,
|
||||||
|
this.hasMaskFilter,
|
||||||
|
this.style,
|
||||||
|
});
|
||||||
|
|
||||||
final Symbol symbol;
|
final Symbol symbol;
|
||||||
final String name;
|
final String name;
|
||||||
@ -934,7 +940,9 @@ abstract class _DrawCommandPaintPredicate extends _PaintPredicate {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class _OneParameterPaintPredicate<T> extends _DrawCommandPaintPredicate {
|
class _OneParameterPaintPredicate<T> extends _DrawCommandPaintPredicate {
|
||||||
_OneParameterPaintPredicate(Symbol symbol, String name, {
|
_OneParameterPaintPredicate(
|
||||||
|
Symbol symbol,
|
||||||
|
String name, {
|
||||||
@required this.expected,
|
@required this.expected,
|
||||||
@required Color color,
|
@required Color color,
|
||||||
@required double strokeWidth,
|
@required double strokeWidth,
|
||||||
@ -967,7 +975,9 @@ class _OneParameterPaintPredicate<T> extends _DrawCommandPaintPredicate {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class _TwoParameterPaintPredicate<T1, T2> extends _DrawCommandPaintPredicate {
|
class _TwoParameterPaintPredicate<T1, T2> extends _DrawCommandPaintPredicate {
|
||||||
_TwoParameterPaintPredicate(Symbol symbol, String name, {
|
_TwoParameterPaintPredicate(
|
||||||
|
Symbol symbol,
|
||||||
|
String name, {
|
||||||
@required this.expected1,
|
@required this.expected1,
|
||||||
@required this.expected2,
|
@required this.expected2,
|
||||||
@required Color color,
|
@required Color color,
|
||||||
|
@ -22,8 +22,8 @@ void main() {
|
|||||||
await SemanticsService.announce('announcement 2', TextDirection.rtl);
|
await SemanticsService.announce('announcement 2', TextDirection.rtl);
|
||||||
|
|
||||||
expect(log, equals(<Map<String, dynamic>>[
|
expect(log, equals(<Map<String, dynamic>>[
|
||||||
<String, dynamic> {'type': 'announce', 'data': <String, dynamic> {'message': 'announcement 1', 'textDirection': 1}},
|
<String, dynamic>{'type': 'announce', 'data': <String, dynamic>{'message': 'announcement 1', 'textDirection': 1}},
|
||||||
<String, dynamic> {'type': 'announce', 'data': <String, dynamic> {'message': 'announcement 2', 'textDirection': 0}},
|
<String, dynamic>{'type': 'announce', 'data': <String, dynamic>{'message': 'announcement 2', 'textDirection': 0}},
|
||||||
]));
|
]));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -67,7 +67,7 @@ void main() {
|
|||||||
'',
|
'',
|
||||||
'hello',
|
'hello',
|
||||||
<dynamic>['nested', <dynamic>[]],
|
<dynamic>['nested', <dynamic>[]],
|
||||||
<dynamic, dynamic>{ 'a': 'nested', 'b': <dynamic, dynamic>{} },
|
<dynamic, dynamic>{'a': 'nested', 'b': <dynamic, dynamic>{}},
|
||||||
'world',
|
'world',
|
||||||
];
|
];
|
||||||
_checkEncodeDecode<dynamic>(json, message);
|
_checkEncodeDecode<dynamic>(json, message);
|
||||||
@ -185,7 +185,7 @@ void main() {
|
|||||||
double.nan,
|
double.nan,
|
||||||
]),
|
]),
|
||||||
<dynamic>['nested', <dynamic>[]],
|
<dynamic>['nested', <dynamic>[]],
|
||||||
<dynamic, dynamic>{ 'a': 'nested', null: <dynamic, dynamic>{} },
|
<dynamic, dynamic>{'a': 'nested', null: <dynamic, dynamic>{}},
|
||||||
'world',
|
'world',
|
||||||
];
|
];
|
||||||
_checkEncodeDecode<dynamic>(standard, message);
|
_checkEncodeDecode<dynamic>(standard, message);
|
||||||
|
@ -26,7 +26,9 @@ void main() {
|
|||||||
);
|
);
|
||||||
final Map<String, dynamic> json = configuration.toJson();
|
final Map<String, dynamic> json = configuration.toJson();
|
||||||
expect(json['inputType'], <String, dynamic>{
|
expect(json['inputType'], <String, dynamic>{
|
||||||
'name': 'TextInputType.text', 'signed': null, 'decimal': null,
|
'name': 'TextInputType.text',
|
||||||
|
'signed': null,
|
||||||
|
'decimal': null,
|
||||||
});
|
});
|
||||||
expect(json['obscureText'], true);
|
expect(json['obscureText'], true);
|
||||||
expect(json['autocorrect'], false);
|
expect(json['autocorrect'], false);
|
||||||
@ -42,7 +44,9 @@ void main() {
|
|||||||
);
|
);
|
||||||
final Map<String, dynamic> json = configuration.toJson();
|
final Map<String, dynamic> json = configuration.toJson();
|
||||||
expect(json['inputType'], <String, dynamic>{
|
expect(json['inputType'], <String, dynamic>{
|
||||||
'name': 'TextInputType.number', 'signed': false, 'decimal': true,
|
'name': 'TextInputType.number',
|
||||||
|
'signed': false,
|
||||||
|
'decimal': true,
|
||||||
});
|
});
|
||||||
expect(json['obscureText'], true);
|
expect(json['obscureText'], true);
|
||||||
expect(json['autocorrect'], false);
|
expect(json['autocorrect'], false);
|
||||||
|
@ -37,8 +37,8 @@ void main() {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
)
|
),
|
||||||
)
|
),
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
await expectLater(
|
await expectLater(
|
||||||
|
@ -1649,8 +1649,7 @@ void main() {
|
|||||||
expect(tester.takeException(), isAssertionError);
|
expect(tester.takeException(), isAssertionError);
|
||||||
});
|
});
|
||||||
|
|
||||||
testWidgets('Hero within a Hero subtree with Builder, throws', (
|
testWidgets('Hero within a Hero subtree with Builder, throws', (WidgetTester tester) async {
|
||||||
WidgetTester tester) async {
|
|
||||||
await tester.pumpWidget(
|
await tester.pumpWidget(
|
||||||
MaterialApp(
|
MaterialApp(
|
||||||
home: Material(
|
home: Material(
|
||||||
@ -1672,8 +1671,7 @@ void main() {
|
|||||||
expect(tester.takeException(),isAssertionError);
|
expect(tester.takeException(),isAssertionError);
|
||||||
});
|
});
|
||||||
|
|
||||||
testWidgets('Hero within a Hero subtree with LayoutBuilder, throws', (
|
testWidgets('Hero within a Hero subtree with LayoutBuilder, throws', (WidgetTester tester) async {
|
||||||
WidgetTester tester) async {
|
|
||||||
await tester.pumpWidget(
|
await tester.pumpWidget(
|
||||||
MaterialApp(
|
MaterialApp(
|
||||||
home: Material(
|
home: Material(
|
||||||
|
@ -902,7 +902,7 @@ class TestImageProvider extends ImageProvider<TestImageProvider> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class TestImageStreamCompleter extends ImageStreamCompleter {
|
class TestImageStreamCompleter extends ImageStreamCompleter {
|
||||||
final Map<ImageListener, ImageErrorListener> listeners = <ImageListener, ImageErrorListener> {};
|
final Map<ImageListener, ImageErrorListener> listeners = <ImageListener, ImageErrorListener>{};
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void addListener(ImageListener listener, { ImageErrorListener onError }) {
|
void addListener(ImageListener listener, { ImageErrorListener onError }) {
|
||||||
|
@ -105,7 +105,8 @@ class LinkedScrollController extends ScrollController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class LinkedScrollPosition extends ScrollPositionWithSingleContext {
|
class LinkedScrollPosition extends ScrollPositionWithSingleContext {
|
||||||
LinkedScrollPosition(this.owner, {
|
LinkedScrollPosition(
|
||||||
|
this.owner, {
|
||||||
ScrollPhysics physics,
|
ScrollPhysics physics,
|
||||||
ScrollContext context,
|
ScrollContext context,
|
||||||
double initialPixels,
|
double initialPixels,
|
||||||
|
@ -9,7 +9,7 @@ void main() {
|
|||||||
testWidgets('Back during pushReplacement', (WidgetTester tester) async {
|
testWidgets('Back during pushReplacement', (WidgetTester tester) async {
|
||||||
await tester.pumpWidget(MaterialApp(
|
await tester.pumpWidget(MaterialApp(
|
||||||
home: const Material(child: Text('home')),
|
home: const Material(child: Text('home')),
|
||||||
routes: <String, WidgetBuilder> {
|
routes: <String, WidgetBuilder>{
|
||||||
'/a': (BuildContext context) => const Material(child: Text('a')),
|
'/a': (BuildContext context) => const Material(child: Text('a')),
|
||||||
'/b': (BuildContext context) => const Material(child: Text('b')),
|
'/b': (BuildContext context) => const Material(child: Text('b')),
|
||||||
},
|
},
|
||||||
@ -42,7 +42,7 @@ void main() {
|
|||||||
testWidgets('pushAndRemoveUntil', (WidgetTester tester) async {
|
testWidgets('pushAndRemoveUntil', (WidgetTester tester) async {
|
||||||
await tester.pumpWidget(MaterialApp(
|
await tester.pumpWidget(MaterialApp(
|
||||||
home: const Material(child: Text('home')),
|
home: const Material(child: Text('home')),
|
||||||
routes: <String, WidgetBuilder> {
|
routes: <String, WidgetBuilder>{
|
||||||
'/a': (BuildContext context) => const Material(child: Text('a')),
|
'/a': (BuildContext context) => const Material(child: Text('a')),
|
||||||
'/b': (BuildContext context) => const Material(child: Text('b')),
|
'/b': (BuildContext context) => const Material(child: Text('b')),
|
||||||
},
|
},
|
||||||
|
@ -22,7 +22,7 @@ Future<void> main() async {
|
|||||||
await tester.pumpWidget(
|
await tester.pumpWidget(
|
||||||
MaterialApp(
|
MaterialApp(
|
||||||
home: Image(image: fakeImageProvider, excludeFromSemantics: true, key: imageKey),
|
home: Image(image: fakeImageProvider, excludeFromSemantics: true, key: imageKey),
|
||||||
routes: <String, WidgetBuilder> {
|
routes: <String, WidgetBuilder>{
|
||||||
'/page': (BuildContext context) => Container(),
|
'/page': (BuildContext context) => Container(),
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
@ -27,9 +27,9 @@ void main() {
|
|||||||
test('SemanticsEvent.toMap', () {
|
test('SemanticsEvent.toMap', () {
|
||||||
expect(
|
expect(
|
||||||
TestSemanticsEvent(text: 'hi', number: 11).toMap(),
|
TestSemanticsEvent(text: 'hi', number: 11).toMap(),
|
||||||
<String, dynamic> {
|
<String, dynamic>{
|
||||||
'type': 'TestEvent',
|
'type': 'TestEvent',
|
||||||
'data': <String, dynamic> {
|
'data': <String, dynamic>{
|
||||||
'text': 'hi',
|
'text': 'hi',
|
||||||
'number': 11,
|
'number': 11,
|
||||||
},
|
},
|
||||||
@ -37,10 +37,10 @@ void main() {
|
|||||||
);
|
);
|
||||||
expect(
|
expect(
|
||||||
TestSemanticsEvent(text: 'hi', number: 11).toMap(nodeId: 123),
|
TestSemanticsEvent(text: 'hi', number: 11).toMap(nodeId: 123),
|
||||||
<String, dynamic> {
|
<String, dynamic>{
|
||||||
'type': 'TestEvent',
|
'type': 'TestEvent',
|
||||||
'nodeId': 123,
|
'nodeId': 123,
|
||||||
'data': <String, dynamic> {
|
'data': <String, dynamic>{
|
||||||
'text': 'hi',
|
'text': 'hi',
|
||||||
'number': 11,
|
'number': 11,
|
||||||
},
|
},
|
||||||
|
@ -621,17 +621,16 @@ class SemanticsTester {
|
|||||||
|
|
||||||
class _HasSemantics extends Matcher {
|
class _HasSemantics extends Matcher {
|
||||||
const _HasSemantics(
|
const _HasSemantics(
|
||||||
this._semantics,
|
this._semantics, {
|
||||||
{
|
@required this.ignoreRect,
|
||||||
@required this.ignoreRect,
|
@required this.ignoreTransform,
|
||||||
@required this.ignoreTransform,
|
@required this.ignoreId,
|
||||||
@required this.ignoreId,
|
@required this.childOrder,
|
||||||
@required this.childOrder,
|
}) : assert(_semantics != null),
|
||||||
}) : assert(_semantics != null),
|
assert(ignoreRect != null),
|
||||||
assert(ignoreRect != null),
|
assert(ignoreId != null),
|
||||||
assert(ignoreId != null),
|
assert(ignoreTransform != null),
|
||||||
assert(ignoreTransform != null),
|
assert(childOrder != null);
|
||||||
assert(childOrder != null);
|
|
||||||
|
|
||||||
final TestSemantics _semantics;
|
final TestSemantics _semantics;
|
||||||
final bool ignoreRect;
|
final bool ignoreRect;
|
||||||
|
@ -166,7 +166,7 @@ void main() {
|
|||||||
|
|
||||||
class _TestWidget extends StatelessWidget {
|
class _TestWidget extends StatelessWidget {
|
||||||
|
|
||||||
const _TestWidget({this.pinned, this.floating, this.bottom, this.controller,});
|
const _TestWidget({this.pinned, this.floating, this.bottom, this.controller});
|
||||||
|
|
||||||
final bool pinned;
|
final bool pinned;
|
||||||
final bool floating;
|
final bool floating;
|
||||||
|
@ -73,7 +73,7 @@ void main() {
|
|||||||
textDirection: TextDirection.ltr,
|
textDirection: TextDirection.ltr,
|
||||||
child: Center(
|
child: Center(
|
||||||
child: Table(
|
child: Table(
|
||||||
columnWidths: const <int, TableColumnWidth> {
|
columnWidths: const <int, TableColumnWidth>{
|
||||||
0: FixedColumnWidth(100.0),
|
0: FixedColumnWidth(100.0),
|
||||||
1: FixedColumnWidth(110.0),
|
1: FixedColumnWidth(110.0),
|
||||||
2: FixedColumnWidth(125.0),
|
2: FixedColumnWidth(125.0),
|
||||||
@ -143,7 +143,7 @@ void main() {
|
|||||||
textDirection: TextDirection.rtl,
|
textDirection: TextDirection.rtl,
|
||||||
child: Center(
|
child: Center(
|
||||||
child: Table(
|
child: Table(
|
||||||
columnWidths: const <int, TableColumnWidth> {
|
columnWidths: const <int, TableColumnWidth>{
|
||||||
0: FixedColumnWidth(100.0),
|
0: FixedColumnWidth(100.0),
|
||||||
1: FixedColumnWidth(110.0),
|
1: FixedColumnWidth(110.0),
|
||||||
2: FixedColumnWidth(125.0),
|
2: FixedColumnWidth(125.0),
|
||||||
|
@ -964,7 +964,7 @@ class TestWidgetInspectorService extends Object with WidgetInspectorService {
|
|||||||
expect(selectionChangedCount, equals(2));
|
expect(selectionChangedCount, equals(2));
|
||||||
expect(service.selection.current, equals(elementB.renderObject));
|
expect(service.selection.current, equals(elementB.renderObject));
|
||||||
|
|
||||||
await service.testExtension('setSelectionById', <String, String>{'arg' : service.toId(elementA, 'my-group'), 'objectGroup': 'my-group'});
|
await service.testExtension('setSelectionById', <String, String>{'arg': service.toId(elementA, 'my-group'), 'objectGroup': 'my-group'});
|
||||||
expect(selectionChangedCount, equals(3));
|
expect(selectionChangedCount, equals(3));
|
||||||
expect(service.selection.currentElement, equals(elementA));
|
expect(service.selection.currentElement, equals(elementA));
|
||||||
expect(service.selection.current, equals(elementA.renderObject));
|
expect(service.selection.current, equals(elementA.renderObject));
|
||||||
|
@ -85,7 +85,7 @@ class TimelineSummary {
|
|||||||
|
|
||||||
/// Encodes this summary as JSON.
|
/// Encodes this summary as JSON.
|
||||||
Map<String, dynamic> get summaryJson {
|
Map<String, dynamic> get summaryJson {
|
||||||
return <String, dynamic> {
|
return <String, dynamic>{
|
||||||
'average_frame_build_time_millis': computeAverageFrameBuildTimeMillis(),
|
'average_frame_build_time_millis': computeAverageFrameBuildTimeMillis(),
|
||||||
'90th_percentile_frame_build_time_millis': computePercentileFrameBuildTimeMillis(90.0),
|
'90th_percentile_frame_build_time_millis': computePercentileFrameBuildTimeMillis(90.0),
|
||||||
'99th_percentile_frame_build_time_millis': computePercentileFrameBuildTimeMillis(99.0),
|
'99th_percentile_frame_build_time_millis': computePercentileFrameBuildTimeMillis(99.0),
|
||||||
|
@ -300,7 +300,7 @@ void main() {
|
|||||||
|
|
||||||
when(mockPeer.sendRequest('_getVMTimeline')).thenAnswer((Invocation invocation) async {
|
when(mockPeer.sendRequest('_getVMTimeline')).thenAnswer((Invocation invocation) async {
|
||||||
log.add('download');
|
log.add('download');
|
||||||
return <String, dynamic> {
|
return <String, dynamic>{
|
||||||
'traceEvents': <dynamic>[
|
'traceEvents': <dynamic>[
|
||||||
<String, String>{
|
<String, String>{
|
||||||
'name': 'test event',
|
'name': 'test event',
|
||||||
@ -359,7 +359,7 @@ void main() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
when(mockPeer.sendRequest('_getVMTimeline')).thenAnswer((Invocation invocation) async {
|
when(mockPeer.sendRequest('_getVMTimeline')).thenAnswer((Invocation invocation) async {
|
||||||
return <String, dynamic> {
|
return <String, dynamic>{
|
||||||
'traceEvents': <dynamic>[
|
'traceEvents': <dynamic>[
|
||||||
<String, String>{
|
<String, String>{
|
||||||
'name': 'test event',
|
'name': 'test event',
|
||||||
|
@ -21,15 +21,22 @@ void main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Map<String, dynamic> build(int timeStamp, int duration) => <String, dynamic>{
|
Map<String, dynamic> build(int timeStamp, int duration) => <String, dynamic>{
|
||||||
'name': 'Frame', 'ph': 'X', 'ts': timeStamp, 'dur': duration,
|
'name': 'Frame',
|
||||||
|
'ph': 'X',
|
||||||
|
'ts': timeStamp,
|
||||||
|
'dur': duration,
|
||||||
};
|
};
|
||||||
|
|
||||||
Map<String, dynamic> begin(int timeStamp) => <String, dynamic>{
|
Map<String, dynamic> begin(int timeStamp) => <String, dynamic>{
|
||||||
'name': 'GPURasterizer::Draw', 'ph': 'B', 'ts': timeStamp,
|
'name': 'GPURasterizer::Draw',
|
||||||
|
'ph': 'B',
|
||||||
|
'ts': timeStamp,
|
||||||
};
|
};
|
||||||
|
|
||||||
Map<String, dynamic> end(int timeStamp) => <String, dynamic>{
|
Map<String, dynamic> end(int timeStamp) => <String, dynamic>{
|
||||||
'name': 'GPURasterizer::Draw', 'ph': 'E', 'ts': timeStamp,
|
'name': 'GPURasterizer::Draw',
|
||||||
|
'ph': 'E',
|
||||||
|
'ts': timeStamp,
|
||||||
};
|
};
|
||||||
|
|
||||||
List<Map<String, dynamic>> rasterizeTimeSequenceInMillis(List<int> sequence) {
|
List<Map<String, dynamic>> rasterizeTimeSequenceInMillis(List<int> sequence) {
|
||||||
|
@ -231,7 +231,8 @@ abstract class TestWidgetsFlutterBinding extends BindingBase
|
|||||||
/// [AutomatedTestWidgetsFlutterBinding] implementation to increase the
|
/// [AutomatedTestWidgetsFlutterBinding] implementation to increase the
|
||||||
/// current timeout. See [AutomatedTestWidgetsFlutterBinding.addTime] for
|
/// current timeout. See [AutomatedTestWidgetsFlutterBinding.addTime] for
|
||||||
/// details. The value is ignored by the [LiveTestWidgetsFlutterBinding].
|
/// details. The value is ignored by the [LiveTestWidgetsFlutterBinding].
|
||||||
Future<T> runAsync<T>(Future<T> callback(), {
|
Future<T> runAsync<T>(
|
||||||
|
Future<T> callback(), {
|
||||||
Duration additionalTime = const Duration(milliseconds: 1000),
|
Duration additionalTime = const Duration(milliseconds: 1000),
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -740,7 +741,8 @@ class AutomatedTestWidgetsFlutterBinding extends TestWidgetsFlutterBinding {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Future<T> runAsync<T>(Future<T> callback(), {
|
Future<T> runAsync<T>(
|
||||||
|
Future<T> callback(), {
|
||||||
Duration additionalTime = const Duration(milliseconds: 1000),
|
Duration additionalTime = const Duration(milliseconds: 1000),
|
||||||
}) {
|
}) {
|
||||||
assert(additionalTime != null);
|
assert(additionalTime != null);
|
||||||
@ -1249,7 +1251,8 @@ class LiveTestWidgetsFlutterBinding extends TestWidgetsFlutterBinding {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Future<T> runAsync<T>(Future<T> callback(), {
|
Future<T> runAsync<T>(
|
||||||
|
Future<T> callback(), {
|
||||||
Duration additionalTime = const Duration(milliseconds: 1000),
|
Duration additionalTime = const Duration(milliseconds: 1000),
|
||||||
}) async {
|
}) async {
|
||||||
assert(() {
|
assert(() {
|
||||||
|
@ -654,7 +654,9 @@ class _ElementPredicateFinder extends MatchFinder {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class _DescendantFinder extends Finder {
|
class _DescendantFinder extends Finder {
|
||||||
_DescendantFinder(this.ancestor, this.descendant, {
|
_DescendantFinder(
|
||||||
|
this.ancestor,
|
||||||
|
this.descendant, {
|
||||||
this.matchRoot = false,
|
this.matchRoot = false,
|
||||||
bool skipOffstage = true,
|
bool skipOffstage = true,
|
||||||
}) : super(skipOffstage: skipOffstage);
|
}) : super(skipOffstage: skipOffstage);
|
||||||
|
@ -409,7 +409,8 @@ class WidgetTester extends WidgetController implements HitTestDispatcher, Ticker
|
|||||||
/// are required to wait for the returned future to complete before calling
|
/// are required to wait for the returned future to complete before calling
|
||||||
/// this method again. Attempts to do otherwise will result in a
|
/// this method again. Attempts to do otherwise will result in a
|
||||||
/// [TestFailure] error being thrown.
|
/// [TestFailure] error being thrown.
|
||||||
Future<T> runAsync<T>(Future<T> callback(), {
|
Future<T> runAsync<T>(
|
||||||
|
Future<T> callback(), {
|
||||||
Duration additionalTime = const Duration(milliseconds: 1000),
|
Duration additionalTime = const Duration(milliseconds: 1000),
|
||||||
}) => binding.runAsync<T>(callback, additionalTime: additionalTime);
|
}) => binding.runAsync<T>(callback, additionalTime: additionalTime);
|
||||||
|
|
||||||
|
@ -315,9 +315,11 @@ class TestWindow implements Window {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void sendPlatformMessage(String name,
|
void sendPlatformMessage(
|
||||||
ByteData data,
|
String name,
|
||||||
PlatformMessageResponseCallback callback) {
|
ByteData data,
|
||||||
|
PlatformMessageResponseCallback callback,
|
||||||
|
) {
|
||||||
_window.sendPlatformMessage(name, data, callback);
|
_window.sendPlatformMessage(name, data, callback);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -162,6 +162,5 @@ class SimpleCustomSemanticsRenderObject extends RenderBox {
|
|||||||
void describeSemanticsConfiguration(SemanticsConfiguration config) {
|
void describeSemanticsConfiguration(SemanticsConfiguration config) {
|
||||||
super.describeSemanticsConfiguration(config);
|
super.describeSemanticsConfiguration(config);
|
||||||
config..label = label..textDirection = TextDirection.ltr;
|
config..label = label..textDirection = TextDirection.ltr;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -113,7 +113,7 @@ Future<void> main(List<String> args) async {
|
|||||||
platformKernelDill: platformKernelDill,
|
platformKernelDill: platformKernelDill,
|
||||||
flutterPatchedSdk: flutterPatchedSdk,
|
flutterPatchedSdk: flutterPatchedSdk,
|
||||||
),
|
),
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -588,7 +588,8 @@ class AndroidSdk {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class AndroidSdkVersion implements Comparable<AndroidSdkVersion> {
|
class AndroidSdkVersion implements Comparable<AndroidSdkVersion> {
|
||||||
AndroidSdkVersion._(this.sdk, {
|
AndroidSdkVersion._(
|
||||||
|
this.sdk, {
|
||||||
@required this.sdkLevel,
|
@required this.sdkLevel,
|
||||||
@required this.platformName,
|
@required this.platformName,
|
||||||
@required this.buildToolsVersion,
|
@required this.buildToolsVersion,
|
||||||
|
@ -30,9 +30,13 @@ final RegExp _dotHomeStudioVersionMatcher =
|
|||||||
String get javaPath => androidStudio?.javaPath;
|
String get javaPath => androidStudio?.javaPath;
|
||||||
|
|
||||||
class AndroidStudio implements Comparable<AndroidStudio> {
|
class AndroidStudio implements Comparable<AndroidStudio> {
|
||||||
AndroidStudio(this.directory,
|
AndroidStudio(
|
||||||
{Version version, this.configured, this.studioAppName = 'AndroidStudio', this.presetPluginsPath})
|
this.directory, {
|
||||||
: version = version ?? Version.unknown {
|
Version version,
|
||||||
|
this.configured,
|
||||||
|
this.studioAppName = 'AndroidStudio',
|
||||||
|
this.presetPluginsPath,
|
||||||
|
}) : version = version ?? Version.unknown {
|
||||||
_init();
|
_init();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -10,7 +10,9 @@ import 'globals.dart';
|
|||||||
|
|
||||||
/// Information about a build to be performed or used.
|
/// Information about a build to be performed or used.
|
||||||
class BuildInfo {
|
class BuildInfo {
|
||||||
const BuildInfo(this.mode, this.flavor, {
|
const BuildInfo(
|
||||||
|
this.mode,
|
||||||
|
this.flavor, {
|
||||||
this.trackWidgetCreation = false,
|
this.trackWidgetCreation = false,
|
||||||
this.compilationTraceFilePath,
|
this.compilationTraceFilePath,
|
||||||
this.createBaseline = false,
|
this.createBaseline = false,
|
||||||
|
@ -119,7 +119,8 @@ class BuildRunner extends CodeGenerator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Future<CodegenDaemon> daemon(FlutterProject flutterProject, {
|
Future<CodegenDaemon> daemon(
|
||||||
|
FlutterProject flutterProject, {
|
||||||
String mainPath,
|
String mainPath,
|
||||||
bool linkPlatformKernelIn = false,
|
bool linkPlatformKernelIn = false,
|
||||||
bool targetProductVm = false,
|
bool targetProductVm = false,
|
||||||
|
@ -528,7 +528,7 @@ class AppDomain extends Domain {
|
|||||||
return app.stop().then<bool>(
|
return app.stop().then<bool>(
|
||||||
(void value) => true,
|
(void value) => true,
|
||||||
onError: (dynamic error, StackTrace stack) {
|
onError: (dynamic error, StackTrace stack) {
|
||||||
_sendAppEvent(app, 'log', <String, dynamic>{ 'log': '$error', 'error': true });
|
_sendAppEvent(app, 'log', <String, dynamic>{'log': '$error', 'error': true});
|
||||||
app.closeLogger();
|
app.closeLogger();
|
||||||
_apps.remove(app);
|
_apps.remove(app);
|
||||||
return false;
|
return false;
|
||||||
@ -546,7 +546,7 @@ class AppDomain extends Domain {
|
|||||||
return app.detach().then<bool>(
|
return app.detach().then<bool>(
|
||||||
(void value) => true,
|
(void value) => true,
|
||||||
onError: (dynamic error, StackTrace stack) {
|
onError: (dynamic error, StackTrace stack) {
|
||||||
_sendAppEvent(app, 'log', <String, dynamic>{ 'log': '$error', 'error': true });
|
_sendAppEvent(app, 'log', <String, dynamic>{'log': '$error', 'error': true});
|
||||||
app.closeLogger();
|
app.closeLogger();
|
||||||
_apps.remove(app);
|
_apps.remove(app);
|
||||||
return false;
|
return false;
|
||||||
@ -559,7 +559,7 @@ class AppDomain extends Domain {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void _sendAppEvent(AppInstance app, String name, [ Map<String, dynamic> args ]) {
|
void _sendAppEvent(AppInstance app, String name, [ Map<String, dynamic> args ]) {
|
||||||
final Map<String, dynamic> eventArgs = <String, dynamic> {'appId': app.id};
|
final Map<String, dynamic> eventArgs = <String, dynamic>{'appId': app.id};
|
||||||
if (args != null)
|
if (args != null)
|
||||||
eventArgs.addAll(args);
|
eventArgs.addAll(args);
|
||||||
sendEvent('app.$name', eventArgs);
|
sendEvent('app.$name', eventArgs);
|
||||||
@ -951,7 +951,7 @@ class _AppRunLogger extends Logger {
|
|||||||
if (parent != null) {
|
if (parent != null) {
|
||||||
parent.printTrace(message);
|
parent.printTrace(message);
|
||||||
} else {
|
} else {
|
||||||
_sendLogEvent(<String, dynamic>{ 'log': message, 'trace': true });
|
_sendLogEvent(<String, dynamic>{'log': message, 'trace': true});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@ abstract class RunCommandBase extends FlutterCommand {
|
|||||||
)
|
)
|
||||||
..addFlag('verbose-system-logs',
|
..addFlag('verbose-system-logs',
|
||||||
negatable: false,
|
negatable: false,
|
||||||
help: 'Include verbose logging from the flutter engine.'
|
help: 'Include verbose logging from the flutter engine.',
|
||||||
)
|
)
|
||||||
..addOption('route',
|
..addOption('route',
|
||||||
help: 'Which route to load when running the app.',
|
help: 'Which route to load when running the app.',
|
||||||
@ -203,7 +203,7 @@ class RunCommand extends RunCommandBase {
|
|||||||
? getNameForTargetPlatform(await devices[0].targetPlatform)
|
? getNameForTargetPlatform(await devices[0].targetPlatform)
|
||||||
: 'multiple';
|
: 'multiple';
|
||||||
|
|
||||||
return <String, String>{ 'cd3': '$isEmulator', 'cd4': deviceType };
|
return <String, String>{'cd3': '$isEmulator', 'cd4': deviceType};
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
@ -909,7 +909,10 @@ class PubspecHeader extends PubspecLine {
|
|||||||
|
|
||||||
/// A dependency, as represented by a line (or two) from a pubspec.yaml file.
|
/// A dependency, as represented by a line (or two) from a pubspec.yaml file.
|
||||||
class PubspecDependency extends PubspecLine {
|
class PubspecDependency extends PubspecLine {
|
||||||
PubspecDependency(String line, this.name, this.suffix, {
|
PubspecDependency(
|
||||||
|
String line,
|
||||||
|
this.name,
|
||||||
|
this.suffix, {
|
||||||
@required this.isTransitive,
|
@required this.isTransitive,
|
||||||
DependencyKind kind,
|
DependencyKind kind,
|
||||||
this.version,
|
this.version,
|
||||||
|
@ -412,7 +412,8 @@ class _RejectRequest extends _CompilationRequest {
|
|||||||
/// The wrapper is intended to stay resident in memory as user changes, reloads,
|
/// The wrapper is intended to stay resident in memory as user changes, reloads,
|
||||||
/// restarts the Flutter app.
|
/// restarts the Flutter app.
|
||||||
class ResidentCompiler {
|
class ResidentCompiler {
|
||||||
ResidentCompiler(this._sdkRoot, {
|
ResidentCompiler(
|
||||||
|
this._sdkRoot, {
|
||||||
bool trackWidgetCreation = false,
|
bool trackWidgetCreation = false,
|
||||||
String packagesPath,
|
String packagesPath,
|
||||||
List<String> fileSystemRoots,
|
List<String> fileSystemRoots,
|
||||||
|
@ -76,7 +76,7 @@ Future<void> pubGet({
|
|||||||
bool upgrade = false,
|
bool upgrade = false,
|
||||||
bool offline = false,
|
bool offline = false,
|
||||||
bool checkLastModified = true,
|
bool checkLastModified = true,
|
||||||
bool skipPubspecYamlCheck = false
|
bool skipPubspecYamlCheck = false,
|
||||||
}) async {
|
}) async {
|
||||||
directory ??= fs.currentDirectory.path;
|
directory ??= fs.currentDirectory.path;
|
||||||
|
|
||||||
|
@ -241,7 +241,7 @@ class ServiceProtocolDevFSOperations implements DevFSOperations {
|
|||||||
try {
|
try {
|
||||||
return await vmService.vm.invokeRpcRaw(
|
return await vmService.vm.invokeRpcRaw(
|
||||||
'_writeDevFSFile',
|
'_writeDevFSFile',
|
||||||
params: <String, dynamic> {
|
params: <String, dynamic>{
|
||||||
'fsName': fsName,
|
'fsName': fsName,
|
||||||
'uri': deviceUri.toString(),
|
'uri': deviceUri.toString(),
|
||||||
'fileContents': fileContents,
|
'fileContents': fileContents,
|
||||||
@ -337,8 +337,11 @@ class _DevFSHttpWriter {
|
|||||||
|
|
||||||
// Basic statistics for DevFS update operation.
|
// Basic statistics for DevFS update operation.
|
||||||
class UpdateFSReport {
|
class UpdateFSReport {
|
||||||
UpdateFSReport({bool success = false,
|
UpdateFSReport({
|
||||||
int invalidatedSourcesCount = 0, int syncedBytes = 0}) {
|
bool success = false,
|
||||||
|
int invalidatedSourcesCount = 0,
|
||||||
|
int syncedBytes = 0,
|
||||||
|
}) {
|
||||||
_success = success;
|
_success = success;
|
||||||
_invalidatedSourcesCount = invalidatedSourcesCount;
|
_invalidatedSourcesCount = invalidatedSourcesCount;
|
||||||
_syncedBytes = syncedBytes;
|
_syncedBytes = syncedBytes;
|
||||||
|
@ -364,7 +364,8 @@ abstract class Device {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class DebuggingOptions {
|
class DebuggingOptions {
|
||||||
DebuggingOptions.enabled(this.buildInfo, {
|
DebuggingOptions.enabled(
|
||||||
|
this.buildInfo, {
|
||||||
this.startPaused = false,
|
this.startPaused = false,
|
||||||
this.enableSoftwareRendering = false,
|
this.enableSoftwareRendering = false,
|
||||||
this.skiaDeterministicRendering = false,
|
this.skiaDeterministicRendering = false,
|
||||||
|
@ -213,8 +213,7 @@ class FuchsiaDevice extends Device {
|
|||||||
_FuchsiaPortForwarder _portForwarder;
|
_FuchsiaPortForwarder _portForwarder;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void clearLogs() {
|
void clearLogs() { }
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
bool get supportsScreenshot => false;
|
bool get supportsScreenshot => false;
|
||||||
@ -306,7 +305,9 @@ class FuchsiaDevice extends Device {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class FuchsiaIsolateDiscoveryProtocol {
|
class FuchsiaIsolateDiscoveryProtocol {
|
||||||
FuchsiaIsolateDiscoveryProtocol(this._device, this._isolateName, [
|
FuchsiaIsolateDiscoveryProtocol(
|
||||||
|
this._device,
|
||||||
|
this._isolateName, [
|
||||||
this._vmServiceConnector = _kDefaultFuchsiaIsolateDiscoveryConnector,
|
this._vmServiceConnector = _kDefaultFuchsiaIsolateDiscoveryConnector,
|
||||||
this._pollOnce = false,
|
this._pollOnce = false,
|
||||||
]);
|
]);
|
||||||
|
@ -163,7 +163,7 @@ Future<Map<String, String>> getCodeSigningIdentityDevelopmentTeam({
|
|||||||
if (await opensslProcess.exitCode != 0)
|
if (await opensslProcess.exitCode != 0)
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
return <String, String> {
|
return <String, String>{
|
||||||
'DEVELOPMENT_TEAM': _certificateOrganizationalUnitExtractionPattern
|
'DEVELOPMENT_TEAM': _certificateOrganizationalUnitExtractionPattern
|
||||||
.firstMatch(opensslOutput)
|
.firstMatch(opensslOutput)
|
||||||
?.group(1),
|
?.group(1),
|
||||||
|
@ -389,8 +389,7 @@ class IOSDevice extends Device {
|
|||||||
DevicePortForwarder get portForwarder => _portForwarder ??= _IOSDevicePortForwarder(this);
|
DevicePortForwarder get portForwarder => _portForwarder ??= _IOSDevicePortForwarder(this);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void clearLogs() {
|
void clearLogs() { }
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
bool get supportsScreenshot => iMobileDevice.isInstalled;
|
bool get supportsScreenshot => iMobileDevice.isInstalled;
|
||||||
|
@ -625,15 +625,13 @@ Future<void> diagnoseXcodeBuildFailure(XcodeBuildResult result) async {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class XcodeBuildResult {
|
class XcodeBuildResult {
|
||||||
XcodeBuildResult(
|
XcodeBuildResult({
|
||||||
{
|
@required this.success,
|
||||||
@required this.success,
|
this.output,
|
||||||
this.output,
|
this.stdout,
|
||||||
this.stdout,
|
this.stderr,
|
||||||
this.stderr,
|
this.xcodeBuildExecution,
|
||||||
this.xcodeBuildExecution,
|
});
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
final bool success;
|
final bool success;
|
||||||
final String output;
|
final String output;
|
||||||
@ -645,14 +643,12 @@ class XcodeBuildResult {
|
|||||||
|
|
||||||
/// Describes an invocation of a Xcode build command.
|
/// Describes an invocation of a Xcode build command.
|
||||||
class XcodeBuildExecution {
|
class XcodeBuildExecution {
|
||||||
XcodeBuildExecution(
|
XcodeBuildExecution({
|
||||||
{
|
@required this.buildCommands,
|
||||||
@required this.buildCommands,
|
@required this.appDirectory,
|
||||||
@required this.appDirectory,
|
@required this.buildForPhysicalDevice,
|
||||||
@required this.buildForPhysicalDevice,
|
@required this.buildSettings,
|
||||||
@required this.buildSettings,
|
});
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
/// The original list of Xcode build commands used to produce this build result.
|
/// The original list of Xcode build commands used to produce this build result.
|
||||||
final List<String> buildCommands;
|
final List<String> buildCommands;
|
||||||
|
@ -9,7 +9,7 @@ import '../base/file_system.dart';
|
|||||||
import '../globals.dart';
|
import '../globals.dart';
|
||||||
import '../ios/plist_utils.dart' as plist;
|
import '../ios/plist_utils.dart' as plist;
|
||||||
|
|
||||||
/// Tests whether a [FileSystemEntity] is an macOS bundle directory
|
/// Tests whether a [FileSystemEntity] is an macOS bundle directory
|
||||||
bool _isBundleDirectory(FileSystemEntity entity) =>
|
bool _isBundleDirectory(FileSystemEntity entity) =>
|
||||||
entity is Directory && entity.path.endsWith('.app');
|
entity is Directory && entity.path.endsWith('.app');
|
||||||
|
|
||||||
|
@ -28,7 +28,8 @@ import 'run_hot.dart';
|
|||||||
import 'vmservice.dart';
|
import 'vmservice.dart';
|
||||||
|
|
||||||
class FlutterDevice {
|
class FlutterDevice {
|
||||||
FlutterDevice(this.device, {
|
FlutterDevice(
|
||||||
|
this.device, {
|
||||||
@required this.trackWidgetCreation,
|
@required this.trackWidgetCreation,
|
||||||
this.dillOutputPath,
|
this.dillOutputPath,
|
||||||
this.fileSystemRoots,
|
this.fileSystemRoots,
|
||||||
@ -48,7 +49,8 @@ class FlutterDevice {
|
|||||||
);
|
);
|
||||||
|
|
||||||
/// Create a [FlutterDevice] with optional code generation enabled.
|
/// Create a [FlutterDevice] with optional code generation enabled.
|
||||||
static Future<FlutterDevice> create(Device device, {
|
static Future<FlutterDevice> create(
|
||||||
|
Device device, {
|
||||||
@required bool trackWidgetCreation,
|
@required bool trackWidgetCreation,
|
||||||
String dillOutputPath,
|
String dillOutputPath,
|
||||||
List<String> fileSystemRoots,
|
List<String> fileSystemRoots,
|
||||||
@ -482,7 +484,8 @@ class FlutterDevice {
|
|||||||
|
|
||||||
// Shared code between different resident application runners.
|
// Shared code between different resident application runners.
|
||||||
abstract class ResidentRunner {
|
abstract class ResidentRunner {
|
||||||
ResidentRunner(this.flutterDevices, {
|
ResidentRunner(
|
||||||
|
this.flutterDevices, {
|
||||||
this.target,
|
this.target,
|
||||||
this.debuggingOptions,
|
this.debuggingOptions,
|
||||||
this.usesTerminalUI = true,
|
this.usesTerminalUI = true,
|
||||||
|
@ -93,8 +93,11 @@ class HotRunner extends ResidentRunner {
|
|||||||
benchmarkData[name].add(value);
|
benchmarkData[name].add(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> _reloadSourcesService(String isolateId,
|
Future<void> _reloadSourcesService(
|
||||||
{ bool force = false, bool pause = false }) async {
|
String isolateId, {
|
||||||
|
bool force = false,
|
||||||
|
bool pause = false,
|
||||||
|
}) async {
|
||||||
// TODO(cbernaschina): check that isolateId is the id of the UI isolate.
|
// TODO(cbernaschina): check that isolateId is the id of the UI isolate.
|
||||||
final OperationResult result = await restart(pauseAfterRestart: pause);
|
final OperationResult result = await restart(pauseAfterRestart: pause);
|
||||||
if (!result.isOk) {
|
if (!result.isOk) {
|
||||||
@ -589,7 +592,7 @@ class HotRunner extends ResidentRunner {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<OperationResult> _reloadSources({ bool pause = false, String reason, void Function(String message) onSlow, }) async {
|
Future<OperationResult> _reloadSources({ bool pause = false, String reason, void Function(String message) onSlow }) async {
|
||||||
final Map<String, String> analyticsParameters = <String, String>{};
|
final Map<String, String> analyticsParameters = <String, String>{};
|
||||||
if (reason != null) {
|
if (reason != null) {
|
||||||
analyticsParameters[kEventReloadReasonParameterName] = reason;
|
analyticsParameters[kEventReloadReasonParameterName] = reason;
|
||||||
|
@ -424,8 +424,10 @@ abstract class ServiceObject {
|
|||||||
/// Factory constructor given a [ServiceObjectOwner] and a service map,
|
/// Factory constructor given a [ServiceObjectOwner] and a service map,
|
||||||
/// upgrade the map into a proper [ServiceObject]. This function always
|
/// upgrade the map into a proper [ServiceObject]. This function always
|
||||||
/// returns a new instance and does not interact with caches.
|
/// returns a new instance and does not interact with caches.
|
||||||
factory ServiceObject._fromMap(ServiceObjectOwner owner,
|
factory ServiceObject._fromMap(
|
||||||
Map<String, dynamic> map) {
|
ServiceObjectOwner owner,
|
||||||
|
Map<String, dynamic> map,
|
||||||
|
) {
|
||||||
if (map == null)
|
if (map == null)
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
@ -873,7 +875,7 @@ class VM extends ServiceObjectOwner {
|
|||||||
|
|
||||||
/// Create a new development file system on the device.
|
/// Create a new development file system on the device.
|
||||||
Future<Map<String, dynamic>> createDevFS(String fsName) {
|
Future<Map<String, dynamic>> createDevFS(String fsName) {
|
||||||
return invokeRpcRaw('_createDevFS', params: <String, dynamic> {'fsName': fsName});
|
return invokeRpcRaw('_createDevFS', params: <String, dynamic>{'fsName': fsName});
|
||||||
}
|
}
|
||||||
|
|
||||||
/// List the development file system son the device.
|
/// List the development file system son the device.
|
||||||
@ -928,7 +930,7 @@ class VM extends ServiceObjectOwner {
|
|||||||
Uri assetsDirectory,
|
Uri assetsDirectory,
|
||||||
) {
|
) {
|
||||||
return invokeRpc<ServiceMap>('_flutter.runInView',
|
return invokeRpc<ServiceMap>('_flutter.runInView',
|
||||||
params: <String, dynamic> {
|
params: <String, dynamic>{
|
||||||
'viewId': viewId,
|
'viewId': viewId,
|
||||||
'mainScript': main.toString(),
|
'mainScript': main.toString(),
|
||||||
'packagesFile': packages.toString(),
|
'packagesFile': packages.toString(),
|
||||||
|
@ -57,8 +57,11 @@ class VsCode {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
factory VsCode.fromDirectory(String installPath, String extensionDirectory,
|
factory VsCode.fromDirectory(
|
||||||
{ String edition }) {
|
String installPath,
|
||||||
|
String extensionDirectory, {
|
||||||
|
String edition,
|
||||||
|
}) {
|
||||||
final String packageJsonPath =
|
final String packageJsonPath =
|
||||||
fs.path.join(installPath, 'resources', 'app', 'package.json');
|
fs.path.join(installPath, 'resources', 'app', 'package.json');
|
||||||
final String versionString = _getVersionFromPackageJson(packageJsonPath);
|
final String versionString = _getVersionFromPackageJson(packageJsonPath);
|
||||||
|
@ -35,7 +35,7 @@ void main() {
|
|||||||
artifacts.getArtifactPath(Artifact.flutterTester),
|
artifacts.getArtifactPath(Artifact.flutterTester),
|
||||||
fs.path.join(tempDir.path, 'bin', 'cache', 'artifacts', 'engine', 'linux-x64', 'flutter_tester'),
|
fs.path.join(tempDir.path, 'bin', 'cache', 'artifacts', 'engine', 'linux-x64', 'flutter_tester'),
|
||||||
);
|
);
|
||||||
}, overrides: <Type, Generator> {
|
}, overrides: <Type, Generator>{
|
||||||
Cache: () => Cache(rootOverride: tempDir),
|
Cache: () => Cache(rootOverride: tempDir),
|
||||||
Platform: () => FakePlatform(operatingSystem: 'linux'),
|
Platform: () => FakePlatform(operatingSystem: 'linux'),
|
||||||
});
|
});
|
||||||
@ -53,7 +53,7 @@ void main() {
|
|||||||
artifacts.getEngineType(TargetPlatform.darwin_x64),
|
artifacts.getEngineType(TargetPlatform.darwin_x64),
|
||||||
'darwin-x64',
|
'darwin-x64',
|
||||||
);
|
);
|
||||||
}, overrides: <Type, Generator> {
|
}, overrides: <Type, Generator>{
|
||||||
Cache: () => Cache(rootOverride: tempDir),
|
Cache: () => Cache(rootOverride: tempDir),
|
||||||
Platform: () => FakePlatform(operatingSystem: 'linux'),
|
Platform: () => FakePlatform(operatingSystem: 'linux'),
|
||||||
});
|
});
|
||||||
@ -89,7 +89,7 @@ void main() {
|
|||||||
artifacts.getArtifactPath(Artifact.engineDartSdkPath),
|
artifacts.getArtifactPath(Artifact.engineDartSdkPath),
|
||||||
fs.path.join(tempDir.path, 'out', 'host_debug_unopt', 'dart-sdk'),
|
fs.path.join(tempDir.path, 'out', 'host_debug_unopt', 'dart-sdk'),
|
||||||
);
|
);
|
||||||
}, overrides: <Type, Generator> {
|
}, overrides: <Type, Generator>{
|
||||||
Platform: () => FakePlatform(operatingSystem: 'linux'),
|
Platform: () => FakePlatform(operatingSystem: 'linux'),
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -106,7 +106,7 @@ void main() {
|
|||||||
artifacts.getEngineType(TargetPlatform.darwin_x64),
|
artifacts.getEngineType(TargetPlatform.darwin_x64),
|
||||||
'android_debug_unopt',
|
'android_debug_unopt',
|
||||||
);
|
);
|
||||||
}, overrides: <Type, Generator> {
|
}, overrides: <Type, Generator>{
|
||||||
Platform: () => FakePlatform(operatingSystem: 'linux'),
|
Platform: () => FakePlatform(operatingSystem: 'linux'),
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -36,7 +36,7 @@ void main() {
|
|||||||
r'\[ (?: {0,2}\+[0-9]{1,3} ms| )\] Oooh, I do I do I do\n$'));
|
r'\[ (?: {0,2}\+[0-9]{1,3} ms| )\] Oooh, I do I do I do\n$'));
|
||||||
expect(mockLogger.traceText, '');
|
expect(mockLogger.traceText, '');
|
||||||
expect(mockLogger.errorText, matches( r'^\[ (?: {0,2}\+[0-9]{1,3} ms| )\] Helpless!\n$'));
|
expect(mockLogger.errorText, matches( r'^\[ (?: {0,2}\+[0-9]{1,3} ms| )\] Helpless!\n$'));
|
||||||
}, overrides: <Type, Generator> {
|
}, overrides: <Type, Generator>{
|
||||||
OutputPreferences: () => OutputPreferences(showColor: false),
|
OutputPreferences: () => OutputPreferences(showColor: false),
|
||||||
Platform: _kNoAnsiPlatform,
|
Platform: _kNoAnsiPlatform,
|
||||||
});
|
});
|
||||||
@ -57,7 +57,7 @@ void main() {
|
|||||||
expect(
|
expect(
|
||||||
mockLogger.errorText,
|
mockLogger.errorText,
|
||||||
matches('^$red' r'\[ (?: {0,2}\+[0-9]{1,3} ms| )\] ' '${bold}Helpless!$resetBold$resetColor' r'\n$'));
|
matches('^$red' r'\[ (?: {0,2}\+[0-9]{1,3} ms| )\] ' '${bold}Helpless!$resetBold$resetColor' r'\n$'));
|
||||||
}, overrides: <Type, Generator> {
|
}, overrides: <Type, Generator>{
|
||||||
OutputPreferences: () => OutputPreferences(showColor: true),
|
OutputPreferences: () => OutputPreferences(showColor: true),
|
||||||
Platform: () => FakePlatform()..stdoutSupportsAnsi = true,
|
Platform: () => FakePlatform()..stdoutSupportsAnsi = true,
|
||||||
});
|
});
|
||||||
|
@ -32,7 +32,7 @@ void main() {
|
|||||||
// rwxr--r--
|
// rwxr--r--
|
||||||
expect(mode.substring(0, 3), endsWith('x'));
|
expect(mode.substring(0, 3), endsWith('x'));
|
||||||
}
|
}
|
||||||
}, overrides: <Type, Generator> {
|
}, overrides: <Type, Generator>{
|
||||||
OperatingSystemUtils: () => OperatingSystemUtils(),
|
OperatingSystemUtils: () => OperatingSystemUtils(),
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -44,7 +44,7 @@ void main() {
|
|||||||
equals('${AnsiTerminal.colorCode(color)}output${AnsiTerminal.resetColor}'),
|
equals('${AnsiTerminal.colorCode(color)}output${AnsiTerminal.resetColor}'),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}, overrides: <Type, Generator> {
|
}, overrides: <Type, Generator>{
|
||||||
OutputPreferences: () => OutputPreferences(showColor: true),
|
OutputPreferences: () => OutputPreferences(showColor: true),
|
||||||
Platform: () => FakePlatform()..stdoutSupportsAnsi = true,
|
Platform: () => FakePlatform()..stdoutSupportsAnsi = true,
|
||||||
});
|
});
|
||||||
@ -54,7 +54,7 @@ void main() {
|
|||||||
terminal.bolden('output'),
|
terminal.bolden('output'),
|
||||||
equals('${AnsiTerminal.bold}output${AnsiTerminal.resetBold}'),
|
equals('${AnsiTerminal.bold}output${AnsiTerminal.resetBold}'),
|
||||||
);
|
);
|
||||||
}, overrides: <Type, Generator> {
|
}, overrides: <Type, Generator>{
|
||||||
OutputPreferences: () => OutputPreferences(showColor: true),
|
OutputPreferences: () => OutputPreferences(showColor: true),
|
||||||
Platform: () => FakePlatform()..stdoutSupportsAnsi = true,
|
Platform: () => FakePlatform()..stdoutSupportsAnsi = true,
|
||||||
});
|
});
|
||||||
@ -68,7 +68,7 @@ void main() {
|
|||||||
terminal.color('non-bold ${terminal.bolden('output')} also non-bold', TerminalColor.blue),
|
terminal.color('non-bold ${terminal.bolden('output')} also non-bold', TerminalColor.blue),
|
||||||
equals('${AnsiTerminal.blue}non-bold ${AnsiTerminal.bold}output${AnsiTerminal.resetBold} also non-bold${AnsiTerminal.resetColor}'),
|
equals('${AnsiTerminal.blue}non-bold ${AnsiTerminal.bold}output${AnsiTerminal.resetBold} also non-bold${AnsiTerminal.resetColor}'),
|
||||||
);
|
);
|
||||||
}, overrides: <Type, Generator> {
|
}, overrides: <Type, Generator>{
|
||||||
OutputPreferences: () => OutputPreferences(showColor: true),
|
OutputPreferences: () => OutputPreferences(showColor: true),
|
||||||
Platform: () => FakePlatform()..stdoutSupportsAnsi = true,
|
Platform: () => FakePlatform()..stdoutSupportsAnsi = true,
|
||||||
});
|
});
|
||||||
@ -82,7 +82,7 @@ void main() {
|
|||||||
terminal.bolden('non-color ${terminal.color('output', TerminalColor.blue)} also non-color'),
|
terminal.bolden('non-color ${terminal.color('output', TerminalColor.blue)} also non-color'),
|
||||||
equals('${AnsiTerminal.bold}non-color ${AnsiTerminal.blue}output${AnsiTerminal.resetColor} also non-color${AnsiTerminal.resetBold}'),
|
equals('${AnsiTerminal.bold}non-color ${AnsiTerminal.blue}output${AnsiTerminal.resetColor} also non-color${AnsiTerminal.resetBold}'),
|
||||||
);
|
);
|
||||||
}, overrides: <Type, Generator> {
|
}, overrides: <Type, Generator>{
|
||||||
OutputPreferences: () => OutputPreferences(showColor: true),
|
OutputPreferences: () => OutputPreferences(showColor: true),
|
||||||
Platform: () => FakePlatform()..stdoutSupportsAnsi = true,
|
Platform: () => FakePlatform()..stdoutSupportsAnsi = true,
|
||||||
});
|
});
|
||||||
@ -96,7 +96,7 @@ void main() {
|
|||||||
terminal.color('magenta ${terminal.color('output', TerminalColor.blue)} also magenta', TerminalColor.magenta),
|
terminal.color('magenta ${terminal.color('output', TerminalColor.blue)} also magenta', TerminalColor.magenta),
|
||||||
equals('${AnsiTerminal.magenta}magenta ${AnsiTerminal.blue}output${AnsiTerminal.resetColor}${AnsiTerminal.magenta} also magenta${AnsiTerminal.resetColor}'),
|
equals('${AnsiTerminal.magenta}magenta ${AnsiTerminal.blue}output${AnsiTerminal.resetColor}${AnsiTerminal.magenta} also magenta${AnsiTerminal.resetColor}'),
|
||||||
);
|
);
|
||||||
}, overrides: <Type, Generator> {
|
}, overrides: <Type, Generator>{
|
||||||
OutputPreferences: () => OutputPreferences(showColor: true),
|
OutputPreferences: () => OutputPreferences(showColor: true),
|
||||||
Platform: () => FakePlatform()..stdoutSupportsAnsi = true,
|
Platform: () => FakePlatform()..stdoutSupportsAnsi = true,
|
||||||
});
|
});
|
||||||
@ -110,7 +110,7 @@ void main() {
|
|||||||
terminal.bolden('bold ${terminal.bolden('output')} still bold'),
|
terminal.bolden('bold ${terminal.bolden('output')} still bold'),
|
||||||
equals('${AnsiTerminal.bold}bold output still bold${AnsiTerminal.resetBold}'),
|
equals('${AnsiTerminal.bold}bold output still bold${AnsiTerminal.resetBold}'),
|
||||||
);
|
);
|
||||||
}, overrides: <Type, Generator> {
|
}, overrides: <Type, Generator>{
|
||||||
OutputPreferences: () => OutputPreferences(showColor: true),
|
OutputPreferences: () => OutputPreferences(showColor: true),
|
||||||
Platform: () => FakePlatform()..stdoutSupportsAnsi = true,
|
Platform: () => FakePlatform()..stdoutSupportsAnsi = true,
|
||||||
});
|
});
|
||||||
|
@ -9,12 +9,10 @@ import 'src/common.dart';
|
|||||||
import 'src/context.dart';
|
import 'src/context.dart';
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
setUpAll(() {
|
setUpAll(() { });
|
||||||
});
|
|
||||||
|
|
||||||
group('Validate build number', () {
|
group('Validate build number', () {
|
||||||
setUp(() async {
|
setUp(() async { });
|
||||||
});
|
|
||||||
|
|
||||||
testUsingContext('CFBundleVersion for iOS', () async {
|
testUsingContext('CFBundleVersion for iOS', () async {
|
||||||
String buildName = validatedBuildNumberForPlatform(TargetPlatform.ios, 'xyz');
|
String buildName = validatedBuildNumberForPlatform(TargetPlatform.ios, 'xyz');
|
||||||
@ -34,8 +32,7 @@ void main() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
group('Validate build name', () {
|
group('Validate build name', () {
|
||||||
setUp(() async {
|
setUp(() async { });
|
||||||
});
|
|
||||||
|
|
||||||
testUsingContext('CFBundleShortVersionString for iOS', () async {
|
testUsingContext('CFBundleShortVersionString for iOS', () async {
|
||||||
String buildName = validatedBuildNameForPlatform(TargetPlatform.ios, 'xyz');
|
String buildName = validatedBuildNameForPlatform(TargetPlatform.ios, 'xyz');
|
||||||
|
@ -24,7 +24,7 @@ import '../src/context.dart';
|
|||||||
const String frameworkRevision = '12345678';
|
const String frameworkRevision = '12345678';
|
||||||
const String frameworkChannel = 'omega';
|
const String frameworkChannel = 'omega';
|
||||||
final Generator _kNoColorTerminalPlatform = () => FakePlatform.fromPlatform(const LocalPlatform())..stdoutSupportsAnsi = false;
|
final Generator _kNoColorTerminalPlatform = () => FakePlatform.fromPlatform(const LocalPlatform())..stdoutSupportsAnsi = false;
|
||||||
final Map<Type, Generator> noColorTerminalOverride = <Type, Generator> {
|
final Map<Type, Generator> noColorTerminalOverride = <Type, Generator>{
|
||||||
Platform: _kNoColorTerminalPlatform,
|
Platform: _kNoColorTerminalPlatform,
|
||||||
};
|
};
|
||||||
const String samplesIndexJson = '''[
|
const String samplesIndexJson = '''[
|
||||||
@ -900,7 +900,7 @@ void main() {
|
|||||||
final List<String> args = <String>[
|
final List<String> args = <String>[
|
||||||
'create',
|
'create',
|
||||||
'--list-samples',
|
'--list-samples',
|
||||||
outputFile
|
outputFile,
|
||||||
];
|
];
|
||||||
|
|
||||||
await runner.run(args);
|
await runner.run(args);
|
||||||
@ -918,7 +918,7 @@ void main() {
|
|||||||
final List<String> args = <String>[
|
final List<String> args = <String>[
|
||||||
'create',
|
'create',
|
||||||
'--list-samples',
|
'--list-samples',
|
||||||
outputFile
|
outputFile,
|
||||||
];
|
];
|
||||||
|
|
||||||
await expectLater(runner.run(args), throwsToolExit(exitCode: 2, message: 'Failed to write samples'));
|
await expectLater(runner.run(args), throwsToolExit(exitCode: 2, message: 'Failed to write samples'));
|
||||||
|
@ -123,7 +123,7 @@ void main() {
|
|||||||
notifyingLogger: notifyingLogger,
|
notifyingLogger: notifyingLogger,
|
||||||
);
|
);
|
||||||
|
|
||||||
commands.add(<String, dynamic>{ 'id': 0, 'method': 'app.restart' });
|
commands.add(<String, dynamic>{'id': 0, 'method': 'app.restart'});
|
||||||
final Map<String, dynamic> response = await responses.stream.firstWhere(_notEvent);
|
final Map<String, dynamic> response = await responses.stream.firstWhere(_notEvent);
|
||||||
expect(response['id'], 0);
|
expect(response['id'], 0);
|
||||||
expect(response['error'], contains('appId is required'));
|
expect(response['error'], contains('appId is required'));
|
||||||
@ -147,7 +147,7 @@ void main() {
|
|||||||
commands.add(<String, dynamic>{
|
commands.add(<String, dynamic>{
|
||||||
'id': 0,
|
'id': 0,
|
||||||
'method': 'app.callServiceExtension',
|
'method': 'app.callServiceExtension',
|
||||||
'params': <String, String> {
|
'params': <String, String>{
|
||||||
'methodName': 'ext.flutter.debugPaint',
|
'methodName': 'ext.flutter.debugPaint',
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
@ -171,7 +171,7 @@ void main() {
|
|||||||
notifyingLogger: notifyingLogger,
|
notifyingLogger: notifyingLogger,
|
||||||
);
|
);
|
||||||
|
|
||||||
commands.add(<String, dynamic>{ 'id': 0, 'method': 'app.stop' });
|
commands.add(<String, dynamic>{'id': 0, 'method': 'app.stop'});
|
||||||
final Map<String, dynamic> response = await responses.stream.firstWhere(_notEvent);
|
final Map<String, dynamic> response = await responses.stream.firstWhere(_notEvent);
|
||||||
expect(response['id'], 0);
|
expect(response['id'], 0);
|
||||||
expect(response['error'], contains('appId is required'));
|
expect(response['error'], contains('appId is required'));
|
||||||
@ -258,7 +258,7 @@ void main() {
|
|||||||
notifyingLogger: notifyingLogger,
|
notifyingLogger: notifyingLogger,
|
||||||
);
|
);
|
||||||
|
|
||||||
commands.add(<String, dynamic>{ 'id': 0, 'method': 'emulator.launch' });
|
commands.add(<String, dynamic>{'id': 0, 'method': 'emulator.launch'});
|
||||||
final Map<String, dynamic> response = await responses.stream.firstWhere(_notEvent);
|
final Map<String, dynamic> response = await responses.stream.firstWhere(_notEvent);
|
||||||
expect(response['id'], 0);
|
expect(response['id'], 0);
|
||||||
expect(response['error'], contains('emulatorId is required'));
|
expect(response['error'], contains('emulatorId is required'));
|
||||||
|
@ -108,12 +108,14 @@ class MockProcessManager extends Mock implements ProcessManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Future<Process> start(List<dynamic> command,
|
Future<Process> start(
|
||||||
{String workingDirectory,
|
List<dynamic> command, {
|
||||||
Map<String, String> environment,
|
String workingDirectory,
|
||||||
bool includeParentEnvironment = true,
|
Map<String, String> environment,
|
||||||
bool runInShell = false,
|
bool includeParentEnvironment = true,
|
||||||
ProcessStartMode mode = ProcessStartMode.normal}) {
|
bool runInShell = false,
|
||||||
|
ProcessStartMode mode = ProcessStartMode.normal,
|
||||||
|
}) {
|
||||||
final Completer<Process> completer = Completer<Process>();
|
final Completer<Process> completer = Completer<Process>();
|
||||||
completer.complete(MockProcess());
|
completer.complete(MockProcess());
|
||||||
return completer.future;
|
return completer.future;
|
||||||
|
@ -532,9 +532,12 @@ Future<void> _recompile(
|
|||||||
mockFrontendServerStdIn._stdInWrites.clear();
|
mockFrontendServerStdIn._stdInWrites.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> _accept(StreamController<List<int>> streamController,
|
Future<void> _accept(
|
||||||
ResidentCompiler generator, MockStdIn mockFrontendServerStdIn,
|
StreamController<List<int>> streamController,
|
||||||
String expected) async {
|
ResidentCompiler generator,
|
||||||
|
MockStdIn mockFrontendServerStdIn,
|
||||||
|
String expected,
|
||||||
|
) async {
|
||||||
// Put content into the output stream after generator.recompile gets
|
// Put content into the output stream after generator.recompile gets
|
||||||
// going few lines below, resets completer.
|
// going few lines below, resets completer.
|
||||||
generator.accept();
|
generator.accept();
|
||||||
@ -544,9 +547,13 @@ Future<void> _accept(StreamController<List<int>> streamController,
|
|||||||
mockFrontendServerStdIn._stdInWrites.clear();
|
mockFrontendServerStdIn._stdInWrites.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> _reject(StreamController<List<int>> streamController,
|
Future<void> _reject(
|
||||||
ResidentCompiler generator, MockStdIn mockFrontendServerStdIn,
|
StreamController<List<int>> streamController,
|
||||||
String mockCompilerOutput, String expected) async {
|
ResidentCompiler generator,
|
||||||
|
MockStdIn mockFrontendServerStdIn,
|
||||||
|
String mockCompilerOutput,
|
||||||
|
String expected,
|
||||||
|
) async {
|
||||||
// Put content into the output stream after generator.recompile gets
|
// Put content into the output stream after generator.recompile gets
|
||||||
// going few lines below, resets completer.
|
// going few lines below, resets completer.
|
||||||
scheduleMicrotask(() {
|
scheduleMicrotask(() {
|
||||||
|
@ -151,7 +151,7 @@ void main() {
|
|||||||
'version': 'test-version',
|
'version': 'test-version',
|
||||||
},
|
},
|
||||||
));
|
));
|
||||||
}, overrides: <Type, Generator> {
|
}, overrides: <Type, Generator>{
|
||||||
Platform: () => FakePlatform(
|
Platform: () => FakePlatform(
|
||||||
operatingSystem: 'linux',
|
operatingSystem: 'linux',
|
||||||
environment: <String, String>{
|
environment: <String, String>{
|
||||||
|
@ -237,7 +237,7 @@ void main() {
|
|||||||
];
|
];
|
||||||
await HotRunner(devices).cleanupAfterSignal();
|
await HotRunner(devices).cleanupAfterSignal();
|
||||||
expect(shutdownTestingConfig.shutdownHookCalled, true);
|
expect(shutdownTestingConfig.shutdownHookCalled, true);
|
||||||
}, overrides: <Type, Generator> {
|
}, overrides: <Type, Generator>{
|
||||||
Artifacts: () => mockArtifacts,
|
Artifacts: () => mockArtifacts,
|
||||||
HotRunnerConfig: () => shutdownTestingConfig,
|
HotRunnerConfig: () => shutdownTestingConfig,
|
||||||
});
|
});
|
||||||
@ -252,7 +252,7 @@ void main() {
|
|||||||
];
|
];
|
||||||
await HotRunner(devices).preStop();
|
await HotRunner(devices).preStop();
|
||||||
expect(shutdownTestingConfig.shutdownHookCalled, true);
|
expect(shutdownTestingConfig.shutdownHookCalled, true);
|
||||||
}, overrides: <Type, Generator> {
|
}, overrides: <Type, Generator>{
|
||||||
Artifacts: () => mockArtifacts,
|
Artifacts: () => mockArtifacts,
|
||||||
HotRunnerConfig: () => shutdownTestingConfig,
|
HotRunnerConfig: () => shutdownTestingConfig,
|
||||||
});
|
});
|
||||||
|
@ -146,7 +146,7 @@ void main() {
|
|||||||
expect(testLogger.statusText, contains('iPhone Developer: Profile 1 (1111AAAA11)'));
|
expect(testLogger.statusText, contains('iPhone Developer: Profile 1 (1111AAAA11)'));
|
||||||
expect(testLogger.errorText, isEmpty);
|
expect(testLogger.errorText, isEmpty);
|
||||||
verify(mockStdIn.write('This is a mock certificate'));
|
verify(mockStdIn.write('This is a mock certificate'));
|
||||||
expect(signingConfigs, <String, String> {'DEVELOPMENT_TEAM': '3333CCCC33'});
|
expect(signingConfigs, <String, String>{'DEVELOPMENT_TEAM': '3333CCCC33'});
|
||||||
},
|
},
|
||||||
overrides: <Type, Generator>{
|
overrides: <Type, Generator>{
|
||||||
ProcessManager: () => mockProcessManager,
|
ProcessManager: () => mockProcessManager,
|
||||||
@ -217,7 +217,7 @@ void main() {
|
|||||||
);
|
);
|
||||||
expect(testLogger.errorText, isEmpty);
|
expect(testLogger.errorText, isEmpty);
|
||||||
verify(mockOpenSslStdIn.write('This is a mock certificate'));
|
verify(mockOpenSslStdIn.write('This is a mock certificate'));
|
||||||
expect(signingConfigs, <String, String> {'DEVELOPMENT_TEAM': '4444DDDD44'});
|
expect(signingConfigs, <String, String>{'DEVELOPMENT_TEAM': '4444DDDD44'});
|
||||||
|
|
||||||
verify(config.setValue('ios-signing-cert', 'iPhone Developer: Profile 3 (3333CCCC33)'));
|
verify(config.setValue('ios-signing-cert', 'iPhone Developer: Profile 3 (3333CCCC33)'));
|
||||||
},
|
},
|
||||||
@ -288,7 +288,7 @@ void main() {
|
|||||||
);
|
);
|
||||||
expect(testLogger.errorText, isEmpty);
|
expect(testLogger.errorText, isEmpty);
|
||||||
verify(mockOpenSslStdIn.write('This is a mock certificate'));
|
verify(mockOpenSslStdIn.write('This is a mock certificate'));
|
||||||
expect(signingConfigs, <String, String> {'DEVELOPMENT_TEAM': '5555EEEE55'});
|
expect(signingConfigs, <String, String>{'DEVELOPMENT_TEAM': '5555EEEE55'});
|
||||||
},
|
},
|
||||||
overrides: <Type, Generator>{
|
overrides: <Type, Generator>{
|
||||||
ProcessManager: () => mockProcessManager,
|
ProcessManager: () => mockProcessManager,
|
||||||
@ -360,7 +360,7 @@ void main() {
|
|||||||
);
|
);
|
||||||
expect(testLogger.errorText, isEmpty);
|
expect(testLogger.errorText, isEmpty);
|
||||||
verify(mockOpenSslStdIn.write('This is a mock certificate'));
|
verify(mockOpenSslStdIn.write('This is a mock certificate'));
|
||||||
expect(signingConfigs, <String, String> {'DEVELOPMENT_TEAM': '4444DDDD44'});
|
expect(signingConfigs, <String, String>{'DEVELOPMENT_TEAM': '4444DDDD44'});
|
||||||
},
|
},
|
||||||
overrides: <Type, Generator>{
|
overrides: <Type, Generator>{
|
||||||
ProcessManager: () => mockProcessManager,
|
ProcessManager: () => mockProcessManager,
|
||||||
@ -432,7 +432,7 @@ void main() {
|
|||||||
testLogger.statusText,
|
testLogger.statusText,
|
||||||
contains('Certificate choice "iPhone Developer: Profile 3 (3333CCCC33)"'),
|
contains('Certificate choice "iPhone Developer: Profile 3 (3333CCCC33)"'),
|
||||||
);
|
);
|
||||||
expect(signingConfigs, <String, String> {'DEVELOPMENT_TEAM': '4444DDDD44'});
|
expect(signingConfigs, <String, String>{'DEVELOPMENT_TEAM': '4444DDDD44'});
|
||||||
verify(config.setValue('ios-signing-cert', 'iPhone Developer: Profile 3 (3333CCCC33)'));
|
verify(config.setValue('ios-signing-cert', 'iPhone Developer: Profile 3 (3333CCCC33)'));
|
||||||
},
|
},
|
||||||
overrides: <Type, Generator>{
|
overrides: <Type, Generator>{
|
||||||
|
@ -403,11 +403,12 @@ void main() {
|
|||||||
expect(GitTagVersion.parse('v1.2.3-4-gx$hash').frameworkVersionFor(hash), '0.0.0-unknown');
|
expect(GitTagVersion.parse('v1.2.3-4-gx$hash').frameworkVersionFor(hash), '0.0.0-unknown');
|
||||||
expect(testLogger.statusText, '');
|
expect(testLogger.statusText, '');
|
||||||
expect(testLogger.errorText, '');
|
expect(testLogger.errorText, '');
|
||||||
expect(testLogger.traceText,
|
expect(
|
||||||
|
testLogger.traceText,
|
||||||
'Could not interpret results of "git describe": x1.2.3-4-gabcdef\n'
|
'Could not interpret results of "git describe": x1.2.3-4-gabcdef\n'
|
||||||
'Could not interpret results of "git describe": v1.0.0-unknown-0-gabcdef\n'
|
'Could not interpret results of "git describe": v1.0.0-unknown-0-gabcdef\n'
|
||||||
'Could not interpret results of "git describe": beta-1-gabcdef\n'
|
'Could not interpret results of "git describe": beta-1-gabcdef\n'
|
||||||
'Could not interpret results of "git describe": v1.2.3-4-gxabcdef\n'
|
'Could not interpret results of "git describe": v1.2.3-4-gxabcdef\n',
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -40,7 +40,7 @@ Future<void> main() async {
|
|||||||
} else if (words.first == 'start') {
|
} else if (words.first == 'start') {
|
||||||
_send(<String, dynamic>{
|
_send(<String, dynamic>{
|
||||||
'method': 'app.start',
|
'method': 'app.start',
|
||||||
'params': <String, dynamic> {
|
'params': <String, dynamic>{
|
||||||
'deviceId': words[1],
|
'deviceId': words[1],
|
||||||
'projectDirectory': words[2],
|
'projectDirectory': words[2],
|
||||||
'launchMode': words[3],
|
'launchMode': words[3],
|
||||||
@ -50,7 +50,7 @@ Future<void> main() async {
|
|||||||
if (words.length > 1) {
|
if (words.length > 1) {
|
||||||
_send(<String, dynamic>{
|
_send(<String, dynamic>{
|
||||||
'method': 'app.stop',
|
'method': 'app.stop',
|
||||||
'params': <String, dynamic> {'appId': words[1]},
|
'params': <String, dynamic>{'appId': words[1]},
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
_send(<String, dynamic>{'method': 'app.stop'});
|
_send(<String, dynamic>{'method': 'app.stop'});
|
||||||
@ -59,7 +59,7 @@ Future<void> main() async {
|
|||||||
if (words.length > 1) {
|
if (words.length > 1) {
|
||||||
_send(<String, dynamic>{
|
_send(<String, dynamic>{
|
||||||
'method': 'app.restart',
|
'method': 'app.restart',
|
||||||
'params': <String, dynamic> {'appId': words[1]},
|
'params': <String, dynamic>{'appId': words[1]},
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
_send(<String, dynamic>{'method': 'app.restart'});
|
_send(<String, dynamic>{'method': 'app.restart'});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user