•  


Prepare framework for `use_super_parameters` by goderbauer · Pull Request #100905 · flutter/flutter · GitHub
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement . We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prepare framework for use_super_parameters #100905

Merged
merged 1 commit into from Apr 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
10 changes: 5 additions & 5 deletions packages/flutter/lib/src/animation/tween.dart
Expand Up @@ -368,7 +368,7 @@ class ColorTween extends Tween<Color?> {
/// or [end] if you want the effect of fading in or out of transparent.
/// Instead prefer null. [Colors.transparent] refers to black transparent and
/// thus will fade out of or into black which is likely unwanted.
ColorTween({ Color? begin, Color? end }) : super ( begin : begin, end : end );
ColorTween({ super . begin , super. end } );

/// Returns the value this variable has at the given animation clock value.
@override
Expand All @@ -388,7 +388,7 @@ class SizeTween extends Tween<Size?> {
///
/// The [begin] and [end] properties may be null; the null value
/// is treated as an empty size.
SizeTween({ Size? begin, Size? end }) : super ( begin : begin, end : end );
SizeTween({ super . begin , super. end } );

/// Returns the value this variable has at the given animation clock value.
@override
Expand All @@ -409,7 +409,7 @@ class RectTween extends Tween<Rect?> {
///
/// The [begin] and [end] properties may be null; the null value
/// is treated as an empty rect at the top left corner.
RectTween({ Rect? begin, Rect? end }) : super ( begin : begin, end : end );
RectTween({ super . begin , super. end } );

/// Returns the value this variable has at the given animation clock value.
@override
Expand All @@ -436,7 +436,7 @@ class IntTween extends Tween<int> {
/// The [begin] and [end] properties must be non-null before the tween is
/// first used, but the arguments can be null if the values are going to be
/// filled in later.
IntTween({ int? begin, int? end }) : super ( begin : begin, end : end );
IntTween({ super . begin , super. end } );

// The inherited lerp() function doesn't work with ints because it multiplies
// the begin and end types by a double, and int * double returns a double.
Expand Down Expand Up @@ -464,7 +464,7 @@ class StepTween extends Tween<int> {
/// The [begin] and [end] properties must be non-null before the tween is
/// first used, but the arguments can be null if the values are going to be
/// filled in later.
StepTween({ int? begin, int? end }) : super ( begin : begin, end : end );
StepTween({ super . begin , super. end } );

// The inherited lerp() function doesn't work with ints because it multiplies
// the begin and end types by a double, and int * double returns a double.
Expand Down
5 changes: 2 additions & 3 deletions packages/flutter/lib/src/animation/tween_sequence.dart
Expand Up @@ -110,9 +110,8 @@ class FlippedTweenSequence extends TweenSequence<double> {
/// There's a small cost associated with building a `TweenSequence` so it's
/// best to reuse one, rather than rebuilding it on every frame, when that's
/// possible.
FlippedTweenSequence(List<TweenSequenceItem<double>> items)
: assert(items != null),
super(items);
FlippedTweenSequence(super.items)
: assert(items != null);

@override
double transform(double t) => 1 - super.transform(1 - t);
Expand Down
10 changes: 4 additions & 6 deletions packages/flutter/lib/src/cupertino/activity_indicator.dart
Expand Up @@ -26,15 +26,14 @@ const Color _kActiveTickColor = CupertinoDynamicColor.withBrightness(
class CupertinoActivityIndicator extends StatefulWidget {
/// Creates an iOS-style activity indicator that spins clockwise.
const CupertinoActivityIndicator({
Key? key,
super. key,
this.color,
this.animating = true,
this.radius = _kDefaultIndicatorRadius,
}) : assert(animating != null),
assert(radius != null),
assert(radius > 0.0),
progress = 1.0,
super(key: key);
progress = 1.0;

/// Creates a non-animated iOS-style activity indicator that displays
/// a partial count of ticks based on the value of [progress].
Expand All @@ -43,7 +42,7 @@ class CupertinoActivityIndicator extends StatefulWidget {
/// will be shown) and 1.0 (all ticks will be shown) inclusive. Defaults
/// to 1.0.
const CupertinoActivityIndicator.partiallyRevealed({
Key? key,
super. key,
this.color,
this.radius = _kDefaultIndicatorRadius,
this.progress = 1.0,
Expand All @@ -52,8 +51,7 @@ class CupertinoActivityIndicator extends StatefulWidget {
assert(progress != null),
assert(progress >= 0.0),
assert(progress <= 1.0),
animating = false,
super(key: key);
animating = false;

/// Color of the activity indicator.
///
Expand Down
10 changes: 4 additions & 6 deletions packages/flutter/lib/src/cupertino/app.dart
Expand Up @@ -148,7 +148,7 @@ class CupertinoApp extends StatefulWidget {
///
/// The boolean arguments, [routes], and [navigatorObservers], must not be null.
const CupertinoApp({
Key? key,
super. key,
this.navigatorKey,
this.home,
this.theme,
Expand Down Expand Up @@ -188,12 +188,11 @@ class CupertinoApp extends StatefulWidget {
routeInformationProvider = null,
routeInformationParser = null,
routerDelegate = null,
backButtonDispatcher = null,
super(key: key);
backButtonDispatcher = null;

/// Creates a [CupertinoApp] that uses the [Router] instead of a [Navigator].
const CupertinoApp.router({
Key? key,
super. key,
this.routeInformationProvider,
required RouteInformationParser<Object> this.routeInformationParser,
required RouterDelegate<Object> this.routerDelegate,
Expand Down Expand Up @@ -231,8 +230,7 @@ class CupertinoApp extends StatefulWidget {
onGenerateInitialRoutes = null,
onUnknownRoute = null,
routes = null,
initialRoute = null,
super(key: key);
initialRoute = null;

/// {@macro flutter.widgets.widgetsApp.navigatorKey}
final GlobalKey<NavigatorState>? navigatorKey;
Expand Down
5 changes: 2 additions & 3 deletions packages/flutter/lib/src/cupertino/bottom_tab_bar.dart
Expand Up @@ -58,7 +58,7 @@ const Color _kDefaultTabBarInactiveColor = CupertinoColors.inactiveGray;
class CupertinoTabBar extends StatelessWidget implements PreferredSizeWidget {
/// Creates a tab bar in the iOS style.
const CupertinoTabBar({
Key? key,
super. key,
required this.items,
this.onTap,
this.currentIndex = 0,
Expand All @@ -82,8 +82,7 @@ class CupertinoTabBar extends StatelessWidget implements PreferredSizeWidget {
assert(0 <= currentIndex && currentIndex < items.length),
assert(iconSize != null),
assert(height != null && height >= 0.0),
assert(inactiveColor != null),
super(key: key);
assert(inactiveColor != null);

/// The interactive items laid out within the bottom navigation bar.
///
Expand Down
10 changes: 4 additions & 6 deletions packages/flutter/lib/src/cupertino/button.dart
Expand Up @@ -39,7 +39,7 @@ const EdgeInsets _kBackgroundButtonPadding = EdgeInsets.symmetric(
class CupertinoButton extends StatefulWidget {
/// Creates an iOS-style button.
const CupertinoButton({
Key? key,
super. key,
required this.child,
this.padding,
this.color,
Expand All @@ -52,8 +52,7 @@ class CupertinoButton extends StatefulWidget {
}) : assert(pressedOpacity == null || (pressedOpacity >= 0.0 && pressedOpacity <= 1.0)),
assert(disabledColor != null),
assert(alignment != null),
_filled = false,
super(key: key);
_filled = false;

/// Creates an iOS-style button with a filled background.
///
Expand All @@ -62,7 +61,7 @@ class CupertinoButton extends StatefulWidget {
/// To specify a custom background color, use the [color] argument of the
/// default constructor.
const CupertinoButton.filled({
Key? key,
super. key,
required this.child,
this.padding,
this.disabledColor = CupertinoColors.quaternarySystemFill,
Expand All @@ -75,8 +74,7 @@ class CupertinoButton extends StatefulWidget {
assert(disabledColor != null),
assert(alignment != null),
color = null,
_filled = true,
super(key: key);
_filled = true;

/// The widget below this widget in the tree.
///
Expand Down
27 changes: 9 additions & 18 deletions packages/flutter/lib/src/cupertino/context_menu.dart
Expand Up @@ -98,13 +98,12 @@ class CupertinoContextMenu extends StatefulWidget {
///
/// [child] is required and cannot be null.
CupertinoContextMenu({
Key? key,
super. key,
required this.actions,
required this.child,
this.previewBuilder,
}) : assert(actions != null && actions.isNotEmpty),
assert(child != null),
super(key: key);
assert(child != null);

/// The widget that can be "opened" with the [CupertinoContextMenu].
///
Expand Down Expand Up @@ -403,12 +402,11 @@ class _CupertinoContextMenuState extends State<CupertinoContextMenu> with Ticker
// siblings of the original child.
class _DecoyChild extends StatefulWidget {
const _DecoyChild({
Key? key,
this.beginRect,
required this.controller,
this.endRect,
this.child,
}) : super(key: key) ;
});

final Rect? beginRect;
final AnimationController controller;
Expand Down Expand Up @@ -521,19 +519,15 @@ class _ContextMenuRoute<T> extends PopupRoute<T> {
required _ContextMenuLocation contextMenuLocation,
this.barrierLabel,
_ContextMenuPreviewBuilderChildless? builder,
ui.ImageFilter? filter,
super. filter,
required Rect previousChildRect,
RouteSettings? settings,
super. settings,
}) : assert(actions != null && actions.isNotEmpty),
assert(contextMenuLocation != null),
_actions = actions,
_builder = builder,
_contextMenuLocation = contextMenuLocation,
_previousChildRect = previousChildRect,
super(
filter: filter,
settings: settings,
);
_previousChildRect = previousChildRect;

// Barrier color for a Cupertino modal barrier.
static const Color _kModalBarrierColor = Color(0x6604040F);
Expand Down Expand Up @@ -812,7 +806,6 @@ class _ContextMenuRoute<T> extends PopupRoute<T> {
// animating out.
class _ContextMenuRouteStatic extends StatefulWidget {
const _ContextMenuRouteStatic({
Key? key,
this.actions,
required this.child,
this.childGlobalKey,
Expand All @@ -821,8 +814,7 @@ class _ContextMenuRouteStatic extends StatefulWidget {
required this.orientation,
this.sheetGlobalKey,
}) : assert(contextMenuLocation != null),
assert(orientation != null),
super(key: key);
assert(orientation != null);

final List<Widget>? actions;
final Widget child;
Expand Down Expand Up @@ -1145,16 +1137,15 @@ class _ContextMenuRouteStaticState extends State<_ContextMenuRouteStatic> with T
// list of actions that are typically CupertinoContextMenuActions.
class _ContextMenuSheet extends StatelessWidget {
_ContextMenuSheet({
Key? key,
super. key,
required this.actions,
required _ContextMenuLocation contextMenuLocation,
required Orientation orientation,
}) : assert(actions != null && actions.isNotEmpty),
assert(contextMenuLocation != null),
assert(orientation != null),
_contextMenuLocation = contextMenuLocation,
_orientation = orientation,
super(key: key);
_orientation = orientation;

final List<Widget> actions;
final _ContextMenuLocation _contextMenuLocation;
Expand Down
5 changes: 2 additions & 3 deletions packages/flutter/lib/src/cupertino/context_menu_action.dart
Expand Up @@ -14,16 +14,15 @@ import 'colors.dart';
class CupertinoContextMenuAction extends StatefulWidget {
/// Construct a CupertinoContextMenuAction.
const CupertinoContextMenuAction({
Key? key,
super. key,
required this.child,
this.isDefaultAction = false,
this.isDestructiveAction = false,
this.onPressed,
this.trailingIcon,
}) : assert(child != null),
assert(isDefaultAction != null),
assert(isDestructiveAction != null),
super(key: key);
assert(isDestructiveAction != null);

/// The widget that will be placed inside the action.
final Widget child;
Expand Down
10 changes: 4 additions & 6 deletions packages/flutter/lib/src/cupertino/date_picker.dart
Expand Up @@ -259,7 +259,7 @@ class CupertinoDatePicker extends StatefulWidget {
/// [dateOrder] determines the order of the columns inside [CupertinoDatePicker] in date mode.
/// Defaults to the locale's default date format/order.
CupertinoDatePicker({
Key? key,
super. key,
this.mode = CupertinoDatePickerMode.dateAndTime,
required this.onDateTimeChanged,
DateTime? initialDateTime,
Expand All @@ -278,8 +278,7 @@ class CupertinoDatePicker extends StatefulWidget {
assert(
minuteInterval > 0 && 60 % minuteInterval == 0,
'minute interval is not a positive integer factor of 60',
),
super(key: key) {
) {
assert(this.initialDateTime != null);
assert(
mode != CupertinoDatePickerMode.dateAndTime || minimumDate == null || !this.initialDateTime.isBefore(minimumDate!),
Expand Down Expand Up @@ -1525,7 +1524,7 @@ class CupertinoTimerPicker extends StatefulWidget {
/// [secondInterval] is the granularity of the second spinner. Must be a
/// positive integer factor of 60.
CupertinoTimerPicker({
Key? key,
super. key,
this.mode = CupertinoTimerPickerMode.hms,
this.initialTimerDuration = Duration.zero,
this.minuteInterval = 1,
Expand All @@ -1541,8 +1540,7 @@ class CupertinoTimerPicker extends StatefulWidget {
assert(secondInterval > 0 && 60 % secondInterval == 0),
assert(initialTimerDuration.inMinutes % minuteInterval == 0),
assert(initialTimerDuration.inSeconds % secondInterval == 0),
assert(alignment != null),
super(key: key);
assert(alignment != null);

/// The mode of the timer picker.
final CupertinoTimerPickerMode mode;
Expand Down
14 changes: 4 additions & 10 deletions packages/flutter/lib/src/cupertino/desktop_text_selection.dart
Expand Up @@ -91,7 +91,6 @@ final TextSelectionControls cupertinoDesktopTextSelectionControls =
// Generates the child that's passed into CupertinoDesktopTextSelectionToolbar.
class _CupertinoDesktopTextSelectionControlsToolbar extends StatefulWidget {
const _CupertinoDesktopTextSelectionControlsToolbar({
Key? key,
required this.clipboardStatus,
required this.endpoints,
required this.globalEditableRegion,
Expand All @@ -102,7 +101,7 @@ class _CupertinoDesktopTextSelectionControlsToolbar extends StatefulWidget {
required this.selectionMidpoint,
required this.textLineHeight,
required this.lastSecondaryTapDownPosition,
}) : super(key: key) ;
});

final ClipboardStatusNotifier? clipboardStatus;
final List<TextSelectionPoint> endpoints;
Expand Down Expand Up @@ -228,11 +227,9 @@ class _CupertinoDesktopTextSelectionControlsToolbarState extends State<_Cupertin
class _CupertinoDesktopTextSelectionToolbar extends StatelessWidget {
/// Creates an instance of CupertinoTextSelectionToolbar.
const _CupertinoDesktopTextSelectionToolbar({
Key? key,
required this.anchor,
required this.children,
}) : assert(children.length > 0),
super(key: key);
}) : assert(children.length > 0);

/// The point at which the toolbar will attempt to position itself as closely
/// as possible.
Expand Down Expand Up @@ -318,15 +315,13 @@ const EdgeInsets _kToolbarButtonPadding = EdgeInsets.fromLTRB(
class _CupertinoDesktopTextSelectionToolbarButton extends StatefulWidget {
/// Creates an instance of CupertinoDesktopTextSelectionToolbarButton.
const _CupertinoDesktopTextSelectionToolbarButton({
Key? key,
required this.onPressed,
required this.child,
}) : super(key: key) ;
});

/// Create an instance of [CupertinoDesktopTextSelectionToolbarButton] whose child is
/// a [Text] widget styled like the default Mac context menu button.
_CupertinoDesktopTextSelectionToolbarButton.text({
Key? key,
required BuildContext context,
required this.onPressed,
required String text,
Expand All @@ -339,8 +334,7 @@ class _CupertinoDesktopTextSelectionToolbarButton extends StatefulWidget {
darkColor: CupertinoColors.white,
).resolveFrom(context),
),
),
super(key: key);
);

/// {@macro flutter.cupertino.CupertinoTextSelectionToolbarButton.onPressed}
final VoidCallback onPressed;
Expand Down
- "漢字路" 한글한자자동변환 서비스는 교육부 고전문헌국역지원사업의 지원으로 구축되었습니다.
- "漢字路" 한글한자자동변환 서비스는 전통문화연구회 "울산대학교한국어처리연구실 옥철영(IT융합전공)교수팀"에서 개발한 한글한자자동변환기를 바탕하여 지속적으로 공동 연구 개발하고 있는 서비스입니다.
- 현재 고유명사(인명, 지명등)을 비롯한 여러 변환오류가 있으며 이를 해결하고자 많은 연구 개발을 진행하고자 하고 있습니다. 이를 인지하시고 다른 곳에서 인용시 한자 변환 결과를 한번 더 검토하시고 사용해 주시기 바랍니다.
- 변환오류 및 건의,문의사항은 juntong@juntong.or.kr로 메일로 보내주시면 감사하겠습니다. .
Copyright ⓒ 2020 By '전통문화연구회(傳統文化硏究會)' All Rights reserved.
 한국   대만   중국   일본