f_00006f 17.2 KB
Newer Older
1
define(['dart_sdk', 'packages/flutter/src/painting/edge_insets.dart', 'packages/flutter/src/material/icon_button.dart', 'packages/flutter/src/material/colors.dart', 'packages/flutter/src/painting/rounded_rectangle_border.dart', 'packages/flutter/src/painting/borders.dart', 'packages/flutter/src/painting/border_radius.dart', 'packages/flutter/src/widgets/widget_span.dart'], (function load__packages__flutter__src__material__text_selection_toolbar_text_button_dart(dart_sdk, packages__flutter__src__painting__edge_insets$46dart, packages__flutter__src__material__icon_button$46dart, packages__flutter__src__material__colors$46dart, packages__flutter__src__painting__rounded_rectangle_border$46dart, packages__flutter__src__painting__borders$46dart, packages__flutter__src__painting__border_radius$46dart, packages__flutter__src__widgets__widget_span$46dart) {
Lubber's avatar
Lubber committed
2 3 4 5 6
  'use strict';
  const core = dart_sdk.core;
  const ui = dart_sdk.ui;
  const dart = dart_sdk.dart;
  const dartx = dart_sdk.dartx;
7 8 9 10 11
  const edge_insets = packages__flutter__src__painting__edge_insets$46dart.src__painting__edge_insets;
  const theme$ = packages__flutter__src__material__icon_button$46dart.src__material__theme;
  const text_button = packages__flutter__src__material__icon_button$46dart.src__material__text_button;
  const colors = packages__flutter__src__material__colors$46dart.src__material__colors;
  const rounded_rectangle_border = packages__flutter__src__painting__rounded_rectangle_border$46dart.src__painting__rounded_rectangle_border;
Lubber's avatar
Lubber committed
12 13
  const borders = packages__flutter__src__painting__borders$46dart.src__painting__borders;
  const border_radius = packages__flutter__src__painting__border_radius$46dart.src__painting__border_radius;
14 15 16
  const widget_inspector = packages__flutter__src__widgets__widget_span$46dart.src__widgets__widget_inspector;
  const framework = packages__flutter__src__widgets__widget_span$46dart.src__widgets__framework;
  var text_selection_toolbar_text_button = Object.create(dart.library);
Lubber's avatar
Lubber committed
17 18
  dart._checkModuleNullSafetyMode(false);
  var T = {
19 20
    _TextSelectionToolbarItemPositionL: () => (T._TextSelectionToolbarItemPositionL = dart.constFn(dart.legacy(text_selection_toolbar_text_button._TextSelectionToolbarItemPosition)))(),
    _LocationL: () => (T._LocationL = dart.constFn(dart.legacy(widget_inspector._Location)))()
Lubber's avatar
Lubber committed
21 22 23 24 25 26 27 28 29 30 31 32 33 34
  };
  var T$Eval = Object.assign({
    _: () => T$Eval
  }, T);
  var S = {
    _: () => S
  };
  var S$Eval = Object.assign({
    _: () => S$Eval
  }, S);
  const CT = Object.create({
    _: () => (C, CT)
  });
  dart.defineLazy(CT, {
35 36 37 38 39 40 41
    get C0() {
      return C[0] = dart.const({
        __proto__: text_selection_toolbar_text_button._TextSelectionToolbarItemPosition.prototype,
        [_name$]: "_TextSelectionToolbarItemPosition.first",
        index: 0
      });
    },
Lubber's avatar
Lubber committed
42 43
    get C1() {
      return C[1] = dart.const({
44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67
        __proto__: text_selection_toolbar_text_button._TextSelectionToolbarItemPosition.prototype,
        [_name$]: "_TextSelectionToolbarItemPosition.middle",
        index: 1
      });
    },
    get C2() {
      return C[2] = dart.const({
        __proto__: text_selection_toolbar_text_button._TextSelectionToolbarItemPosition.prototype,
        [_name$]: "_TextSelectionToolbarItemPosition.last",
        index: 2
      });
    },
    get C3() {
      return C[3] = dart.const({
        __proto__: text_selection_toolbar_text_button._TextSelectionToolbarItemPosition.prototype,
        [_name$]: "_TextSelectionToolbarItemPosition.only",
        index: 3
      });
    },
    get C4() {
      return C[4] = dart.constList([C[0] || CT.C0, C[1] || CT.C1, C[2] || CT.C2, C[3] || CT.C3], T._TextSelectionToolbarItemPositionL());
    },
    get C7() {
      return C[7] = dart.const({
Lubber's avatar
Lubber committed
68 69 70 71 72
        __proto__: borders.BorderStyle.prototype,
        [_name]: "BorderStyle.none",
        index: 0
      });
    },
73 74
    get C8() {
      return C[8] = dart.const({
Lubber's avatar
Lubber committed
75 76 77 78
        __proto__: ui.Color.prototype,
        [Color_value]: 4278190080.0
      });
    },
79 80
    get C6() {
      return C[6] = dart.const({
Lubber's avatar
Lubber committed
81
        __proto__: borders.BorderSide.prototype,
82
        [BorderSide_style]: C[7] || CT.C7,
Lubber's avatar
Lubber committed
83
        [BorderSide_width]: 0,
84
        [BorderSide_color]: C[8] || CT.C8
Lubber's avatar
Lubber committed
85 86
      });
    },
87 88
    get C10() {
      return C[10] = dart.const({
Lubber's avatar
Lubber committed
89 90 91 92 93
        __proto__: ui.Radius.prototype,
        [Radius_y]: 0,
        [Radius_x]: 0
      });
    },
94 95
    get C9() {
      return C[9] = dart.const({
Lubber's avatar
Lubber committed
96
        __proto__: border_radius.BorderRadius.prototype,
97 98 99 100
        [BorderRadius_bottomRight]: C[10] || CT.C10,
        [BorderRadius_bottomLeft]: C[10] || CT.C10,
        [BorderRadius_topRight]: C[10] || CT.C10,
        [BorderRadius_topLeft]: C[10] || CT.C10
Lubber's avatar
Lubber committed
101 102 103 104
      });
    },
    get C5() {
      return C[5] = dart.const({
105 106 107 108 109 110 111 112 113 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 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157
        __proto__: rounded_rectangle_border.RoundedRectangleBorder.prototype,
        [OutlinedBorder_side]: C[6] || CT.C6,
        [RoundedRectangleBorder_borderRadius]: C[9] || CT.C9
      });
    },
    get C11() {
      return C[11] = dart.const({
        __proto__: ui.Size.prototype,
        [OffsetBase__dy]: 48,
        [OffsetBase__dx]: 48
      });
    },
    get C14() {
      return C[14] = dart.const({
        __proto__: widget_inspector._Location.prototype,
        [_Location_parameterLocations]: null,
        [_Location_name]: "style",
        [_Location_column]: 7,
        [_Location_line]: 115,
        [_Location_file]: null
      });
    },
    get C15() {
      return C[15] = dart.const({
        __proto__: widget_inspector._Location.prototype,
        [_Location_parameterLocations]: null,
        [_Location_name]: "onPressed",
        [_Location_column]: 7,
        [_Location_line]: 121,
        [_Location_file]: null
      });
    },
    get C16() {
      return C[16] = dart.const({
        __proto__: widget_inspector._Location.prototype,
        [_Location_parameterLocations]: null,
        [_Location_name]: "child",
        [_Location_column]: 7,
        [_Location_line]: 122,
        [_Location_file]: null
      });
    },
    get C13() {
      return C[13] = dart.constList([C[14] || CT.C14, C[15] || CT.C15, C[16] || CT.C16], T._LocationL());
    },
    get C12() {
      return C[12] = dart.const({
        __proto__: widget_inspector._Location.prototype,
        [_Location_parameterLocations]: C[13] || CT.C13,
        [_Location_name]: null,
        [_Location_column]: 12,
        [_Location_line]: 114,
        [_Location_file]: "file:///C:/_libs/flutter/packages/flutter/lib/src/material/text_selection_toolbar_text_button.dart"
Lubber's avatar
Lubber committed
158 159 160
      });
    }
  }, false);
161
  var C = Array(17).fill(void 0);
Lubber's avatar
Lubber committed
162
  var I = [
163 164
    "file:///C:/_libs/flutter/packages/flutter/lib/src/material/text_selection_toolbar_text_button.dart",
    "package:flutter/src/material/text_selection_toolbar_text_button.dart"
Lubber's avatar
Lubber committed
165
  ];
166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195
  var _name$ = dart.privateName(text_selection_toolbar_text_button, "_name");
  text_selection_toolbar_text_button._TextSelectionToolbarItemPosition = class _TextSelectionToolbarItemPosition extends core.Object {
    toString() {
      return this[_name$];
    }
  };
  (text_selection_toolbar_text_button._TextSelectionToolbarItemPosition.new = function(index, _name) {
    if (index == null) dart.nullFailed(I[0], 12, 6, "index");
    if (_name == null) dart.nullFailed(I[0], 12, 6, "_name");
    this.index = index;
    this[_name$] = _name;
    ;
  }).prototype = text_selection_toolbar_text_button._TextSelectionToolbarItemPosition.prototype;
  dart.addTypeTests(text_selection_toolbar_text_button._TextSelectionToolbarItemPosition);
  dart.addTypeCaches(text_selection_toolbar_text_button._TextSelectionToolbarItemPosition);
  dart.setLibraryUri(text_selection_toolbar_text_button._TextSelectionToolbarItemPosition, I[1]);
  dart.setFieldSignature(text_selection_toolbar_text_button._TextSelectionToolbarItemPosition, () => ({
    __proto__: dart.getFields(text_selection_toolbar_text_button._TextSelectionToolbarItemPosition.__proto__),
    index: dart.finalFieldType(core.int),
    [_name$]: dart.finalFieldType(core.String)
  }));
  dart.defineExtensionMethods(text_selection_toolbar_text_button._TextSelectionToolbarItemPosition, ['toString']);
  text_selection_toolbar_text_button._TextSelectionToolbarItemPosition.first = C[0] || CT.C0;
  text_selection_toolbar_text_button._TextSelectionToolbarItemPosition.middle = C[1] || CT.C1;
  text_selection_toolbar_text_button._TextSelectionToolbarItemPosition.last = C[2] || CT.C2;
  text_selection_toolbar_text_button._TextSelectionToolbarItemPosition.only = C[3] || CT.C3;
  text_selection_toolbar_text_button._TextSelectionToolbarItemPosition.values = C[4] || CT.C4;
  var child$ = dart.privateName(text_selection_toolbar_text_button, "TextSelectionToolbarTextButton.child");
  var onPressed$ = dart.privateName(text_selection_toolbar_text_button, "TextSelectionToolbarTextButton.onPressed");
  var padding$ = dart.privateName(text_selection_toolbar_text_button, "TextSelectionToolbarTextButton.padding");
Lubber's avatar
Lubber committed
196 197 198 199 200
  var _name = dart.privateName(borders, "_name");
  var BorderSide_style = dart.privateName(borders, "BorderSide.style");
  var BorderSide_width = dart.privateName(borders, "BorderSide.width");
  var Color_value = dart.privateName(ui, "Color.value");
  var BorderSide_color = dart.privateName(borders, "BorderSide.color");
201
  var OutlinedBorder_side = dart.privateName(borders, "OutlinedBorder.side");
Lubber's avatar
Lubber committed
202 203 204 205 206 207
  var Radius_y = dart.privateName(ui, "Radius.y");
  var Radius_x = dart.privateName(ui, "Radius.x");
  var BorderRadius_bottomRight = dart.privateName(border_radius, "BorderRadius.bottomRight");
  var BorderRadius_bottomLeft = dart.privateName(border_radius, "BorderRadius.bottomLeft");
  var BorderRadius_topRight = dart.privateName(border_radius, "BorderRadius.topRight");
  var BorderRadius_topLeft = dart.privateName(border_radius, "BorderRadius.topLeft");
208 209 210 211 212 213 214 215 216 217 218
  var RoundedRectangleBorder_borderRadius = dart.privateName(rounded_rectangle_border, "RoundedRectangleBorder.borderRadius");
  var OffsetBase__dy = dart.privateName(ui, "OffsetBase._dy");
  var OffsetBase__dx = dart.privateName(ui, "OffsetBase._dx");
  var _Location_parameterLocations = dart.privateName(widget_inspector, "_Location.parameterLocations");
  var _Location_name = dart.privateName(widget_inspector, "_Location.name");
  var _Location_column = dart.privateName(widget_inspector, "_Location.column");
  var _Location_line = dart.privateName(widget_inspector, "_Location.line");
  var _Location_file = dart.privateName(widget_inspector, "_Location.file");
  text_selection_toolbar_text_button.TextSelectionToolbarTextButton = class TextSelectionToolbarTextButton extends framework.StatelessWidget {
    get child() {
      return this[child$];
Lubber's avatar
Lubber committed
219
    }
220 221
    set child(value) {
      super.child = value;
Lubber's avatar
Lubber committed
222
    }
223 224
    get onPressed() {
      return this[onPressed$];
Lubber's avatar
Lubber committed
225
    }
226 227
    set onPressed(value) {
      super.onPressed = value;
Lubber's avatar
Lubber committed
228
    }
229 230
    get padding() {
      return this[padding$];
Lubber's avatar
Lubber committed
231
    }
232 233
    set padding(value) {
      super.padding = value;
Lubber's avatar
Lubber committed
234
    }
235 236 237 238 239 240
    static getPadding(index, total) {
      if (index == null) dart.nullFailed(I[0], 70, 36, "index");
      if (total == null) dart.nullFailed(I[0], 70, 47, "total");
      if (!(dart.notNull(total) > 0 && dart.notNull(index) >= 0 && dart.notNull(index) < dart.notNull(total))) dart.assertFailed(null, I[0], 71, 12, "total > 0 && index >= 0 && index < total");
      let position = text_selection_toolbar_text_button.TextSelectionToolbarTextButton._getPosition(index, total);
      return new edge_insets.EdgeInsets.only({left: text_selection_toolbar_text_button.TextSelectionToolbarTextButton._getLeftPadding(position), right: text_selection_toolbar_text_button.TextSelectionToolbarTextButton._getRightPadding(position)});
Lubber's avatar
Lubber committed
241
    }
242 243 244 245
    static _getLeftPadding(position) {
      if (position == null) dart.nullFailed(I[0], 79, 67, "position");
      if (position == text_selection_toolbar_text_button._TextSelectionToolbarItemPosition.first || position == text_selection_toolbar_text_button._TextSelectionToolbarItemPosition.only) {
        return 14.5;
Lubber's avatar
Lubber committed
246
      }
247
      return 9.5;
Lubber's avatar
Lubber committed
248
    }
249 250 251 252
    static _getRightPadding(position) {
      if (position == null) dart.nullFailed(I[0], 87, 68, "position");
      if (position == text_selection_toolbar_text_button._TextSelectionToolbarItemPosition.last || position == text_selection_toolbar_text_button._TextSelectionToolbarItemPosition.only) {
        return 14.5;
Lubber's avatar
Lubber committed
253
      }
254
      return 9.5;
Lubber's avatar
Lubber committed
255
    }
256 257 258 259 260
    static _getPosition(index, total) {
      if (index == null) dart.nullFailed(I[0], 95, 61, "index");
      if (total == null) dart.nullFailed(I[0], 95, 72, "total");
      if (index === 0) {
        return total === 1 ? text_selection_toolbar_text_button._TextSelectionToolbarItemPosition.only : text_selection_toolbar_text_button._TextSelectionToolbarItemPosition.first;
Lubber's avatar
Lubber committed
261
      }
262 263
      if (index === dart.notNull(total) - 1) {
        return text_selection_toolbar_text_button._TextSelectionToolbarItemPosition.last;
Lubber's avatar
Lubber committed
264
      }
265
      return text_selection_toolbar_text_button._TextSelectionToolbarItemPosition.middle;
Lubber's avatar
Lubber committed
266
    }
267 268 269 270 271 272
    build(context) {
      if (context == null) dart.nullFailed(I[0], 108, 29, "context");
      let theme = theme$.Theme.of(context);
      let isDark = theme.colorScheme.brightness == ui.Brightness.dark;
      let primary = isDark ? colors.Colors.white : colors.Colors.black87;
      return new text_button.TextButton.new({style: text_button.TextButton.styleFrom({primary: primary, shape: C[5] || CT.C5, minimumSize: C[11] || CT.C11, padding: this.padding}), onPressed: this.onPressed, child: this.child, $creationLocationd_0dea112b090073317d4: C[12] || CT.C12});
Lubber's avatar
Lubber committed
273 274
    }
  };
275 276 277 278 279 280 281 282 283 284 285 286
  (text_selection_toolbar_text_button.TextSelectionToolbarTextButton.new = function(opts) {
    let key = opts && 'key' in opts ? opts.key : null;
    let child = opts && 'child' in opts ? opts.child : null;
    if (child == null) dart.nullFailed(I[0], 31, 19, "child");
    let padding = opts && 'padding' in opts ? opts.padding : null;
    if (padding == null) dart.nullFailed(I[0], 32, 19, "padding");
    let onPressed = opts && 'onPressed' in opts ? opts.onPressed : null;
    let $36creationLocationd_0dea112b090073317d4 = opts && '$creationLocationd_0dea112b090073317d4' in opts ? opts.$creationLocationd_0dea112b090073317d4 : null;
    this[child$] = child;
    this[padding$] = padding;
    this[onPressed$] = onPressed;
    text_selection_toolbar_text_button.TextSelectionToolbarTextButton.__proto__.new.call(this, {key: key, $creationLocationd_0dea112b090073317d4: $36creationLocationd_0dea112b090073317d4});
Lubber's avatar
Lubber committed
287
    ;
288 289 290 291 292 293
  }).prototype = text_selection_toolbar_text_button.TextSelectionToolbarTextButton.prototype;
  dart.addTypeTests(text_selection_toolbar_text_button.TextSelectionToolbarTextButton);
  dart.addTypeCaches(text_selection_toolbar_text_button.TextSelectionToolbarTextButton);
  dart.setMethodSignature(text_selection_toolbar_text_button.TextSelectionToolbarTextButton, () => ({
    __proto__: dart.getMethods(text_selection_toolbar_text_button.TextSelectionToolbarTextButton.__proto__),
    build: dart.fnType(framework.Widget, [framework.BuildContext])
Lubber's avatar
Lubber committed
294
  }));
295 296 297 298 299 300
  dart.setLibraryUri(text_selection_toolbar_text_button.TextSelectionToolbarTextButton, I[1]);
  dart.setFieldSignature(text_selection_toolbar_text_button.TextSelectionToolbarTextButton, () => ({
    __proto__: dart.getFields(text_selection_toolbar_text_button.TextSelectionToolbarTextButton.__proto__),
    child: dart.finalFieldType(framework.Widget),
    onPressed: dart.finalFieldType(dart.nullable(dart.fnType(dart.void, []))),
    padding: dart.finalFieldType(edge_insets.EdgeInsets)
Lubber's avatar
Lubber committed
301
  }));
302 303 304 305 306 307 308 309 310 311
  dart.defineLazy(text_selection_toolbar_text_button.TextSelectionToolbarTextButton, {
    /*text_selection_toolbar_text_button.TextSelectionToolbarTextButton._kMiddlePadding*/get _kMiddlePadding() {
      return 9.5;
    },
    /*text_selection_toolbar_text_button.TextSelectionToolbarTextButton._kEndPadding*/get _kEndPadding() {
      return 14.5;
    }
  }, false);
  dart.trackLibraries("packages/flutter/src/material/text_selection_toolbar_text_button.dart", {
    "package:flutter/src/material/text_selection_toolbar_text_button.dart": text_selection_toolbar_text_button
Lubber's avatar
Lubber committed
312
  }, {
313
  }, '{"version":3,"sourceRoot":"","sources":["text_selection_toolbar_text_button.dart"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAuBA;;;QAZK;;;;;EAYL;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAsBe;;;;;;IAKO;;;;;;IAYH;;;;;;sBAOgB,OAAW;UAAX;UAAW;AAC1C,YAAa,AAAkB,aAAxB,KAAK,IAAG,KAAW,aAAN,KAAK,KAAI,KAAW,aAAN,KAAK,iBAAG,KAAK;AACP,qBAAW,+EAAa,KAAK,EAAE,KAAK;AAC5E,YAAkB,wCACV,kFAAgB,QAAQ,UACvB,mFAAiB,QAAQ;IAEpC;;UAEgE;AAC9D,UAAI,AAAS,QAAD,IAAsC,8EAC3C,AAAS,QAAD,IAAsC;AACnD;;AAEF;IACF;;UAEiE;AAC/D,UAAI,AAAS,QAAD,IAAsC,6EAC3C,AAAS,QAAD,IAAsC;AACnD;;AAEF;IACF;wBAE0D,OAAW;UAAX;UAAW;AACnE,UAAI,AAAM,KAAD,KAAI;AACX,cAAO,AAAM,MAAD,KAAI,IACwB,4EACA;;AAE1C,UAAI,AAAM,KAAD,KAAU,aAAN,KAAK,IAAG;AACnB,cAAyC;;AAE3C,YAAyC;IAC3C;;UAG0B;AAER,kBAAc,gBAAG,OAAO;AAC7B,mBAAS,AAAM,AAAY,AAAW,KAAxB,2BAAsC;AACnD,oBAAU,MAAM,GAAU,sBAAe;AAErD,YAAO,wCACa,2CACP,OAAO,+DAGP,2BAEA,uBACJ;IAEX;;;QA9FO;QACS;;QACA;;QACT;;IAFS;IACA;IACT;AACF,qGAAW,GAAG;;EAAC;;;;;;;;;;;;;;;MAIA,iFAAe;;;MACf,8EAAY","file":"../../../../../../../packages/flutter/src/material/text_selection_toolbar_text_button.dart.lib.js"}');
Lubber's avatar
Lubber committed
314 315
  // Exports:
  return {
316
    src__material__text_selection_toolbar_text_button: text_selection_toolbar_text_button
Lubber's avatar
Lubber committed
317 318 319
  };
}));

320
//# sourceMappingURL=text_selection_toolbar_text_button.dart.lib.js.map