Commit b1b62716 authored by Adam Barth's avatar Adam Barth

Use "call" instead of "invoke" (#4177)

For consistency.

Fixes #4142
parent d97df402
......@@ -79,9 +79,9 @@ class AlwaysStoppedAnimation<T> extends Animation<T> {
/// Creates an [AlwaysStoppedAnimation] with the given value.
///
/// Since the [value] and [status] of an [AlwaysStoppedAnimation] can never
/// change, the listeners can never be invoked. It is therefore safe to reuse
/// change, the listeners can never be called. It is therefore safe to reuse
/// an [AlwaysStoppedAnimation] instance in multiple places. If the [value] to
/// be used is known at compile time, the constructor should be invoked as a
/// be used is known at compile time, the constructor should be called as a
/// `const` constructor.
const AlwaysStoppedAnimation(this.value);
......
......@@ -55,7 +55,7 @@ abstract class AnimationEagerListenerMixin implements _ListenerMixin {
}
/// A mixin that implements the addListener/removeListener protocol and notifies
/// all the registered listeners when notifyListeners is invoked.
/// all the registered listeners when notifyListeners is called.
abstract class AnimationLocalListenersMixin extends _ListenerMixin {
final List<VoidCallback> _listeners = <VoidCallback>[];
......@@ -88,7 +88,7 @@ abstract class AnimationLocalListenersMixin extends _ListenerMixin {
/// A mixin that implements the addStatusListener/removeStatusListener protocol
/// and notifies all the registered listeners when notifyStatusListeners is
/// invoked.
/// called.
abstract class AnimationLocalStatusListenersMixin extends _ListenerMixin {
final List<AnimationStatusListener> _statusListeners = <AnimationStatusListener>[];
......
......@@ -7,7 +7,7 @@ This is an implementation of the Cassowary constraint solving algorithm in Dart.
A solver is the object that accepts constraints and updates member variables in an attempt to satisfy the same. It is rarely the case that the user will have to create a solver. Instead, one will be vended by Flutter.
# Parameters
In order to create constraints, the user needs to take specific parameter objects vended by elements in the view hierarchy and create expression from these. Constraints can then be obtained from these expressions. If the solver needs to update these parameters to satisfy constraints, it will invoke callbacks on these parameters.
In order to create constraints, the user needs to take specific parameter objects vended by elements in the view hierarchy and create expression from these. Constraints can then be obtained from these expressions. If the solver needs to update these parameters to satisfy constraints, it will call callbacks on these parameters.
# Constructing Constraints
......
......@@ -45,7 +45,7 @@ class FlutterErrorDetails {
/// StackTrace objects are opaque except for their [toString] function.
///
/// If this field is not null, then the [stackFilter] callback, if any, will
/// be invoked with the result of calling [toString] on this object and
/// be called with the result of calling [toString] on this object and
/// splitting that result on line breaks. If there's no [stackFilter]
/// callback, then [FlutterError.defaultStackFilter] is used instead. That
/// function expects the stack to be in the format used by
......@@ -77,11 +77,11 @@ class FlutterErrorDetails {
/// This won't be called if [stack] is null.
final IterableFilter<String> stackFilter;
/// A callback which, when invoked with a [StringBuffer] will write to that buffer
/// A callback which, when called with a [StringBuffer] will write to that buffer
/// information that could help with debugging the problem.
///
/// Information collector callbacks can be expensive, so the generated information
/// should be cached, rather than the callback being invoked multiple times.
/// should be cached, rather than the callback being called multiple times.
///
/// The text written to the information argument may contain newlines but should
/// not end with a newline.
......@@ -139,7 +139,7 @@ class FlutterError extends AssertionError {
/// Called whenever the Flutter framework catches an error.
///
/// The default behavior is to invoke [dumpErrorToConsole].
/// The default behavior is to call [dumpErrorToConsole].
///
/// You can set this to your own function to override this default behavior.
/// For example, you could report all errors to your server.
......
......@@ -14,9 +14,9 @@ typedef void ValueChanged<T>(T value);
/// Signature for callbacks that report that a value has been set.
///
/// This is the same signature as [ValueChanged], but is used when the
/// callback is invoked even if the underlying value has not changed.
/// callback is called even if the underlying value has not changed.
/// For example, service extensions use this callback because they
/// invoke the callback whenever the extension is invoked with a
/// call the callback whenever the extension is called with a
/// value, regardless of whether the given value is new or not.
typedef void ValueSetter<T>(T value);
......
......@@ -125,8 +125,7 @@ abstract class BindingBase {
/// name "ext.flutter.name"), which takes no arguments and returns
/// no value.
///
/// Invokes the `callback` callback when the service extension is
/// invoked.
/// Calls the `callback` callback when the service extension is called.
void registerSignalServiceExtension({
@required String name,
@required VoidCallback callback
......@@ -149,11 +148,11 @@ abstract class BindingBase {
/// than "true" is considered equivalent to "false". Other arguments
/// are ignored.)
///
/// Invokes the `getter` callback to obtain the value when
/// responding to the service extension method being invoked.
/// Calls the `getter` callback to obtain the value when
/// responding to the service extension method being called.
///
/// Invokes the `setter` callback with the new value when the
/// service extension method is invoked with a new value.
/// Calls the `setter` callback with the new value when the
/// service extension method is called with a new value.
void registerBoolServiceExtension({
String name,
@required ValueGetter<bool> getter,
......@@ -178,11 +177,11 @@ abstract class BindingBase {
/// that can be parsed by [double.parse], and can be omitted to read
/// the current value. (Other arguments are ignored.)
///
/// Invokes the `getter` callback to obtain the value when
/// responding to the service extension method being invoked.
/// Calls the `getter` callback to obtain the value when
/// responding to the service extension method being called.
///
/// Invokes the `setter` callback with the new value when the
/// service extension method is invoked with a new value.
/// Calls the `setter` callback with the new value when the
/// service extension method is called with a new value.
void registerNumericServiceExtension({
@required String name,
@required ValueGetter<double> getter,
......@@ -202,7 +201,7 @@ abstract class BindingBase {
}
/// Registers a service extension method with the given name (full
/// name "ext.flutter.name"). The given callback is invoked when the
/// name "ext.flutter.name"). The given callback is called when the
/// extension method is called. The callback must return a [Future]
/// that either eventually completes to a return value in the form
/// of a name/value map where the values can all be converted to
......
......@@ -81,7 +81,7 @@ class DoubleTapGestureRecognizer extends GestureRecognizer {
// _firstTap records the successful tap.
// Second tap in progress: Much like the "first tap in progress" state, but
// _firstTap is non-null. If a tap completes successfully while in this
// state, the callback is invoked and the state is reset.
// state, the callback is called and the state is reset.
// There are various other scenarios that cause the state to reset:
// - All in-progress taps are rejected (by time, distance, pointercancel, etc)
// - The long timer between taps expires
......
......@@ -99,7 +99,7 @@ class MaterialApp extends StatefulWidget {
/// in this map for the [Navigator.defaultRouteName] route (`'/'`).
///
/// If a route is requested that is not specified in this table (or
/// by [home]), then the [onGenerateRoute] callback is invoked to
/// by [home]), then the [onGenerateRoute] callback is called to
/// build the page instead.
final Map<String, WidgetBuilder> routes;
......@@ -107,7 +107,7 @@ class MaterialApp extends StatefulWidget {
/// named route.
final RouteFactory onGenerateRoute;
/// Callback that is invoked when the operating system changes the
/// Callback that is called when the operating system changes the
/// current locale.
final LocaleChangedCallback onLocaleChanged;
......
......@@ -167,7 +167,7 @@ class MaterialButton extends StatefulWidget {
/// Defaults to the value from the current [ButtonTheme].
final EdgeInsets padding;
/// The callback that is invoked when the button is tapped or otherwise activated.
/// The callback that is called when the button is tapped or otherwise activated.
///
/// If this is set to null, the button will be disabled.
final VoidCallback onPressed;
......
......@@ -62,7 +62,7 @@ class DataColumn {
/// right-aligned.
final bool numeric;
/// Invoked when the user asks to sort the table using this column.
/// Called when the user asks to sort the table using this column.
///
/// If null, the column will not be considered sortable.
///
......@@ -99,7 +99,7 @@ class DataRow {
/// If the table never changes once created, no key is necessary.
final LocalKey key;
/// Invoked when the user selects or unselects a selectable row.
/// Called when the user selects or unselects a selectable row.
///
/// If this is not null, then the row is selectable. The current
/// selection state of the row is given by [selected].
......@@ -179,9 +179,9 @@ class DataCell {
/// the icon will have no effect.
final bool showEditIcon;
/// Invoked if the cell is tapped.
/// Called if the cell is tapped.
///
/// If non-null, tapping the cell will invoke this callback. If
/// If non-null, tapping the cell will call this callback. If
/// null, tapping the cell will attempt to select the row (if
/// [TableRow.onSelectChanged] is provided).
final VoidCallback onTap;
......
......@@ -12,7 +12,7 @@ import 'scaffold.dart';
/// Used by many material design widgets to make sure that they are
/// only used in contexts where they can print ink onto some material.
///
/// To invoke this function, use the following pattern, typically in the
/// To call this function, use the following pattern, typically in the
/// relevant Widget's [build] method:
///
/// ```dart
......@@ -51,7 +51,7 @@ bool debugCheckHasMaterial(BuildContext context) {
/// For example, the [AppBar] in some situations requires a Scaffold
/// to do the right thing with scrolling.
///
/// To invoke this function, use the following pattern, typically in the
/// To call this function, use the following pattern, typically in the
/// relevant Widget's [build] method:
///
/// ```dart
......
......@@ -52,7 +52,7 @@ class FlatButton extends StatelessWidget {
assert(child != null);
}
/// The callback that is invoked when the button is tapped or otherwise activated.
/// The callback that is called when the button is tapped or otherwise activated.
///
/// If this is set to null, the button will be disabled.
final VoidCallback onPressed;
......
......@@ -67,7 +67,7 @@ class FloatingActionButton extends StatefulWidget {
/// Defaults to the accent color of the current theme.
final Color backgroundColor;
/// The callback that is invoked when the button is tapped or otherwise activated.
/// The callback that is called when the button is tapped or otherwise activated.
///
/// If this is set to null, the button will be disabled.
final VoidCallback onPressed;
......
......@@ -76,7 +76,7 @@ class IconButton extends StatelessWidget {
/// See also [color].
final Color disabledColor;
/// The callback that is invoked when the button is tapped or otherwise activated.
/// The callback that is called when the button is tapped or otherwise activated.
///
/// If this is set to null, the button will be disabled.
final VoidCallback onPressed;
......
......@@ -110,7 +110,7 @@ abstract class MaterialInkController {
/// The ink splash is clipped only to the edges of the [Material].
/// This is the default.
///
/// When the splash is removed, onRemoved will be invoked.
/// When the splash is removed, onRemoved will be called.
InkSplash splashAt({
RenderBox referenceBox,
Point position,
......
......@@ -48,7 +48,7 @@ class RaisedButton extends StatelessWidget {
this.child
}) : super(key: key);
/// The callback that is invoked when the button is tapped or otherwise activated.
/// The callback that is called when the button is tapped or otherwise activated.
///
/// If this is set to null, the button will be disabled.
final VoidCallback onPressed;
......
......@@ -54,9 +54,9 @@ class SnackBarAction extends StatefulWidget {
/// The button label.
final String label;
/// The callback to be invoked when the button is pressed. Must not be null.
/// The callback to be called when the button is pressed. Must not be null.
///
/// This callback will be invoked at most once each time this action is
/// This callback will be called at most once each time this action is
/// displayed in a [SnackBar].
final VoidCallback onPressed;
......
......@@ -104,7 +104,7 @@ abstract class RendererBinding extends BindingBase implements SchedulerBinding,
_renderView.attach(pipelineOwner);
}
/// Invoked when the system metrics change.
/// Called when the system metrics change.
///
/// See [ui.window.onMetricsChanged].
void handleMetricsChanged() {
......
......@@ -854,7 +854,7 @@ abstract class RenderBox extends RenderObject {
if (needsLayout) {
throw new FlutterError(
'Cannot hit test a dirty render box.\n'
'The hitTest() method was invoked on this RenderBox:\n'
'The hitTest() method was called on this RenderBox:\n'
' $this\n'
'Unfortunately, since this object has been marked as needing layout, its geometry is not known at this time. '
'This means it cannot be accurately hit-tested. Make sure to only mark nodes as needing layout during a pipeline '
......@@ -866,7 +866,7 @@ abstract class RenderBox extends RenderObject {
if (!hasSize) {
throw new FlutterError(
'Cannot hit test a render box with no size.\n'
'The hitTest() method was invoked on this RenderBox:\n'
'The hitTest() method was called on this RenderBox:\n'
' $this\n'
'Although this node is not marked as needing layout, its size is not set. A RenderBox object must have an '
'explicit size before it can be hit-tested. Make sure that the RenderBox in question sets its size during layout.'
......
......@@ -40,7 +40,7 @@ abstract class MultiChildLayoutDelegate {
///
/// Call this from your [performLayout] function to lay out each
/// child. Every child must be laid out using this function exactly
/// once each time the [performLayout] function is invoked.
/// once each time the [performLayout] function is called.
Size layoutChild(Object childId, BoxConstraints constraints) {
final RenderBox child = _idToChild[childId];
assert(() {
......
......@@ -1346,7 +1346,7 @@ abstract class RenderObject extends AbstractNode implements HitTestTarget {
VoidCallback _performLayout = _doNothing;
/// Allows this render object to mutate its child list during layout and
/// invokes callback.
/// calls callback.
void invokeLayoutCallback(LayoutCallback callback) {
assert(_debugMutationsLocked);
assert(_debugDoingThisLayout);
......@@ -1374,7 +1374,7 @@ abstract class RenderObject extends AbstractNode implements HitTestTarget {
// N = newAngle-oldAngle
// ...but the rendering is expected to remain the same, pixel for
// pixel, on the output device. Then, the layout() method or
// equivalent will be invoked.
// equivalent will be called.
// PAINTING
......
......@@ -1388,7 +1388,7 @@ class RenderFractionalTranslation extends RenderProxyBox {
/// this animation and repaint whenever the animation ticks, avoiding both the
/// build and layout phases of the pipeline.
///
/// The [hitTest] method is invoked when the user interacts with the underlying
/// The [hitTest] method is called when the user interacts with the underlying
/// render object, to determine if the user hit the object or missed it.
abstract class CustomPainter {
/// Creates a custom painter.
......@@ -1439,9 +1439,9 @@ abstract class CustomPainter {
///
/// If the method returns `false`, then the paint call might be optimized away.
///
/// It's possible that the [paint] method will get invoked even if
/// It's possible that the [paint] method will get called even if
/// [shouldRepaint] returns `false` (e.g. if an ancestor or descendant needed to
/// be repainted). It's also possible that the [paint] method will get invoked
/// be repainted). It's also possible that the [paint] method will get called
/// without [shouldRepaint] being called at all (e.g. if the box changes
/// size).
///
......@@ -1489,7 +1489,7 @@ class RenderCustomPaint extends RenderProxyBox {
/// The background custom paint delegate.
///
/// This painter, if non-null, is invoked to paint behind the children.
/// This painter, if non-null, is called to paint behind the children.
CustomPainter get painter => _painter;
CustomPainter _painter;
/// Set a new background custom paint delegate.
......@@ -1497,11 +1497,11 @@ class RenderCustomPaint extends RenderProxyBox {
/// If the new delegate is the same as the previous one, this does nothing.
///
/// If the new delegate is the same class as the previous one, then the new
/// delegate has its [CustomPainter.shouldRepaint] invoked; if the result is
/// `true`, then the delegate will be invoked.
/// delegate has its [CustomPainter.shouldRepaint] called; if the result is
/// `true`, then the delegate will be called.
///
/// If the new delegate is a different class than the previous one, then the
/// delegate will be invoked.
/// delegate will be called.
///
/// If the new value is null, then there is no background custom painter.
set painter (CustomPainter newPainter) {
......@@ -1514,7 +1514,7 @@ class RenderCustomPaint extends RenderProxyBox {
/// The foreground custom paint delegate.
///
/// This painter, if non-null, is invoked to paint in front of the children.
/// This painter, if non-null, is called to paint in front of the children.
CustomPainter get foregroundPainter => _foregroundPainter;
CustomPainter _foregroundPainter;
/// Set a new foreground custom paint delegate.
......@@ -1522,11 +1522,11 @@ class RenderCustomPaint extends RenderProxyBox {
/// If the new delegate is the same as the previous one, this does nothing.
///
/// If the new delegate is the same class as the previous one, then the new
/// delegate has its [CustomPainter.shouldRepaint] invoked; if the result is
/// `true`, then the delegate will be invoked.
/// delegate has its [CustomPainter.shouldRepaint] called; if the result is
/// `true`, then the delegate will be called.
///
/// If the new delegate is a different class than the previous one, then the
/// delegate will be invoked.
/// delegate will be called.
///
/// If the new value is null, then there is no foreground custom painter.
set foregroundPainter (CustomPainter newPainter) {
......@@ -1633,7 +1633,7 @@ typedef void PointerMoveEventListener(PointerMoveEvent event);
typedef void PointerUpEventListener(PointerUpEvent event);
typedef void PointerCancelEventListener(PointerCancelEvent event);
/// Invokes the callbacks in response to pointer events.
/// Calls the callbacks in response to pointer events.
class RenderPointerListener extends RenderProxyBoxWithHitTestBehavior {
RenderPointerListener({
this.onPointerDown,
......
......@@ -14,7 +14,7 @@ import 'node.dart';
/// The type of function returned by [RenderObject.getSemanticAnnotators()].
///
/// These callbacks are invoked with the [SemanticsNode] object that
/// These callbacks are called with the [SemanticsNode] object that
/// corresponds to the [RenderObject]. (One [SemanticsNode] can
/// correspond to multiple [RenderObject] objects.)
///
......
......@@ -26,7 +26,7 @@ double timeDilation = 1.0;
/// common time base.
typedef void FrameCallback(Duration timeStamp);
/// Signature for the [SchedulerBinding.schedulingStrategy] callback. Invoked
/// Signature for the [SchedulerBinding.schedulingStrategy] callback. Called
/// whenever the system needs to decide whether a task at a given
/// priority needs to be run.
///
......@@ -142,7 +142,7 @@ abstract class SchedulerBinding extends BindingBase {
_hasRequestedAnEventLoopCallback = true;
}
/// Invoked by the system when there is time to run tasks.
/// Called by the system when there is time to run tasks.
void handleEventLoopCallback() {
_hasRequestedAnEventLoopCallback = false;
_runTasks();
......@@ -177,7 +177,7 @@ abstract class SchedulerBinding extends BindingBase {
/// The current number of transient frame callbacks scheduled.
///
/// This is reset to zero just before all the currently scheduled
/// transient callbacks are invoked, at the start of a frame.
/// transient callbacks are called, at the start of a frame.
///
/// This number is primarily exposed so that tests can verify that
/// there are no unexpected transient callbacks still registered
......@@ -197,7 +197,7 @@ abstract class SchedulerBinding extends BindingBase {
/// the stack trace that is stored for this callback is the original stack
/// trace for when the callback was _first_ registered, rather than the stack
/// trace for when the callback is reregistered. This makes it easier to track
/// down the original reason that a particular callback was invoked. If
/// down the original reason that a particular callback was called. If
/// `rescheduling` is true, the call must be in the context of a frame
/// callback.
///
......@@ -216,7 +216,7 @@ abstract class SchedulerBinding extends BindingBase {
/// These callbacks are executed in the order in which they have
/// been added.
///
/// Callbacks registered with this method will not be invoked until
/// Callbacks registered with this method will not be called until
/// a frame is requested. To register a callback and ensure that a
/// frame is immediately scheduled, use [scheduleFrameCallback].
///
......@@ -228,7 +228,7 @@ abstract class SchedulerBinding extends BindingBase {
/// the stack trace that is stored for this callback is the original stack
/// trace for when the callback was _first_ registered, rather than the stack
/// trace for when the callback is reregistered. This makes it easier to track
/// down the original reason that a particular callback was invoked. If
/// down the original reason that a particular callback was called. If
/// `rescheduling` is true, the call must be in the context of a frame
/// callback.
///
......@@ -259,7 +259,7 @@ abstract class SchedulerBinding extends BindingBase {
/// This is expected to be called at the end of tests (the
/// flutter_test framework does it automatically in normal cases).
///
/// Invoke this method when you expect there to be no transient
/// Call this method when you expect there to be no transient
/// callbacks registered, in an assert statement with a message that
/// you want printed when a transient callback is registered:
///
......@@ -305,7 +305,7 @@ abstract class SchedulerBinding extends BindingBase {
/// Adds a persistent frame callback.
///
/// Persistent callbacks are invoked after transient
/// Persistent callbacks are called after transient
/// (non-persistent) frame callbacks.
///
/// Does *not* request a new frame. Conceptually, persistent frame
......@@ -346,7 +346,7 @@ abstract class SchedulerBinding extends BindingBase {
/// If necessary, schedules a new frame by calling
/// [ui.window.scheduleFrame].
///
/// After this is called, the engine will (eventually) invoke
/// After this is called, the engine will (eventually) call
/// [handleBeginFrame]. (This call might be delayed, e.g. if the
/// device's screen is turned off it will typically be delayed until
/// the screen is on and the application is visible.)
......@@ -409,7 +409,7 @@ abstract class SchedulerBinding extends BindingBase {
Timeline.finishSync();
}
// Invokes the given [callback] with [timestamp] as argument.
// Calls the given [callback] with [timestamp] as argument.
//
// Wraps the callback in a try/catch and forwards any error to
// [debugSchedulerExceptionHandler], if set. If not set, then simply prints
......
......@@ -9,7 +9,7 @@ import 'binding.dart';
/// Signature for the [onTick] constructor argument of the [Ticker] class.
///
/// The argument is the time that the object had spent enabled so far
/// at the time of the callback being invoked.
/// at the time of the callback being called.
typedef void TickerCallback(Duration elapsed);
/// Calls its callback once per animation frame.
......@@ -28,7 +28,7 @@ class Ticker {
int _animationId;
Duration _startTime;
/// Whether this ticker has scheduled a call to invoke its callback
/// Whether this ticker has scheduled a call to call its callback
/// on the next frame.
bool get isTicking => _completer != null;
......
......@@ -17,7 +17,7 @@ mojom.HapticFeedbackProxy _initHapticFeedbackProxy() {
final mojom.HapticFeedbackProxy _hapticFeedbackProxy = _initHapticFeedbackProxy();
/// Allows access to the haptic feedback interface on the device. This API is
/// intentionally terse since it invokes default platform behavior. It is not
/// intentionally terse since it calls default platform behavior. It is not
/// suitable for use if you require more flexible access to device sensors and
/// peripherals.
class HapticFeedback {
......
......@@ -140,7 +140,7 @@ class ImageCache {
///
/// If the given [ImageProvider] has already been used and is still in the
/// cache, then the [ImageResource] object is immediately usable and the
/// provider is not invoked.
/// provider is not called.
ImageResource loadProvider(ImageProvider provider) {
ImageResource result = _cache[provider];
if (result != null) {
......
......@@ -86,7 +86,7 @@ class ImageResource {
try {
listener(_image);
} catch (exception, stack) {
_handleImageError('by a synchronously-invoked image listener', exception, stack);
_handleImageError('by a synchronously-called image listener', exception, stack);
}
}
}
......
......@@ -66,7 +66,7 @@ class WidgetsApp extends StatefulWidget {
/// named route.
final RouteFactory onGenerateRoute;
/// Callback that is invoked when the operating system changes the
/// Callback that is called when the operating system changes the
/// current locale.
final LocaleChangedCallback onLocaleChanged;
......
......@@ -321,7 +321,7 @@ class ClipOval extends SingleChildRenderObjectWidget {
/// Clips its child using a path.
///
/// Invokes a callback on a delegate whenever the widget is to be
/// Calls a callback on a delegate whenever the widget is to be
/// painted. The callback returns a path and the widget prevents the
/// child from painting outside the path.
///
......@@ -3042,7 +3042,7 @@ class KeyedSubtree extends StatelessWidget {
Widget build(BuildContext context) => child;
}
/// A platonic widget that invokes a closure to obtain its child widget.
/// A platonic widget that calls a closure to obtain its child widget.
class Builder extends StatelessWidget {
Builder({ Key key, this.builder }) : super(key: key) {
assert(builder != null);
......@@ -3050,7 +3050,7 @@ class Builder extends StatelessWidget {
/// Called to obtain the child widget.
///
/// This function is invoked whenever this widget is included in its parent's
/// This function is called whenever this widget is included in its parent's
/// build and the old widget (if any) that it synchronizes with has a distinct
/// object identity. Typically the parent's build method will construct
/// a new tree of widgets and so a new Builder child will not be [identical]
......
......@@ -110,7 +110,7 @@ abstract class WidgetsBinding extends BindingBase implements GestureBinding, Ren
/// observers).
bool removeObserver(WidgetsBindingObserver observer) => _observers.remove(observer);
/// Invoked when the system metrics change.
/// Called when the system metrics change.
///
/// Notifies all the observers using
/// [WidgetsBindingObserver.didChangeMetrics].
......@@ -123,7 +123,7 @@ abstract class WidgetsBinding extends BindingBase implements GestureBinding, Ren
observer.didChangeMetrics();
}
/// Invoked when the system locale changes.
/// Called when the system locale changes.
///
/// Calls [dispatchLocaleChanged] to notify the binding observers.
///
......@@ -140,7 +140,7 @@ abstract class WidgetsBinding extends BindingBase implements GestureBinding, Ren
observer.didChangeLocale(locale);
}
/// Invoked when the system pops the current route.
/// Called when the system pops the current route.
///
/// This first notifies the binding observers (using
/// [WidgetsBindingObserver.didPopRoute]), in registration order,
......@@ -161,7 +161,7 @@ abstract class WidgetsBinding extends BindingBase implements GestureBinding, Ren
activity.finishCurrentActivity();
}
/// Invoked when the application lifecycle state changes.
/// Called when the application lifecycle state changes.
///
/// Notifies all the observers using
/// [WidgetsBindingObserver.didChangeAppLifecycleState].
......
......@@ -421,7 +421,7 @@ abstract class State<T extends StatefulWidget> {
if (result is Future) {
throw new FlutterError(
'setState() callback argument returned a Future.\n'
'The setState() method on $this was invoked with a closure or method that '
'The setState() method on $this was called with a closure or method that '
'returned a Future. Maybe it is marked as "async".\n'
'Instead of performing asynchronous work inside a call to setState(), first '
'execute the work (without updating the widget state), and then synchronously '
......@@ -717,7 +717,7 @@ class BuildOwner {
if (_dirtyElements.contains(element)) {
throw new FlutterError(
'scheduleBuildFor() called for a widget for which a build was already scheduled.\n'
'The method was invoked for the following element:\n'
'The method was called for the following element:\n'
' $element\n'
'The current dirty list consists of:\n'
' $_dirtyElements\n'
......@@ -728,7 +728,7 @@ class BuildOwner {
if (!element.dirty) {
throw new FlutterError(
'scheduleBuildFor() called for a widget that is not marked as dirty.\n'
'The method was invoked for the following element:\n'
'The method was called for the following element:\n'
' $element\n'
'This element is not current marked as dirty. Make sure to set the dirty flag before '
'calling scheduleBuildFor().\n'
......@@ -1520,7 +1520,7 @@ abstract class ComponentElement extends BuildableElement {
rebuild();
}
/// Reinvokes the build() method of the [StatelessWidget] object (for
/// Calls the build() method of the [StatelessWidget] object (for
/// stateless widgets) or the [State] object (for stateful widgets) and
/// then updates the widget tree.
///
......
......@@ -50,7 +50,7 @@ class OverlayEntry {
/// This entry will include the widget built by this builder in the overlay at the entry's position.
///
/// To cause this builder to be invoked again, call [markNeedsBuild] on this
/// To cause this builder to be called again, call [markNeedsBuild] on this
/// overlay entry.
final WidgetBuilder builder;
......
......@@ -464,7 +464,7 @@ class ScrollableState<T extends Scrollable> extends State<T> {
if (endScrollOffset.isNaN)
return null;
final double snappedScrollOffset = snapScrollOffset(endScrollOffset); // invokes the config.snapOffsetCallback callback
final double snappedScrollOffset = snapScrollOffset(endScrollOffset); // Calls the config.snapOffsetCallback callback
if (!_scrollOffsetIsInBounds(snappedScrollOffset))
return null;
......
......@@ -212,7 +212,7 @@ abstract class TestWidgetsFlutterBinding extends BindingBase
/// test failures.
bool showAppDumpInErrors = false;
/// Invoke the callback inside a [FakeAsync] scope on which [pump] can
/// Call the callback inside a [FakeAsync] scope on which [pump] can
/// advance time.
///
/// Returns a future which completes when the test has run.
......
......@@ -33,7 +33,7 @@ class _AsyncScope {
/// ```
///
/// It does this while still allowing nested calls, e.g. so that you can
/// invoke [expect] from inside callbacks.
/// call [expect] from inside callbacks.
///
/// You can use this in your own test functions, if you have some asynchronous
/// functions that must be used with "await". Wrap the contents of the function
......@@ -50,7 +50,7 @@ class TestAsyncUtils {
static List<_AsyncScope> _scopeStack = <_AsyncScope>[];
/// Invokes the given callback in a new async scope. The callback argument is
/// Calls the given callback in a new async scope. The callback argument is
/// the asynchronous body of the calling method. The calling method is said to
/// be "guarded". Nested calls to guarded methods from within the body of this
/// one are fine, but calls to other guarded methods from outside the body of
......@@ -215,7 +215,7 @@ class TestAsyncUtils {
if (collidingGuarder.className == null && collidingGuarder.methodName == 'expect') {
message.writeln(
'If you are confident that all test APIs are being called using "await", and '
'this expect() call is not being invoked at the top level but is itself being '
'this expect() call is not being called at the top level but is itself being '
'called from some sort of callback registered before the ${originalGuarder.methodName} '
'method was called, then consider using expectSync() instead.'
);
......
......@@ -114,7 +114,7 @@ void main() {
real_test.expect(lines[1], matches(r'^The guarded method "testGuard1" from class TestAPI was called from .*test_async_utils_test.dart on line [0-9]+\.$'));
real_test.expect(lines[2], matches(r'^Then, the "expect" function was called from .*test_async_utils_test.dart on line [0-9]+\.$'));
real_test.expect(lines[3], 'The first method (TestAPI.testGuard1) had not yet finished executing at the time that the second function (expect) was called. Since both are guarded, and the second was not a nested call inside the first, the first must complete its execution before the second can be called. Typically, this is achieved by putting an "await" statement in front of the call to the first.');
real_test.expect(lines[4], 'If you are confident that all test APIs are being called using "await", and this expect() call is not being invoked at the top level but is itself being called from some sort of callback registered before the testGuard1 method was called, then consider using expectSync() instead.');
real_test.expect(lines[4], 'If you are confident that all test APIs are being called using "await", and this expect() call is not being called at the top level but is itself being called from some sort of callback registered before the testGuard1 method was called, then consider using expectSync() instead.');
real_test.expect(lines[5], '');
real_test.expect(lines[6], 'When the first method (TestAPI.testGuard1) was called, this was the stack:');
real_test.expect(lines.length, greaterThan(7));
......
......@@ -19,7 +19,7 @@ import 'ios/simulators.dart';
/// A class to get all available devices.
class DeviceManager {
/// Constructing DeviceManagers is cheap; they only do expensive work if some
/// of their methods are invoked.
/// of their methods are called.
DeviceManager() {
// Register the known discoverers.
_deviceDiscoverers.add(new AndroidDevices());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment