mirror of
https://github.com/flutter/flutter
synced 2024-10-13 03:32:55 +00:00
add missing trailing commas (#79352)
This commit is contained in:
parent
83980ef246
commit
41507a0408
|
@ -1207,7 +1207,7 @@ class _MasterDetailFlow extends StatefulWidget {
|
|||
throw FlutterError(
|
||||
'Master Detail operation requested with a context that does not include a Master Detail '
|
||||
'Flow.\nThe context used to open a detail page from the Master Detail Flow must be '
|
||||
'that of a widget that is a descendant of a Master Detail Flow widget.'
|
||||
'that of a widget that is a descendant of a Master Detail Flow widget.',
|
||||
);
|
||||
}
|
||||
return true;
|
||||
|
@ -1279,15 +1279,14 @@ class _MasterDetailFlowState extends State<_MasterDetailFlow> implements _PageOp
|
|||
case _LayoutMode.lateral:
|
||||
return _lateralUI(context);
|
||||
case _LayoutMode.auto:
|
||||
return LayoutBuilder(
|
||||
builder: (BuildContext context, BoxConstraints constraints) {
|
||||
final double availableWidth = constraints.maxWidth;
|
||||
if (availableWidth >= (widget.breakpoint ?? _materialWideDisplayThreshold)) {
|
||||
return _lateralUI(context);
|
||||
} else {
|
||||
return _nestedUI(context);
|
||||
}
|
||||
});
|
||||
return LayoutBuilder(builder: (BuildContext context, BoxConstraints constraints) {
|
||||
final double availableWidth = constraints.maxWidth;
|
||||
if (availableWidth >= (widget.breakpoint ?? _materialWideDisplayThreshold)) {
|
||||
return _lateralUI(context);
|
||||
} else {
|
||||
return _nestedUI(context);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1308,7 +1307,7 @@ class _MasterDetailFlowState extends State<_MasterDetailFlow> implements _PageOp
|
|||
case _Focus.detail:
|
||||
return <Route<void>>[
|
||||
masterPageRoute,
|
||||
_detailPageRoute(_cachedDetailArguments)
|
||||
_detailPageRoute(_cachedDetailArguments),
|
||||
];
|
||||
}
|
||||
},
|
||||
|
@ -1547,7 +1546,7 @@ class _MasterDetailScaffoldState extends State<_MasterDetailScaffold>
|
|||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
@ -1568,11 +1567,14 @@ class _MasterDetailScaffoldState extends State<_MasterDetailScaffold>
|
|||
valueListenable: _detailArguments,
|
||||
builder: (BuildContext context, Object? value, Widget? child) {
|
||||
return AnimatedSwitcher(
|
||||
transitionBuilder:
|
||||
(Widget child, Animation<double> animation) =>
|
||||
const FadeUpwardsPageTransitionsBuilder()
|
||||
.buildTransitions<void>(
|
||||
null, null, animation, null, child),
|
||||
transitionBuilder: (Widget child, Animation<double> animation) =>
|
||||
const FadeUpwardsPageTransitionsBuilder().buildTransitions<void>(
|
||||
null,
|
||||
null,
|
||||
animation,
|
||||
null,
|
||||
child,
|
||||
),
|
||||
duration: const Duration(milliseconds: 500),
|
||||
child: Container(
|
||||
key: ValueKey<Object?>(value ?? widget.initialArguments),
|
||||
|
@ -1643,11 +1645,9 @@ class _DetailView extends StatelessWidget {
|
|||
color: Theme.of(context).cardColor,
|
||||
elevation: _kCardElevation,
|
||||
clipBehavior: Clip.antiAlias,
|
||||
margin: const EdgeInsets.fromLTRB(
|
||||
_kCardElevation, 0.0, _kCardElevation, 0.0),
|
||||
margin: const EdgeInsets.fromLTRB(_kCardElevation, 0.0, _kCardElevation, 0.0),
|
||||
shape: const RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.vertical(
|
||||
top: Radius.circular(3.0), bottom: Radius.zero),
|
||||
borderRadius: BorderRadius.vertical(top: Radius.circular(3.0), bottom: Radius.zero),
|
||||
),
|
||||
child: _builder(
|
||||
context,
|
||||
|
|
|
@ -785,7 +785,7 @@ class _MaterialAppState extends State<MaterialApp> {
|
|||
},
|
||||
)
|
||||
: child!,
|
||||
)
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -390,7 +390,7 @@ class _ModalBottomSheetState<T> extends State<_ModalBottomSheet<T>> {
|
|||
// Disable the initial animation when accessible navigation is on so
|
||||
// that the semantics are added to the tree at the correct time.
|
||||
final double animationValue = animationCurve.transform(
|
||||
mediaQuery.accessibleNavigation ? 1.0 : widget.route!.animation!.value
|
||||
mediaQuery.accessibleNavigation ? 1.0 : widget.route!.animation!.value,
|
||||
);
|
||||
return Semantics(
|
||||
scopesRoute: true,
|
||||
|
|
|
@ -202,10 +202,11 @@ class ButtonBarThemeData with Diagnosticable {
|
|||
properties.add(DoubleProperty('height', buttonHeight, defaultValue: null));
|
||||
properties.add(DiagnosticsProperty<EdgeInsetsGeometry>('padding', buttonPadding, defaultValue: null));
|
||||
properties.add(FlagProperty(
|
||||
'buttonAlignedDropdown',
|
||||
value: buttonAlignedDropdown,
|
||||
ifTrue: 'dropdown width matches button',
|
||||
defaultValue: null));
|
||||
'buttonAlignedDropdown',
|
||||
value: buttonAlignedDropdown,
|
||||
ifTrue: 'dropdown width matches button',
|
||||
defaultValue: null,
|
||||
));
|
||||
properties.add(DiagnosticsProperty<ButtonBarLayoutBehavior>('layoutBehavior', layoutBehavior, defaultValue: null));
|
||||
properties.add(DiagnosticsProperty<VerticalDirection>('overflowDirection', overflowDirection, defaultValue: null));
|
||||
}
|
||||
|
|
|
@ -304,7 +304,7 @@ class _ButtonStyleState extends State<ButtonStyleButton> with TickerProviderStat
|
|||
if (size.height.isFinite) {
|
||||
effectiveConstraints = effectiveConstraints.copyWith(
|
||||
minHeight: size.height,
|
||||
maxHeight: size.height
|
||||
maxHeight: size.height,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -534,7 +534,7 @@ class _MonthPickerState extends State<_MonthPicker> {
|
|||
if (widget.initialMonth != oldWidget.initialMonth && widget.initialMonth != _currentMonth) {
|
||||
// We can't interrupt this widget build with a scroll, so do it next frame
|
||||
WidgetsBinding.instance!.addPostFrameCallback(
|
||||
(Duration timeStamp) => _showMonth(widget.initialMonth, jump: true)
|
||||
(Duration timeStamp) => _showMonth(widget.initialMonth, jump: true),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -627,9 +627,10 @@ class _MonthPickerState extends State<_MonthPicker> {
|
|||
if (jump) {
|
||||
_pageController.jumpToPage(monthPage);
|
||||
} else {
|
||||
_pageController.animateToPage(monthPage,
|
||||
_pageController.animateToPage(
|
||||
monthPage,
|
||||
duration: _monthScrollDuration,
|
||||
curve: Curves.ease
|
||||
curve: Curves.ease,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -808,7 +809,7 @@ class _FocusedDate extends InheritedWidget {
|
|||
const _FocusedDate({
|
||||
Key? key,
|
||||
required Widget child,
|
||||
this.date
|
||||
this.date,
|
||||
}) : super(key: key, child: child);
|
||||
|
||||
final DateTime? date;
|
||||
|
@ -892,7 +893,7 @@ class _DayPickerState extends State<_DayPicker> {
|
|||
final int daysInMonth = DateUtils.getDaysInMonth(widget.displayedMonth.year, widget.displayedMonth.month);
|
||||
_dayFocusNodes = List<FocusNode>.generate(
|
||||
daysInMonth,
|
||||
(int index) => FocusNode(skipTraversal: true, debugLabel: 'Day ${index + 1}')
|
||||
(int index) => FocusNode(skipTraversal: true, debugLabel: 'Day ${index + 1}'),
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -479,7 +479,7 @@ class _CheckboxState extends State<Checkbox> with TickerProviderStateMixin, Togg
|
|||
..value = value
|
||||
..previousValue = _previousValue
|
||||
..shape = widget.shape ?? themeData.checkboxTheme.shape ?? const RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.all(Radius.circular(1.0))
|
||||
borderRadius: BorderRadius.all(Radius.circular(1.0)),
|
||||
)
|
||||
..side = widget.side ?? themeData.checkboxTheme.side,
|
||||
),
|
||||
|
|
|
@ -131,7 +131,7 @@ class DataTableThemeData with Diagnosticable {
|
|||
horizontalMargin: lerpDouble(a.horizontalMargin, b.horizontalMargin, t),
|
||||
columnSpacing: lerpDouble(a.columnSpacing, b.columnSpacing, t),
|
||||
dividerThickness: lerpDouble(a.dividerThickness, b.dividerThickness, t),
|
||||
checkboxHorizontalMargin: lerpDouble(a.checkboxHorizontalMargin, b.checkboxHorizontalMargin, t)
|
||||
checkboxHorizontalMargin: lerpDouble(a.checkboxHorizontalMargin, b.checkboxHorizontalMargin, t),
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -1578,13 +1578,13 @@ class _CalendarRangePickerDialog extends StatelessWidget {
|
|||
final String endDateText = _formatRangeEndDate(localizations, selectedStartDate, selectedEndDate, DateTime.now());
|
||||
final TextStyle? headlineStyle = textTheme.headline5;
|
||||
final TextStyle? startDateStyle = headlineStyle?.apply(
|
||||
color: selectedStartDate != null ? headerForeground : headerDisabledForeground
|
||||
color: selectedStartDate != null ? headerForeground : headerDisabledForeground,
|
||||
);
|
||||
final TextStyle? endDateStyle = headlineStyle?.apply(
|
||||
color: selectedEndDate != null ? headerForeground : headerDisabledForeground
|
||||
color: selectedEndDate != null ? headerForeground : headerDisabledForeground,
|
||||
);
|
||||
final TextStyle saveButtonStyle = textTheme.button!.apply(
|
||||
color: onConfirm != null ? headerForeground : headerDisabledForeground
|
||||
color: onConfirm != null ? headerForeground : headerDisabledForeground,
|
||||
);
|
||||
|
||||
return SafeArea(
|
||||
|
@ -2303,7 +2303,7 @@ class _MonthItemState extends State<_MonthItem> {
|
|||
final int daysInMonth = DateUtils.getDaysInMonth(widget.displayedMonth.year, widget.displayedMonth.month);
|
||||
_dayFocusNodes = List<FocusNode>.generate(
|
||||
daysInMonth,
|
||||
(int index) => FocusNode(skipTraversal: true, debugLabel: 'Day ${index + 1}')
|
||||
(int index) => FocusNode(skipTraversal: true, debugLabel: 'Day ${index + 1}'),
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -69,7 +69,7 @@ const _DayPickerGridDelegate _kDayPickerGridDelegate = _DayPickerGridDelegate();
|
|||
///
|
||||
@Deprecated(
|
||||
'Use CalendarDatePicker instead. '
|
||||
'This feature was deprecated after v1.26.0-18.0.pre.'
|
||||
'This feature was deprecated after v1.26.0-18.0.pre.',
|
||||
)
|
||||
class DayPicker extends StatelessWidget {
|
||||
/// Creates a day picker.
|
||||
|
@ -77,7 +77,7 @@ class DayPicker extends StatelessWidget {
|
|||
/// Rarely used directly. Instead, typically used as part of a [MonthPicker].
|
||||
@Deprecated(
|
||||
'Use CalendarDatePicker instead. '
|
||||
'This feature was deprecated after v1.26.0-18.0.pre.'
|
||||
'This feature was deprecated after v1.26.0-18.0.pre.',
|
||||
)
|
||||
DayPicker({
|
||||
Key? key,
|
||||
|
@ -355,7 +355,7 @@ class DayPicker extends StatelessWidget {
|
|||
///
|
||||
@Deprecated(
|
||||
'Use CalendarDatePicker instead. '
|
||||
'This feature was deprecated after v1.26.0-18.0.pre.'
|
||||
'This feature was deprecated after v1.26.0-18.0.pre.',
|
||||
)
|
||||
class MonthPicker extends StatefulWidget {
|
||||
/// Creates a month picker.
|
||||
|
@ -364,7 +364,7 @@ class MonthPicker extends StatefulWidget {
|
|||
/// by [showDatePicker].
|
||||
@Deprecated(
|
||||
'Use CalendarDatePicker instead. '
|
||||
'This feature was deprecated after v1.26.0-18.0.pre.'
|
||||
'This feature was deprecated after v1.26.0-18.0.pre.',
|
||||
)
|
||||
MonthPicker({
|
||||
Key? key,
|
||||
|
@ -504,14 +504,12 @@ class _MonthPickerState extends State<MonthPicker> with SingleTickerProviderStat
|
|||
|
||||
/// True if the earliest allowable month is displayed.
|
||||
bool get _isDisplayingFirstMonth {
|
||||
return !_currentDisplayedMonthDate.isAfter(
|
||||
DateTime(widget.firstDate.year, widget.firstDate.month));
|
||||
return !_currentDisplayedMonthDate.isAfter(DateTime(widget.firstDate.year, widget.firstDate.month));
|
||||
}
|
||||
|
||||
/// True if the latest allowable month is displayed.
|
||||
bool get _isDisplayingLastMonth {
|
||||
return !_currentDisplayedMonthDate.isBefore(
|
||||
DateTime(widget.lastDate.year, widget.lastDate.month));
|
||||
return !_currentDisplayedMonthDate.isBefore(DateTime(widget.lastDate.year, widget.lastDate.month));
|
||||
}
|
||||
|
||||
late DateTime _previousMonthDate;
|
||||
|
|
|
@ -34,16 +34,15 @@ bool debugCheckHasMaterial(BuildContext context) {
|
|||
'material is represented by the Material widget. It is the '
|
||||
'Material widget that renders ink splashes, for instance. '
|
||||
'Because of this, many material library widgets require that '
|
||||
'there be a Material widget in the tree above them.'
|
||||
'there be a Material widget in the tree above them.',
|
||||
),
|
||||
ErrorHint(
|
||||
'To introduce a Material widget, you can either directly '
|
||||
'include one, or use a widget that contains Material itself, '
|
||||
'such as a Card, Dialog, Drawer, or Scaffold.',
|
||||
),
|
||||
...context.describeMissingAncestor(expectedAncestorType: Material)
|
||||
]
|
||||
);
|
||||
...context.describeMissingAncestor(expectedAncestorType: Material),
|
||||
]);
|
||||
}
|
||||
return true;
|
||||
}());
|
||||
|
@ -71,19 +70,19 @@ bool debugCheckHasMaterialLocalizations(BuildContext context) {
|
|||
ErrorSummary('No MaterialLocalizations found.'),
|
||||
ErrorDescription(
|
||||
'${context.widget.runtimeType} widgets require MaterialLocalizations '
|
||||
'to be provided by a Localizations widget ancestor.'
|
||||
'to be provided by a Localizations widget ancestor.',
|
||||
),
|
||||
ErrorDescription(
|
||||
'The material library uses Localizations to generate messages, '
|
||||
'labels, and abbreviations.'
|
||||
'labels, and abbreviations.',
|
||||
),
|
||||
ErrorHint(
|
||||
'To introduce a MaterialLocalizations, either use a '
|
||||
'MaterialApp at the root of your application to include them '
|
||||
'automatically, or add a Localization widget with a '
|
||||
'MaterialLocalizations delegate.'
|
||||
'MaterialLocalizations delegate.',
|
||||
),
|
||||
...context.describeMissingAncestor(expectedAncestorType: MaterialLocalizations)
|
||||
...context.describeMissingAncestor(expectedAncestorType: MaterialLocalizations),
|
||||
]);
|
||||
}
|
||||
return true;
|
||||
|
@ -113,8 +112,8 @@ bool debugCheckHasScaffold(BuildContext context) {
|
|||
...context.describeMissingAncestor(expectedAncestorType: Scaffold),
|
||||
ErrorHint(
|
||||
'Typically, the Scaffold widget is introduced by the MaterialApp or '
|
||||
'WidgetsApp widget at the top of your application widget tree.'
|
||||
)
|
||||
'WidgetsApp widget at the top of your application widget tree.',
|
||||
),
|
||||
]);
|
||||
}
|
||||
return true;
|
||||
|
@ -144,8 +143,8 @@ bool debugCheckHasScaffoldMessenger(BuildContext context) {
|
|||
...context.describeMissingAncestor(expectedAncestorType: ScaffoldMessenger),
|
||||
ErrorHint(
|
||||
'Typically, the ScaffoldMessenger widget is introduced by the MaterialApp '
|
||||
'at the top of your application widget tree.'
|
||||
)
|
||||
'at the top of your application widget tree.',
|
||||
),
|
||||
]);
|
||||
}
|
||||
return true;
|
||||
|
|
|
@ -883,7 +883,7 @@ class SimpleDialog extends StatelessWidget {
|
|||
child: Semantics(
|
||||
namesRoute: label == null,
|
||||
container: true,
|
||||
child: title
|
||||
child: title,
|
||||
),
|
||||
),
|
||||
);
|
||||
|
|
|
@ -138,7 +138,10 @@ class _DropdownMenuItemButtonState<T> extends State<_DropdownMenuItemButton<T>>
|
|||
|
||||
if (focused && inTraditionalMode) {
|
||||
final _MenuLimits menuLimits = widget.route.getMenuLimits(
|
||||
widget.buttonRect, widget.constraints.maxHeight, widget.itemIndex);
|
||||
widget.buttonRect,
|
||||
widget.constraints.maxHeight,
|
||||
widget.itemIndex,
|
||||
);
|
||||
widget.route.scrollController!.animateTo(
|
||||
menuLimits.scrollOffset,
|
||||
curve: Curves.easeInOut,
|
||||
|
@ -459,7 +462,7 @@ class _DropdownRoute<T> extends PopupRoute<_DropdownRouteResult<T>> {
|
|||
style: style,
|
||||
dropdownColor: dropdownColor,
|
||||
);
|
||||
}
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -1243,7 +1246,7 @@ class _DropdownButtonState<T> extends State<DropdownButton<T>> with WidgetsBindi
|
|||
|
||||
_dropdownRoute!.itemHeights[index] = size.height;
|
||||
},
|
||||
)
|
||||
),
|
||||
];
|
||||
|
||||
final NavigatorState navigator = Navigator.of(context);
|
||||
|
@ -1503,7 +1506,7 @@ class DropdownButtonFormField<T> extends FormField<T> {
|
|||
@Deprecated(
|
||||
'Use autovalidateMode parameter which provide more specific '
|
||||
'behaviour related to auto validation. '
|
||||
'This feature was deprecated after v1.19.0.'
|
||||
'This feature was deprecated after v1.19.0.',
|
||||
)
|
||||
bool autovalidate = false,
|
||||
AutovalidateMode? autovalidateMode,
|
||||
|
|
|
@ -451,7 +451,7 @@ class _ElevatedButtonWithIcon extends ElevatedButton {
|
|||
MediaQuery.maybeOf(context)?.textScaleFactor ?? 1,
|
||||
);
|
||||
return super.defaultStyleOf(context).copyWith(
|
||||
padding: MaterialStateProperty.all<EdgeInsetsGeometry>(scaledPadding)
|
||||
padding: MaterialStateProperty.all<EdgeInsetsGeometry>(scaledPadding),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@ import 'theme.dart';
|
|||
|
||||
const double _kPanelHeaderCollapsedHeight = kMinInteractiveDimension;
|
||||
const EdgeInsets _kPanelHeaderExpandedDefaultPadding = EdgeInsets.symmetric(
|
||||
vertical: 64.0 - _kPanelHeaderCollapsedHeight
|
||||
vertical: 64.0 - _kPanelHeaderCollapsedHeight,
|
||||
);
|
||||
|
||||
class _SaltedKey<S, V> extends LocalKey {
|
||||
|
|
|
@ -317,7 +317,7 @@ class _ExpansionTileState extends State<ExpansionTile> with SingleTickerProvider
|
|||
),
|
||||
enabled: !closed,
|
||||
),
|
||||
offstage: closed
|
||||
offstage: closed,
|
||||
);
|
||||
|
||||
return AnimatedBuilder(
|
||||
|
|
|
@ -25,7 +25,7 @@ import 'theme_data.dart';
|
|||
/// [flutter.dev/go/material-button-migration-guide](https://flutter.dev/go/material-button-migration-guide).
|
||||
@Deprecated(
|
||||
'Use TextButton instead. See the migration guide in flutter.dev/go/material-button-migration-guide). '
|
||||
'This feature was deprecated after v1.26.0-18.0.pre.'
|
||||
'This feature was deprecated after v1.26.0-18.0.pre.',
|
||||
)
|
||||
class FlatButton extends MaterialButton {
|
||||
/// Create a simple text button.
|
||||
|
@ -33,7 +33,7 @@ class FlatButton extends MaterialButton {
|
|||
/// The [autofocus] and [clipBehavior] arguments must not be null.
|
||||
@Deprecated(
|
||||
'Use TextButton instead. See the migration guide in flutter.dev/go/material-button-migration-guide). '
|
||||
'This feature was deprecated after v1.26.0-18.0.pre.'
|
||||
'This feature was deprecated after v1.26.0-18.0.pre.',
|
||||
)
|
||||
const FlatButton({
|
||||
Key? key,
|
||||
|
@ -100,7 +100,7 @@ class FlatButton extends MaterialButton {
|
|||
/// The [icon], [label], and [clipBehavior] arguments must not be null.
|
||||
@Deprecated(
|
||||
'Use TextButton instead. See the migration guide in flutter.dev/go/material-button-migration-guide). '
|
||||
'This feature was deprecated after v1.26.0-18.0.pre.'
|
||||
'This feature was deprecated after v1.26.0-18.0.pre.',
|
||||
)
|
||||
factory FlatButton.icon({
|
||||
Key? key,
|
||||
|
|
|
@ -336,8 +336,8 @@ class _FlexibleSpaceBarState extends State<FlexibleSpaceBar> {
|
|||
filter: ui.ImageFilter.blur(
|
||||
sigmaX: blurAmount,
|
||||
sigmaY: blurAmount,
|
||||
)
|
||||
)
|
||||
),
|
||||
),
|
||||
));
|
||||
}
|
||||
}
|
||||
|
@ -378,7 +378,7 @@ class _FlexibleSpaceBarState extends State<FlexibleSpaceBar> {
|
|||
if (opacity > 0.0) {
|
||||
TextStyle titleStyle = theme.primaryTextTheme.headline6!;
|
||||
titleStyle = titleStyle.copyWith(
|
||||
color: titleStyle.color!.withOpacity(opacity)
|
||||
color: titleStyle.color!.withOpacity(opacity),
|
||||
);
|
||||
final bool effectiveCenterTitle = _getEffectiveCenterTitle(theme);
|
||||
final EdgeInsetsGeometry padding = widget.titlePadding ??
|
||||
|
@ -406,7 +406,7 @@ class _FlexibleSpaceBarState extends State<FlexibleSpaceBar> {
|
|||
alignment: titleAlignment,
|
||||
child: title,
|
||||
);
|
||||
}
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -416,7 +416,7 @@ class _FlexibleSpaceBarState extends State<FlexibleSpaceBar> {
|
|||
}
|
||||
|
||||
return ClipRect(child: Stack(children: children));
|
||||
}
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1760,7 +1760,7 @@ class _AffixText extends StatelessWidget {
|
|||
duration: _kTransitionDuration,
|
||||
curve: _kTransitionCurve,
|
||||
opacity: labelIsFloating ? 1.0 : 0.0,
|
||||
child: child ?? (text == null ? null : Text(text!, style: style,)),
|
||||
child: child ?? (text == null ? null : Text(text!, style: style)),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
@ -1945,7 +1945,7 @@ class _InputDecoratorState extends State<InputDecorator> with TickerProviderStat
|
|||
_floatingLabelController = AnimationController(
|
||||
duration: _kTransitionDuration,
|
||||
vsync: this,
|
||||
value: labelIsInitiallyFloating ? 1.0 : 0.0
|
||||
value: labelIsInitiallyFloating ? 1.0 : 0.0,
|
||||
);
|
||||
_floatingLabelController.addListener(_handleChange);
|
||||
|
||||
|
@ -2520,7 +2520,7 @@ class InputDecoration {
|
|||
this.errorMaxLines,
|
||||
@Deprecated(
|
||||
'Use floatingLabelBehavior instead. '
|
||||
'This feature was deprecated after v1.13.2.'
|
||||
'This feature was deprecated after v1.13.2.',
|
||||
)
|
||||
this.hasFloatingPlaceholder = true,
|
||||
this.floatingLabelBehavior,
|
||||
|
@ -2566,7 +2566,7 @@ class InputDecoration {
|
|||
required this.hintText,
|
||||
@Deprecated(
|
||||
'Use floatingLabelBehavior instead. '
|
||||
'This feature was deprecated after v1.13.2.'
|
||||
'This feature was deprecated after v1.13.2.',
|
||||
)
|
||||
this.hasFloatingPlaceholder = true,
|
||||
this.floatingLabelBehavior,
|
||||
|
@ -2748,7 +2748,7 @@ class InputDecoration {
|
|||
///
|
||||
@Deprecated(
|
||||
'Use floatingLabelBehavior instead. '
|
||||
'This feature was deprecated after v1.13.2.'
|
||||
'This feature was deprecated after v1.13.2.',
|
||||
)
|
||||
final bool hasFloatingPlaceholder;
|
||||
|
||||
|
@ -3618,7 +3618,7 @@ class InputDecorationTheme with Diagnosticable {
|
|||
this.errorMaxLines,
|
||||
@Deprecated(
|
||||
'Use floatingLabelBehavior instead. '
|
||||
'This feature was deprecated after v1.13.2.'
|
||||
'This feature was deprecated after v1.13.2.',
|
||||
)
|
||||
this.hasFloatingPlaceholder = true,
|
||||
this.floatingLabelBehavior = FloatingLabelBehavior.auto,
|
||||
|
@ -3712,7 +3712,7 @@ class InputDecorationTheme with Diagnosticable {
|
|||
/// Defaults to true.
|
||||
@Deprecated(
|
||||
'Use floatingLabelBehavior instead. '
|
||||
'This feature was deprecated after v1.13.2.'
|
||||
'This feature was deprecated after v1.13.2.',
|
||||
)
|
||||
final bool hasFloatingPlaceholder;
|
||||
|
||||
|
@ -3969,7 +3969,7 @@ class InputDecorationTheme with Diagnosticable {
|
|||
int? errorMaxLines,
|
||||
@Deprecated(
|
||||
'Use floatingLabelBehavior instead. '
|
||||
'This feature was deprecated after v1.13.2.'
|
||||
'This feature was deprecated after v1.13.2.',
|
||||
)
|
||||
bool? hasFloatingPlaceholder,
|
||||
FloatingLabelBehavior? floatingLabelBehavior,
|
||||
|
|
|
@ -1687,7 +1687,7 @@ class _RenderListTile extends RenderBox {
|
|||
@override
|
||||
Size computeDryLayout(BoxConstraints constraints) {
|
||||
assert(debugCannotComputeDryLayout(
|
||||
reason: 'Layout requires baseline metrics, which are only available after a full layout.'
|
||||
reason: 'Layout requires baseline metrics, which are only available after a full layout.',
|
||||
));
|
||||
return Size.zero;
|
||||
}
|
||||
|
|
|
@ -295,10 +295,10 @@ class _MergeableMaterialState extends State<MergeableMaterial> with TickerProvid
|
|||
super.didUpdateWidget(oldWidget);
|
||||
|
||||
final Set<LocalKey> oldKeys = oldWidget.children.map<LocalKey>(
|
||||
(MergeableMaterialItem child) => child.key
|
||||
(MergeableMaterialItem child) => child.key,
|
||||
).toSet();
|
||||
final Set<LocalKey> newKeys = widget.children.map<LocalKey>(
|
||||
(MergeableMaterialItem child) => child.key
|
||||
(MergeableMaterialItem child) => child.key,
|
||||
).toSet();
|
||||
final Set<LocalKey> newOnly = newKeys.difference(oldKeys);
|
||||
final Set<LocalKey> oldOnly = oldKeys.difference(newKeys);
|
||||
|
@ -570,11 +570,11 @@ class _MergeableMaterialState extends State<MergeableMaterial> with TickerProvid
|
|||
final Border border;
|
||||
if (i == 0) {
|
||||
border = Border(
|
||||
bottom: hasBottomDivider ? divider : BorderSide.none
|
||||
bottom: hasBottomDivider ? divider : BorderSide.none,
|
||||
);
|
||||
} else if (i == _children.length - 1) {
|
||||
border = Border(
|
||||
top: hasTopDivider ? divider : BorderSide.none
|
||||
top: hasTopDivider ? divider : BorderSide.none,
|
||||
);
|
||||
} else {
|
||||
border = Border(
|
||||
|
|
|
@ -652,7 +652,7 @@ class _RailDestination extends StatelessWidget {
|
|||
child: label,
|
||||
),
|
||||
),
|
||||
]
|
||||
],
|
||||
),
|
||||
);
|
||||
} else {
|
||||
|
@ -758,7 +758,7 @@ class _RailDestination extends StatelessWidget {
|
|||
Semantics(
|
||||
label: indexLabel,
|
||||
),
|
||||
]
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@ class _NoSplashFactory extends InteractiveInkFeatureFactory {
|
|||
return NoSplash(
|
||||
controller: controller,
|
||||
referenceBox: referenceBox,
|
||||
color: color
|
||||
color: color,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -36,7 +36,7 @@ const Duration _kElevationDuration = Duration(milliseconds: 75);
|
|||
/// [flutter.dev/go/material-button-migration-guide](https://flutter.dev/go/material-button-migration-guide).
|
||||
@Deprecated(
|
||||
'Use OutlinedButton instead. See the migration guide in flutter.dev/go/material-button-migration-guide). '
|
||||
'This feature was deprecated after v1.26.0-18.0.pre.'
|
||||
'This feature was deprecated after v1.26.0-18.0.pre.',
|
||||
)
|
||||
class OutlineButton extends MaterialButton {
|
||||
/// Create an outline button.
|
||||
|
@ -45,7 +45,7 @@ class OutlineButton extends MaterialButton {
|
|||
/// and the [autofocus] and [clipBehavior] arguments must not be null.
|
||||
@Deprecated(
|
||||
'Use OutlinedButton instead. See the migration guide in flutter.dev/go/material-button-migration-guide). '
|
||||
'This feature was deprecated after v1.26.0-18.0.pre.'
|
||||
'This feature was deprecated after v1.26.0-18.0.pre.',
|
||||
)
|
||||
const OutlineButton({
|
||||
Key? key,
|
||||
|
@ -109,7 +109,7 @@ class OutlineButton extends MaterialButton {
|
|||
/// [icon], [label], [autofocus], and [clipBehavior] arguments must not be null.
|
||||
@Deprecated(
|
||||
'Use OutlinedButton instead. See the migration guide in flutter.dev/go/material-button-migration-guide). '
|
||||
'This feature was deprecated after v1.26.0-18.0.pre.'
|
||||
'This feature was deprecated after v1.26.0-18.0.pre.',
|
||||
)
|
||||
factory OutlineButton.icon({
|
||||
Key? key,
|
||||
|
@ -581,7 +581,7 @@ class _OutlineBorder extends ShapeBorder implements MaterialStateProperty<ShapeB
|
|||
ShapeBorder resolve(Set<MaterialState> states) {
|
||||
return _OutlineBorder(
|
||||
shape: shape,
|
||||
side: side.copyWith(color: MaterialStateProperty.resolveAs<Color>(side.color, states),
|
||||
));
|
||||
side: side.copyWith(color: MaterialStateProperty.resolveAs<Color>(side.color, states)),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -108,7 +108,7 @@ mixin MaterialRouteTransitionMixin<T> on PageRoute<T> {
|
|||
if (result == null) {
|
||||
throw FlutterError(
|
||||
'The builder for route "${settings.name}" returned null.\n'
|
||||
'Route builders must never return null.'
|
||||
'Route builders must never return null.',
|
||||
);
|
||||
}
|
||||
return true;
|
||||
|
|
|
@ -393,7 +393,7 @@ class PaginatedDataTableState extends State<PaginatedDataTable> {
|
|||
padding: const EdgeInsetsDirectional.only(start: 24.0 - 8.0 * 2.0),
|
||||
child: action,
|
||||
);
|
||||
}).toList()
|
||||
}).toList(),
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -492,7 +492,7 @@ class PaginatedDataTableState extends State<PaginatedDataTable> {
|
|||
: themeData.textTheme.headline6!.copyWith(fontWeight: FontWeight.w400),
|
||||
child: IconTheme.merge(
|
||||
data: const IconThemeData(
|
||||
opacity: 0.54
|
||||
opacity: 0.54,
|
||||
),
|
||||
child: Ink(
|
||||
height: 64.0,
|
||||
|
@ -537,7 +537,7 @@ class PaginatedDataTableState extends State<PaginatedDataTable> {
|
|||
style: footerTextStyle!,
|
||||
child: IconTheme.merge(
|
||||
data: const IconThemeData(
|
||||
opacity: 0.54
|
||||
opacity: 0.54,
|
||||
),
|
||||
child: SizedBox(
|
||||
// TODO(bkonyi): this won't handle text zoom correctly,
|
||||
|
|
|
@ -366,7 +366,7 @@ class PopupMenuItemState<T, W extends PopupMenuItem<T>> extends State<W> {
|
|||
mouseCursor: effectiveMouseCursor,
|
||||
child: item,
|
||||
),
|
||||
)
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -579,7 +579,7 @@ class _PopupMenu<T> extends StatelessWidget {
|
|||
label: semanticLabel,
|
||||
child: SingleChildScrollView(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
vertical: _kMenuVerticalPadding
|
||||
vertical: _kMenuVerticalPadding,
|
||||
),
|
||||
child: ListBody(children: children),
|
||||
),
|
||||
|
|
|
@ -505,7 +505,7 @@ class _RadioState<T> extends State<Radio<T>> with TickerProviderStateMixin, Togg
|
|||
..isFocused = states.contains(MaterialState.focused)
|
||||
..isHovered = states.contains(MaterialState.hovered)
|
||||
..activeColor = effectiveActiveColor
|
||||
..inactiveColor = effectiveInactiveColor
|
||||
..inactiveColor = effectiveInactiveColor,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@ import 'theme_data.dart';
|
|||
/// [flutter.dev/go/material-button-migration-guide](https://flutter.dev/go/material-button-migration-guide).
|
||||
@Deprecated(
|
||||
'Use ElevatedButton instead. See the migration guide in flutter.dev/go/material-button-migration-guide). '
|
||||
'This feature was deprecated after v1.26.0-18.0.pre.'
|
||||
'This feature was deprecated after v1.26.0-18.0.pre.',
|
||||
)
|
||||
class RaisedButton extends MaterialButton {
|
||||
/// Create a filled button.
|
||||
|
@ -37,7 +37,7 @@ class RaisedButton extends MaterialButton {
|
|||
/// specified.
|
||||
@Deprecated(
|
||||
'Use ElevatedButton instead. See the migration guide in flutter.dev/go/material-button-migration-guide). '
|
||||
'This feature was deprecated after v1.26.0-18.0.pre.'
|
||||
'This feature was deprecated after v1.26.0-18.0.pre.',
|
||||
)
|
||||
const RaisedButton({
|
||||
Key? key,
|
||||
|
@ -118,7 +118,7 @@ class RaisedButton extends MaterialButton {
|
|||
/// [label], and [clipBehavior] arguments must not be null.
|
||||
@Deprecated(
|
||||
'Use ElevatedButton instead. See the migration guide in flutter.dev/go/material-button-migration-guide). '
|
||||
'This feature was deprecated after v1.26.0-18.0.pre.'
|
||||
'This feature was deprecated after v1.26.0-18.0.pre.',
|
||||
)
|
||||
factory RaisedButton.icon({
|
||||
Key? key,
|
||||
|
|
|
@ -253,7 +253,7 @@ class RefreshIndicatorState extends State<RefreshIndicator> with TickerProviderS
|
|||
begin: (widget.color ?? theme.colorScheme.primary).withOpacity(0.0),
|
||||
end: (widget.color ?? theme.colorScheme.primary).withOpacity(1.0),
|
||||
).chain(CurveTween(
|
||||
curve: const Interval(0.0, 1.0 / _kDragSizeFactorLimit)
|
||||
curve: const Interval(0.0, 1.0 / _kDragSizeFactorLimit),
|
||||
)),
|
||||
);
|
||||
super.didChangeDependencies();
|
||||
|
@ -269,7 +269,7 @@ class RefreshIndicatorState extends State<RefreshIndicator> with TickerProviderS
|
|||
begin: (widget.color ?? theme.colorScheme.primary).withOpacity(0.0),
|
||||
end: (widget.color ?? theme.colorScheme.primary).withOpacity(1.0),
|
||||
).chain(CurveTween(
|
||||
curve: const Interval(0.0, 1.0 / _kDragSizeFactorLimit)
|
||||
curve: const Interval(0.0, 1.0 / _kDragSizeFactorLimit),
|
||||
)),
|
||||
);
|
||||
}
|
||||
|
@ -448,7 +448,7 @@ class RefreshIndicatorState extends State<RefreshIndicator> with TickerProviderS
|
|||
FlutterError.reportError(FlutterErrorDetails(
|
||||
exception: FlutterError(
|
||||
'The onRefresh callback returned null.\n'
|
||||
'The RefreshIndicator onRefresh callback must return a Future.'
|
||||
'The RefreshIndicator onRefresh callback must return a Future.',
|
||||
),
|
||||
context: ErrorDescription('when calling onRefresh'),
|
||||
library: 'material library',
|
||||
|
|
|
@ -352,7 +352,7 @@ class _ReorderableListViewState extends State<ReorderableListView> {
|
|||
assert(() {
|
||||
if (item.key == null) {
|
||||
throw FlutterError(
|
||||
'Every item of ReorderableListView must have a key.'
|
||||
'Every item of ReorderableListView must have a key.',
|
||||
);
|
||||
}
|
||||
return true;
|
||||
|
|
|
@ -716,7 +716,7 @@ class _ScaffoldGeometryNotifier extends ChangeNotifier implements ValueListenabl
|
|||
throw FlutterError(
|
||||
'Scaffold.geometryOf() must only be accessed during the paint phase.\n'
|
||||
'The ScaffoldGeometry is only available during the paint phase, because '
|
||||
'its value is computed during the animation and layout phases prior to painting.'
|
||||
'its value is computed during the animation and layout phases prior to painting.',
|
||||
);
|
||||
return true;
|
||||
}());
|
||||
|
@ -1367,7 +1367,7 @@ class _FloatingActionButtonTransitionState extends State<_FloatingActionButtonTr
|
|||
/// ),
|
||||
/// bottomNavigationBar: BottomAppBar(
|
||||
/// shape: const CircularNotchedRectangle(),
|
||||
/// child: Container(height: 50.0,),
|
||||
/// child: Container(height: 50.0),
|
||||
/// ),
|
||||
/// floatingActionButton: FloatingActionButton(
|
||||
/// onPressed: () => setState(() {
|
||||
|
@ -1965,18 +1965,18 @@ class Scaffold extends StatefulWidget {
|
|||
return result;
|
||||
throw FlutterError.fromParts(<DiagnosticsNode>[
|
||||
ErrorSummary(
|
||||
'Scaffold.of() called with a context that does not contain a Scaffold.'
|
||||
'Scaffold.of() called with a context that does not contain a Scaffold.',
|
||||
),
|
||||
ErrorDescription(
|
||||
'No Scaffold ancestor could be found starting from the context that was passed to Scaffold.of(). '
|
||||
'This usually happens when the context provided is from the same StatefulWidget as that '
|
||||
'whose build function actually creates the Scaffold widget being sought.'
|
||||
'whose build function actually creates the Scaffold widget being sought.',
|
||||
),
|
||||
ErrorHint(
|
||||
'There are several ways to avoid this problem. The simplest is to use a Builder to get a '
|
||||
'context that is "under" the Scaffold. For an example of this, please see the '
|
||||
'documentation for Scaffold.of():\n'
|
||||
' https://api.flutter.dev/flutter/material/Scaffold/of.html'
|
||||
' https://api.flutter.dev/flutter/material/Scaffold/of.html',
|
||||
),
|
||||
ErrorHint(
|
||||
'A more efficient solution is to split your build function into several widgets. This '
|
||||
|
@ -1985,9 +1985,9 @@ class Scaffold extends StatefulWidget {
|
|||
'your new inner widgets, and then in these inner widgets you would use Scaffold.of().\n'
|
||||
'A less elegant but more expedient solution is assign a GlobalKey to the Scaffold, '
|
||||
'then use the key.currentState property to obtain the ScaffoldState rather than '
|
||||
'using the Scaffold.of() function.'
|
||||
'using the Scaffold.of() function.',
|
||||
),
|
||||
context.describeElement('The context used was')
|
||||
context.describeElement('The context used was'),
|
||||
]);
|
||||
}
|
||||
|
||||
|
@ -2032,17 +2032,17 @@ class Scaffold extends StatefulWidget {
|
|||
if (scaffoldScope == null)
|
||||
throw FlutterError.fromParts(<DiagnosticsNode>[
|
||||
ErrorSummary(
|
||||
'Scaffold.geometryOf() called with a context that does not contain a Scaffold.'
|
||||
'Scaffold.geometryOf() called with a context that does not contain a Scaffold.',
|
||||
),
|
||||
ErrorDescription(
|
||||
'This usually happens when the context provided is from the same StatefulWidget as that '
|
||||
'whose build function actually creates the Scaffold widget being sought.'
|
||||
'whose build function actually creates the Scaffold widget being sought.',
|
||||
),
|
||||
ErrorHint(
|
||||
'There are several ways to avoid this problem. The simplest is to use a Builder to get a '
|
||||
'context that is "under" the Scaffold. For an example of this, please see the '
|
||||
'documentation for Scaffold.of():\n'
|
||||
' https://api.flutter.dev/flutter/material/Scaffold/of.html'
|
||||
' https://api.flutter.dev/flutter/material/Scaffold/of.html',
|
||||
),
|
||||
ErrorHint(
|
||||
'A more efficient solution is to split your build function into several widgets. This '
|
||||
|
@ -2050,7 +2050,7 @@ class Scaffold extends StatefulWidget {
|
|||
'you would have an outer widget that creates the Scaffold populated by instances of '
|
||||
'your new inner widgets, and then in these inner widgets you would use Scaffold.geometryOf().',
|
||||
),
|
||||
context.describeElement('The context used was')
|
||||
context.describeElement('The context used was'),
|
||||
]);
|
||||
return scaffoldScope.geometryNotifier;
|
||||
}
|
||||
|
@ -2238,7 +2238,7 @@ class ScaffoldState extends State<Scaffold> with TickerProviderStateMixin, Resto
|
|||
/// * [ScaffoldMessenger], this should be used instead to manage [SnackBar]s.
|
||||
@Deprecated(
|
||||
'Use ScaffoldMessenger.showSnackBar. '
|
||||
'This feature was deprecated after v1.23.0-14.0.pre.'
|
||||
'This feature was deprecated after v1.23.0-14.0.pre.',
|
||||
)
|
||||
ScaffoldFeatureController<SnackBar, SnackBarClosedReason> showSnackBar(SnackBar snackbar) {
|
||||
_snackBarController ??= SnackBar.createAnimationController(vsync: this)
|
||||
|
@ -2300,7 +2300,7 @@ class ScaffoldState extends State<Scaffold> with TickerProviderStateMixin, Resto
|
|||
/// * [ScaffoldMessenger], this should be used instead to manage [SnackBar]s.
|
||||
@Deprecated(
|
||||
'Use ScaffoldMessenger.removeCurrentSnackBar. '
|
||||
'This feature was deprecated after v1.23.0-14.0.pre.'
|
||||
'This feature was deprecated after v1.23.0-14.0.pre.',
|
||||
)
|
||||
void removeCurrentSnackBar({ SnackBarClosedReason reason = SnackBarClosedReason.remove }) {
|
||||
assert(reason != null);
|
||||
|
@ -2345,7 +2345,7 @@ class ScaffoldState extends State<Scaffold> with TickerProviderStateMixin, Resto
|
|||
/// * [ScaffoldMessenger], this should be used instead to manage [SnackBar]s.
|
||||
@Deprecated(
|
||||
'Use ScaffoldMessenger.hideCurrentSnackBar. '
|
||||
'This feature was deprecated after v1.23.0-14.0.pre.'
|
||||
'This feature was deprecated after v1.23.0-14.0.pre.',
|
||||
)
|
||||
void hideCurrentSnackBar({ SnackBarClosedReason reason = SnackBarClosedReason.hide }) {
|
||||
assert(reason != null);
|
||||
|
@ -2485,7 +2485,7 @@ class ScaffoldState extends State<Scaffold> with TickerProviderStateMixin, Resto
|
|||
throw FlutterError(
|
||||
'Scaffold.bottomSheet cannot be specified while a bottom sheet '
|
||||
'displayed with showBottomSheet() is still visible.\n'
|
||||
'Rebuild the Scaffold with a null bottomSheet before calling showBottomSheet().'
|
||||
'Rebuild the Scaffold with a null bottomSheet before calling showBottomSheet().',
|
||||
);
|
||||
}
|
||||
return true;
|
||||
|
@ -2658,7 +2658,7 @@ class ScaffoldState extends State<Scaffold> with TickerProviderStateMixin, Resto
|
|||
throw FlutterError(
|
||||
'Scaffold.bottomSheet cannot be specified while a bottom sheet '
|
||||
'displayed with showBottomSheet() is still visible.\n'
|
||||
'Rebuild the Scaffold with a null bottomSheet before calling showBottomSheet().'
|
||||
'Rebuild the Scaffold with a null bottomSheet before calling showBottomSheet().',
|
||||
);
|
||||
}
|
||||
return true;
|
||||
|
@ -2789,12 +2789,12 @@ class ScaffoldState extends State<Scaffold> with TickerProviderStateMixin, Resto
|
|||
throw FlutterError.fromParts(<DiagnosticsNode>[
|
||||
ErrorSummary(
|
||||
'Scaffold.bottomSheet cannot be specified while a bottom sheet displayed '
|
||||
'with showBottomSheet() is still visible.'
|
||||
'with showBottomSheet() is still visible.',
|
||||
),
|
||||
ErrorHint(
|
||||
'Use the PersistentBottomSheetController '
|
||||
'returned by showBottomSheet() to close the old bottom sheet before creating '
|
||||
'a Scaffold with a (non null) bottomSheet.'
|
||||
'a Scaffold with a (non null) bottomSheet.',
|
||||
),
|
||||
]);
|
||||
}
|
||||
|
@ -2885,7 +2885,7 @@ class ScaffoldState extends State<Scaffold> with TickerProviderStateMixin, Resto
|
|||
|
||||
if (maintainBottomViewPadding && data.viewInsets.bottom != 0.0) {
|
||||
data = data.copyWith(
|
||||
padding: data.padding.copyWith(bottom: data.viewPadding.bottom)
|
||||
padding: data.padding.copyWith(bottom: data.viewPadding.bottom),
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -583,7 +583,7 @@ class _SearchPageState<T> extends State<_SearchPage<T>> {
|
|||
duration: const Duration(milliseconds: 300),
|
||||
child: body,
|
||||
),
|
||||
)
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
|
|
@ -453,7 +453,7 @@ class _SelectableTextState extends State<SelectableText> with AutomaticKeepAlive
|
|||
super.initState();
|
||||
_selectionGestureDetectorBuilder = _SelectableTextSelectionGestureDetectorBuilder(state: this);
|
||||
_controller = _TextSpanEditingController(
|
||||
textSpan: widget.textSpan ?? TextSpan(text: widget.data)
|
||||
textSpan: widget.textSpan ?? TextSpan(text: widget.data),
|
||||
);
|
||||
_controller.addListener(_onControllerChanged);
|
||||
}
|
||||
|
@ -464,7 +464,7 @@ class _SelectableTextState extends State<SelectableText> with AutomaticKeepAlive
|
|||
if (widget.data != oldWidget.data || widget.textSpan != oldWidget.textSpan) {
|
||||
_controller.removeListener(_onControllerChanged);
|
||||
_controller = _TextSpanEditingController(
|
||||
textSpan: widget.textSpan ?? TextSpan(text: widget.data)
|
||||
textSpan: widget.textSpan ?? TextSpan(text: widget.data),
|
||||
);
|
||||
_controller.addListener(_onControllerChanged);
|
||||
}
|
||||
|
|
|
@ -1509,7 +1509,7 @@ class _RenderSlider extends RenderBox with RelayoutWhenSystemFontsChangeMixin {
|
|||
|
||||
class _AdjustSliderIntent extends Intent {
|
||||
const _AdjustSliderIntent({
|
||||
required this.type
|
||||
required this.type,
|
||||
});
|
||||
|
||||
const _AdjustSliderIntent.right() : type = _SliderAdjustmentType.right;
|
||||
|
|
|
@ -1493,9 +1493,9 @@ class RectangularSliderTrackShape extends SliderTrackShape with BaseSliderTrackS
|
|||
const RectangularSliderTrackShape({
|
||||
@Deprecated(
|
||||
'It no longer has any effect because the thumb does not shrink when the slider is disabled now. '
|
||||
'This feature was deprecated after v1.26.0-18.0.pre.'
|
||||
'This feature was deprecated after v1.26.0-18.0.pre.',
|
||||
)
|
||||
this.disabledThumbGapWidth = 2.0
|
||||
this.disabledThumbGapWidth = 2.0,
|
||||
});
|
||||
|
||||
/// Horizontal spacing, or gap, between the disabled thumb and the track.
|
||||
|
@ -1506,7 +1506,7 @@ class RectangularSliderTrackShape extends SliderTrackShape with BaseSliderTrackS
|
|||
/// thumb radius.
|
||||
@Deprecated(
|
||||
'It no longer has any effect because the thumb does not shrink when the slider is disabled now. '
|
||||
'This feature was deprecated after v1.26.0-18.0.pre.'
|
||||
'This feature was deprecated after v1.26.0-18.0.pre.',
|
||||
)
|
||||
final double disabledThumbGapWidth;
|
||||
|
||||
|
@ -1920,10 +1920,12 @@ class RoundedRectRangeSliderTrackShape extends RangeSliderTrackShape {
|
|||
// but reversed for right to left text.
|
||||
final ColorTween activeTrackColorTween = ColorTween(
|
||||
begin: sliderTheme.disabledActiveTrackColor,
|
||||
end: sliderTheme.activeTrackColor);
|
||||
end: sliderTheme.activeTrackColor,
|
||||
);
|
||||
final ColorTween inactiveTrackColorTween = ColorTween(
|
||||
begin: sliderTheme.disabledInactiveTrackColor,
|
||||
end: sliderTheme.inactiveTrackColor);
|
||||
end: sliderTheme.inactiveTrackColor,
|
||||
);
|
||||
final Paint activePaint = Paint()
|
||||
..color = activeTrackColorTween.evaluate(enableAnimation)!;
|
||||
final Paint inactivePaint = Paint()
|
||||
|
@ -2582,7 +2584,8 @@ class RectangularSliderValueIndicatorShape extends SliderComponentShape {
|
|||
labelPainter: labelPainter,
|
||||
textScaleFactor: textScaleFactor,
|
||||
sizeWithOverflow: sizeWithOverflow,
|
||||
backgroundPaintColor: sliderTheme.valueIndicatorColor!);
|
||||
backgroundPaintColor: sliderTheme.valueIndicatorColor!,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -505,11 +505,11 @@ class _StepperState extends State<Stepper> with TickerProviderStateMixin {
|
|||
return textTheme.bodyText1!;
|
||||
case StepState.disabled:
|
||||
return textTheme.bodyText1!.copyWith(
|
||||
color: _isDark() ? _kDisabledDark : _kDisabledLight
|
||||
color: _isDark() ? _kDisabledDark : _kDisabledLight,
|
||||
);
|
||||
case StepState.error:
|
||||
return textTheme.bodyText1!.copyWith(
|
||||
color: _isDark() ? _kErrorDark : _kErrorLight
|
||||
color: _isDark() ? _kErrorDark : _kErrorLight,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -526,11 +526,11 @@ class _StepperState extends State<Stepper> with TickerProviderStateMixin {
|
|||
return textTheme.caption!;
|
||||
case StepState.disabled:
|
||||
return textTheme.caption!.copyWith(
|
||||
color: _isDark() ? _kDisabledDark : _kDisabledLight
|
||||
color: _isDark() ? _kDisabledDark : _kDisabledLight,
|
||||
);
|
||||
case StepState.error:
|
||||
return textTheme.caption!.copyWith(
|
||||
color: _isDark() ? _kErrorDark : _kErrorLight
|
||||
color: _isDark() ? _kErrorDark : _kErrorLight,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -578,7 +578,7 @@ class _StepperState extends State<Stepper> with TickerProviderStateMixin {
|
|||
child: Container(
|
||||
margin: const EdgeInsetsDirectional.only(start: 12.0),
|
||||
child: _buildHeaderText(index),
|
||||
)
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
@ -734,7 +734,7 @@ class _StepperState extends State<Stepper> with TickerProviderStateMixin {
|
|||
'Steppers must not be nested.\n'
|
||||
'The material specification advises that one should avoid embedding '
|
||||
'steppers within steppers. '
|
||||
'https://material.io/archive/guidelines/components/steppers.html#steppers-usage'
|
||||
'https://material.io/archive/guidelines/components/steppers.html#steppers-usage',
|
||||
);
|
||||
return true;
|
||||
}());
|
||||
|
|
|
@ -385,7 +385,7 @@ class Switch extends StatelessWidget {
|
|||
value: value,
|
||||
onChanged: onChanged,
|
||||
activeColor: activeColor,
|
||||
trackColor: inactiveTrackColor
|
||||
trackColor: inactiveTrackColor,
|
||||
),
|
||||
),
|
||||
);
|
||||
|
@ -741,7 +741,7 @@ class _MaterialSwitchState extends State<_MaterialSwitch> with TickerProviderSta
|
|||
..isInteractive = isInteractive
|
||||
..trackInnerLength = _trackInnerLength
|
||||
..textDirection = Directionality.of(context)
|
||||
..surfaceColor = theme.colorScheme.surface
|
||||
..surfaceColor = theme.colorScheme.surface,
|
||||
),
|
||||
),
|
||||
);
|
||||
|
|
|
@ -400,7 +400,7 @@ class _IndicatorPainter extends CustomPainter {
|
|||
if (!(rect.size >= insets.collapsedSize)) {
|
||||
throw FlutterError(
|
||||
'indicatorPadding insets should be less than Tab Size\n'
|
||||
'Rect Size : ${rect.size}, Insets: ${insets.toString()}'
|
||||
'Rect Size : ${rect.size}, Insets: ${insets.toString()}',
|
||||
);
|
||||
}
|
||||
return insets.deflateRect(rect);
|
||||
|
@ -968,7 +968,7 @@ class _TabBarState extends State<TabBar> {
|
|||
'When creating a ${widget.runtimeType}, you must either provide an explicit '
|
||||
'TabController using the "controller" property, or you must ensure that there '
|
||||
'is a DefaultTabController above the ${widget.runtimeType}.\n'
|
||||
'In this case, there was neither an explicit controller nor a default controller.'
|
||||
'In this case, there was neither an explicit controller nor a default controller.',
|
||||
);
|
||||
}
|
||||
return true;
|
||||
|
@ -1145,7 +1145,7 @@ class _TabBarState extends State<TabBar> {
|
|||
if (_controller!.length != widget.tabs.length) {
|
||||
throw FlutterError(
|
||||
"Controller's length property (${_controller!.length}) does not match the "
|
||||
"number of tabs (${widget.tabs.length}) present in TabBar's tabs property."
|
||||
"number of tabs (${widget.tabs.length}) present in TabBar's tabs property.",
|
||||
);
|
||||
}
|
||||
return true;
|
||||
|
@ -1170,7 +1170,7 @@ class _TabBarState extends State<TabBar> {
|
|||
child: widget.tabs[i],
|
||||
),
|
||||
),
|
||||
)
|
||||
),
|
||||
];
|
||||
|
||||
// If the controller was provided by DefaultTabController and we're part
|
||||
|
@ -1341,7 +1341,7 @@ class _TabBarViewState extends State<TabBarView> {
|
|||
'When creating a ${widget.runtimeType}, you must either provide an explicit '
|
||||
'TabController using the "controller" property, or you must ensure that there '
|
||||
'is a DefaultTabController above the ${widget.runtimeType}.\n'
|
||||
'In this case, there was neither an explicit controller nor a default controller.'
|
||||
'In this case, there was neither an explicit controller nor a default controller.',
|
||||
);
|
||||
}
|
||||
return true;
|
||||
|
@ -1479,7 +1479,7 @@ class _TabBarViewState extends State<TabBarView> {
|
|||
if (_controller!.length != widget.children.length) {
|
||||
throw FlutterError(
|
||||
"Controller's length property (${_controller!.length}) does not match the "
|
||||
"number of tabs (${widget.children.length}) present in TabBar's tabs property."
|
||||
"number of tabs (${widget.children.length}) present in TabBar's tabs property.",
|
||||
);
|
||||
}
|
||||
return true;
|
||||
|
@ -1629,7 +1629,7 @@ class TabPageSelector extends StatelessWidget {
|
|||
'When creating a $runtimeType, you must either provide an explicit TabController '
|
||||
'using the "controller" property, or you must ensure that there is a '
|
||||
'DefaultTabController above the $runtimeType.\n'
|
||||
'In this case, there was neither an explicit controller nor a default controller.'
|
||||
'In this case, there was neither an explicit controller nor a default controller.',
|
||||
);
|
||||
}
|
||||
return true;
|
||||
|
|
|
@ -444,7 +444,7 @@ class _TextButtonWithIcon extends TextButton {
|
|||
MediaQuery.maybeOf(context)?.textScaleFactor ?? 1,
|
||||
);
|
||||
return super.defaultStyleOf(context).copyWith(
|
||||
padding: MaterialStateProperty.all<EdgeInsetsGeometry>(scaledPadding)
|
||||
padding: MaterialStateProperty.all<EdgeInsetsGeometry>(scaledPadding),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -362,7 +362,7 @@ class TextField extends StatefulWidget {
|
|||
@Deprecated(
|
||||
'Use maxLengthEnforcement parameter which provides more specific '
|
||||
'behavior related to the maxLength limit. '
|
||||
'This feature was deprecated after v1.25.0-5.0.pre.'
|
||||
'This feature was deprecated after v1.25.0-5.0.pre.',
|
||||
)
|
||||
this.maxLengthEnforced = true,
|
||||
this.maxLengthEnforcement,
|
||||
|
@ -614,7 +614,7 @@ class TextField extends StatefulWidget {
|
|||
@Deprecated(
|
||||
'Use maxLengthEnforcement parameter which provides more specific '
|
||||
'behavior related to the maxLength limit. '
|
||||
'This feature was deprecated after v1.25.0-5.0.pre.'
|
||||
'This feature was deprecated after v1.25.0-5.0.pre.',
|
||||
)
|
||||
final bool maxLengthEnforced;
|
||||
|
||||
|
|
|
@ -160,13 +160,13 @@ class TextFormField extends FormField<String> {
|
|||
@Deprecated(
|
||||
'Use autovalidateMode parameter which provide more specific '
|
||||
'behaviour related to auto validation. '
|
||||
'This feature was deprecated after v1.19.0.'
|
||||
'This feature was deprecated after v1.19.0.',
|
||||
)
|
||||
bool autovalidate = false,
|
||||
@Deprecated(
|
||||
'Use maxLengthEnforcement parameter which provides more specific '
|
||||
'behavior related to the maxLength limit. '
|
||||
'This feature was deprecated after v1.25.0-5.0.pre.'
|
||||
'This feature was deprecated after v1.25.0-5.0.pre.',
|
||||
)
|
||||
bool maxLengthEnforced = true,
|
||||
MaxLengthEnforcement? maxLengthEnforcement,
|
||||
|
|
|
@ -210,7 +210,7 @@ class _TextSelectionControlsToolbarState extends State<_TextSelectionControlsToo
|
|||
: widget.endpoints[0];
|
||||
final Offset anchorAbove = Offset(
|
||||
widget.globalEditableRegion.left + widget.selectionMidpoint.dx,
|
||||
widget.globalEditableRegion.top + startTextSelectionPoint.point.dy - widget.textLineHeight - _kToolbarContentDistance
|
||||
widget.globalEditableRegion.top + startTextSelectionPoint.point.dy - widget.textLineHeight - _kToolbarContentDistance,
|
||||
);
|
||||
final Offset anchorBelow = Offset(
|
||||
widget.globalEditableRegion.left + widget.selectionMidpoint.dx,
|
||||
|
|
|
@ -126,52 +126,52 @@ class TextTheme with Diagnosticable {
|
|||
this.overline,
|
||||
@Deprecated(
|
||||
'This is the term used in the 2014 version of material design. The modern term is headline1. '
|
||||
'This feature was deprecated after v1.13.8.'
|
||||
'This feature was deprecated after v1.13.8.',
|
||||
)
|
||||
TextStyle? display4,
|
||||
@Deprecated(
|
||||
'This is the term used in the 2014 version of material design. The modern term is headline2. '
|
||||
'This feature was deprecated after v1.13.8.'
|
||||
'This feature was deprecated after v1.13.8.',
|
||||
)
|
||||
TextStyle? display3,
|
||||
@Deprecated(
|
||||
'This is the term used in the 2014 version of material design. The modern term is headline3. '
|
||||
'This feature was deprecated after v1.13.8.'
|
||||
'This feature was deprecated after v1.13.8.',
|
||||
)
|
||||
TextStyle? display2,
|
||||
@Deprecated(
|
||||
'This is the term used in the 2014 version of material design. The modern term is headline4. '
|
||||
'This feature was deprecated after v1.13.8.'
|
||||
'This feature was deprecated after v1.13.8.',
|
||||
)
|
||||
TextStyle? display1,
|
||||
@Deprecated(
|
||||
'This is the term used in the 2014 version of material design. The modern term is headline5. '
|
||||
'This feature was deprecated after v1.13.8.'
|
||||
'This feature was deprecated after v1.13.8.',
|
||||
)
|
||||
TextStyle? headline,
|
||||
@Deprecated(
|
||||
'This is the term used in the 2014 version of material design. The modern term is headline6. '
|
||||
'This feature was deprecated after v1.13.8.'
|
||||
'This feature was deprecated after v1.13.8.',
|
||||
)
|
||||
TextStyle? title,
|
||||
@Deprecated(
|
||||
'This is the term used in the 2014 version of material design. The modern term is subtitle1. '
|
||||
'This feature was deprecated after v1.13.8.'
|
||||
'This feature was deprecated after v1.13.8.',
|
||||
)
|
||||
TextStyle? subhead,
|
||||
@Deprecated(
|
||||
'This is the term used in the 2014 version of material design. The modern term is subtitle2. '
|
||||
'This feature was deprecated after v1.13.8.'
|
||||
'This feature was deprecated after v1.13.8.',
|
||||
)
|
||||
TextStyle? subtitle,
|
||||
@Deprecated(
|
||||
'This is the term used in the 2014 version of material design. The modern term is bodyText1. '
|
||||
'This feature was deprecated after v1.13.8.'
|
||||
'This feature was deprecated after v1.13.8.',
|
||||
)
|
||||
TextStyle? body2,
|
||||
@Deprecated(
|
||||
'This is the term used in the 2014 version of material design. The modern term is bodyText2. '
|
||||
'This feature was deprecated after v1.13.8.'
|
||||
'This feature was deprecated after v1.13.8.',
|
||||
)
|
||||
TextStyle? body1,
|
||||
}) : assert(
|
||||
|
@ -243,7 +243,7 @@ class TextTheme with Diagnosticable {
|
|||
/// specification calls this [headline1].
|
||||
@Deprecated(
|
||||
'This is the term used in the 2014 version of material design. The modern term is headline1. '
|
||||
'This feature was deprecated after v1.13.8.'
|
||||
'This feature was deprecated after v1.13.8.',
|
||||
)
|
||||
TextStyle? get display4 => headline1;
|
||||
|
||||
|
@ -253,7 +253,7 @@ class TextTheme with Diagnosticable {
|
|||
/// specification calls this [headline2].
|
||||
@Deprecated(
|
||||
'This is the term used in the 2014 version of material design. The modern term is headline2. '
|
||||
'This feature was deprecated after v1.13.8.'
|
||||
'This feature was deprecated after v1.13.8.',
|
||||
)
|
||||
TextStyle? get display3 => headline2;
|
||||
|
||||
|
@ -263,7 +263,7 @@ class TextTheme with Diagnosticable {
|
|||
/// specification calls this [headline3].
|
||||
@Deprecated(
|
||||
'This is the term used in the 2014 version of material design. The modern term is headline3. '
|
||||
'This feature was deprecated after v1.13.8.'
|
||||
'This feature was deprecated after v1.13.8.',
|
||||
)
|
||||
TextStyle? get display2 => headline3;
|
||||
|
||||
|
@ -273,7 +273,7 @@ class TextTheme with Diagnosticable {
|
|||
/// specification calls this [headline4].
|
||||
@Deprecated(
|
||||
'This is the term used in the 2014 version of material design. The modern term is headline4. '
|
||||
'This feature was deprecated after v1.13.8.'
|
||||
'This feature was deprecated after v1.13.8.',
|
||||
)
|
||||
TextStyle? get display1 => headline4;
|
||||
|
||||
|
@ -283,7 +283,7 @@ class TextTheme with Diagnosticable {
|
|||
/// specification calls this [headline5].
|
||||
@Deprecated(
|
||||
'This is the term used in the 2014 version of material design. The modern term is headline5. '
|
||||
'This feature was deprecated after v1.13.8.'
|
||||
'This feature was deprecated after v1.13.8.',
|
||||
)
|
||||
TextStyle? get headline => headline5;
|
||||
|
||||
|
@ -293,7 +293,7 @@ class TextTheme with Diagnosticable {
|
|||
/// specification calls this [headline6].
|
||||
@Deprecated(
|
||||
'This is the term used in the 2014 version of material design. The modern term is headline6. '
|
||||
'This feature was deprecated after v1.13.8.'
|
||||
'This feature was deprecated after v1.13.8.',
|
||||
)
|
||||
TextStyle? get title => headline6;
|
||||
|
||||
|
@ -303,7 +303,7 @@ class TextTheme with Diagnosticable {
|
|||
/// specification calls this [subtitle1].
|
||||
@Deprecated(
|
||||
'This is the term used in the 2014 version of material design. The modern term is subtitle1. '
|
||||
'This feature was deprecated after v1.13.8.'
|
||||
'This feature was deprecated after v1.13.8.',
|
||||
)
|
||||
TextStyle? get subhead => subtitle1;
|
||||
|
||||
|
@ -313,7 +313,7 @@ class TextTheme with Diagnosticable {
|
|||
/// specification calls this [subtitle2].
|
||||
@Deprecated(
|
||||
'This is the term used in the 2014 version of material design. The modern term is subtitle2. '
|
||||
'This feature was deprecated after v1.13.8.'
|
||||
'This feature was deprecated after v1.13.8.',
|
||||
)
|
||||
TextStyle? get subtitle => subtitle2;
|
||||
|
||||
|
@ -324,7 +324,7 @@ class TextTheme with Diagnosticable {
|
|||
/// [bodyText1].
|
||||
@Deprecated(
|
||||
'This is the term used in the 2014 version of material design. The modern term is bodyText1. '
|
||||
'This feature was deprecated after v1.13.8.'
|
||||
'This feature was deprecated after v1.13.8.',
|
||||
)
|
||||
TextStyle? get body2 => bodyText1;
|
||||
|
||||
|
@ -335,7 +335,7 @@ class TextTheme with Diagnosticable {
|
|||
/// [bodyText2].
|
||||
@Deprecated(
|
||||
'This is the term used in the 2014 version of material design. The modern term is bodyText2. '
|
||||
'This feature was deprecated after v1.13.8.'
|
||||
'This feature was deprecated after v1.13.8.',
|
||||
)
|
||||
TextStyle? get body1 => bodyText2;
|
||||
|
||||
|
@ -396,52 +396,52 @@ class TextTheme with Diagnosticable {
|
|||
TextStyle? overline,
|
||||
@Deprecated(
|
||||
'This is the term used in the 2014 version of material design. The modern term is headline1. '
|
||||
'This feature was deprecated after v1.13.8.'
|
||||
'This feature was deprecated after v1.13.8.',
|
||||
)
|
||||
TextStyle? display4,
|
||||
@Deprecated(
|
||||
'This is the term used in the 2014 version of material design. The modern term is headline2. '
|
||||
'This feature was deprecated after v1.13.8.'
|
||||
'This feature was deprecated after v1.13.8.',
|
||||
)
|
||||
TextStyle? display3,
|
||||
@Deprecated(
|
||||
'This is the term used in the 2014 version of material design. The modern term is headline3. '
|
||||
'This feature was deprecated after v1.13.8.'
|
||||
'This feature was deprecated after v1.13.8.',
|
||||
)
|
||||
TextStyle? display2,
|
||||
@Deprecated(
|
||||
'This is the term used in the 2014 version of material design. The modern term is headline4. '
|
||||
'This feature was deprecated after v1.13.8.'
|
||||
'This feature was deprecated after v1.13.8.',
|
||||
)
|
||||
TextStyle? display1,
|
||||
@Deprecated(
|
||||
'This is the term used in the 2014 version of material design. The modern term is headline5. '
|
||||
'This feature was deprecated after v1.13.8.'
|
||||
'This feature was deprecated after v1.13.8.',
|
||||
)
|
||||
TextStyle? headline,
|
||||
@Deprecated(
|
||||
'This is the term used in the 2014 version of material design. The modern term is headline6. '
|
||||
'This feature was deprecated after v1.13.8.'
|
||||
'This feature was deprecated after v1.13.8.',
|
||||
)
|
||||
TextStyle? title,
|
||||
@Deprecated(
|
||||
'This is the term used in the 2014 version of material design. The modern term is subtitle1. '
|
||||
'This feature was deprecated after v1.13.8.'
|
||||
'This feature was deprecated after v1.13.8.',
|
||||
)
|
||||
TextStyle? subhead,
|
||||
@Deprecated(
|
||||
'This is the term used in the 2014 version of material design. The modern term is subtitle2. '
|
||||
'This feature was deprecated after v1.13.8.'
|
||||
'This feature was deprecated after v1.13.8.',
|
||||
)
|
||||
TextStyle? subtitle,
|
||||
@Deprecated(
|
||||
'This is the term used in the 2014 version of material design. The modern term is bodyText1. '
|
||||
'This feature was deprecated after v1.13.8.'
|
||||
'This feature was deprecated after v1.13.8.',
|
||||
)
|
||||
TextStyle? body2,
|
||||
@Deprecated(
|
||||
'This is the term used in the 2014 version of material design. The modern term is bodyText2. '
|
||||
'This feature was deprecated after v1.13.8.'
|
||||
'This feature was deprecated after v1.13.8.',
|
||||
)
|
||||
TextStyle? body1,
|
||||
}) {
|
||||
|
|
|
@ -245,17 +245,17 @@ class ThemeData with Diagnosticable {
|
|||
Color? secondaryHeaderColor,
|
||||
@Deprecated(
|
||||
'Use TextSelectionThemeData.selectionColor instead. '
|
||||
'This feature was deprecated after v1.26.0-18.0.pre.'
|
||||
'This feature was deprecated after v1.26.0-18.0.pre.',
|
||||
)
|
||||
Color? textSelectionColor,
|
||||
@Deprecated(
|
||||
'Use TextSelectionThemeData.cursorColor instead. '
|
||||
'This feature was deprecated after v1.26.0-18.0.pre.'
|
||||
'This feature was deprecated after v1.26.0-18.0.pre.',
|
||||
)
|
||||
Color? cursorColor,
|
||||
@Deprecated(
|
||||
'Use TextSelectionThemeData.selectionHandleColor instead. '
|
||||
'This feature was deprecated after v1.26.0-18.0.pre.'
|
||||
'This feature was deprecated after v1.26.0-18.0.pre.',
|
||||
)
|
||||
Color? textSelectionHandleColor,
|
||||
Color? backgroundColor,
|
||||
|
@ -309,7 +309,7 @@ class ThemeData with Diagnosticable {
|
|||
bool? fixTextFieldOutlineLabel,
|
||||
@Deprecated(
|
||||
'No longer used by the framework, please remove any reference to it. '
|
||||
'This feature was deprecated after v1.23.0-4.0.pre.'
|
||||
'This feature was deprecated after v1.23.0-4.0.pre.',
|
||||
)
|
||||
bool? useTextSelectionTheme,
|
||||
}) {
|
||||
|
@ -566,17 +566,17 @@ class ThemeData with Diagnosticable {
|
|||
required this.secondaryHeaderColor,
|
||||
@Deprecated(
|
||||
'Use TextSelectionThemeData.selectionColor instead. '
|
||||
'This feature was deprecated after v1.26.0-18.0.pre.'
|
||||
'This feature was deprecated after v1.26.0-18.0.pre.',
|
||||
)
|
||||
required this.textSelectionColor,
|
||||
@Deprecated(
|
||||
'Use TextSelectionThemeData.cursorColor instead. '
|
||||
'This feature was deprecated after v1.26.0-18.0.pre.'
|
||||
'This feature was deprecated after v1.26.0-18.0.pre.',
|
||||
)
|
||||
required this.cursorColor,
|
||||
@Deprecated(
|
||||
'Use TextSelectionThemeData.selectionHandleColor instead. '
|
||||
'This feature was deprecated after v1.26.0-18.0.pre.'
|
||||
'This feature was deprecated after v1.26.0-18.0.pre.',
|
||||
)
|
||||
required this.textSelectionHandleColor,
|
||||
required this.backgroundColor,
|
||||
|
@ -629,7 +629,7 @@ class ThemeData with Diagnosticable {
|
|||
required this.fixTextFieldOutlineLabel,
|
||||
@Deprecated(
|
||||
'No longer used by the framework, please remove any reference to it. '
|
||||
'This feature was deprecated after v1.23.0-4.0.pre.'
|
||||
'This feature was deprecated after v1.23.0-4.0.pre.',
|
||||
)
|
||||
required this.useTextSelectionTheme,
|
||||
}) : assert(visualDensity != null),
|
||||
|
@ -953,21 +953,21 @@ class ThemeData with Diagnosticable {
|
|||
/// The color of text selections in text fields, such as [TextField].
|
||||
@Deprecated(
|
||||
'Use TextSelectionThemeData.selectionColor instead. '
|
||||
'This feature was deprecated after v1.26.0-18.0.pre.'
|
||||
'This feature was deprecated after v1.26.0-18.0.pre.',
|
||||
)
|
||||
final Color textSelectionColor;
|
||||
|
||||
/// The color of cursors in Material-style text fields, such as [TextField].
|
||||
@Deprecated(
|
||||
'Use TextSelectionThemeData.cursorColor instead. '
|
||||
'This feature was deprecated after v1.26.0-18.0.pre.'
|
||||
'This feature was deprecated after v1.26.0-18.0.pre.',
|
||||
)
|
||||
final Color cursorColor;
|
||||
|
||||
/// The color of the handles used to adjust what part of the text is currently selected.
|
||||
@Deprecated(
|
||||
'Use TextSelectionThemeData.selectionHandleColor instead. '
|
||||
'This feature was deprecated after v1.26.0-18.0.pre.'
|
||||
'This feature was deprecated after v1.26.0-18.0.pre.',
|
||||
)
|
||||
final Color textSelectionHandleColor;
|
||||
|
||||
|
@ -1226,7 +1226,7 @@ class ThemeData with Diagnosticable {
|
|||
/// reference to this property, as it will be removed in future releases.
|
||||
@Deprecated(
|
||||
'No longer used by the framework, please remove any reference to it. '
|
||||
'This feature was deprecated after v1.23.0-4.0.pre.'
|
||||
'This feature was deprecated after v1.23.0-4.0.pre.',
|
||||
)
|
||||
final bool useTextSelectionTheme;
|
||||
|
||||
|
@ -1262,17 +1262,17 @@ class ThemeData with Diagnosticable {
|
|||
Color? secondaryHeaderColor,
|
||||
@Deprecated(
|
||||
'Use TextSelectionThemeData.selectionColor instead. '
|
||||
'This feature was deprecated after v1.26.0-18.0.pre.'
|
||||
'This feature was deprecated after v1.26.0-18.0.pre.',
|
||||
)
|
||||
Color? textSelectionColor,
|
||||
@Deprecated(
|
||||
'Use TextSelectionThemeData.cursorColor instead. '
|
||||
'This feature was deprecated after v1.26.0-18.0.pre.'
|
||||
'This feature was deprecated after v1.26.0-18.0.pre.',
|
||||
)
|
||||
Color? cursorColor,
|
||||
@Deprecated(
|
||||
'Use TextSelectionThemeData.selectionHandleColor instead. '
|
||||
'This feature was deprecated after v1.26.0-18.0.pre.'
|
||||
'This feature was deprecated after v1.26.0-18.0.pre.',
|
||||
)
|
||||
Color? textSelectionHandleColor,
|
||||
Color? backgroundColor,
|
||||
|
@ -1325,7 +1325,7 @@ class ThemeData with Diagnosticable {
|
|||
bool? fixTextFieldOutlineLabel,
|
||||
@Deprecated(
|
||||
'No longer used by the framework, please remove any reference to it. '
|
||||
'This feature was deprecated after v1.23.0-4.0.pre.'
|
||||
'This feature was deprecated after v1.23.0-4.0.pre.',
|
||||
)
|
||||
bool? useTextSelectionTheme,
|
||||
}) {
|
||||
|
|
|
@ -189,7 +189,7 @@ class _TimePickerHeader extends StatelessWidget {
|
|||
orientation: orientation,
|
||||
onChanged: onChanged,
|
||||
),
|
||||
]
|
||||
],
|
||||
],
|
||||
),
|
||||
),
|
||||
|
|
|
@ -89,7 +89,7 @@ class Typography with Diagnosticable {
|
|||
'The default Typography constructor defaults to the 2014 material design defaults. '
|
||||
'Applications are urged to migrate to Typography.material2018(), or, if the 2014 defaults '
|
||||
'are desired, to explicitly request them using Typography.material2014(). '
|
||||
'This feature was deprecated after v1.13.8.'
|
||||
'This feature was deprecated after v1.13.8.',
|
||||
)
|
||||
factory Typography({
|
||||
TargetPlatform? platform,
|
||||
|
|
|
@ -35,14 +35,12 @@ class NetworkImage
|
|||
final Map<String, String>? headers;
|
||||
|
||||
@override
|
||||
Future<NetworkImage> obtainKey(
|
||||
image_provider.ImageConfiguration configuration) {
|
||||
Future<NetworkImage> obtainKey(image_provider.ImageConfiguration configuration) {
|
||||
return SynchronousFuture<NetworkImage>(this);
|
||||
}
|
||||
|
||||
@override
|
||||
ImageStreamCompleter load(
|
||||
image_provider.NetworkImage key, image_provider.DecoderCallback decode) {
|
||||
ImageStreamCompleter load(image_provider.NetworkImage key, image_provider.DecoderCallback decode) {
|
||||
// Ownership of this controller is handed off to [_loadAsync]; it is that
|
||||
// method's responsibility to close the controller's stream when the image
|
||||
// has been loaded or an error is thrown.
|
||||
|
@ -50,21 +48,20 @@ class NetworkImage
|
|||
StreamController<ImageChunkEvent>();
|
||||
|
||||
return MultiFrameImageStreamCompleter(
|
||||
chunkEvents: chunkEvents.stream,
|
||||
codec: _loadAsync(key as NetworkImage, decode, chunkEvents),
|
||||
scale: key.scale,
|
||||
debugLabel: key.url,
|
||||
informationCollector: _imageStreamInformationCollector(key));
|
||||
chunkEvents: chunkEvents.stream,
|
||||
codec: _loadAsync(key as NetworkImage, decode, chunkEvents),
|
||||
scale: key.scale,
|
||||
debugLabel: key.url,
|
||||
informationCollector: _imageStreamInformationCollector(key),
|
||||
);
|
||||
}
|
||||
|
||||
InformationCollector? _imageStreamInformationCollector(
|
||||
image_provider.NetworkImage key) {
|
||||
InformationCollector? _imageStreamInformationCollector(image_provider.NetworkImage key) {
|
||||
InformationCollector? collector;
|
||||
assert(() {
|
||||
collector = () {
|
||||
return <DiagnosticsNode>[
|
||||
DiagnosticsProperty<image_provider.ImageProvider>(
|
||||
'Image provider', this),
|
||||
DiagnosticsProperty<image_provider.ImageProvider>('Image provider', this),
|
||||
DiagnosticsProperty<NetworkImage>('Image key', key as NetworkImage),
|
||||
];
|
||||
};
|
||||
|
@ -80,19 +77,21 @@ class NetworkImage
|
|||
// here is ignored and the web-only `ui.webOnlyInstantiateImageCodecFromUrl` will be used
|
||||
// directly in place of the typical `instantiateImageCodec` method.
|
||||
Future<ui.Codec> _loadAsync(
|
||||
NetworkImage key,
|
||||
image_provider.DecoderCallback decode,
|
||||
StreamController<ImageChunkEvent> chunkEvents) {
|
||||
NetworkImage key,
|
||||
image_provider.DecoderCallback decode,
|
||||
StreamController<ImageChunkEvent> chunkEvents,
|
||||
) {
|
||||
assert(key == this);
|
||||
|
||||
final Uri resolved = Uri.base.resolve(key.url);
|
||||
// This API only exists in the web engine implementation and is not
|
||||
// contained in the analyzer summary for Flutter.
|
||||
return ui.webOnlyInstantiateImageCodecFromUrl(resolved, // ignore: undefined_function
|
||||
chunkCallback: (int bytes, int total) {
|
||||
chunkEvents.add(ImageChunkEvent(
|
||||
cumulativeBytesLoaded: bytes, expectedTotalBytes: total));
|
||||
}) as Future<ui.Codec>;
|
||||
return ui.webOnlyInstantiateImageCodecFromUrl(// ignore: undefined_function
|
||||
resolved,
|
||||
chunkCallback: (int bytes, int total) {
|
||||
chunkEvents.add(ImageChunkEvent(cumulativeBytesLoaded: bytes, expectedTotalBytes: total));
|
||||
},
|
||||
) as Future<ui.Codec>;
|
||||
}
|
||||
|
||||
@override
|
||||
|
|
|
@ -566,7 +566,7 @@ class _CompoundBorder extends ShapeBorder {
|
|||
@override
|
||||
ShapeBorder scale(double t) {
|
||||
return _CompoundBorder(
|
||||
borders.map<ShapeBorder>((ShapeBorder border) => border.scale(t)).toList()
|
||||
borders.map<ShapeBorder>((ShapeBorder border) => border.scale(t)).toList(),
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -158,7 +158,7 @@ abstract class BoxBorder extends ShapeBorder {
|
|||
'BoxBorder.lerp() was called with two objects of type ${a.runtimeType} and ${b.runtimeType}:\n'
|
||||
' $a\n'
|
||||
' $b\n'
|
||||
'However, only Border and BorderDirectional classes are supported by this method.'
|
||||
'However, only Border and BorderDirectional classes are supported by this method.',
|
||||
),
|
||||
ErrorHint('For a more general interpolation method, consider using ShapeBorder.lerp instead.'),
|
||||
]);
|
||||
|
|
|
@ -51,7 +51,7 @@ class DecorationImage {
|
|||
this.centerSlice,
|
||||
this.repeat = ImageRepeat.noRepeat,
|
||||
this.matchTextDirection = false,
|
||||
this.scale = 1.0
|
||||
this.scale = 1.0,
|
||||
}) : assert(image != null),
|
||||
assert(alignment != null),
|
||||
assert(repeat != null),
|
||||
|
@ -188,7 +188,7 @@ class DecorationImage {
|
|||
'$repeat',
|
||||
if (matchTextDirection)
|
||||
'match text direction',
|
||||
'scale: $scale'
|
||||
'scale: $scale',
|
||||
];
|
||||
return '${objectRuntimeType(this, 'DecorationImage')}(${properties.join(", ")})';
|
||||
}
|
||||
|
@ -243,7 +243,7 @@ class DecorationImagePainter {
|
|||
ErrorSummary('DecorationImage.matchTextDirection can only be used when a TextDirection is available.'),
|
||||
ErrorDescription(
|
||||
'When DecorationImagePainter.paint() was called, there was no text direction provided '
|
||||
'in the ImageConfiguration object to match.'
|
||||
'in the ImageConfiguration object to match.',
|
||||
),
|
||||
DiagnosticsProperty<DecorationImage>('The DecorationImage was', _details, style: DiagnosticsTreeStyle.errorProperty),
|
||||
DiagnosticsProperty<ImageConfiguration>('The ImageConfiguration was', configuration, style: DiagnosticsTreeStyle.errorProperty),
|
||||
|
@ -544,7 +544,7 @@ void paintImage({
|
|||
'Flutter.ImageSizesForFrame',
|
||||
<String, Object>{
|
||||
for (ImageSizeInfo imageSizeInfo in _pendingImageSizeInfo.values)
|
||||
imageSizeInfo.source!: imageSizeInfo.toJson()
|
||||
imageSizeInfo.source!: imageSizeInfo.toJson(),
|
||||
},
|
||||
);
|
||||
_pendingImageSizeInfo = <String, ImageSizeInfo>{};
|
||||
|
|
|
@ -55,7 +55,7 @@ _ColorsAndStops _interpolateColorsAndStops(
|
|||
..addAll(bStops);
|
||||
final List<double> interpolatedStops = stops.toList(growable: false);
|
||||
final List<Color> interpolatedColors = interpolatedStops.map<Color>(
|
||||
(double stop) => Color.lerp(_sample(aColors, aStops, stop), _sample(bColors, bStops, stop), t)!
|
||||
(double stop) => Color.lerp(_sample(aColors, aStops, stop), _sample(bColors, bStops, stop), t)!,
|
||||
).toList(growable: false);
|
||||
return _ColorsAndStops(interpolatedColors, interpolatedStops);
|
||||
}
|
||||
|
|
|
@ -250,7 +250,7 @@ class ImageCache {
|
|||
if (pendingImage != null) {
|
||||
if (!kReleaseMode) {
|
||||
Timeline.instantSync('ImageCache.evict', arguments: <String, dynamic>{
|
||||
'type': 'pending'
|
||||
'type': 'pending',
|
||||
});
|
||||
}
|
||||
pendingImage.removeListener();
|
||||
|
|
|
@ -445,8 +445,8 @@ abstract class ImageProvider<T extends Object> {
|
|||
specification: ZoneSpecification(
|
||||
handleUncaughtError: (Zone zone, ZoneDelegate delegate, Zone parent, Object error, StackTrace stackTrace) {
|
||||
handleError(error, stackTrace);
|
||||
}
|
||||
)
|
||||
},
|
||||
),
|
||||
);
|
||||
dangerZone.runGuarded(() {
|
||||
Future<T> key;
|
||||
|
@ -655,7 +655,7 @@ abstract class AssetBundleImageProvider extends ImageProvider<AssetBundleImageKe
|
|||
codec: _loadAsync(key, decode),
|
||||
scale: key.scale,
|
||||
debugLabel: key.name,
|
||||
informationCollector: collector
|
||||
informationCollector: collector,
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -236,7 +236,7 @@ class AssetImage extends AssetBundleImageProvider {
|
|||
// ourselves.
|
||||
result = SynchronousFuture<AssetBundleImageKey>(key);
|
||||
}
|
||||
}
|
||||
},
|
||||
).catchError((Object error, StackTrace stack) {
|
||||
// We had an error. (This guarantees we weren't called synchronously.)
|
||||
// Forward the error to the caller.
|
||||
|
|
|
@ -39,7 +39,7 @@ abstract class PlaceholderSpan extends InlineSpan {
|
|||
this.alignment = ui.PlaceholderAlignment.bottom,
|
||||
this.baseline,
|
||||
TextStyle? style,
|
||||
}) : super(style: style,);
|
||||
}) : super(style: style);
|
||||
|
||||
/// How the placeholder aligns vertically with the text.
|
||||
///
|
||||
|
|
|
@ -145,7 +145,7 @@ class DefaultShaderWarmUp extends ShaderWarmUp {
|
|||
const ui.RRect rrect = ui.RRect.fromLTRBXY(20.0, 20.0, 60.0, 60.0, 10.0, 10.0);
|
||||
final ui.Path rrectPath = ui.Path()..addRRect(rrect);
|
||||
final ui.Path circlePath = ui.Path()..addOval(
|
||||
ui.Rect.fromCircle(center: const ui.Offset(40.0, 40.0), radius: 20.0)
|
||||
ui.Rect.fromCircle(center: const ui.Offset(40.0, 40.0), radius: 20.0),
|
||||
);
|
||||
|
||||
// The following path is based on
|
||||
|
|
|
@ -395,7 +395,7 @@ class _StadiumToRoundedRectangleBorder extends OutlinedBorder {
|
|||
return _StadiumToRoundedRectangleBorder(
|
||||
side: side ?? this.side,
|
||||
borderRadius: borderRadius ?? this.borderRadius,
|
||||
rectness: rectness ?? this.rectness
|
||||
rectness: rectness ?? this.rectness,
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -616,7 +616,7 @@ class TextPainter {
|
|||
if (_needsLayout) {
|
||||
throw FlutterError(
|
||||
'TextPainter.paint called when text geometry was not yet calculated.\n'
|
||||
'Please call layout() before paint() to position the text before painting it.'
|
||||
'Please call layout() before paint() to position the text before painting it.',
|
||||
);
|
||||
}
|
||||
return true;
|
||||
|
@ -865,7 +865,7 @@ class TextPainter {
|
|||
selection.start,
|
||||
selection.end,
|
||||
boxHeightStyle: boxHeightStyle,
|
||||
boxWidthStyle: boxWidthStyle
|
||||
boxWidthStyle: boxWidthStyle,
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -302,7 +302,7 @@ class TextSpan extends InlineSpan implements HitTestTarget, MouseTrackerAnnotati
|
|||
void computeToPlainText(
|
||||
StringBuffer buffer, {
|
||||
bool includeSemanticsLabels = true,
|
||||
bool includePlaceholders = true
|
||||
bool includePlaceholders = true,
|
||||
}) {
|
||||
assert(debugAssertIsValid());
|
||||
if (semanticsLabel != null && includeSemanticsLabels) {
|
||||
|
@ -388,9 +388,12 @@ class TextSpan extends InlineSpan implements HitTestTarget, MouseTrackerAnnotati
|
|||
throw FlutterError.fromParts(<DiagnosticsNode>[
|
||||
ErrorSummary('TextSpan contains a null child.'),
|
||||
ErrorDescription(
|
||||
'A TextSpan object with a non-null child list should not have any nulls in its child list.'),
|
||||
toDiagnosticsNode(name: 'The full text in question was',
|
||||
style: DiagnosticsTreeStyle.errorProperty),
|
||||
'A TextSpan object with a non-null child list should not have any nulls in its child list.',
|
||||
),
|
||||
toDiagnosticsNode(
|
||||
name: 'The full text in question was',
|
||||
style: DiagnosticsTreeStyle.errorProperty,
|
||||
),
|
||||
]);
|
||||
}
|
||||
assert(child.debugAssertIsValid());
|
||||
|
@ -477,7 +480,7 @@ class TextSpan extends InlineSpan implements HitTestTarget, MouseTrackerAnnotati
|
|||
text,
|
||||
showName: false,
|
||||
defaultValue: null,
|
||||
)
|
||||
),
|
||||
);
|
||||
if (style == null && text == null && children == null)
|
||||
properties.add(DiagnosticsNode.message('(empty)'));
|
||||
|
|
|
@ -132,7 +132,7 @@ mixin RendererBinding on BindingBase, ServicesBinding, SchedulerBinding, Gesture
|
|||
return <String, Object>{
|
||||
'data': data,
|
||||
};
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
registerServiceExtension(
|
||||
|
|
|
@ -1412,7 +1412,7 @@ abstract class RenderBox extends RenderObject {
|
|||
ErrorHint(
|
||||
'If you perform computations on another height before passing it to '
|
||||
'getMinIntrinsicWidth, consider using math.max() or double.clamp() '
|
||||
'to force the value into the valid range.'
|
||||
'to force the value into the valid range.',
|
||||
),
|
||||
]);
|
||||
}
|
||||
|
@ -1561,7 +1561,7 @@ abstract class RenderBox extends RenderObject {
|
|||
ErrorHint(
|
||||
'If you perform computations on another height before passing it to '
|
||||
'getMaxIntrinsicWidth, consider using math.max() or double.clamp() '
|
||||
'to force the value into the valid range.'
|
||||
'to force the value into the valid range.',
|
||||
),
|
||||
]);
|
||||
}
|
||||
|
@ -1644,7 +1644,7 @@ abstract class RenderBox extends RenderObject {
|
|||
ErrorHint(
|
||||
'If you perform computations on another width before passing it to '
|
||||
'getMinIntrinsicHeight, consider using math.max() or double.clamp() '
|
||||
'to force the value into the valid range.'
|
||||
'to force the value into the valid range.',
|
||||
),
|
||||
]);
|
||||
}
|
||||
|
@ -1726,7 +1726,7 @@ abstract class RenderBox extends RenderObject {
|
|||
ErrorHint(
|
||||
'If you perform computations on another width before passing it to '
|
||||
'getMaxIntrinsicHeight, consider using math.max() or double.clamp() '
|
||||
'to force the value into the valid range.'
|
||||
'to force the value into the valid range.',
|
||||
),
|
||||
]);
|
||||
}
|
||||
|
@ -1868,7 +1868,7 @@ abstract class RenderBox extends RenderObject {
|
|||
ErrorSummary('The ${objectRuntimeType(this, 'RenderBox')} class does not implement "computeDryLayout".'),
|
||||
ErrorHint(
|
||||
'If you are not writing your own RenderBox subclass, then this is not\n'
|
||||
'your fault. Contact support: https://github.com/flutter/flutter/issues/new?template=2_bug.md'
|
||||
'your fault. Contact support: https://github.com/flutter/flutter/issues/new?template=2_bug.md',
|
||||
),
|
||||
]),
|
||||
));
|
||||
|
@ -1970,7 +1970,7 @@ abstract class RenderBox extends RenderObject {
|
|||
information.add(ErrorDescription('It appears that the size setter was called from performLayout().'));
|
||||
} else {
|
||||
information.add(ErrorDescription(
|
||||
'The size setter was called from outside layout (neither performResize() nor performLayout() were being run for this object).'
|
||||
'The size setter was called from outside layout (neither performResize() nor performLayout() were being run for this object).',
|
||||
));
|
||||
if (owner != null && owner!.debugDoingLayout)
|
||||
information.add(ErrorDescription('Only the object itself can set its size. It is a contract violation for other objects to set it.'));
|
||||
|
@ -2019,20 +2019,20 @@ abstract class RenderBox extends RenderObject {
|
|||
'However, this second render object is not, or is no longer, a '
|
||||
'child of the first, and it is therefore a violation of the '
|
||||
'RenderBox layout protocol to use that size in the layout of the '
|
||||
'first render object.'
|
||||
'first render object.',
|
||||
),
|
||||
ErrorHint(
|
||||
'If the size was obtained at a time where it was valid to read '
|
||||
'the size (because the second render object above was a child '
|
||||
'of the first at the time), then it should be adopted using '
|
||||
'debugAdoptSize at that time.'
|
||||
'debugAdoptSize at that time.',
|
||||
),
|
||||
ErrorHint(
|
||||
'If the size comes from a grandchild or a render object from an '
|
||||
'entirely different part of the render tree, then there is no '
|
||||
'way to be notified when the size changes and therefore attempts '
|
||||
'to read that size are almost certainly a source of bugs. A different '
|
||||
'approach should be used.'
|
||||
'approach should be used.',
|
||||
),
|
||||
]);
|
||||
}
|
||||
|
@ -2047,7 +2047,7 @@ abstract class RenderBox extends RenderObject {
|
|||
'inaccurate: the size was nonetheless used by the parent.\n'
|
||||
'It is important to tell the framework if the size will be used or not '
|
||||
'as several important performance optimizations can be made if the '
|
||||
'size will not be used by the parent.'
|
||||
'size will not be used by the parent.',
|
||||
),
|
||||
]);
|
||||
}
|
||||
|
@ -2184,7 +2184,7 @@ abstract class RenderBox extends RenderObject {
|
|||
ErrorDescription(
|
||||
'This probably means that it is a render object that tries to be '
|
||||
'as big as possible, but it was put inside another render object '
|
||||
'that allows its children to pick their own size.'
|
||||
'that allows its children to pick their own size.',
|
||||
),
|
||||
];
|
||||
if (!constraints.hasBoundedWidth) {
|
||||
|
@ -2216,7 +2216,7 @@ abstract class RenderBox extends RenderObject {
|
|||
DiagnosticsProperty<Size>('Size', _size, style: DiagnosticsTreeStyle.errorProperty),
|
||||
ErrorHint(
|
||||
'If you are not writing your own RenderBox subclass, then this is not '
|
||||
'your fault. Contact support: https://github.com/flutter/flutter/issues/new?template=2_bug.md'
|
||||
'your fault. Contact support: https://github.com/flutter/flutter/issues/new?template=2_bug.md',
|
||||
),
|
||||
]);
|
||||
}
|
||||
|
@ -2263,7 +2263,7 @@ abstract class RenderBox extends RenderObject {
|
|||
...failures,
|
||||
ErrorHint(
|
||||
'If you are not writing your own RenderBox subclass, then this is not\n'
|
||||
'your fault. Contact support: https://github.com/flutter/flutter/issues/new?template=2_bug.md'
|
||||
'your fault. Contact support: https://github.com/flutter/flutter/issues/new?template=2_bug.md',
|
||||
),
|
||||
]);
|
||||
}
|
||||
|
@ -2282,14 +2282,14 @@ abstract class RenderBox extends RenderObject {
|
|||
ErrorSummary('The size given to the ${objectRuntimeType(this, 'RenderBox')} class differs from the size computed by computeDryLayout.'),
|
||||
ErrorDescription(
|
||||
'The size computed in ${sizedByParent ? 'performResize' : 'performLayout'} '
|
||||
'is $size, which is different from $dryLayoutSize, which was computed by computeDryLayout.'
|
||||
'is $size, which is different from $dryLayoutSize, which was computed by computeDryLayout.',
|
||||
),
|
||||
ErrorDescription(
|
||||
'The constraints used were $constraints.',
|
||||
),
|
||||
ErrorHint(
|
||||
'If you are not writing your own RenderBox subclass, then this is not\n'
|
||||
'your fault. Contact support: https://github.com/flutter/flutter/issues/new?template=2_bug.md'
|
||||
'your fault. Contact support: https://github.com/flutter/flutter/issues/new?template=2_bug.md',
|
||||
),
|
||||
]);
|
||||
}
|
||||
|
@ -2340,7 +2340,7 @@ abstract class RenderBox extends RenderObject {
|
|||
ErrorHint(
|
||||
'RenderBox subclasses need to either override performLayout() to '
|
||||
'set a size and lay out any children, or, set sizedByParent to true '
|
||||
'so that performResize() sizes the render object.'
|
||||
'so that performResize() sizes the render object.',
|
||||
),
|
||||
]);
|
||||
}
|
||||
|
@ -2382,13 +2382,13 @@ abstract class RenderBox extends RenderObject {
|
|||
ErrorDescription(
|
||||
"Unfortunately, this object's geometry is not known at this time, "
|
||||
'probably because it has never been laid out. '
|
||||
'This means it cannot be accurately hit-tested.'
|
||||
'This means it cannot be accurately hit-tested.',
|
||||
),
|
||||
ErrorHint(
|
||||
'If you are trying '
|
||||
'to perform a hit test during the layout phase itself, make sure '
|
||||
"you only hit test nodes that have completed layout (e.g. the node's "
|
||||
'children, after their layout() method has been called).'
|
||||
'children, after their layout() method has been called).',
|
||||
),
|
||||
]);
|
||||
}
|
||||
|
@ -2397,12 +2397,12 @@ abstract class RenderBox extends RenderObject {
|
|||
describeForError('The hitTest() method was called on this RenderBox'),
|
||||
ErrorDescription(
|
||||
'Although this node is not marked as needing layout, '
|
||||
'its size is not set.'
|
||||
'its size is not set.',
|
||||
),
|
||||
ErrorHint(
|
||||
'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.'
|
||||
'that the RenderBox in question sets its size during layout.',
|
||||
),
|
||||
]);
|
||||
}
|
||||
|
@ -2485,7 +2485,7 @@ abstract class RenderBox extends RenderObject {
|
|||
'children all use BoxParentData objects for their parentData field. '
|
||||
'Since $runtimeType does not in fact use that ParentData class for its children, it must '
|
||||
'provide an implementation of applyPaintTransform that supports the specific ParentData '
|
||||
'subclass used by its children (which apparently is ${child.parentData.runtimeType}).'
|
||||
'subclass used by its children (which apparently is ${child.parentData.runtimeType}).',
|
||||
),
|
||||
]);
|
||||
}
|
||||
|
|
|
@ -144,13 +144,13 @@ abstract class MultiChildLayoutDelegate {
|
|||
if (child == null) {
|
||||
throw FlutterError(
|
||||
'The $this custom multichild layout delegate tried to lay out a non-existent child.\n'
|
||||
'There is no child with the id "$childId".'
|
||||
'There is no child with the id "$childId".',
|
||||
);
|
||||
}
|
||||
if (!_debugChildrenNeedingLayout!.remove(child)) {
|
||||
throw FlutterError(
|
||||
'The $this custom multichild layout delegate tried to lay out the child with id "$childId" more than once.\n'
|
||||
'Each child must be laid out exactly once.'
|
||||
'Each child must be laid out exactly once.',
|
||||
);
|
||||
}
|
||||
try {
|
||||
|
@ -162,8 +162,8 @@ abstract class MultiChildLayoutDelegate {
|
|||
ErrorDescription(
|
||||
'The minimum width and height must be greater than or equal to zero.\n'
|
||||
'The maximum width must be greater than or equal to the minimum width.\n'
|
||||
'The maximum height must be greater than or equal to the minimum height.'
|
||||
)
|
||||
'The maximum height must be greater than or equal to the minimum height.',
|
||||
),
|
||||
]);
|
||||
}
|
||||
return true;
|
||||
|
@ -184,12 +184,12 @@ abstract class MultiChildLayoutDelegate {
|
|||
if (child == null) {
|
||||
throw FlutterError(
|
||||
'The $this custom multichild layout delegate tried to position out a non-existent child:\n'
|
||||
'There is no child with the id "$childId".'
|
||||
'There is no child with the id "$childId".',
|
||||
);
|
||||
}
|
||||
if (offset == null) {
|
||||
throw FlutterError(
|
||||
'The $this custom multichild layout delegate provided a null position for the child with id "$childId".'
|
||||
'The $this custom multichild layout delegate provided a null position for the child with id "$childId".',
|
||||
);
|
||||
}
|
||||
return true;
|
||||
|
|
|
@ -576,21 +576,22 @@ class RenderCustomPaint extends RenderProxyBox {
|
|||
'The $painter custom painter called canvas.save() or canvas.saveLayer() at least '
|
||||
'${debugNewCanvasSaveCount - debugPreviousCanvasSaveCount} more '
|
||||
'time${debugNewCanvasSaveCount - debugPreviousCanvasSaveCount == 1 ? '' : 's' } '
|
||||
'than it called canvas.restore().'
|
||||
'than it called canvas.restore().',
|
||||
),
|
||||
ErrorDescription('This leaves the canvas in an inconsistent state and will probably result in a broken display.'),
|
||||
ErrorHint('You must pair each call to save()/saveLayer() with a later matching call to restore().')
|
||||
ErrorHint('You must pair each call to save()/saveLayer() with a later matching call to restore().'),
|
||||
]);
|
||||
}
|
||||
if (debugNewCanvasSaveCount < debugPreviousCanvasSaveCount) {
|
||||
throw FlutterError.fromParts(<DiagnosticsNode>[
|
||||
ErrorSummary('The $painter custom painter called canvas.restore() '
|
||||
ErrorSummary(
|
||||
'The $painter custom painter called canvas.restore() '
|
||||
'${debugPreviousCanvasSaveCount - debugNewCanvasSaveCount} more '
|
||||
'time${debugPreviousCanvasSaveCount - debugNewCanvasSaveCount == 1 ? '' : 's' } '
|
||||
'than it called canvas.save() or canvas.saveLayer().'
|
||||
'than it called canvas.save() or canvas.saveLayer().',
|
||||
),
|
||||
ErrorDescription('This leaves the canvas in an inconsistent state and will result in a broken display.'),
|
||||
ErrorHint('You should only call restore() if you first called save() or saveLayer().')
|
||||
ErrorHint('You should only call restore() if you first called save() or saveLayer().'),
|
||||
]);
|
||||
}
|
||||
return debugNewCanvasSaveCount == debugPreviousCanvasSaveCount;
|
||||
|
@ -649,8 +650,8 @@ class RenderCustomPaint extends RenderProxyBox {
|
|||
throw FlutterError.fromParts(<DiagnosticsNode>[
|
||||
ErrorSummary(
|
||||
'$runtimeType does not have a child widget but received a non-empty list of child SemanticsNode:\n'
|
||||
'${children.join('\n')}'
|
||||
)
|
||||
'${children.join('\n')}',
|
||||
),
|
||||
]);
|
||||
}
|
||||
return true;
|
||||
|
|
|
@ -206,14 +206,14 @@ mixin DebugOverflowIndicatorMixin on RenderObject {
|
|||
'The edge of the $runtimeType that is '
|
||||
'overflowing has been marked in the rendering with a yellow and black '
|
||||
'striped pattern. This is usually caused by the contents being too big '
|
||||
'for the $runtimeType.'
|
||||
'for the $runtimeType.',
|
||||
));
|
||||
overflowHints.add(ErrorHint(
|
||||
'This is considered an error condition because it indicates that there '
|
||||
'is content that cannot be seen. If the content is legitimately bigger '
|
||||
'than the available space, consider clipping it with a ClipRect widget '
|
||||
'before putting it in the $runtimeType, or using a scrollable '
|
||||
'container, like a ListView.'
|
||||
'container, like a ListView.',
|
||||
));
|
||||
}
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@ const Radius _kFloatingCaretRadius = Radius.circular(1.0);
|
|||
@Deprecated(
|
||||
'Signature of a deprecated class method, '
|
||||
'textSelectionDelegate.userUpdateTextEditingValue. '
|
||||
'This feature was deprecated after v1.26.0-17.2.pre.'
|
||||
'This feature was deprecated after v1.26.0-17.2.pre.',
|
||||
)
|
||||
typedef SelectionChangedHandler = void Function(TextSelection selection, RenderEditable renderObject, SelectionChangedCause cause);
|
||||
|
||||
|
@ -171,7 +171,7 @@ class RenderEditable extends RenderBox with RelayoutWhenSystemFontsChangeMixin {
|
|||
required ViewportOffset offset,
|
||||
@Deprecated(
|
||||
'Uses the textSelectionDelegate.userUpdateTextEditingValue instead. '
|
||||
'This feature was deprecated after v1.26.0-17.2.pre.'
|
||||
'This feature was deprecated after v1.26.0-17.2.pre.',
|
||||
)
|
||||
this.onSelectionChanged,
|
||||
this.onCaretChanged,
|
||||
|
@ -378,7 +378,7 @@ class RenderEditable extends RenderBox with RelayoutWhenSystemFontsChangeMixin {
|
|||
/// If this is null, then selection changes will be ignored.
|
||||
@Deprecated(
|
||||
'Uses the textSelectionDelegate.userUpdateTextEditingValue instead. '
|
||||
'This feature was deprecated after v1.26.0-17.2.pre.'
|
||||
'This feature was deprecated after v1.26.0-17.2.pre.',
|
||||
)
|
||||
SelectionChangedHandler? onSelectionChanged;
|
||||
|
||||
|
@ -1775,8 +1775,7 @@ class RenderEditable extends RenderBox with RelayoutWhenSystemFontsChangeMixin {
|
|||
assert(_shortcutKeys.contains(key), 'shortcut key $key not recognized.');
|
||||
if (key == LogicalKeyboardKey.keyC) {
|
||||
if (!selection.isCollapsed) {
|
||||
Clipboard.setData(
|
||||
ClipboardData(text: selection.textInside(text)));
|
||||
Clipboard.setData(ClipboardData(text: selection.textInside(text)));
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
@ -2519,7 +2518,7 @@ class RenderEditable extends RenderBox with RelayoutWhenSystemFontsChangeMixin {
|
|||
final int baseOffset = !extentSelection ? extentOffset : selection!.baseOffset;
|
||||
_setSelection(
|
||||
TextSelection(baseOffset: baseOffset, extentOffset: extentOffset),
|
||||
SelectionChangedCause.keyboard
|
||||
SelectionChangedCause.keyboard,
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -2551,7 +2550,7 @@ class RenderEditable extends RenderBox with RelayoutWhenSystemFontsChangeMixin {
|
|||
baseOffset: baseOffset,
|
||||
extentOffset: previousWord.start,
|
||||
),
|
||||
SelectionChangedCause.keyboard
|
||||
SelectionChangedCause.keyboard,
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -3480,7 +3479,7 @@ abstract class RenderEditablePainter extends ChangeNotifier {
|
|||
class _TextHighlightPainter extends RenderEditablePainter {
|
||||
_TextHighlightPainter({
|
||||
TextRange? highlightedRange,
|
||||
Color? highlightColor
|
||||
Color? highlightColor,
|
||||
}) : _highlightedRange = highlightedRange,
|
||||
_highlightColor = highlightColor;
|
||||
|
||||
|
@ -3542,7 +3541,7 @@ class _TextHighlightPainter extends RenderEditablePainter {
|
|||
final List<TextBox> boxes = renderEditable._textPainter.getBoxesForSelection(
|
||||
TextSelection(baseOffset: range.start, extentOffset: range.end),
|
||||
boxHeightStyle: selectionHeightStyle,
|
||||
boxWidthStyle: selectionWidthStyle
|
||||
boxWidthStyle: selectionWidthStyle,
|
||||
);
|
||||
|
||||
for (final TextBox box in boxes)
|
||||
|
|
|
@ -675,7 +675,7 @@ class RenderFlex extends RenderBox with ContainerRenderObjectMixin<RenderBox, Fl
|
|||
Size computeDryLayout(BoxConstraints constraints) {
|
||||
if (!_canComputeIntrinsics) {
|
||||
assert(debugCannotComputeDryLayout(
|
||||
reason: 'Dry layout cannot be computed for CrossAxisAlignment.baseline, which requires a full layout.'
|
||||
reason: 'Dry layout cannot be computed for CrossAxisAlignment.baseline, which requires a full layout.',
|
||||
));
|
||||
return Size.zero;
|
||||
}
|
||||
|
@ -725,7 +725,7 @@ class RenderFlex extends RenderBox with ContainerRenderObjectMixin<RenderBox, Fl
|
|||
'When a $identity is in a parent that does not provide a finite $dimension constraint, for example '
|
||||
'if it is in a $axis scrollable, it will try to shrink-wrap its children along the $axis '
|
||||
'axis. Setting a flex on a child (e.g. using Expanded) indicates that the child is to '
|
||||
'expand to fill the remaining space in the $axis direction.'
|
||||
'expand to fill the remaining space in the $axis direction.',
|
||||
);
|
||||
if (reportParentConstraints) { // Constraints of parents are unavailable in dry layout.
|
||||
RenderBox? node = this;
|
||||
|
@ -756,26 +756,26 @@ class RenderFlex extends RenderBox with ContainerRenderObjectMixin<RenderBox, Fl
|
|||
message,
|
||||
ErrorDescription(
|
||||
'These two directives are mutually exclusive. If a parent is to shrink-wrap its child, the child '
|
||||
'cannot simultaneously expand to fit its parent.'
|
||||
'cannot simultaneously expand to fit its parent.',
|
||||
),
|
||||
ErrorHint(
|
||||
'Consider setting mainAxisSize to MainAxisSize.min and using FlexFit.loose fits for the flexible '
|
||||
'children (using Flexible rather than Expanded). This will allow the flexible children '
|
||||
'to size themselves to less than the infinite remaining space they would otherwise be '
|
||||
'forced to take, and then will cause the RenderFlex to shrink-wrap the children '
|
||||
'rather than expanding to fit the maximum constraints provided by the parent.'
|
||||
'rather than expanding to fit the maximum constraints provided by the parent.',
|
||||
),
|
||||
ErrorDescription(
|
||||
'If this message did not help you determine the problem, consider using debugDumpRenderTree():\n'
|
||||
' https://flutter.dev/debugging/#rendering-layer\n'
|
||||
' http://api.flutter.dev/flutter/rendering/debugDumpRenderTree.html'
|
||||
' http://api.flutter.dev/flutter/rendering/debugDumpRenderTree.html',
|
||||
),
|
||||
describeForError('The affected RenderFlex is', style: DiagnosticsTreeStyle.errorProperty),
|
||||
DiagnosticsProperty<dynamic>('The creator information is set to', debugCreator, style: DiagnosticsTreeStyle.errorProperty),
|
||||
...addendum,
|
||||
ErrorDescription(
|
||||
"If none of the above helps enough to fix this problem, please don't hesitate to file a bug:\n"
|
||||
' https://github.com/flutter/flutter/issues/new?template=2_bug.md'
|
||||
' https://github.com/flutter/flutter/issues/new?template=2_bug.md',
|
||||
),
|
||||
]);
|
||||
return true;
|
||||
|
@ -1098,24 +1098,24 @@ class RenderFlex extends RenderBox with ContainerRenderObjectMixin<RenderBox, Fl
|
|||
// _direction changes.
|
||||
final List<DiagnosticsNode> debugOverflowHints = <DiagnosticsNode>[
|
||||
ErrorDescription(
|
||||
'The overflowing $runtimeType has an orientation of $_direction.'
|
||||
'The overflowing $runtimeType has an orientation of $_direction.',
|
||||
),
|
||||
ErrorDescription(
|
||||
'The edge of the $runtimeType that is overflowing has been marked '
|
||||
'in the rendering with a yellow and black striped pattern. This is '
|
||||
'usually caused by the contents being too big for the $runtimeType.'
|
||||
'usually caused by the contents being too big for the $runtimeType.',
|
||||
),
|
||||
ErrorHint(
|
||||
'Consider applying a flex factor (e.g. using an Expanded widget) to '
|
||||
'force the children of the $runtimeType to fit within the available '
|
||||
'space instead of being sized to their natural size.'
|
||||
'space instead of being sized to their natural size.',
|
||||
),
|
||||
ErrorHint(
|
||||
'This is considered an error condition because it indicates that there '
|
||||
'is content that cannot be seen. If the content is legitimately bigger '
|
||||
'than the available space, consider clipping it with a ClipRect widget '
|
||||
'before putting it in the flex, or using a scrollable container rather '
|
||||
'than a Flex, like a ListView.'
|
||||
'than a Flex, like a ListView.',
|
||||
),
|
||||
];
|
||||
|
||||
|
|
|
@ -345,7 +345,7 @@ class RenderFlow extends RenderBox
|
|||
throw FlutterError(
|
||||
'Cannot call paintChild twice for the same child.\n'
|
||||
'The flow delegate of type ${_delegate.runtimeType} attempted to '
|
||||
'paint child $i multiple times, which is not permitted.'
|
||||
'paint child $i multiple times, which is not permitted.',
|
||||
);
|
||||
}
|
||||
return true;
|
||||
|
|
|
@ -505,8 +505,8 @@ class PictureLayer extends Layer {
|
|||
properties.add(DiagnosticsProperty<String>('picture', describeIdentity(_picture)));
|
||||
properties.add(DiagnosticsProperty<String>(
|
||||
'raster cache hints',
|
||||
'isComplex = $isComplexHint, willChange = $willChangeHint'),
|
||||
);
|
||||
'isComplex = $isComplexHint, willChange = $willChangeHint',
|
||||
));
|
||||
}
|
||||
|
||||
@override
|
||||
|
@ -1580,7 +1580,7 @@ class TransformLayer extends OffsetLayer {
|
|||
Offset? _transformOffset(Offset localPosition) {
|
||||
if (_inverseDirty) {
|
||||
_invertedTransform = Matrix4.tryInvert(
|
||||
PointerEvent.removePerspectiveTransform(transform!)
|
||||
PointerEvent.removePerspectiveTransform(transform!),
|
||||
);
|
||||
_inverseDirty = false;
|
||||
}
|
||||
|
|
|
@ -105,12 +105,12 @@ class RenderListBody extends RenderBox
|
|||
ErrorDescription(
|
||||
'RenderListBody does not clip or resize its children, so it must be '
|
||||
'placed in a parent that does not constrain the main '
|
||||
'axis.'
|
||||
'axis.',
|
||||
),
|
||||
ErrorHint(
|
||||
'You probably want to put the RenderListBody inside a '
|
||||
'RenderViewport with a matching main axis.'
|
||||
)
|
||||
'RenderViewport with a matching main axis.',
|
||||
),
|
||||
]);
|
||||
}());
|
||||
assert(() {
|
||||
|
@ -132,7 +132,7 @@ class RenderListBody extends RenderBox
|
|||
ErrorDescription(
|
||||
"RenderListBody forces its children to expand to fit the RenderListBody's container, "
|
||||
'so it must be placed in a parent that constrains the cross '
|
||||
'axis to a finite dimension.'
|
||||
'axis to a finite dimension.',
|
||||
),
|
||||
// TODO(jacobr): this hint is a great candidate to promote to being an
|
||||
// automated quick fix in the future.
|
||||
|
@ -141,8 +141,8 @@ class RenderListBody extends RenderBox
|
|||
'one direction inside one of another direction, you will want to '
|
||||
'wrap the inner one inside a box that fixes the dimension in that direction, '
|
||||
'for example, a RenderIntrinsicWidth or RenderIntrinsicHeight object. '
|
||||
'This is relatively expensive, however.' // (that's why we don't do it automatically)
|
||||
)
|
||||
'This is relatively expensive, however.', // (that's why we don't do it automatically)
|
||||
),
|
||||
]);
|
||||
}());
|
||||
return true;
|
||||
|
|
|
@ -580,14 +580,14 @@ class RenderListWheelViewport
|
|||
@override
|
||||
double computeMinIntrinsicWidth(double height) {
|
||||
return _getIntrinsicCrossAxis(
|
||||
(RenderBox child) => child.getMinIntrinsicWidth(height)
|
||||
(RenderBox child) => child.getMinIntrinsicWidth(height),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
double computeMaxIntrinsicWidth(double height) {
|
||||
return _getIntrinsicCrossAxis(
|
||||
(RenderBox child) => child.getMaxIntrinsicWidth(height)
|
||||
(RenderBox child) => child.getMaxIntrinsicWidth(height),
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -880,20 +880,23 @@ class RenderListWheelViewport
|
|||
// Some part of the child is in the center magnifier.
|
||||
if (isAfterMagnifierTopLine && isBeforeMagnifierBottomLine) {
|
||||
final Rect centerRect = Rect.fromLTWH(
|
||||
0.0,
|
||||
magnifierTopLinePosition,
|
||||
size.width,
|
||||
_itemExtent * _magnification);
|
||||
0.0,
|
||||
magnifierTopLinePosition,
|
||||
size.width,
|
||||
_itemExtent * _magnification,
|
||||
);
|
||||
final Rect topHalfRect = Rect.fromLTWH(
|
||||
0.0,
|
||||
0.0,
|
||||
size.width,
|
||||
magnifierTopLinePosition);
|
||||
0.0,
|
||||
0.0,
|
||||
size.width,
|
||||
magnifierTopLinePosition,
|
||||
);
|
||||
final Rect bottomHalfRect = Rect.fromLTWH(
|
||||
0.0,
|
||||
magnifierBottomLinePosition,
|
||||
size.width,
|
||||
magnifierTopLinePosition);
|
||||
0.0,
|
||||
magnifierBottomLinePosition,
|
||||
size.width,
|
||||
magnifierTopLinePosition,
|
||||
);
|
||||
|
||||
// Clipping the part in the center.
|
||||
context.pushClipRect(
|
||||
|
@ -907,8 +910,10 @@ class RenderListWheelViewport
|
|||
_magnifyTransform(),
|
||||
(PaintingContext context, Offset offset) {
|
||||
context.paintChild(child, offset + untransformedPaintingCoordinates);
|
||||
});
|
||||
});
|
||||
},
|
||||
);
|
||||
},
|
||||
);
|
||||
|
||||
// Clipping the part in either the top-half or bottom-half of the wheel.
|
||||
context.pushClipRect(
|
||||
|
@ -923,7 +928,8 @@ class RenderListWheelViewport
|
|||
offset,
|
||||
child,
|
||||
cylindricalTransform,
|
||||
offsetToCenter);
|
||||
offsetToCenter,
|
||||
);
|
||||
},
|
||||
);
|
||||
} else {
|
||||
|
@ -932,7 +938,8 @@ class RenderListWheelViewport
|
|||
offset,
|
||||
child,
|
||||
cylindricalTransform,
|
||||
offsetToCenter);
|
||||
offsetToCenter,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -169,7 +169,7 @@ class _MouseTrackerUpdateDetails with Diagnosticable {
|
|||
/// [RendererBinding].
|
||||
class MouseTracker extends ChangeNotifier {
|
||||
final MouseCursorManager _mouseCursorMixin = MouseCursorManager(
|
||||
SystemMouseCursors.basic
|
||||
SystemMouseCursors.basic,
|
||||
);
|
||||
|
||||
// Tracks the state of connected mouse devices.
|
||||
|
|
|
@ -1697,7 +1697,7 @@ abstract class RenderObject extends AbstractNode with DiagnosticableTreeMixin im
|
|||
"These invalid constraints were provided to $runtimeType's layout() "
|
||||
'function by the following function, which probably computed the '
|
||||
'invalid constraints in question:\n'
|
||||
' $problemFunction'
|
||||
' $problemFunction',
|
||||
);
|
||||
}
|
||||
},
|
||||
|
@ -2231,11 +2231,11 @@ abstract class RenderObject extends AbstractNode with DiagnosticableTreeMixin im
|
|||
ErrorSummary('Tried to paint a RenderObject reentrantly.'),
|
||||
describeForError(
|
||||
'The following RenderObject was already being painted when it was '
|
||||
'painted again'
|
||||
'painted again',
|
||||
),
|
||||
ErrorDescription(
|
||||
'Since this typically indicates an infinite recursion, it is '
|
||||
'disallowed.'
|
||||
'disallowed.',
|
||||
),
|
||||
]);
|
||||
}
|
||||
|
@ -2270,15 +2270,15 @@ abstract class RenderObject extends AbstractNode with DiagnosticableTreeMixin im
|
|||
'The parent was',
|
||||
),
|
||||
describeForError(
|
||||
'The child that was not visited was'
|
||||
'The child that was not visited was',
|
||||
),
|
||||
ErrorDescription(
|
||||
'A RenderObject with children must implement visitChildren and '
|
||||
'call the visitor exactly once for each child; it also should not '
|
||||
'paint children that were removed with dropChild.'
|
||||
'paint children that were removed with dropChild.',
|
||||
),
|
||||
ErrorHint(
|
||||
'This usually indicates an error in the Flutter framework itself.'
|
||||
'This usually indicates an error in the Flutter framework itself.',
|
||||
),
|
||||
]);
|
||||
}
|
||||
|
@ -2286,7 +2286,7 @@ abstract class RenderObject extends AbstractNode with DiagnosticableTreeMixin im
|
|||
throw FlutterError.fromParts(<DiagnosticsNode>[
|
||||
ErrorSummary(
|
||||
'Tried to paint a RenderObject before its compositing bits were '
|
||||
'updated.'
|
||||
'updated.',
|
||||
),
|
||||
describeForError(
|
||||
'The following RenderObject was marked as having dirty compositing '
|
||||
|
@ -2295,10 +2295,10 @@ abstract class RenderObject extends AbstractNode with DiagnosticableTreeMixin im
|
|||
ErrorDescription(
|
||||
'A RenderObject that still has dirty compositing bits cannot be '
|
||||
'painted because this indicates that the tree has not yet been '
|
||||
'properly configured for creating the layer tree.'
|
||||
'properly configured for creating the layer tree.',
|
||||
),
|
||||
ErrorHint(
|
||||
'This usually indicates an error in the Flutter framework itself.'
|
||||
'This usually indicates an error in the Flutter framework itself.',
|
||||
),
|
||||
]);
|
||||
}
|
||||
|
@ -2983,7 +2983,7 @@ mixin RenderObjectWithChildMixin<ChildType extends RenderObject> on RenderObject
|
|||
throw FlutterError.fromParts(<DiagnosticsNode>[
|
||||
ErrorSummary(
|
||||
'A $runtimeType expected a child of type $ChildType but received a '
|
||||
'child of type ${child.runtimeType}.'
|
||||
'child of type ${child.runtimeType}.',
|
||||
),
|
||||
ErrorDescription(
|
||||
'RenderObjects expect specific types of children because they '
|
||||
|
@ -3129,13 +3129,13 @@ mixin ContainerRenderObjectMixin<ChildType extends RenderObject, ParentDataType
|
|||
throw FlutterError.fromParts(<DiagnosticsNode>[
|
||||
ErrorSummary(
|
||||
'A $runtimeType expected a child of type $ChildType but received a '
|
||||
'child of type ${child.runtimeType}.'
|
||||
'child of type ${child.runtimeType}.',
|
||||
),
|
||||
ErrorDescription(
|
||||
'RenderObjects expect specific types of children because they '
|
||||
'coordinate with their children during layout and paint. For '
|
||||
'example, a RenderSliver cannot be the child of a RenderBox because '
|
||||
'a RenderSliver does not understand the RenderBox layout protocol.'
|
||||
'a RenderSliver does not understand the RenderBox layout protocol.',
|
||||
),
|
||||
ErrorSpacer(),
|
||||
DiagnosticsProperty<Object?>(
|
||||
|
|
|
@ -123,7 +123,7 @@ class RenderParagraph extends RenderBox
|
|||
locale: locale,
|
||||
strutStyle: strutStyle,
|
||||
textWidthBasis: textWidthBasis,
|
||||
textHeightBehavior: textHeightBehavior
|
||||
textHeightBehavior: textHeightBehavior,
|
||||
) {
|
||||
addAll(children);
|
||||
_extractPlaceholderSpans(text);
|
||||
|
@ -563,7 +563,7 @@ class RenderParagraph extends RenderBox
|
|||
switch (_placeholderSpans[childIndex].alignment) {
|
||||
case ui.PlaceholderAlignment.baseline: {
|
||||
baselineOffset = child.getDistanceToBaseline(
|
||||
_placeholderSpans[childIndex].baseline!
|
||||
_placeholderSpans[childIndex].baseline!,
|
||||
);
|
||||
break;
|
||||
}
|
||||
|
@ -1005,7 +1005,7 @@ class RenderParagraph extends RenderBox
|
|||
text.toDiagnosticsNode(
|
||||
name: 'text',
|
||||
style: DiagnosticsTreeStyle.transition,
|
||||
)
|
||||
),
|
||||
];
|
||||
}
|
||||
|
||||
|
@ -1021,7 +1021,7 @@ class RenderParagraph extends RenderBox
|
|||
ifTrue: 'wrapping at box width',
|
||||
ifFalse: 'no wrapping except at line break characters',
|
||||
showName: true,
|
||||
)
|
||||
),
|
||||
);
|
||||
properties.add(EnumProperty<TextOverflow>('overflow', overflow));
|
||||
properties.add(
|
||||
|
@ -1029,14 +1029,14 @@ class RenderParagraph extends RenderBox
|
|||
'textScaleFactor',
|
||||
textScaleFactor,
|
||||
defaultValue: 1.0,
|
||||
)
|
||||
),
|
||||
);
|
||||
properties.add(
|
||||
DiagnosticsProperty<Locale>(
|
||||
'locale',
|
||||
locale,
|
||||
defaultValue: null,
|
||||
)
|
||||
),
|
||||
);
|
||||
properties.add(IntProperty('maxLines', maxLines, ifNull: 'unlimited'));
|
||||
}
|
||||
|
|
|
@ -312,9 +312,10 @@ class RenderUiKitView extends RenderBox {
|
|||
void updateGestureRecognizers(Set<Factory<OneSequenceGestureRecognizer>> gestureRecognizers) {
|
||||
assert(gestureRecognizers != null);
|
||||
assert(
|
||||
_factoriesTypeSet(gestureRecognizers).length == gestureRecognizers.length,
|
||||
'There were multiple gesture recognizer factories for the same type, there must only be a single '
|
||||
'gesture recognizer factory for each gesture recognizer type.',);
|
||||
_factoriesTypeSet(gestureRecognizers).length == gestureRecognizers.length,
|
||||
'There were multiple gesture recognizer factories for the same type, there must only be a single '
|
||||
'gesture recognizer factory for each gesture recognizer type.',
|
||||
);
|
||||
if (_factoryTypesSetEquals(gestureRecognizers, _gestureRecognizer?.gestureRecognizerFactories)) {
|
||||
return;
|
||||
}
|
||||
|
@ -702,9 +703,10 @@ mixin _PlatformViewGestureMixin on RenderBox implements MouseTrackerAnnotation {
|
|||
void _updateGestureRecognizersWithCallBack(Set<Factory<OneSequenceGestureRecognizer>> gestureRecognizers, _HandlePointerEvent handlePointerEvent) {
|
||||
assert(gestureRecognizers != null);
|
||||
assert(
|
||||
_factoriesTypeSet(gestureRecognizers).length == gestureRecognizers.length,
|
||||
'There were multiple gesture recognizer factories for the same type, there must only be a single '
|
||||
'gesture recognizer factory for each gesture recognizer type.',);
|
||||
_factoriesTypeSet(gestureRecognizers).length == gestureRecognizers.length,
|
||||
'There were multiple gesture recognizer factories for the same type, there must only be a single '
|
||||
'gesture recognizer factory for each gesture recognizer type.',
|
||||
);
|
||||
if (_factoryTypesSetEquals(gestureRecognizers, _gestureRecognizer?.gestureRecognizerFactories)) {
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -503,7 +503,7 @@ class RenderAspectRatio extends RenderProxyBox {
|
|||
'This $runtimeType was given an aspect ratio of $aspectRatio but was given '
|
||||
'both unbounded width and unbounded height constraints. Because both '
|
||||
'constraints were unbounded, this render object doesn\'t know how much '
|
||||
'size to consume.'
|
||||
'size to consume.',
|
||||
);
|
||||
}
|
||||
return true;
|
||||
|
@ -2147,7 +2147,7 @@ class RenderDecoratedBox extends RenderProxyBox {
|
|||
ErrorDescription(
|
||||
'Before painting the decoration, the canvas save count was $debugSaveCount. '
|
||||
'After painting it, the canvas save count was ${context.canvas.getSaveCount()}. '
|
||||
'Every call to save() or saveLayer() must be matched by a call to restore().'
|
||||
'Every call to save() or saveLayer() must be matched by a call to restore().',
|
||||
),
|
||||
DiagnosticsProperty<Decoration>('The decoration was', decoration, style: DiagnosticsTreeStyle.errorProperty),
|
||||
DiagnosticsProperty<BoxPainter>('The painter was', _painter, style: DiagnosticsTreeStyle.errorProperty),
|
||||
|
|
|
@ -418,8 +418,8 @@ class RenderPositionedBox extends RenderAligningShiftedBox {
|
|||
final Size childSize = child!.getDryLayout(constraints.loosen());
|
||||
return constraints.constrain(Size(
|
||||
shrinkWrapWidth ? childSize.width * (_widthFactor ?? 1.0) : double.infinity,
|
||||
shrinkWrapHeight ? childSize.height * (_heightFactor ?? 1.0) : double.infinity),
|
||||
);
|
||||
shrinkWrapHeight ? childSize.height * (_heightFactor ?? 1.0) : double.infinity,
|
||||
));
|
||||
}
|
||||
return constraints.constrain(Size(
|
||||
shrinkWrapWidth ? 0.0 : double.infinity,
|
||||
|
@ -857,7 +857,7 @@ class RenderConstraintsTransformBox extends RenderAligningShiftedBox with DebugO
|
|||
///
|
||||
@Deprecated(
|
||||
'Use RenderConstraintsTransformBox instead. '
|
||||
'This feature was deprecated after v2.1.0-11.0.pre.'
|
||||
'This feature was deprecated after v2.1.0-11.0.pre.',
|
||||
)
|
||||
class RenderUnconstrainedBox extends RenderConstraintsTransformBox {
|
||||
/// Create a render object that sizes itself to the child but does not
|
||||
|
@ -866,7 +866,7 @@ class RenderUnconstrainedBox extends RenderConstraintsTransformBox {
|
|||
/// The [alignment] and [clipBehavior] must not be null.
|
||||
@Deprecated(
|
||||
'Use RenderConstraintsTransformBox instead. '
|
||||
'This feature was deprecated after v2.1.0-11.0.pre.'
|
||||
'This feature was deprecated after v2.1.0-11.0.pre.',
|
||||
)
|
||||
RenderUnconstrainedBox({
|
||||
required AlignmentGeometry alignment,
|
||||
|
|
|
@ -975,13 +975,13 @@ List<DiagnosticsNode> _debugCompareFloats(String labelA, double valueA, String l
|
|||
if (valueA.toStringAsFixed(1) != valueB.toStringAsFixed(1))
|
||||
ErrorDescription(
|
||||
'The $labelA is ${valueA.toStringAsFixed(1)}, but '
|
||||
'the $labelB is ${valueB.toStringAsFixed(1)}.'
|
||||
'the $labelB is ${valueB.toStringAsFixed(1)}.',
|
||||
)
|
||||
else ...<DiagnosticsNode>[
|
||||
ErrorDescription('The $labelA is $valueA, but the $labelB is $valueB.'),
|
||||
ErrorHint(
|
||||
'Maybe you have fallen prey to floating point rounding errors, and should explicitly '
|
||||
'apply the min() or max() functions, or the clamp() method, to the $labelB?'
|
||||
'apply the min() or max() functions, or the clamp() method, to the $labelB?',
|
||||
),
|
||||
],
|
||||
];
|
||||
|
@ -1205,7 +1205,7 @@ abstract class RenderSliver extends RenderObject {
|
|||
assert(geometry!.debugAssertIsValid(
|
||||
informationCollector: () sync* {
|
||||
yield describeForError('The RenderSliver that returned the offending geometry was');
|
||||
}
|
||||
},
|
||||
));
|
||||
assert(() {
|
||||
if (geometry!.paintOrigin + geometry!.paintExtent > constraints.remainingPaintExtent) {
|
||||
|
|
|
@ -499,7 +499,7 @@ class FloatingHeaderSnapConfiguration {
|
|||
FloatingHeaderSnapConfiguration({
|
||||
@Deprecated(
|
||||
'Specify SliverPersistentHeaderDelegate.vsync instead. '
|
||||
'This feature was deprecated after v1.19.0.'
|
||||
'This feature was deprecated after v1.19.0.',
|
||||
)
|
||||
this.vsync,
|
||||
this.curve = Curves.ease,
|
||||
|
@ -511,7 +511,7 @@ class FloatingHeaderSnapConfiguration {
|
|||
/// header to snap in or out of view.
|
||||
@Deprecated(
|
||||
'Specify SliverPersistentHeaderDelegate.vsync instead. '
|
||||
'This feature was deprecated after v1.19.0.'
|
||||
'This feature was deprecated after v1.19.0.',
|
||||
)
|
||||
final TickerProvider? vsync;
|
||||
|
||||
|
|
|
@ -276,7 +276,7 @@ enum StackFit {
|
|||
/// Deprecated. Use [Stack.clipBehavior] instead.
|
||||
@Deprecated(
|
||||
'Use clipBehavior instead. See the migration guide in flutter.dev/go/clip-behavior. '
|
||||
'This feature was deprecated after v1.22.0-12.0.pre.'
|
||||
'This feature was deprecated after v1.22.0-12.0.pre.',
|
||||
)
|
||||
enum Overflow {
|
||||
/// Overflowing children will be visible.
|
||||
|
|
|
@ -1018,7 +1018,7 @@ class RenderTable extends RenderBox {
|
|||
switch (childParentData.verticalAlignment ?? defaultVerticalAlignment) {
|
||||
case TableCellVerticalAlignment.baseline:
|
||||
assert(debugCannotComputeDryLayout(
|
||||
reason: 'TableCellVerticalAlignment.baseline requires a full layout for baseline metrics to be available.'
|
||||
reason: 'TableCellVerticalAlignment.baseline requires a full layout for baseline metrics to be available.',
|
||||
));
|
||||
return Size.zero;
|
||||
case TableCellVerticalAlignment.top:
|
||||
|
|
|
@ -405,7 +405,7 @@ abstract class RenderViewportBase<ParentDataClass extends ContainerParentDataMix
|
|||
ErrorHint(
|
||||
'If you are merely trying to shrink-wrap the viewport in the main axis direction, '
|
||||
'consider a RenderShrinkWrappingViewport render object (ShrinkWrappingViewport widget), '
|
||||
'which achieves that effect without implementing the intrinsic dimension API.'
|
||||
'which achieves that effect without implementing the intrinsic dimension API.',
|
||||
),
|
||||
]);
|
||||
}
|
||||
|
@ -1366,7 +1366,7 @@ class RenderViewport extends RenderViewportBase<SliverPhysicalContainerParentDat
|
|||
'Viewports expand in the scrolling direction to fill their container. '
|
||||
'In this case, a vertical viewport was given an unlimited amount of '
|
||||
'vertical space in which to expand. This situation typically happens '
|
||||
'when a scrollable widget is nested inside another scrollable widget.'
|
||||
'when a scrollable widget is nested inside another scrollable widget.',
|
||||
),
|
||||
ErrorHint(
|
||||
'If this widget is always nested in a scrollable widget there '
|
||||
|
@ -1374,8 +1374,8 @@ class RenderViewport extends RenderViewportBase<SliverPhysicalContainerParentDat
|
|||
'vertical space for the children. In this case, consider using a '
|
||||
'Column instead. Otherwise, consider using the "shrinkWrap" property '
|
||||
'(or a ShrinkWrappingViewport) to size the height of the viewport '
|
||||
'to the sum of the heights of its children.'
|
||||
)
|
||||
'to the sum of the heights of its children.',
|
||||
),
|
||||
]);
|
||||
}
|
||||
if (!constraints.hasBoundedWidth) {
|
||||
|
@ -1384,7 +1384,7 @@ class RenderViewport extends RenderViewportBase<SliverPhysicalContainerParentDat
|
|||
'Viewports expand in the cross axis to fill their container and '
|
||||
'constrain their children to match their extent in the cross axis. '
|
||||
'In this case, a vertical viewport was given an unlimited amount of '
|
||||
'horizontal space in which to expand.'
|
||||
'horizontal space in which to expand.',
|
||||
);
|
||||
}
|
||||
break;
|
||||
|
@ -1396,7 +1396,7 @@ class RenderViewport extends RenderViewportBase<SliverPhysicalContainerParentDat
|
|||
'Viewports expand in the scrolling direction to fill their container. '
|
||||
'In this case, a horizontal viewport was given an unlimited amount of '
|
||||
'horizontal space in which to expand. This situation typically happens '
|
||||
'when a scrollable widget is nested inside another scrollable widget.'
|
||||
'when a scrollable widget is nested inside another scrollable widget.',
|
||||
),
|
||||
ErrorHint(
|
||||
'If this widget is always nested in a scrollable widget there '
|
||||
|
@ -1404,8 +1404,8 @@ class RenderViewport extends RenderViewportBase<SliverPhysicalContainerParentDat
|
|||
'horizontal space for the children. In this case, consider using a '
|
||||
'Row instead. Otherwise, consider using the "shrinkWrap" property '
|
||||
'(or a ShrinkWrappingViewport) to size the width of the viewport '
|
||||
'to the sum of the widths of its children.'
|
||||
)
|
||||
'to the sum of the widths of its children.',
|
||||
),
|
||||
]);
|
||||
}
|
||||
if (!constraints.hasBoundedHeight) {
|
||||
|
@ -1414,7 +1414,7 @@ class RenderViewport extends RenderViewportBase<SliverPhysicalContainerParentDat
|
|||
'Viewports expand in the cross axis to fill their container and '
|
||||
'constrain their children to match their extent in the cross axis. '
|
||||
'In this case, a horizontal viewport was given an unlimited amount of '
|
||||
'vertical space in which to expand.'
|
||||
'vertical space in which to expand.',
|
||||
);
|
||||
}
|
||||
break;
|
||||
|
@ -1505,7 +1505,7 @@ class RenderViewport extends RenderViewportBase<SliverPhysicalContainerParentDat
|
|||
' applies a reverse correction, leading to an infinite loop of corrections.\n'
|
||||
' * There is a pathological case that would eventually resolve, but it is'
|
||||
' so complicated that it cannot be resolved in any reasonable number of'
|
||||
' layout passes.'
|
||||
' layout passes.',
|
||||
);
|
||||
}
|
||||
return true;
|
||||
|
@ -1806,13 +1806,13 @@ class RenderShrinkWrappingViewport extends RenderViewportBase<SliverLogicalConta
|
|||
ErrorSummary('$runtimeType does not support returning intrinsic dimensions.'),
|
||||
ErrorDescription(
|
||||
'Calculating the intrinsic dimensions would require instantiating every child of '
|
||||
'the viewport, which defeats the point of viewports being lazy.'
|
||||
'the viewport, which defeats the point of viewports being lazy.',
|
||||
),
|
||||
ErrorHint(
|
||||
'If you are merely trying to shrink-wrap the viewport in the main axis direction, '
|
||||
'you should be able to achieve that effect by just giving the viewport loose '
|
||||
'constraints, without needing to measure its intrinsic dimensions.'
|
||||
)
|
||||
'constraints, without needing to measure its intrinsic dimensions.',
|
||||
),
|
||||
]);
|
||||
}
|
||||
return true;
|
||||
|
|
|
@ -98,13 +98,13 @@ class _FrameCallbackEntry {
|
|||
ErrorDescription(
|
||||
'The "rescheduling" argument should only be set to true if the '
|
||||
'callback is being reregistered from within the callback itself, '
|
||||
'and only then if the callback itself is entirely synchronous.'
|
||||
'and only then if the callback itself is entirely synchronous.',
|
||||
),
|
||||
ErrorHint(
|
||||
'If this is the initial registration of the callback, or if the '
|
||||
'callback is asynchronous, then do not use the "rescheduling" '
|
||||
'argument.'
|
||||
)
|
||||
'argument.',
|
||||
),
|
||||
]);
|
||||
}
|
||||
return true;
|
||||
|
@ -304,7 +304,7 @@ mixin SchedulerBinding on BindingBase {
|
|||
exception: exception,
|
||||
stack: stack,
|
||||
context: ErrorDescription('while executing callbacks for FrameTiming'),
|
||||
informationCollector: collector
|
||||
informationCollector: collector,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
@ -573,12 +573,12 @@ mixin SchedulerBinding on BindingBase {
|
|||
// TODO(jacobr): I have added an extra line break in this case.
|
||||
yield ErrorDescription(
|
||||
'There was one transient callback left. '
|
||||
'The stack trace for when it was registered is as follows:'
|
||||
'The stack trace for when it was registered is as follows:',
|
||||
);
|
||||
} else {
|
||||
yield ErrorDescription(
|
||||
'There were $count transient callbacks left. '
|
||||
'The stack traces for when they were registered are as follows:'
|
||||
'The stack traces for when they were registered are as follows:',
|
||||
);
|
||||
}
|
||||
for (final int id in callbacks.keys) {
|
||||
|
@ -620,8 +620,8 @@ mixin SchedulerBinding on BindingBase {
|
|||
FlutterError.defaultStackFilter(
|
||||
FlutterError.demangleStackTrace(
|
||||
_FrameCallbackEntry.debugCurrentCallbackStack!,
|
||||
).toString().trimRight().split('\n')
|
||||
).join('\n')
|
||||
).toString().trimRight().split('\n'),
|
||||
).join('\n'),
|
||||
);
|
||||
} else {
|
||||
debugPrint('No transient callback is currently executing.');
|
||||
|
|
|
@ -1402,7 +1402,7 @@ class SemanticsNode extends AbstractNode with DiagnosticableTreeMixin {
|
|||
if (newChildren.length != _debugPreviousSnapshot.length) {
|
||||
mutationErrors.add(ErrorDescription(
|
||||
"The list's length has changed from ${_debugPreviousSnapshot.length} "
|
||||
'to ${newChildren.length}.'
|
||||
'to ${newChildren.length}.',
|
||||
));
|
||||
} else {
|
||||
for (int i = 0; i < newChildren.length; i++) {
|
||||
|
|
|
@ -149,13 +149,13 @@ class TapSemanticEvent extends SemanticsEvent {
|
|||
///
|
||||
@Deprecated(
|
||||
'This event has never been implemented and will be removed in a future version of Flutter. References to it should be removed. '
|
||||
'This feature was deprecated after v1.26.0-18.0.pre.'
|
||||
'This feature was deprecated after v1.26.0-18.0.pre.',
|
||||
)
|
||||
class UpdateLiveRegionEvent extends SemanticsEvent {
|
||||
/// Creates a new [UpdateLiveRegionEvent].
|
||||
@Deprecated(
|
||||
'This event has never been implemented and will be removed in a future version of Flutter. References to it should be removed. '
|
||||
'This feature was deprecated after v1.26.0-18.0.pre.'
|
||||
'This feature was deprecated after v1.26.0-18.0.pre.',
|
||||
)
|
||||
const UpdateLiveRegionEvent() : super('updateLiveRegion');
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ class FontLoader {
|
|||
throw StateError('FontLoader is already loaded');
|
||||
|
||||
_fontFutures.add(bytes.then(
|
||||
(ByteData data) => Uint8List.view(data.buffer, data.offsetInBytes, data.lengthInBytes)
|
||||
(ByteData data) => Uint8List.view(data.buffer, data.offsetInBytes, data.lengthInBytes),
|
||||
));
|
||||
}
|
||||
|
||||
|
@ -59,8 +59,8 @@ class FontLoader {
|
|||
|
||||
final Iterable<Future<void>> loadFutures = _fontFutures.map(
|
||||
(Future<Uint8List> f) => f.then<void>(
|
||||
(Uint8List list) => loadFont(list, family)
|
||||
)
|
||||
(Uint8List list) => loadFont(list, family),
|
||||
),
|
||||
);
|
||||
await Future.wait(loadFutures.toList());
|
||||
}
|
||||
|
|
|
@ -578,13 +578,11 @@ class _AndroidMotionEventConverter {
|
|||
if (event is PointerDownEvent) {
|
||||
action = numPointers == 1
|
||||
? AndroidViewController.kActionDown
|
||||
: AndroidViewController.pointerAction(
|
||||
pointerIdx, AndroidViewController.kActionPointerDown);
|
||||
: AndroidViewController.pointerAction(pointerIdx, AndroidViewController.kActionPointerDown);
|
||||
} else if (event is PointerUpEvent) {
|
||||
action = numPointers == 1
|
||||
? AndroidViewController.kActionUp
|
||||
: AndroidViewController.pointerAction(
|
||||
pointerIdx, AndroidViewController.kActionPointerUp);
|
||||
: AndroidViewController.pointerAction(pointerIdx, AndroidViewController.kActionPointerUp);
|
||||
} else if (event is PointerMoveEvent) {
|
||||
action = AndroidViewController.kActionMove;
|
||||
} else if (event is PointerCancelEvent) {
|
||||
|
@ -772,7 +770,7 @@ abstract class AndroidViewController extends PlatformViewController {
|
|||
/// The unique identifier of the Android view controlled by this controller.
|
||||
@Deprecated(
|
||||
'Call `controller.viewId` instead. '
|
||||
'This feature was deprecated after v1.20.0-2.0.pre.'
|
||||
'This feature was deprecated after v1.20.0-2.0.pre.',
|
||||
)
|
||||
int get id => viewId;
|
||||
|
||||
|
@ -813,8 +811,7 @@ abstract class AndroidViewController extends PlatformViewController {
|
|||
}
|
||||
|
||||
/// Removes a callback added with [addOnPlatformViewCreatedListener].
|
||||
void removeOnPlatformViewCreatedListener(
|
||||
PlatformViewCreatedCallback listener) {
|
||||
void removeOnPlatformViewCreatedListener(PlatformViewCreatedCallback listener) {
|
||||
assert(_state != _AndroidViewState.disposed);
|
||||
_platformViewCreatedCallbacks.remove(listener);
|
||||
}
|
||||
|
@ -913,12 +910,13 @@ class SurfaceAndroidViewController extends AndroidViewController {
|
|||
required TextDirection layoutDirection,
|
||||
dynamic creationParams,
|
||||
MessageCodec<dynamic>? creationParamsCodec,
|
||||
}) : super._(
|
||||
viewId: viewId,
|
||||
viewType: viewType,
|
||||
layoutDirection: layoutDirection,
|
||||
creationParams: creationParams,
|
||||
creationParamsCodec: creationParamsCodec);
|
||||
}) : super._(
|
||||
viewId: viewId,
|
||||
viewType: viewType,
|
||||
layoutDirection: layoutDirection,
|
||||
creationParams: creationParams,
|
||||
creationParamsCodec: creationParamsCodec,
|
||||
);
|
||||
|
||||
@override
|
||||
Future<void> _sendCreateMessage() {
|
||||
|
|
|
@ -328,28 +328,31 @@ abstract class RawKeyEvent with Diagnosticable {
|
|||
break;
|
||||
case 'macos':
|
||||
data = RawKeyEventDataMacOs(
|
||||
characters: message['characters'] as String? ?? '',
|
||||
charactersIgnoringModifiers: message['charactersIgnoringModifiers'] as String? ?? '',
|
||||
keyCode: message['keyCode'] as int? ?? 0,
|
||||
modifiers: message['modifiers'] as int? ?? 0);
|
||||
characters: message['characters'] as String? ?? '',
|
||||
charactersIgnoringModifiers: message['charactersIgnoringModifiers'] as String? ?? '',
|
||||
keyCode: message['keyCode'] as int? ?? 0,
|
||||
modifiers: message['modifiers'] as int? ?? 0,
|
||||
);
|
||||
character = message['characters'] as String?;
|
||||
break;
|
||||
case 'ios':
|
||||
data = RawKeyEventDataIos(
|
||||
characters: message['characters'] as String? ?? '',
|
||||
charactersIgnoringModifiers: message['charactersIgnoringModifiers'] as String? ?? '',
|
||||
keyCode: message['keyCode'] as int? ?? 0,
|
||||
modifiers: message['modifiers'] as int? ?? 0);
|
||||
characters: message['characters'] as String? ?? '',
|
||||
charactersIgnoringModifiers: message['charactersIgnoringModifiers'] as String? ?? '',
|
||||
keyCode: message['keyCode'] as int? ?? 0,
|
||||
modifiers: message['modifiers'] as int? ?? 0,
|
||||
);
|
||||
break;
|
||||
case 'linux':
|
||||
final int unicodeScalarValues = message['unicodeScalarValues'] as int? ?? 0;
|
||||
data = RawKeyEventDataLinux(
|
||||
keyHelper: KeyHelper(message['toolkit'] as String? ?? ''),
|
||||
unicodeScalarValues: unicodeScalarValues,
|
||||
keyCode: message['keyCode'] as int? ?? 0,
|
||||
scanCode: message['scanCode'] as int? ?? 0,
|
||||
modifiers: message['modifiers'] as int? ?? 0,
|
||||
isDown: message['type'] == 'keydown');
|
||||
keyHelper: KeyHelper(message['toolkit'] as String? ?? ''),
|
||||
unicodeScalarValues: unicodeScalarValues,
|
||||
keyCode: message['keyCode'] as int? ?? 0,
|
||||
scanCode: message['scanCode'] as int? ?? 0,
|
||||
modifiers: message['modifiers'] as int? ?? 0,
|
||||
isDown: message['type'] == 'keydown',
|
||||
);
|
||||
if (unicodeScalarValues != 0) {
|
||||
character = String.fromCharCode(unicodeScalarValues);
|
||||
}
|
||||
|
|
|
@ -32,7 +32,7 @@ const Map<String, LogicalKeyboardKey> _kIosToLogicalMap = <String, LogicalKeyboa
|
|||
'UIKeyInputHome': LogicalKeyboardKey.home,
|
||||
'UIKeyInputEnd': LogicalKeyboardKey.enter,
|
||||
'UIKeyInputPageUp': LogicalKeyboardKey.pageUp,
|
||||
'UIKeyInputPageDown': LogicalKeyboardKey.pageDown
|
||||
'UIKeyInputPageDown': LogicalKeyboardKey.pageDown,
|
||||
};
|
||||
/// Platform-specific key event data for iOS.
|
||||
///
|
||||
|
|
|
@ -858,7 +858,7 @@ class RestorationBucket {
|
|||
}
|
||||
final List<DiagnosticsNode> error = <DiagnosticsNode>[
|
||||
ErrorSummary('Multiple owners claimed child RestorationBuckets with the same IDs.'),
|
||||
ErrorDescription('The following IDs were claimed multiple times from the parent $this:')
|
||||
ErrorDescription('The following IDs were claimed multiple times from the parent $this:'),
|
||||
];
|
||||
for (final MapEntry<String, List<RestorationBucket>> child in _childrenToAdd.entries) {
|
||||
final String id = child.key;
|
||||
|
@ -986,7 +986,7 @@ class RestorationBucket {
|
|||
if (_debugDisposed) {
|
||||
throw FlutterError(
|
||||
'A $runtimeType was used after being disposed.\n'
|
||||
'Once you have called dispose() on a $runtimeType, it can no longer be used.'
|
||||
'Once you have called dispose() on a $runtimeType, it can no longer be used.',
|
||||
);
|
||||
}
|
||||
return true;
|
||||
|
|
|
@ -39,7 +39,7 @@ class SystemNavigator {
|
|||
/// information.
|
||||
static void routeInformationUpdated({
|
||||
required String location,
|
||||
Object? state
|
||||
Object? state,
|
||||
}) {
|
||||
SystemChannels.navigation.invokeMethod<void>(
|
||||
'routeInformationUpdated',
|
||||
|
@ -55,7 +55,7 @@ class SystemNavigator {
|
|||
/// On Web, updates the URL bar with the [routeName].
|
||||
static void routeUpdated({
|
||||
String? routeName,
|
||||
String? previousRouteName
|
||||
String? previousRouteName,
|
||||
}) {
|
||||
SystemChannels.navigation.invokeMethod<void>(
|
||||
'routeUpdated',
|
||||
|
|
|
@ -285,13 +285,13 @@ class FilteringTextInputFormatter extends TextInputFormatter {
|
|||
/// Old name for [FilteringTextInputFormatter.deny].
|
||||
@Deprecated(
|
||||
'Use FilteringTextInputFormatter.deny instead. '
|
||||
'This feature was deprecated after v1.20.0-1.0.pre.'
|
||||
'This feature was deprecated after v1.20.0-1.0.pre.',
|
||||
)
|
||||
class BlacklistingTextInputFormatter extends FilteringTextInputFormatter {
|
||||
/// Old name for [FilteringTextInputFormatter.deny].
|
||||
@Deprecated(
|
||||
'Use FilteringTextInputFormatter.deny instead. '
|
||||
'This feature was deprecated after v1.20.0-1.0.pre.'
|
||||
'This feature was deprecated after v1.20.0-1.0.pre.',
|
||||
)
|
||||
BlacklistingTextInputFormatter(
|
||||
Pattern blacklistedPattern, {
|
||||
|
@ -301,14 +301,14 @@ class BlacklistingTextInputFormatter extends FilteringTextInputFormatter {
|
|||
/// Old name for [filterPattern].
|
||||
@Deprecated(
|
||||
'Use filterPattern instead. '
|
||||
'This feature was deprecated after v1.20.0-1.0.pre.'
|
||||
'This feature was deprecated after v1.20.0-1.0.pre.',
|
||||
)
|
||||
Pattern get blacklistedPattern => filterPattern;
|
||||
|
||||
/// Old name for [FilteringTextInputFormatter.singleLineFormatter].
|
||||
@Deprecated(
|
||||
'Use FilteringTextInputFormatter.singleLineFormatter instead. '
|
||||
'This feature was deprecated after v1.20.0-1.0.pre.'
|
||||
'This feature was deprecated after v1.20.0-1.0.pre.',
|
||||
)
|
||||
static final BlacklistingTextInputFormatter singleLineFormatter
|
||||
= BlacklistingTextInputFormatter(RegExp(r'\n'));
|
||||
|
@ -317,13 +317,13 @@ class BlacklistingTextInputFormatter extends FilteringTextInputFormatter {
|
|||
/// Old name for [FilteringTextInputFormatter.allow].
|
||||
@Deprecated(
|
||||
'Use FilteringTextInputFormatter.allow instead. '
|
||||
'This feature was deprecated after v1.20.0-1.0.pre.'
|
||||
'This feature was deprecated after v1.20.0-1.0.pre.',
|
||||
)
|
||||
class WhitelistingTextInputFormatter extends FilteringTextInputFormatter {
|
||||
/// Old name for [FilteringTextInputFormatter.allow].
|
||||
@Deprecated(
|
||||
'Use FilteringTextInputFormatter.allow instead. '
|
||||
'This feature was deprecated after v1.20.0-1.0.pre.'
|
||||
'This feature was deprecated after v1.20.0-1.0.pre.',
|
||||
)
|
||||
WhitelistingTextInputFormatter(Pattern whitelistedPattern)
|
||||
: assert(whitelistedPattern != null),
|
||||
|
@ -332,14 +332,14 @@ class WhitelistingTextInputFormatter extends FilteringTextInputFormatter {
|
|||
/// Old name for [filterPattern].
|
||||
@Deprecated(
|
||||
'Use filterPattern instead. '
|
||||
'This feature was deprecated after v1.20.0-1.0.pre.'
|
||||
'This feature was deprecated after v1.20.0-1.0.pre.',
|
||||
)
|
||||
Pattern get whitelistedPattern => filterPattern;
|
||||
|
||||
/// Old name for [FilteringTextInputFormatter.digitsOnly].
|
||||
@Deprecated(
|
||||
'Use FilteringTextInputFormatter.digitsOnly instead. '
|
||||
'This feature was deprecated after v1.20.0-1.0.pre.'
|
||||
'This feature was deprecated after v1.20.0-1.0.pre.',
|
||||
)
|
||||
static final WhitelistingTextInputFormatter digitsOnly
|
||||
= WhitelistingTextInputFormatter(RegExp(r'\d+'));
|
||||
|
@ -540,13 +540,13 @@ TextEditingValue _selectionAwareTextManipulation(
|
|||
manipulatedText = substringManipulation(value.text);
|
||||
} else {
|
||||
final String beforeSelection = substringManipulation(
|
||||
value.text.substring(0, selectionStartIndex)
|
||||
value.text.substring(0, selectionStartIndex),
|
||||
);
|
||||
final String inSelection = substringManipulation(
|
||||
value.text.substring(selectionStartIndex, selectionEndIndex)
|
||||
value.text.substring(selectionStartIndex, selectionEndIndex),
|
||||
);
|
||||
final String afterSelection = substringManipulation(
|
||||
value.text.substring(selectionEndIndex)
|
||||
value.text.substring(selectionEndIndex),
|
||||
);
|
||||
manipulatedText = beforeSelection + inSelection + afterSelection;
|
||||
if (value.selection.baseOffset > value.selection.extentOffset) {
|
||||
|
|
|
@ -804,7 +804,7 @@ mixin TextSelectionDelegate {
|
|||
/// formatting.
|
||||
@Deprecated(
|
||||
'Use the userUpdateTextEditingValue instead. '
|
||||
'This feature was deprecated after v1.26.0-17.2.pre.'
|
||||
'This feature was deprecated after v1.26.0-17.2.pre.',
|
||||
)
|
||||
set textEditingValue(TextEditingValue value) {}
|
||||
|
||||
|
@ -1355,7 +1355,8 @@ class TextInput {
|
|||
break;
|
||||
case 'TextInputClient.performPrivateCommand':
|
||||
_currentConnection!._client.performPrivateCommand(
|
||||
args[1]['action'] as String, args[1]['data'] as Map<String, dynamic>);
|
||||
args[1]['action'] as String, args[1]['data'] as Map<String, dynamic>,
|
||||
);
|
||||
break;
|
||||
case 'TextInputClient.updateFloatingCursor':
|
||||
_currentConnection!._client.updateFloatingCursor(_toTextPoint(
|
||||
|
|
|
@ -402,17 +402,17 @@ class AnimatedList extends StatefulWidget {
|
|||
assert((){
|
||||
if (result == null) {
|
||||
throw FlutterError.fromParts(<DiagnosticsNode>[
|
||||
ErrorSummary(
|
||||
'AnimatedList.of() called with a context that does not contain an AnimatedList.'),
|
||||
ErrorSummary('AnimatedList.of() called with a context that does not contain an AnimatedList.'),
|
||||
ErrorDescription(
|
||||
'No AnimatedList ancestor could be found starting from the context that was passed to AnimatedList.of().'),
|
||||
'No AnimatedList ancestor could be found starting from the context that was passed to AnimatedList.of().',
|
||||
),
|
||||
ErrorHint(
|
||||
'This can happen when the context provided is from the same StatefulWidget that '
|
||||
'built the AnimatedList. Please see the AnimatedList documentation for examples '
|
||||
'of how to refer to an AnimatedListState object:'
|
||||
' https://api.flutter.dev/flutter/widgets/AnimatedListState-class.html'
|
||||
'of how to refer to an AnimatedListState object:\n'
|
||||
' https://api.flutter.dev/flutter/widgets/AnimatedListState-class.html',
|
||||
),
|
||||
context.describeElement('The context used was')
|
||||
context.describeElement('The context used was'),
|
||||
]);
|
||||
}
|
||||
return true;
|
||||
|
@ -826,7 +826,8 @@ class SliverAnimatedList extends StatefulWidget {
|
|||
'for examples of how to refer to an AnimatedListState object: '
|
||||
'https://api.flutter.dev/flutter/widgets/SliverAnimatedListState-class.html\n'
|
||||
'The context used was:\n'
|
||||
' $context');
|
||||
' $context',
|
||||
);
|
||||
}
|
||||
return true;
|
||||
}());
|
||||
|
|
|
@ -1036,7 +1036,7 @@ class WidgetsApp extends StatefulWidget {
|
|||
orderedIntents: <Intent>[
|
||||
ActivateIntent(),
|
||||
ScrollIntent(direction: AxisDirection.down, type: ScrollIncrementType.page),
|
||||
]
|
||||
],
|
||||
),
|
||||
// On the web, enter activates buttons, but not other controls.
|
||||
LogicalKeySet(LogicalKeyboardKey.enter): const ButtonActivateIntent(),
|
||||
|
@ -1235,7 +1235,7 @@ class _WidgetsAppState extends State<WidgetsApp> with WidgetsBindingObserver {
|
|||
' 3. Otherwise, onGenerateRoute is called. It should return a '
|
||||
'non-null value for any valid route not handled by "home" and "routes".\n'
|
||||
' 4. Finally if all else fails onUnknownRoute is called.\n'
|
||||
'Unfortunately, onUnknownRoute was not set.'
|
||||
'Unfortunately, onUnknownRoute was not set.',
|
||||
);
|
||||
}
|
||||
return true;
|
||||
|
@ -1247,7 +1247,7 @@ class _WidgetsAppState extends State<WidgetsApp> with WidgetsBindingObserver {
|
|||
'The onUnknownRoute callback returned null.\n'
|
||||
'When the $runtimeType requested the route $settings from its '
|
||||
'onUnknownRoute callback, the callback returned null. Such callbacks '
|
||||
'must never return null.'
|
||||
'must never return null.',
|
||||
);
|
||||
}
|
||||
return true;
|
||||
|
@ -1484,7 +1484,7 @@ class _WidgetsAppState extends State<WidgetsApp> with WidgetsBindingObserver {
|
|||
message.writeln('\u2550' * 8);
|
||||
message.writeln(
|
||||
"Warning: This application's locale, $appLocale, is not supported by all of its\n"
|
||||
'localization delegates.'
|
||||
'localization delegates.',
|
||||
);
|
||||
for (final Type unsupportedType in unsupportedTypes) {
|
||||
// Currently the Cupertino library only provides english localizations.
|
||||
|
@ -1493,13 +1493,13 @@ class _WidgetsAppState extends State<WidgetsApp> with WidgetsBindingObserver {
|
|||
if (unsupportedType.toString() == 'CupertinoLocalizations')
|
||||
continue;
|
||||
message.writeln(
|
||||
'> A $unsupportedType delegate that supports the $appLocale locale was not found.'
|
||||
'> A $unsupportedType delegate that supports the $appLocale locale was not found.',
|
||||
);
|
||||
}
|
||||
message.writeln(
|
||||
'See https://flutter.dev/tutorials/internationalization/ for more\n'
|
||||
"information about configuring an app's locale, supportedLocales,\n"
|
||||
'and localizationsDelegates parameters.'
|
||||
'and localizationsDelegates parameters.',
|
||||
);
|
||||
message.writeln('\u2550' * 8);
|
||||
debugPrint(message.toString());
|
||||
|
|
|
@ -148,7 +148,7 @@ class _AutomaticKeepAliveState extends State<AutomaticKeepAlive> {
|
|||
'AutomaticKeepAlive handle triggered after AutomaticKeepAlive was disposed.\n'
|
||||
'Widgets should always trigger their KeepAliveNotification handle when they are '
|
||||
'deactivated, so that they (or their handle) do not send spurious events later '
|
||||
'when they are no longer in the tree.'
|
||||
'when they are no longer in the tree.',
|
||||
);
|
||||
}
|
||||
return true;
|
||||
|
@ -405,7 +405,7 @@ class _NullWidget extends StatelessWidget {
|
|||
Widget build(BuildContext context) {
|
||||
throw FlutterError(
|
||||
'Widgets that mix AutomaticKeepAliveClientMixin into their State must '
|
||||
'call super.build() but must ignore the return value of the superclass.'
|
||||
'call super.build() but must ignore the return value of the superclass.',
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3726,7 +3726,7 @@ class Stack extends MultiChildRenderObjectWidget {
|
|||
this.fit = StackFit.loose,
|
||||
@Deprecated(
|
||||
'Use clipBehavior instead. See the migration guide in flutter.dev/go/clip-behavior. '
|
||||
'This feature was deprecated after v1.22.0-12.0.pre.'
|
||||
'This feature was deprecated after v1.22.0-12.0.pre.',
|
||||
)
|
||||
this.overflow = Overflow.clip,
|
||||
this.clipBehavior = Clip.hardEdge,
|
||||
|
@ -3783,7 +3783,7 @@ class Stack extends MultiChildRenderObjectWidget {
|
|||
/// Deprecated. Use [clipBehavior] instead.
|
||||
@Deprecated(
|
||||
'Use clipBehavior instead. See the migration guide in flutter.dev/go/clip-behavior. '
|
||||
'This feature was deprecated after v1.22.0-12.0.pre.'
|
||||
'This feature was deprecated after v1.22.0-12.0.pre.',
|
||||
)
|
||||
final Overflow overflow;
|
||||
|
||||
|
@ -3798,8 +3798,8 @@ class Stack extends MultiChildRenderObjectWidget {
|
|||
context,
|
||||
why: 'to resolve the \'alignment\' argument',
|
||||
hint: alignment == AlignmentDirectional.topStart ? 'The default value for \'alignment\' is AlignmentDirectional.topStart, which requires a text direction.' : null,
|
||||
alternative: 'Instead of providing a Directionality widget, another solution would be passing a non-directional \'alignment\', or an explicit \'textDirection\', to the $runtimeType.'),
|
||||
);
|
||||
alternative: 'Instead of providing a Directionality widget, another solution would be passing a non-directional \'alignment\', or an explicit \'textDirection\', to the $runtimeType.',
|
||||
));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -666,7 +666,7 @@ mixin WidgetsBinding on BindingBase, ServicesBinding, SchedulerBinding, GestureB
|
|||
RouteInformation(
|
||||
location: routeArguments['location'] as String,
|
||||
state: routeArguments['state'] as Object?,
|
||||
)
|
||||
),
|
||||
)
|
||||
)
|
||||
return;
|
||||
|
@ -746,7 +746,7 @@ mixin WidgetsBinding on BindingBase, ServicesBinding, SchedulerBinding, GestureB
|
|||
ErrorSummary('Build scheduled during frame.'),
|
||||
ErrorDescription(
|
||||
'While the widget tree was being built, laid out, and painted, '
|
||||
'a new frame was scheduled to rebuild the widget tree.'
|
||||
'a new frame was scheduled to rebuild the widget tree.',
|
||||
),
|
||||
ErrorHint(
|
||||
'This might be because setState() was called from a layout or '
|
||||
|
@ -761,7 +761,7 @@ mixin WidgetsBinding on BindingBase, ServicesBinding, SchedulerBinding, GestureB
|
|||
'animation, consider scheduling the frame in a post-frame callback '
|
||||
'using SchedulerBinding.addPostFrameCallback or '
|
||||
'using an AnimationController to trigger the animation.',
|
||||
)
|
||||
),
|
||||
]);
|
||||
}
|
||||
return true;
|
||||
|
|
|
@ -26,7 +26,7 @@ class BottomNavigationBarItem {
|
|||
required this.icon,
|
||||
@Deprecated(
|
||||
'Use "label" instead, as it allows for an improved text-scaling experience. '
|
||||
'This feature was deprecated after v1.19.0.'
|
||||
'This feature was deprecated after v1.19.0.',
|
||||
)
|
||||
this.title,
|
||||
this.label,
|
||||
|
@ -72,7 +72,7 @@ class BottomNavigationBarItem {
|
|||
/// This field is deprecated, use [label] instead.
|
||||
@Deprecated(
|
||||
'Use "label" instead, as it allows for an improved text-scaling experience. '
|
||||
'This feature was deprecated after v1.19.0.'
|
||||
'This feature was deprecated after v1.19.0.',
|
||||
)
|
||||
final Widget? title;
|
||||
|
||||
|
|
|
@ -457,7 +457,7 @@ class Container extends StatelessWidget {
|
|||
class _DecorationClipper extends CustomClipper<Path> {
|
||||
_DecorationClipper({
|
||||
TextDirection? textDirection,
|
||||
required this.decoration
|
||||
required this.decoration,
|
||||
}) : assert(decoration != null),
|
||||
textDirection = textDirection ?? TextDirection.ltr;
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue