widgets.dart.expect 7.79 KB
Newer Older
1 2 3 4 5 6 7
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

import 'package:flutter/widgets.dart';

void main() {
8 9
  // Generic reference variables.
  BuildContext context;
10 11 12
  RenderObjectWidget renderObjectWidget;
  RenderObject renderObject;
  Object object;
13 14
  TickerProvider vsync;

15 16 17
  // Changes made in https://github.com/flutter/flutter/pull/123352
  WidgetsBinding.instance.rootElement;

18 19 20 21
  // Changes made in https://github.com/flutter/flutter/pull/119647
  MediaQueryData.fromView(View.of(context));

  // Changes made in https://github.com/flutter/flutter/pull/119186 and https://github.com/flutter/flutter/pull/81067
22
  AnimatedSize(duration: Duration.zero);
23

24 25
  // Changes made in https://github.com/flutter/flutter/pull/45941 and https://github.com/flutter/flutter/pull/83843
  final WidgetsBinding binding = WidgetsBinding.instance;
26 27 28
  binding.deferFirstFrame();
  binding.allowFirstFrame();

29 30 31
  // Changes made in https://github.com/flutter/flutter/pull/44189
  const StatefulElement statefulElement = StatefulElement(myWidget);
  statefulElement.dependOnInheritedElement(ancestor);
32

33
  // Changes made in https://github.com/flutter/flutter/pull/61648
34 35
  const Form form = Form(autovalidateMode: AutovalidateMode.always);
  const Form form = Form(autovalidateMode: AutovalidateMode.disabled);
36
  const Form form = Form(error: '');
37 38 39
  final autoMode = form.autovalidateMode;

  // Changes made in https://github.com/flutter/flutter/pull/61648
40 41
  const FormField formField = FormField(autovalidateMode: AutovalidateMode.always);
  const FormField formField = FormField(autovalidateMode: AutovalidateMode.disabled);
42
  const FormField formField = FormField(error: '');
43 44
  final autoMode = formField.autovalidateMode;

45 46 47
  // Changes made in https://github.com/flutter/flutter/pull/66305
  const Stack stack = Stack(clipBehavior: Clip.none);
  const Stack stack = Stack(clipBehavior: Clip.hardEdge);
48
  const Stack stack = Stack(error: '');
49
  final behavior = stack.clipBehavior;
50 51 52 53

  // Changes made in https://github.com/flutter/flutter/pull/68736
  MediaQuery.maybeOf(context);
  MediaQuery.of(context);
54
  MediaQuery.of(error: '');
55 56 57 58

  // Changes made in https://github.com/flutter/flutter/pull/70726
  Navigator.maybeOf(context);
  Navigator.of(context);
59
  Navigator.of(error: '');
60 61 62 63

  // Changes made in https://github.com/flutter/flutter/pull/68910
  Router.maybeOf(context);
  Router.of(context);
64
  Router.of(error: '');
65 66 67 68

  // Changes made in https://github.com/flutter/flutter/pull/68911
  Localizations.maybeLocaleOf(context);
  Localizations.localeOf(context);
69
  Localizations.localeOf(error: '');
70 71 72 73

  // Changes made in https://github.com/flutter/flutter/pull/68917
  FocusTraversalOrder.maybeOf(context);
  FocusTraversalOrder.of(context);
74 75
  FocusTraversalOrder.of(error: '');
  FocusTraversalGroup.of(error: '');
76 77 78 79
  FocusTraversalGroup.maybeOf(context);
  FocusTraversalGroup.of(context);
  Focus.maybeOf(context);
  Focus.of(context);
80
  Focus.of(error: '');
81 82 83 84

  // Changes made in https://github.com/flutter/flutter/pull/68921
  Shortcuts.maybeOf(context);
  Shortcuts.of(context);
85
  Shortcuts.of(error: '');
86 87 88 89

  // Changes made in https://github.com/flutter/flutter/pull/68925
  AnimatedList.maybeOf(context);
  AnimatedList.of(context);
90 91
  AnimatedList.of(error: '');
  SliverAnimatedList.of(error: '');
92 93
  SliverAnimatedList.maybeOf(context);
  SliverAnimatedList.of(context);
94 95 96

  // Changes made in https://github.com/flutter/flutter/pull/59127
  const BottomNavigationBarItem bottomNavigationBarItem = BottomNavigationBarItem(label: myTitle);
97 98
  const BottomNavigationBarItem bottomNavigationBarItem = BottomNavigationBarItem();
  const BottomNavigationBarItem bottomNavigationBarItem = BottomNavigationBarItem(error: '');
99
  bottomNavigationBarItem.label;
100 101 102 103 104

  // Changes made in https://github.com/flutter/flutter/pull/79160
  Draggable draggable = Draggable();
  draggable = Draggable(dragAnchorStrategy: childDragAnchorStrategy);
  draggable = Draggable(dragAnchorStrategy: pointerDragAnchorStrategy);
105
  draggable = Draggable(error: '');
106 107 108 109 110 111
  draggable.dragAnchorStrategy;

  // Changes made in https://github.com/flutter/flutter/pull/79160
  LongPressDraggable longPressDraggable = LongPressDraggable();
  longPressDraggable = LongPressDraggable(dragAnchorStrategy: childDragAnchorStrategy);
  longPressDraggable = LongPressDraggable(dragAnchorStrategy: pointerDragAnchorStrategy);
112
  longPressDraggable = LongPressDraggable(error: '');
113
  longPressDraggable.dragAnchorStrategy;
114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139

  // Changes made in https://github.com/flutter/flutter/pull/64254
  final LeafRenderObjectElement leafElement = LeafRenderObjectElement();
  leafElement.insertRenderObjectChild(renderObject, object);
  leafElement.moveRenderObjectChild(renderObject, object);
  leafElement.removeRenderObjectChild(renderObject);
  final ListWheelElement listWheelElement = ListWheelElement();
  listWheelElement.insertRenderObjectChild(renderObject, object);
  listWheelElement.moveRenderObjectChild(renderObject, object);
  listWheelElement.removeRenderObjectChild(renderObject);
  final MultiChildRenderObjectElement multiChildRenderObjectElement = MultiChildRenderObjectElement();
  multiChildRenderObjectElement.insertRenderObjectChild(renderObject, object);
  multiChildRenderObjectElement.moveRenderObjectChild(renderObject, object);
  multiChildRenderObjectElement.removeRenderObjectChild(renderObject);
  final SingleChildRenderObjectElement singleChildRenderObjectElement = SingleChildRenderObjectElement();
  singleChildRenderObjectElement.insertRenderObjectChild(renderObject, object);
  singleChildRenderObjectElement.moveRenderObjectChild(renderObject, object);
  singleChildRenderObjectElement.removeRenderObjectChild(renderObject);
  final SliverMultiBoxAdaptorElement sliverMultiBoxAdaptorElement = SliverMultiBoxAdaptorElement();
  sliverMultiBoxAdaptorElement.insertRenderObjectChild(renderObject, object);
  sliverMultiBoxAdaptorElement.moveRenderObjectChild(renderObject, object);
  sliverMultiBoxAdaptorElement.removeRenderObjectChild(renderObject);
  final RenderObjectToWidgetElement renderObjectToWidgetElement = RenderObjectToWidgetElement(widget);
  renderObjectToWidgetElement.insertRenderObjectChild(renderObject, object);
  renderObjectToWidgetElement.moveRenderObjectChild(renderObject, object);
  renderObjectToWidgetElement.removeRenderObjectChild(renderObject);
140 141 142 143 144

  // Changes made in https://flutter.dev/docs/release/breaking-changes/clip-behavior
  ListWheelViewport listWheelViewport = ListWheelViewport();
  listWheelViewport = ListWheelViewport(clipBehavior: Clip.hardEdge);
  listWheelViewport = ListWheelViewport(clipBehavior: Clip.none);
145
  listWheelViewport = ListWheelViewport(error: '');
146
  listWheelViewport.clipBehavior;
147 148 149

  // Changes made in https://github.com/flutter/flutter/pull/87839
  final OverscrollIndicatorNotification notification = OverscrollIndicatorNotification(leading: true);
150
  final OverscrollIndicatorNotification notification = OverscrollIndicatorNotification(error: '');
151
  notification.disallowIndicator();
152 153 154 155

  // Changes made in https://github.com/flutter/flutter/pull/96957
  RawScrollbar rawScrollbar = RawScrollbar(thumbVisibility: true);
  nowShowing = rawScrollbar.thumbVisibility;
156 157 158

  // Change made in https://github.com/flutter/flutter/pull/100381
  SelectionOverlay.fadeDuration;
159 160 161 162

  // Changes made in https://github.com/flutter/flutter/pull/78588
  final ScrollBehavior scrollBehavior = ScrollBehavior();
  scrollBehavior.buildOverscrollIndicator(context, child, axisDirection);
163 164 165

  // Changes made in https://github.com/flutter/flutter/pull/114459
  MediaQuery.boldTextOf(context);
166 167 168 169 170 171 172

  // Changes made in https://github.com/flutter/flutter/pull/122555
  final ScrollableDetails details = ScrollableDetails(
    direction: AxisDirection.down,
    decorationClipBehavior: Clip.none,
  );
  final Clip clip = details.decorationClipBehavior;
173
}