diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index cec51997..aad65fe1 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -36,6 +36,9 @@ jobs: - name: Install dependencies run: flutter pub get + - name: Format check + run: dart format -l 120 -o none --set-exit-if-changed . + - name: Run Flutter test id: test run: flutter test diff --git a/CODING_STANDARDS.md b/CODING_STANDARDS.md index ab57b709..4d45be4d 100644 --- a/CODING_STANDARDS.md +++ b/CODING_STANDARDS.md @@ -14,6 +14,18 @@ Please refer to the following guideline for detailed recommendations: [Style guide for Flutter](https://github.com/flutter/flutter/blob/master/docs/contributing/Style-guide-for-Flutter-repo.md) +## Code style + +Your code should adhere to the effective [dart style](https://dart.dev/effective-dart/style). + ## Code formatting -You must adhere to the formatting described in the Flutter style guide. \ No newline at end of file +According to the above recommended style, we check our code for formatting with the `dart format` cli in our CI +(before running src code generation, e.g. Mocks). +The only deviation is a line length of `120` compared to the standard guide. If your code does not follow these standards, +the CI will fail. We run this step: + +```yml +- name: Format check + run: dart format -l 120 -o none --set-exit-if-changed . +``` \ No newline at end of file diff --git a/example/lib/main.dart b/example/lib/main.dart index a3f8b410..6d973445 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -4,6 +4,5 @@ import 'package:provider/provider.dart'; import 'native_app.dart'; void main() { - runApp(ChangeNotifierProvider( - create: (BuildContext context) => AppState(), child: MyApp())); + runApp(ChangeNotifierProvider(create: (BuildContext context) => AppState(), child: MyApp())); } diff --git a/lib/src/accordion/sbb_accordion.dart b/lib/src/accordion/sbb_accordion.dart index 704cc701..625166b6 100644 --- a/lib/src/accordion/sbb_accordion.dart +++ b/lib/src/accordion/sbb_accordion.dart @@ -89,7 +89,7 @@ class SBBAccordion extends StatefulWidget { }); SBBAccordion.single({ - Key? key, + Key? key, required String title, required Widget body, bool isExpanded = false, @@ -107,8 +107,7 @@ class SBBAccordion extends StatefulWidget { ), ], titleMaxLines: titleMaxLines, - accordionCallback: (index, isExpanded) => - singleAccordionCallback?.call( + accordionCallback: (index, isExpanded) => singleAccordionCallback?.call( isExpanded, ), backgroundColor: backgroundColor, @@ -151,13 +150,10 @@ class _SBBAccordionState extends State { ); } - Container _buildAccordionChildren( - BuildContext context, SBBAccordionItem child, int i) { + Container _buildAccordionChildren(BuildContext context, SBBAccordionItem child, int i) { final style = SBBControlStyles.of(context); return Container( - decoration: BoxDecoration( - border: - Border.all(color: widget.borderColor ?? SBBColors.transparent)), + decoration: BoxDecoration(border: Border.all(color: widget.borderColor ?? SBBColors.transparent)), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ @@ -174,9 +170,7 @@ class _SBBAccordionState extends State { child.title, style: style.accordionTitleTextStyle, maxLines: widget.titleMaxLines, - overflow: widget.titleMaxLines == null - ? null - : TextOverflow.ellipsis, + overflow: widget.titleMaxLines == null ? null : TextOverflow.ellipsis, ), ), ), @@ -213,9 +207,7 @@ class _SBBAccordionState extends State { curve: Curves.fastOutSlowIn, ), sizeCurve: Curves.fastOutSlowIn, - crossFadeState: _isChildExpanded(i) - ? CrossFadeState.showSecond - : CrossFadeState.showFirst, + crossFadeState: _isChildExpanded(i) ? CrossFadeState.showSecond : CrossFadeState.showFirst, duration: kThemeAnimationDuration, ), if (i < widget.children.length - 1) const Divider(), @@ -234,8 +226,7 @@ class _ExpandIcon extends StatefulWidget { _ExpandIconState createState() => _ExpandIconState(); } -class _ExpandIconState extends State<_ExpandIcon> - with SingleTickerProviderStateMixin { +class _ExpandIconState extends State<_ExpandIcon> with SingleTickerProviderStateMixin { late AnimationController _controller; late Animation _iconTurns; diff --git a/lib/src/button/sbb_icon_form_button.dart b/lib/src/button/sbb_icon_form_button.dart index 10263842..951a3cff 100644 --- a/lib/src/button/sbb_icon_form_button.dart +++ b/lib/src/button/sbb_icon_form_button.dart @@ -35,9 +35,7 @@ class SBBIconFormButton extends StatelessWidget { shape: SBBTheme.allStates(const RoundedRectangleBorder()), ); return TextButton( - style: SBBButtonStyles.of(context) - .iconFormStyle - ?.overrideButtonStyle(baseStyle), + style: SBBButtonStyles.of(context).iconFormStyle?.overrideButtonStyle(baseStyle), onPressed: onPressed, focusNode: focusNode, child: Icon(icon, size: sbbIconSizeSmall), diff --git a/lib/src/chip/sbb_chip.dart b/lib/src/chip/sbb_chip.dart index 0b1130ce..2417c266 100644 --- a/lib/src/chip/sbb_chip.dart +++ b/lib/src/chip/sbb_chip.dart @@ -43,8 +43,7 @@ class SBBChip extends StatelessWidget { decoration: ShapeDecoration( shape: StadiumBorder( side: BorderSide( - color: - _disabled ? style.disabledBorderColor! : style.borderColor!, + color: _disabled ? style.disabledBorderColor! : style.borderColor!, ), ), ), @@ -63,16 +62,13 @@ class SBBChip extends StatelessWidget { } Padding _label(SBBChipStyle style) { - final labelTextStyle = _disabled - ? style.labelTextStyle!.textStyleDisabled - : style.labelTextStyle!.textStyle; + final labelTextStyle = _disabled ? style.labelTextStyle!.textStyleDisabled : style.labelTextStyle!.textStyle; return Padding( padding: const EdgeInsets.symmetric( vertical: 6.0, horizontal: 12.0, ).subtract( - EdgeInsets.only( - right: _showBadgeLabel || _showUnselectButton ? _kChipMargin : 0), + EdgeInsets.only(right: _showBadgeLabel || _showUnselectButton ? _kChipMargin : 0), ), child: Text( label, @@ -83,9 +79,7 @@ class SBBChip extends StatelessWidget { } Widget _badge(SBBChipStyle style) { - final badgeTextStyle = _disabled - ? style.badgeTextStyle!.textStyleDisabled - : style.badgeTextStyle!.textStyle; + final badgeTextStyle = _disabled ? style.badgeTextStyle!.textStyleDisabled : style.badgeTextStyle!.textStyle; return _roundedContainer( child: Text( badgeLabel ?? '', @@ -103,13 +97,9 @@ class SBBChip extends StatelessWidget { child: _roundedContainer( child: Icon( SBBIcons.cross_small, - color: _disabled - ? style.disabledUnselectButtonIconColor! - : style.unselectButtonIconColor!, + color: _disabled ? style.disabledUnselectButtonIconColor! : style.unselectButtonIconColor!, ), - color: _disabled - ? style.disabledUnselectButtonColor! - : style.unselectButtonColor!, + color: _disabled ? style.disabledUnselectButtonColor! : style.unselectButtonColor!, width: 24.0, ), ); diff --git a/lib/src/header/sbb_header.dart b/lib/src/header/sbb_header.dart index fb71b299..ee51e844 100644 --- a/lib/src/header/sbb_header.dart +++ b/lib/src/header/sbb_header.dart @@ -105,7 +105,7 @@ class SBBHeader extends StatelessWidget implements PreferredSizeWidget { required this.logoTooltip, this.actions, this.blockSemantics, - }) : assert(actions == null || onPressedLogo == null); + }) : assert(actions == null || onPressedLogo == null); final String title; final Widget? leadingWidget; @@ -208,8 +208,7 @@ class SBBHeader extends StatelessWidget implements PreferredSizeWidget { excluding: onPressedLogo == null, child: Container( alignment: Alignment.centerRight, - padding: - const EdgeInsets.only(right: sbbDefaultSpacing / 2), + padding: const EdgeInsets.only(right: sbbDefaultSpacing / 2), height: kToolbarHeight, width: customLeadingWidth ? leadingWidth : kToolbarHeight, child: IconButton( diff --git a/lib/src/input_trigger/sbb_input_trigger.dart b/lib/src/input_trigger/sbb_input_trigger.dart index 4e40ca3b..da5b94a4 100644 --- a/lib/src/input_trigger/sbb_input_trigger.dart +++ b/lib/src/input_trigger/sbb_input_trigger.dart @@ -199,9 +199,7 @@ class SBBInputTrigger extends StatelessWidget { TextStyle _valueTextStyle(SBBTextFieldStyle style) { return !enabled ? style.textStyleDisabled! - : (!_hasValue - ? style.placeholderTextStyle - : (_hasError ? style.textStyleError : style.textStyle))!; + : (!_hasValue ? style.placeholderTextStyle : (_hasError ? style.textStyleError : style.textStyle))!; } } @@ -233,9 +231,7 @@ class SBBInputTriggerIconWidget extends StatelessWidget { } final style = SBBControlStyles.of(context).textField!; - final iconColor = enabled - ? (error ? style.prefixIconColorError : style.iconColor) - : style.iconColorDisabled; + final iconColor = enabled ? (error ? style.prefixIconColorError : style.iconColor) : style.iconColorDisabled; if (onPressed == null) { return Padding( diff --git a/lib/src/link/sbb_link_text.dart b/lib/src/link/sbb_link_text.dart index 7656cbba..92ec6b6e 100644 --- a/lib/src/link/sbb_link_text.dart +++ b/lib/src/link/sbb_link_text.dart @@ -59,9 +59,7 @@ class SBBLinkTextState extends State { final plainTextSections = widget.text.split(combinedPattern); final linkSections = combinedPattern.allMatches(widget.text).toList(); final List inlineSpans = []; - for (var i = 0; - i < math.max(plainTextSections.length, linkSections.length); - i++) { + for (var i = 0; i < math.max(plainTextSections.length, linkSections.length); i++) { if (i < plainTextSections.length) { inlineSpans.add( TextSpan( @@ -81,10 +79,8 @@ class SBBLinkTextState extends State { _isHoveredValues.add(false); final tapGestureRecognizer = TapGestureRecognizer(); - tapGestureRecognizer.onTapDown = (TapDownDetails details) => - setState(() => _isPressedValues[i] = true); - tapGestureRecognizer.onTapCancel = - () => setState(() => _isPressedValues[i] = false); + tapGestureRecognizer.onTapDown = (TapDownDetails details) => setState(() => _isPressedValues[i] = true); + tapGestureRecognizer.onTapCancel = () => setState(() => _isPressedValues[i] = false); tapGestureRecognizer.onTap = () { widget.onLaunch(url); setState(() => _isPressedValues[i] = false); @@ -98,8 +94,7 @@ class SBBLinkTextState extends State { _isHoveredValues[i] = false; }), text: text ?? url, - style: _linkTextStyle( - _isPressedValues[i] == true, _isHoveredValues[i] == true), + style: _linkTextStyle(_isPressedValues[i] == true, _isHoveredValues[i] == true), recognizer: tapGestureRecognizer, ), ); @@ -111,8 +106,7 @@ class SBBLinkTextState extends State { TextStyle? _resolveTextStyle(SBBBaseStyle style) { final hasCustomStyle = widget.style != null; final textStyle = hasCustomStyle - ? widget.style!.copyWith( - color: widget.style!.color ?? style.defaultTextStyle!.color) + ? widget.style!.copyWith(color: widget.style!.color ?? style.defaultTextStyle!.color) : style.defaultTextStyle; return textStyle; } @@ -122,15 +116,12 @@ class SBBLinkTextState extends State { final controlStyle = SBBControlStyles.of(context); final hasCustomStyle = widget.style != null; final textStyle = hasCustomStyle - ? widget.style!.copyWith( - color: widget.style!.color ?? style.defaultTextStyle!.color) + ? widget.style!.copyWith(color: widget.style!.color ?? style.defaultTextStyle!.color) : style.defaultTextStyle; - final linkStyle = hasCustomStyle - ? textStyle!.copyWith(color: controlStyle.linkTextStyle!.color) - : controlStyle.linkTextStyle; + final linkStyle = + hasCustomStyle ? textStyle!.copyWith(color: controlStyle.linkTextStyle!.color) : controlStyle.linkTextStyle; final linkStylePressed = hasCustomStyle - ? textStyle! - .copyWith(color: controlStyle.linkTextStyleHighlighted!.color) + ? textStyle!.copyWith(color: controlStyle.linkTextStyleHighlighted!.color) : controlStyle.linkTextStyleHighlighted; return (isPressed ? linkStylePressed : linkStyle)!; diff --git a/lib/src/list_item/sbb_list_item.dart b/lib/src/list_item/sbb_list_item.dart index e478e04a..35339d9b 100644 --- a/lib/src/list_item/sbb_list_item.dart +++ b/lib/src/list_item/sbb_list_item.dart @@ -34,9 +34,7 @@ class SBBListItem extends StatefulWidget { ), child: Icon( trailingIcon, - color: isEnabled - ? style.iconColor - : style.iconColorDisabled, + color: isEnabled ? style.iconColor : style.iconColorDisabled, ), ); }, @@ -117,8 +115,7 @@ class _SBBListItemState extends State { child: Semantics( button: isEnabled, child: Material( - color: - isEnabled ? style.backgroundColor : style.backgroundColorDisabled, + color: isEnabled ? style.backgroundColor : style.backgroundColorDisabled, child: InkWell( splashColor: style.backgroundColorHighlighted, focusColor: style.backgroundColorHighlighted, @@ -151,23 +148,18 @@ class _SBBListItemState extends State { children: [ if (widget.leadingIcon != null) Padding( - padding: - const EdgeInsetsDirectional.only( + padding: const EdgeInsetsDirectional.only( end: sbbDefaultSpacing * 0.5, ), child: Icon( widget.leadingIcon, - color: isEnabled - ? style.iconColor - : style.iconColorDisabled, + color: isEnabled ? style.iconColor : style.iconColorDisabled, ), ), Expanded( child: Text( widget.title, - style: isEnabled - ? style.textStyle - : style.textStyleDisabled, + style: isEnabled ? style.textStyle : style.textStyleDisabled, maxLines: widget.titleMaxLines, overflow: wrapTitle ? TextOverflow.clip : TextOverflow.ellipsis, ), @@ -182,9 +174,7 @@ class _SBBListItemState extends State { ), child: Text( widget.subtitle!, - style: isEnabled - ? style.secondaryTextStyle - : style.secondaryTextStyleDisabled, + style: isEnabled ? style.secondaryTextStyle : style.secondaryTextStyleDisabled, maxLines: widget.subtitleMaxLines, overflow: wrapSubtitleTitle ? TextOverflow.clip : TextOverflow.ellipsis, ), diff --git a/lib/src/loading_indicator/sbb_loading_indicator.dart b/lib/src/loading_indicator/sbb_loading_indicator.dart index b91682dc..d6903607 100644 --- a/lib/src/loading_indicator/sbb_loading_indicator.dart +++ b/lib/src/loading_indicator/sbb_loading_indicator.dart @@ -122,7 +122,7 @@ class SBBLoadingIndicator extends StatelessWidget { class LoadingAnimation extends StatefulWidget { const LoadingAnimation({ - super.key, + super.key, required this.squareWidth, required this.squareHeight, required this.squareSpacing, @@ -138,8 +138,7 @@ class LoadingAnimation extends StatefulWidget { LoadingAnimationState createState() => LoadingAnimationState(); } -class LoadingAnimationState extends State - with SingleTickerProviderStateMixin { +class LoadingAnimationState extends State with SingleTickerProviderStateMixin { late AnimationController _animationController; late Animation _loadingSquareOne; late Animation _loadingSquareTwo; @@ -185,8 +184,7 @@ class LoadingAnimationState extends State curve: Curves.linear, ), ); - _container = - Tween(begin: Offset.zero, end: const Offset(-0.2, 0.0)).animate( + _container = Tween(begin: Offset.zero, end: const Offset(-0.2, 0.0)).animate( CurvedAnimation( parent: _animationController, curve: Curves.linear, diff --git a/lib/src/onboarding/sbb_onboarding.dart b/lib/src/onboarding/sbb_onboarding.dart index d79c38c4..23174f37 100644 --- a/lib/src/onboarding/sbb_onboarding.dart +++ b/lib/src/onboarding/sbb_onboarding.dart @@ -34,8 +34,7 @@ class SBBOnboarding extends StatefulWidget { SBBOnboardingState createState() => SBBOnboardingState(); } -class SBBOnboardingState extends State - with SingleTickerProviderStateMixin { +class SBBOnboardingState extends State with SingleTickerProviderStateMixin { static const navigationAreaVerticalPadding = 24.0; static const navigationAreaHeight = navigationAreaVerticalPadding + SBBInternal.defaultButtonHeight + @@ -93,8 +92,7 @@ class SBBOnboardingState extends State Orientation get orientation => MediaQuery.of(context).orientation; - bool get isBlocking => - widget.blocking && !isShowingStartPage && !isShowingEndPage; + bool get isBlocking => widget.blocking && !isShowingStartPage && !isShowingEndPage; @override void setState(VoidCallback fn) { @@ -119,18 +117,14 @@ class SBBOnboardingState extends State duration: kThemeAnimationDuration, )..addListener(() { if (isAnimating) { - if (backScrollController.hasClients && - backScrollController.offset > 0 && - !isBackScrollControllerAnimating) { + if (backScrollController.hasClients && backScrollController.offset > 0 && !isBackScrollControllerAnimating) { isBackScrollControllerAnimating = true; backScrollController.animateTo( 0, duration: kThemeAnimationDuration, curve: Curves.easeInOut, ); - } else if (scrollController.hasClients && - scrollController.offset > 0 && - !isScrollControllerAnimating) { + } else if (scrollController.hasClients && scrollController.offset > 0 && !isScrollControllerAnimating) { isScrollControllerAnimating = true; scrollController.animateTo( 0, @@ -160,8 +154,7 @@ class SBBOnboardingState extends State cardWidth = widgetWidth - frontCardPadding.horizontal; switch (orientation) { case Orientation.portrait: - cardHeight = - widgetHeight - navigationAreaHeight - frontCardPadding.vertical; + cardHeight = widgetHeight - navigationAreaHeight - frontCardPadding.vertical; break; case Orientation.landscape: cardHeight = widgetHeight - frontCardPadding.vertical; @@ -288,35 +281,23 @@ class SBBOnboardingState extends State ), ), if (cardHeightCalculated) ...backCards.reversed, - if (cardHeightCalculated && - ((isAnimating && !goToNextStep!) || isDraggingToPrevious)) - buildBackCard(0), + if (cardHeightCalculated && ((isAnimating && !goToNextStep!) || isDraggingToPrevious)) buildBackCard(0), if (cardHeightCalculated) buildFrontCard(), - if (cardHeightCalculated && - currentStepIndex > 0 && - currentStepIndex < _cards.length && - !isShowingEndPage) + if (cardHeightCalculated && currentStepIndex > 0 && currentStepIndex < _cards.length && !isShowingEndPage) Positioned( left: isDraggingToPrevious && isAnimating ? min( 0, - (dragEndPosition! - - dragStartPosition - - frontCardPadding.left - - cardWidth) * + (dragEndPosition! - dragStartPosition - frontCardPadding.left - cardWidth) * animationValueReversed) : isDraggingToPrevious && !isAnimating ? cardLeftValue! - frontCardPadding.left : goToNextStep! ? -cardWidth * animationValue - : -(cardWidth + frontCardPadding.left) * - animationValueReversed, + : -(cardWidth + frontCardPadding.left) * animationValueReversed, child: IgnorePointer( child: Opacity( - opacity: - isDraggingToPrevious || isAnimating && !goToNextStep! - ? 1 - : 0, + opacity: isDraggingToPrevious || isAnimating && !goToNextStep! ? 1 : 0, child: Padding( padding: frontCardPadding, child: buildCard(currentStepIndex - 1), @@ -388,9 +369,7 @@ class SBBOnboardingState extends State Widget buildStartPage() => Positioned( left: isShowingStartPage && isAnimating ? isDraggingToPrevious - ? dragEndPosition! - - widgetWidth + - (widgetWidth - dragEndPosition!) * animationValue + ? dragEndPosition! - widgetWidth + (widgetWidth - dragEndPosition!) * animationValue : goToNextStep! ? -widgetWidth * animationValue : -widgetWidth + widgetWidth * animationValue @@ -423,8 +402,7 @@ class SBBOnboardingState extends State ? dragEndPosition! * animationValueReversed : cardLeftValue! + widgetWidth : isShowingEndPage && isAnimating - ? widgetWidth * - (goToNextStep! ? animationValueReversed : animationValue) + ? widgetWidth * (goToNextStep! ? animationValueReversed : animationValue) : null, child: SizedBox( width: widgetWidth, @@ -486,22 +464,14 @@ class SBBOnboardingState extends State } Widget buildFrontCard() => Positioned( - left: isNotDragging && - isAnimating && - goToNextStep! && - !isShowingStartPage && - !isShowingEndPage + left: isNotDragging && isAnimating && goToNextStep! && !isShowingStartPage && !isShowingEndPage ? -(cardWidth + frontCardPadding.left) * animationValue : isDraggingToNext && isAnimating && !isShowingEndPage ? min( 0, dragEndPosition! - dragStartPosition - - (cardWidth + - frontCardPadding.left + - dragEndPosition! - - dragStartPosition) * - animationValue) + (cardWidth + frontCardPadding.left + dragEndPosition! - dragStartPosition) * animationValue) : isDraggingToNext && !isAnimating && !isShowingEndPage ? cardLeftValue : null, @@ -527,14 +497,12 @@ class SBBOnboardingState extends State ); if (isDraggingToPrevious && currentStepIndex == 0) { setState(() => isShowingStartPage = true); - } else if (isDraggingToNext && - currentStepIndex == _cards.length - 1) { + } else if (isDraggingToNext && currentStepIndex == _cards.length - 1) { setState(() => isShowingEndPage = true); } } - setState(() => cardLeftValue = isDraggingToNext - ? min(0, newLeftValue) - : min(0, newLeftValue - cardWidth)); + setState( + () => cardLeftValue = isDraggingToNext ? min(0, newLeftValue) : min(0, newLeftValue - cardWidth)); }), onHorizontalDragEnd: (details) { if (dragEndPosition != null) { @@ -577,11 +545,7 @@ class SBBOnboardingState extends State parentPadding), ), child: Opacity( - opacity: max( - 0.0, - 1.0 - - layerIndex * opacityMultiplier + - resizeValue * opacityMultiplier), + opacity: max(0.0, 1.0 - layerIndex * opacityMultiplier + resizeValue * opacityMultiplier), child: Transform.scale( scale: 1.0 - 0.1 * layerIndex + 0.1 * resizeValue, alignment: Alignment.topCenter, @@ -619,8 +583,7 @@ class SBBOnboardingState extends State ); void changeStep({bool? goToNextStep}) { - if (isAnimating || - !isAnimating && isNotDragging && isShowingStartPage && !goToNextStep!) { + if (isAnimating || !isAnimating && isNotDragging && isShowingStartPage && !goToNextStep!) { return; } setState(() { diff --git a/lib/src/onboarding/sbb_onboarding_notification.dart b/lib/src/onboarding/sbb_onboarding_notification.dart index 863a4869..8f8ad1ce 100644 --- a/lib/src/onboarding/sbb_onboarding_notification.dart +++ b/lib/src/onboarding/sbb_onboarding_notification.dart @@ -3,17 +3,13 @@ import 'package:flutter/material.dart'; class SBBOnboardingNotification extends Notification { SBBOnboardingNotification._(this.type, this.index); - SBBOnboardingNotification.startPage() - : this._(SBBOnboardingNotificationType.startPage, null); + SBBOnboardingNotification.startPage() : this._(SBBOnboardingNotificationType.startPage, null); - SBBOnboardingNotification.endPage() - : this._(SBBOnboardingNotificationType.endPage, null); + SBBOnboardingNotification.endPage() : this._(SBBOnboardingNotificationType.endPage, null); - SBBOnboardingNotification.card(int index) - : this._(SBBOnboardingNotificationType.card, index); + SBBOnboardingNotification.card(int index) : this._(SBBOnboardingNotificationType.card, index); - SBBOnboardingNotification.other(int index) - : this._(SBBOnboardingNotificationType.other, index); + SBBOnboardingNotification.other(int index) : this._(SBBOnboardingNotificationType.other, index); final SBBOnboardingNotificationType type; final int? index; diff --git a/lib/src/picker/sbb_date_picker.dart b/lib/src/picker/sbb_date_picker.dart index 5ba49bd4..f0608cd5 100644 --- a/lib/src/picker/sbb_date_picker.dart +++ b/lib/src/picker/sbb_date_picker.dart @@ -37,9 +37,7 @@ class SBBDatePicker extends StatefulWidget { minimumDate = _minimumDate(minimumDate), maximumDate = _maximumDate(maximumDate) { assert( - this.minimumDate == null || - this.maximumDate == null || - this.minimumDate!.isBefore(this.maximumDate!), + this.minimumDate == null || this.maximumDate == null || this.minimumDate!.isBefore(this.maximumDate!), 'minimum date (${this.minimumDate}) is not before maximum date (${this.maximumDate})', ); } @@ -169,17 +167,9 @@ class _SBBDatePickerState extends _TimeBasedPickerState { late double _dayItemTextWidth; late double _yearItemTextWidth; - double get _dayItemWidth => - _widgetHorizontalPadding + - _itemPadding + - _dayItemTextWidth + - _itemPadding; + double get _dayItemWidth => _widgetHorizontalPadding + _itemPadding + _dayItemTextWidth + _itemPadding; - double get _yearItemWidth => - _itemPadding + - _yearItemTextWidth + - _itemPadding + - _widgetHorizontalPadding; + double get _yearItemWidth => _itemPadding + _yearItemTextWidth + _itemPadding + _widgetHorizontalPadding; double get _dayItemTextMinWidth => _textSize('33.').width; @@ -335,9 +325,7 @@ class _SBBDatePickerState extends _TimeBasedPickerState { final itemDate = selectedMonthYear.copyWith(day: itemDay); final minDate = widget.minimumDate; // set max date to last valid day in month if current day value too high - final maxDate = dayOverflow - ? selectedMonthYear.copyWith(day: daysInMonth) - : widget.maximumDate; + final maxDate = dayOverflow ? selectedMonthYear.copyWith(day: daysInMonth) : widget.maximumDate; final isEnabled = itemDate.isInRange(minDate, maxDate); final label = '$itemDay.'; @@ -410,9 +398,7 @@ class _SBBDatePickerState extends _TimeBasedPickerState { } void _onScrollingStateChanged() { - if (_yearController.isScrolling() || - _monthController.isScrolling() || - _dayController.isScrolling()) { + if (_yearController.isScrolling() || _monthController.isScrolling() || _dayController.isScrolling()) { // do nothing if any controller still scrolling return; } @@ -531,17 +517,13 @@ class _SBBDatePickerState extends _TimeBasedPickerState { // check if items text width needs to be reduced if (widthOverflow > 0) { // calculate items text widths based on width overflow - final dayItemFlexibleWidth = - _dayItemTextDefaultWidth - _dayItemTextMinWidth; - final yearItemFlexibleWidth = - _yearItemTextDefaultWidth - _yearItemTextMinWidth; + final dayItemFlexibleWidth = _dayItemTextDefaultWidth - _dayItemTextMinWidth; + final yearItemFlexibleWidth = _yearItemTextDefaultWidth - _yearItemTextMinWidth; final flexibleWidths = dayItemFlexibleWidth + yearItemFlexibleWidth; final widthReductions = min(flexibleWidths, widthOverflow); final widthReductionRatio = widthReductions / flexibleWidths; - final dayItemReducedWidth = - _dayItemTextDefaultWidth - dayItemFlexibleWidth * widthReductionRatio; - final yearItemReducedWidth = _yearItemTextDefaultWidth - - yearItemFlexibleWidth * widthReductionRatio; + final dayItemReducedWidth = _dayItemTextDefaultWidth - dayItemFlexibleWidth * widthReductionRatio; + final yearItemReducedWidth = _yearItemTextDefaultWidth - yearItemFlexibleWidth * widthReductionRatio; // set reduced item text widths _dayItemTextWidth = dayItemReducedWidth; diff --git a/lib/src/picker/sbb_date_time_picker.dart b/lib/src/picker/sbb_date_time_picker.dart index 289c7e47..46aa4d3b 100644 --- a/lib/src/picker/sbb_date_time_picker.dart +++ b/lib/src/picker/sbb_date_time_picker.dart @@ -408,9 +408,7 @@ class _SBBDateTimePickerState extends _TimeBasedPickerState { } void _onScrollingStateChanged() { - if (_dateController.isScrolling() || - _hourController.isScrolling() || - _minuteController.isScrolling()) { + if (_dateController.isScrolling() || _hourController.isScrolling() || _minuteController.isScrolling()) { // do nothing if any controller still scrolling return; } diff --git a/lib/src/picker/sbb_picker_scroll_controller.dart b/lib/src/picker/sbb_picker_scroll_controller.dart index 00b0a9b9..0487cf6a 100644 --- a/lib/src/picker/sbb_picker_scroll_controller.dart +++ b/lib/src/picker/sbb_picker_scroll_controller.dart @@ -199,8 +199,7 @@ class SBBPickerScrollController extends ScrollController { } double _targetOffset(double offset) { - final indexBasedPositionOffset = - (0 - initialItem - _indexOffset) * _itemHeight; + final indexBasedPositionOffset = (0 - initialItem - _indexOffset) * _itemHeight; return offset + indexBasedPositionOffset; } diff --git a/lib/src/picker/sbb_picker_utils.dart b/lib/src/picker/sbb_picker_utils.dart index b8da5091..f414ef92 100644 --- a/lib/src/picker/sbb_picker_utils.dart +++ b/lib/src/picker/sbb_picker_utils.dart @@ -56,8 +56,7 @@ abstract class _PickerClassState extends State { /// Abstract class extended by the State classes of [SBBDatePicker], /// [SBBDateTimePicker] and [SBBTimePicker] that provides convenience methods. -abstract class _TimeBasedPickerState - extends _PickerClassState { +abstract class _TimeBasedPickerState extends _PickerClassState { late double _itemPadding; double get _timeItemTextMinWidth => _textSize('33').width; @@ -308,11 +307,9 @@ extension TimeOfDayExtensions on TimeOfDay { const dayOffsetMinutes = TimeOfDay.hoursPerDay * TimeOfDay.minutesPerHour; final minTimeDiff = (timeMinutes - minTimeMinutes).abs(); - final minTimeOffsetDiff = - (timeMinutes - dayOffsetMinutes - minTimeMinutes).abs(); + final minTimeOffsetDiff = (timeMinutes - dayOffsetMinutes - minTimeMinutes).abs(); final maxTimeDiff = (timeMinutes - maxTimeMinutes).abs(); - final maxTimeOffsetDiff = - (timeMinutes + dayOffsetMinutes - maxTimeMinutes).abs(); + final maxTimeOffsetDiff = (timeMinutes + dayOffsetMinutes - maxTimeMinutes).abs(); final smallerMinTimeDiff = min(minTimeDiff, minTimeOffsetDiff); final smallerMaxTimeDiff = min(maxTimeDiff, maxTimeOffsetDiff); @@ -355,8 +352,7 @@ extension TimeOfDayExtensions on TimeOfDay { /// ``` TimeOfDay roundToInterval(int minuteInterval) { var roundedMinute = ((minute / minuteInterval).round() * minuteInterval); - final roundedHour = (hour + roundedMinute ~/ TimeOfDay.minutesPerHour) % - TimeOfDay.hoursPerDay; + final roundedHour = (hour + roundedMinute ~/ TimeOfDay.minutesPerHour) % TimeOfDay.hoursPerDay; roundedMinute %= TimeOfDay.minutesPerHour; return replacing(hour: roundedHour, minute: roundedMinute); } @@ -373,8 +369,7 @@ extension TimeOfDayExtensions on TimeOfDay { /// ``` TimeOfDay floorToInterval(int minuteInterval) { final roundedHour = hour + minute ~/ TimeOfDay.minutesPerHour; - final roundedMinute = ((minute / minuteInterval).floor() * minuteInterval) % - TimeOfDay.minutesPerHour; + final roundedMinute = ((minute / minuteInterval).floor() * minuteInterval) % TimeOfDay.minutesPerHour; return replacing(hour: roundedHour, minute: roundedMinute); } diff --git a/lib/src/picker/sbb_time_picker.dart b/lib/src/picker/sbb_time_picker.dart index ce407a1e..34cbf33e 100644 --- a/lib/src/picker/sbb_time_picker.dart +++ b/lib/src/picker/sbb_time_picker.dart @@ -185,11 +185,7 @@ class _SBBTimePickerTimeState extends _TimeBasedPickerState { TimeOfDay get _safeMaxTime => widget.maximumTime ?? _endOfDay; - double get _timeItemWidth => - _itemPadding + - _timeItemTextWidth + - _itemPadding + - _widgetHorizontalPadding; + double get _timeItemWidth => _itemPadding + _timeItemTextWidth + _itemPadding + _widgetHorizontalPadding; @override void initState() { @@ -440,9 +436,7 @@ class _SBBTimePickerTimeState extends _TimeBasedPickerState { } double _availableTimeItemTextWidths(double widgetWidth) { - return widgetWidth - - _widgetHorizontalPadding * 2 - - _itemPadding * _horizontalPaddingCount; + return widgetWidth - _widgetHorizontalPadding * 2 - _itemPadding * _horizontalPaddingCount; } int _indexToMinute(int minuteIndex) { diff --git a/lib/src/slider/sbb_slider_track_shape.dart b/lib/src/slider/sbb_slider_track_shape.dart index b2b779c0..09a98198 100644 --- a/lib/src/slider/sbb_slider_track_shape.dart +++ b/lib/src/slider/sbb_slider_track_shape.dart @@ -19,8 +19,10 @@ class EvenRoundedRectSliderTrackShape extends RoundedRectSliderTrackShape { }) { // Assign the track segment paints, which are leading: active and // trailing: inactive. - final ColorTween activeTrackColorTween = ColorTween(begin: sliderTheme.disabledActiveTrackColor, end: sliderTheme.activeTrackColor); - final ColorTween inactiveTrackColorTween = ColorTween(begin: sliderTheme.disabledInactiveTrackColor, end: sliderTheme.inactiveTrackColor); + final ColorTween activeTrackColorTween = + ColorTween(begin: sliderTheme.disabledActiveTrackColor, end: sliderTheme.activeTrackColor); + final ColorTween inactiveTrackColorTween = + ColorTween(begin: sliderTheme.disabledInactiveTrackColor, end: sliderTheme.inactiveTrackColor); final Paint activePaint = Paint()..color = activeTrackColorTween.evaluate(enableAnimation)!; final Paint inactivePaint = Paint()..color = inactiveTrackColorTween.evaluate(enableAnimation)!; final Paint leftTrackPaint; diff --git a/lib/src/stepper/sbb_stepper_item.dart b/lib/src/stepper/sbb_stepper_item.dart index d41bd962..20c450f9 100644 --- a/lib/src/stepper/sbb_stepper_item.dart +++ b/lib/src/stepper/sbb_stepper_item.dart @@ -12,9 +12,7 @@ class SBBStepperItem { @override bool operator ==(Object other) { if (identical(this, other)) return true; - return other is SBBStepperItem && - other.icon == icon && - other.label == label; + return other is SBBStepperItem && other.icon == icon && other.label == label; } @override diff --git a/lib/src/tab_bar/tab_bar_curve_clipper.dart b/lib/src/tab_bar/tab_bar_curve_clipper.dart index 0420aaed..739a9573 100644 --- a/lib/src/tab_bar/tab_bar_curve_clipper.dart +++ b/lib/src/tab_bar/tab_bar_curve_clipper.dart @@ -54,45 +54,54 @@ class TabBarCurveClipper extends CustomClipper { if (smallVersion) { if (_fromLeft) { path = Path() - ..moveTo(rightShape.pCurveRight.dx, rightShape.pCurveRight.dy) + ..moveTo(rightShape.pCurveRight.dx, rightShape.pCurveRight.dy) ..quadraticBezierTo(rightShape.cRight.dx, rightShape.cRight.dy, rightShape.pRight.dx, rightShape.pRight.dy) - ..quadraticBezierTo(rightShape.cBottomRight.dx, rightShape.cBottomRight.dy, rightShape.pBottom.dx, rightShape.pBottom.dy) - ..quadraticBezierTo(rightShape.cBottomLeft.dx, rightShape.cBottomRight.dy, rightShape.pLeft.dx, rightShape.pLeft.dy) - + ..quadraticBezierTo( + rightShape.cBottomRight.dx, rightShape.cBottomRight.dy, rightShape.pBottom.dx, rightShape.pBottom.dy) + ..quadraticBezierTo( + rightShape.cBottomLeft.dx, rightShape.cBottomRight.dy, rightShape.pLeft.dx, rightShape.pLeft.dy) ..quadraticBezierTo(leftShape.cRight.dx, leftShape.cRight.dy, leftShape.pRight.dx, leftShape.pRight.dy) - - ..quadraticBezierTo(leftShape.cBottomRight.dx, leftShape.cBottomRight.dy, leftShape.pBottom.dx, leftShape.pBottom.dy) - ..quadraticBezierTo(leftShape.cBottomLeft.dx, leftShape.cBottomLeft.dy, leftShape.pLeft.dx, leftShape.pLeft.dy) + ..quadraticBezierTo( + leftShape.cBottomRight.dx, leftShape.cBottomRight.dy, leftShape.pBottom.dx, leftShape.pBottom.dy) + ..quadraticBezierTo( + leftShape.cBottomLeft.dx, leftShape.cBottomLeft.dy, leftShape.pLeft.dx, leftShape.pLeft.dy) ..quadraticBezierTo(leftShape.cLeft.dx, leftShape.cLeft.dy, leftShape.pCurveLeft.dx, leftShape.pCurveLeft.dy) ..close(); } else { path = Path() ..moveTo(leftShape.pCurveLeft.dx, leftShape.pCurveLeft.dy) ..quadraticBezierTo(leftShape.cLeft.dx, leftShape.cLeft.dy, leftShape.pLeft.dx, leftShape.pLeft.dy) - ..quadraticBezierTo(leftShape.cBottomLeft.dx, leftShape.cBottomLeft.dy, leftShape.pBottom.dx, leftShape.pBottom.dy) - ..quadraticBezierTo(leftShape.cBottomRight.dx, leftShape.cBottomRight.dy, leftShape.pRight.dx, leftShape.pRight.dy) - + ..quadraticBezierTo( + leftShape.cBottomLeft.dx, leftShape.cBottomLeft.dy, leftShape.pBottom.dx, leftShape.pBottom.dy) + ..quadraticBezierTo( + leftShape.cBottomRight.dx, leftShape.cBottomRight.dy, leftShape.pRight.dx, leftShape.pRight.dy) ..quadraticBezierTo(rightShape.cLeft.dx, rightShape.cLeft.dy, rightShape.pLeft.dx, rightShape.pLeft.dy) - - ..quadraticBezierTo(rightShape.cBottomLeft.dx, rightShape.cBottomLeft.dy, rightShape.pBottom.dx, rightShape.pBottom.dy) - ..quadraticBezierTo(rightShape.cBottomRight.dx, rightShape.cBottomRight.dy, rightShape.pRight.dx, rightShape.pRight.dy) - ..quadraticBezierTo(rightShape.cRight.dx, rightShape.cRight.dy, rightShape.pCurveRight.dx, rightShape.pCurveRight.dy) + ..quadraticBezierTo( + rightShape.cBottomLeft.dx, rightShape.cBottomLeft.dy, rightShape.pBottom.dx, rightShape.pBottom.dy) + ..quadraticBezierTo( + rightShape.cBottomRight.dx, rightShape.cBottomRight.dy, rightShape.pRight.dx, rightShape.pRight.dy) + ..quadraticBezierTo( + rightShape.cRight.dx, rightShape.cRight.dy, rightShape.pCurveRight.dx, rightShape.pCurveRight.dy) ..close(); } } else { path = Path() ..moveTo(leftShape.pCurveLeft.dx, leftShape.pCurveLeft.dy) ..quadraticBezierTo(leftShape.cLeft.dx, leftShape.cLeft.dy, leftShape.pLeft.dx, leftShape.pLeft.dy) - ..quadraticBezierTo(leftShape.cBottomLeft.dx, leftShape.cBottomLeft.dy, leftShape.pBottom.dx, leftShape.pBottom.dy) - ..quadraticBezierTo(leftShape.cBottomRight.dx, leftShape.cBottomRight.dy, leftShape.pRight.dx, leftShape.pRight.dy) - ..quadraticBezierTo(leftShape.cRight.dx, leftShape.cRight.dy, leftShape.pCurveRight.dx, leftShape.pCurveRight.dy) - + ..quadraticBezierTo( + leftShape.cBottomLeft.dx, leftShape.cBottomLeft.dy, leftShape.pBottom.dx, leftShape.pBottom.dy) + ..quadraticBezierTo( + leftShape.cBottomRight.dx, leftShape.cBottomRight.dy, leftShape.pRight.dx, leftShape.pRight.dy) + ..quadraticBezierTo( + leftShape.cRight.dx, leftShape.cRight.dy, leftShape.pCurveRight.dx, leftShape.pCurveRight.dy) ..lineTo(rightShape.pCurveLeft.dx, rightShape.pCurveLeft.dy) - ..quadraticBezierTo(rightShape.cLeft.dx, rightShape.cLeft.dy, rightShape.pLeft.dx, rightShape.pLeft.dy) - ..quadraticBezierTo(rightShape.cBottomLeft.dx, rightShape.cBottomLeft.dy, rightShape.pBottom.dx, rightShape.pBottom.dy) - ..quadraticBezierTo(rightShape.cBottomRight.dx, rightShape.cBottomRight.dy, rightShape.pRight.dx, rightShape.pRight.dy) - ..quadraticBezierTo(rightShape.cRight.dx, rightShape.cRight.dy, rightShape.pCurveRight.dx, rightShape.pCurveRight.dy) + ..quadraticBezierTo( + rightShape.cBottomLeft.dx, rightShape.cBottomLeft.dy, rightShape.pBottom.dx, rightShape.pBottom.dy) + ..quadraticBezierTo( + rightShape.cBottomRight.dx, rightShape.cBottomRight.dy, rightShape.pRight.dx, rightShape.pRight.dy) + ..quadraticBezierTo( + rightShape.cRight.dx, rightShape.cRight.dy, rightShape.pCurveRight.dx, rightShape.pCurveRight.dy) ..close(); } @@ -182,4 +191,4 @@ class _HoleShape { Offset get cBottomRight => Tween(begin: _pTopCenter + _controlOffset, end: _pBottomRight).transform(percent); Offset get pBottom => Tween(begin: _pTopCenter, end: _pBottomCenter).transform(percent); -} \ No newline at end of file +} diff --git a/lib/src/tab_bar/tab_bar_draw_data.dart b/lib/src/tab_bar/tab_bar_draw_data.dart index fcc2fc82..5af83408 100644 --- a/lib/src/tab_bar/tab_bar_draw_data.dart +++ b/lib/src/tab_bar/tab_bar_draw_data.dart @@ -8,10 +8,10 @@ class TabBarDrawData { TabBarDrawData(this.positions, this.sizes, this.paddingBetween); factory TabBarDrawData.empty(List items) => TabBarDrawData( - Map.fromIterable(items, value: (_) => 0.0), - Map.fromIterable(items, value: (_) => Size.zero), - 0, - ); + Map.fromIterable(items, value: (_) => 0.0), + Map.fromIterable(items, value: (_) => Size.zero), + 0, + ); final Map positions; final Map sizes; @@ -21,7 +21,9 @@ class TabBarDrawData { bool operator ==(Object other) { if (other is TabBarDrawData) { const mapEquality = MapEquality(); - return mapEquality.equals(positions, other.positions) && mapEquality.equals(sizes, other.sizes) && paddingBetween == paddingBetween; + return mapEquality.equals(positions, other.positions) && + mapEquality.equals(sizes, other.sizes) && + paddingBetween == paddingBetween; } return false; } diff --git a/lib/src/tab_bar/tab_bar_filler.dart b/lib/src/tab_bar/tab_bar_filler.dart index c651e184..78503328 100644 --- a/lib/src/tab_bar/tab_bar_filler.dart +++ b/lib/src/tab_bar/tab_bar_filler.dart @@ -19,7 +19,7 @@ class TabBarFiller extends StatelessWidget { final mediaQuery = MediaQuery.of(context); final textScaler = mediaQuery.textScaler; final portrait = mediaQuery.orientation == Orientation.portrait; - return portrait ? 64.0 + textScaler.scale(20.0) : 52.0; + return portrait ? 64.0 + textScaler.scale(20.0) : 52.0; } @override diff --git a/lib/src/text/sbb_text_form_field.dart b/lib/src/text/sbb_text_form_field.dart index a2ea2cfa..0db5638b 100644 --- a/lib/src/text/sbb_text_form_field.dart +++ b/lib/src/text/sbb_text_form_field.dart @@ -205,9 +205,7 @@ class _SBBTextField extends State { errorStyle: const TextStyle(fontSize: 0, height: 0), errorText: errorText, focusedErrorBorder: InputBorder.none, - contentPadding: widget.maxLines == 1 - ? const EdgeInsets.only(bottom: 2.0) - : const EdgeInsets.only(bottom: 8.0), + contentPadding: widget.maxLines == 1 ? const EdgeInsets.only(bottom: 2.0) : const EdgeInsets.only(bottom: 8.0), labelStyle: textField.placeholderTextStyle, hintText: widget.hintText, hintStyle: textField.placeholderTextStyle, diff --git a/lib/src/theme/icons/sbb_icons_index.dart b/lib/src/theme/icons/sbb_icons_index.dart index ee2b83af..5e9744c8 100644 --- a/lib/src/theme/icons/sbb_icons_index.dart +++ b/lib/src/theme/icons/sbb_icons_index.dart @@ -253,7 +253,10 @@ sealed class SBBIconsIndex { {'icon': SBBIcons.lock_open_small, 'name': 'lock_open_small'}, {'icon': SBBIcons.lock_closed_small, 'name': 'lock_closed_small'}, {'icon': SBBIcons.location_pin_surrounding_area_small, 'name': 'location_pin_surrounding_area_small'}, - {'icon': SBBIcons.location_pin_surrounding_area_power_plug_small, 'name': 'location_pin_surrounding_area_power_plug_small'}, + { + 'icon': SBBIcons.location_pin_surrounding_area_power_plug_small, + 'name': 'location_pin_surrounding_area_power_plug_small' + }, {'icon': SBBIcons.location_pin_small, 'name': 'location_pin_small'}, {'icon': SBBIcons.location_pin_pulse_surrounding_area_small, 'name': 'location_pin_pulse_surrounding_area_small'}, {'icon': SBBIcons.location_pin_map_small, 'name': 'location_pin_map_small'}, @@ -876,7 +879,10 @@ sealed class SBBIconsIndex { {'icon': SBBIcons.locker_medium, 'name': 'locker_medium'}, {'icon': SBBIcons.lock_open_medium, 'name': 'lock_open_medium'}, {'icon': SBBIcons.lock_closed_medium, 'name': 'lock_closed_medium'}, - {'icon': SBBIcons.location_pin_surrounding_area_power_plug_medium, 'name': 'location_pin_surrounding_area_power_plug_medium'}, + { + 'icon': SBBIcons.location_pin_surrounding_area_power_plug_medium, + 'name': 'location_pin_surrounding_area_power_plug_medium' + }, {'icon': SBBIcons.location_pin_surrounding_area_medium, 'name': 'location_pin_surrounding_area_medium'}, {'icon': SBBIcons.location_pin_pulse_surrounding_area_medium, 'name': 'location_pin_pulse_surrounding_area_medium'}, {'icon': SBBIcons.location_pin_medium, 'name': 'location_pin_medium'}, @@ -1351,7 +1357,10 @@ sealed class SBBIconsIndex { {'icon': SBBIcons.locomotive_high_speed_large, 'name': 'locomotive_high_speed_large'}, {'icon': SBBIcons.lock_open_large, 'name': 'lock_open_large'}, {'icon': SBBIcons.lock_closed_large, 'name': 'lock_closed_large'}, - {'icon': SBBIcons.location_pin_surrounding_area_power_plug_large, 'name': 'location_pin_surrounding_area_power_plug_large'}, + { + 'icon': SBBIcons.location_pin_surrounding_area_power_plug_large, + 'name': 'location_pin_surrounding_area_power_plug_large' + }, {'icon': SBBIcons.location_pin_surrounding_area_large, 'name': 'location_pin_surrounding_area_large'}, {'icon': SBBIcons.location_pin_map_large, 'name': 'location_pin_map_large'}, {'icon': SBBIcons.location_pin_camera_large, 'name': 'location_pin_camera_large'}, diff --git a/test/sbb_secondary_button_test.dart b/test/sbb_secondary_button_test.dart index 8fbfbe38..ad086ad7 100644 --- a/test/sbb_secondary_button_test.dart +++ b/test/sbb_secondary_button_test.dart @@ -8,7 +8,6 @@ void main() { testWidgets('secondary_button', (WidgetTester tester) async { final widget = Padding( padding: const EdgeInsets.symmetric(horizontal: sbbDefaultSpacing / 2), - child: Column( children: [ const SizedBox(height: sbbDefaultSpacing),