diff --git a/lib/src/alerts/confirmation_dialog.dart b/lib/src/alerts/confirmation_dialog.dart index ab6124d..f319d2b 100644 --- a/lib/src/alerts/confirmation_dialog.dart +++ b/lib/src/alerts/confirmation_dialog.dart @@ -28,8 +28,9 @@ Future showConfirmDialog({ return Center( child: Card( margin: const EdgeInsets.all(16), - shape: - RoundedRectangleBorder(borderRadius: BorderRadius.circular(24)), + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(24), + ), clipBehavior: Clip.hardEdge, child: Column( mainAxisSize: MainAxisSize.min, @@ -45,37 +46,41 @@ Future showConfirmDialog({ : Lottie.asset(lottie, width: double.infinity), ), ), - const SizedBox( - height: 12, - ), + const SizedBox(height: 12), Container( - padding: - const EdgeInsets.symmetric(vertical: 10.0, horizontal: 16), + padding: const EdgeInsets.symmetric( + vertical: 10.0, + horizontal: 16, + ), width: double.infinity, child: Text( title, - style: titleTextStyle ?? + style: + titleTextStyle ?? const TextStyle( - fontSize: 20, fontWeight: FontWeight.bold), + fontSize: 20, + fontWeight: FontWeight.bold, + ), textAlign: TextAlign.start, ), ), Container( - padding: - const EdgeInsets.symmetric(vertical: 12.0, horizontal: 16), + padding: const EdgeInsets.symmetric( + vertical: 12.0, + horizontal: 16, + ), width: double.infinity, child: Text( message, - style: messageTextStyle ?? - const TextStyle( - fontSize: 18, - ), + style: messageTextStyle ?? const TextStyle(fontSize: 18), textAlign: TextAlign.start, ), ), Padding( - padding: - const EdgeInsets.symmetric(horizontal: 8.0, vertical: 12), + padding: const EdgeInsets.symmetric( + horizontal: 8.0, + vertical: 12, + ), child: Row( mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: [ @@ -87,7 +92,8 @@ Future showConfirmDialog({ isConfirmed = true; onConfirmed(); }, - style: confirmButtonStyle ?? + style: + confirmButtonStyle ?? ElevatedButton.styleFrom( backgroundColor: Theme.of(context).primaryColor, shape: RoundedRectangleBorder( @@ -100,7 +106,8 @@ Future showConfirmDialog({ ), child: Text( confirmText, - style: confirmButtonTextStyle ?? + style: + confirmButtonTextStyle ?? const TextStyle(fontSize: 18), ), ), @@ -114,7 +121,8 @@ Future showConfirmDialog({ isConfirmed = false; Navigator.pop(context); }, - style: cancelButtonStyle ?? + style: + cancelButtonStyle ?? TextButton.styleFrom( padding: const EdgeInsets.symmetric( horizontal: 8, @@ -126,16 +134,19 @@ Future showConfirmDialog({ ), child: Text( cancelText, - style: cancelButtonTextStyle ?? + style: + cancelButtonTextStyle ?? const TextStyle( - color: Colors.grey, fontSize: 18), + color: Colors.grey, + fontSize: 18, + ), ), ), ), - ) + ), ], ), - ) + ), ], ), ), diff --git a/lib/src/date/date_picker.dart b/lib/src/date/date_picker.dart index 19b5522..93ac068 100644 --- a/lib/src/date/date_picker.dart +++ b/lib/src/date/date_picker.dart @@ -194,10 +194,7 @@ class DateTimePicker { initialTime: TimeOfDay.fromDateTime(initialDate ?? DateTime.now()), ); if (time != null) { - date = date.copyWith( - hour: time.hour, - minute: time.minute, - ); + date = date.copyWith(hour: time.hour, minute: time.minute); } } diff --git a/lib/src/utils/common_utils.dart b/lib/src/utils/common_utils.dart index 03d3f9c..59d153d 100644 --- a/lib/src/utils/common_utils.dart +++ b/lib/src/utils/common_utils.dart @@ -9,15 +9,14 @@ import 'package:flutter/rendering.dart'; import 'package:flutter_svg/flutter_svg.dart'; class CommonImageUtils { - static Future getImageFromSvgAsset(String assetName, - {Size size = const Size(48, 48), - BuildContext? context, - ColorMapper? colorMapper}) async { + static Future getImageFromSvgAsset( + String assetName, { + Size size = const Size(48, 48), + BuildContext? context, + ColorMapper? colorMapper, + }) async { final pictureInfo = await vg.loadPicture( - SvgAssetLoader( - assetName, - colorMapper: colorMapper, - ), + SvgAssetLoader(assetName, colorMapper: colorMapper), null, ); @@ -68,7 +67,9 @@ class CommonImageUtils { final renderView = RenderView( view: view, child: RenderPositionedBox( - alignment: Alignment.center, child: repaintBoundary), + alignment: Alignment.center, + child: repaintBoundary, + ), configuration: ViewConfiguration( physicalConstraints: BoxConstraints.tight(logicalSize) * view.devicePixelRatio, diff --git a/lib/src/utils/icon_info.dart b/lib/src/utils/icon_info.dart index 140532d..284b7ca 100644 --- a/lib/src/utils/icon_info.dart +++ b/lib/src/utils/icon_info.dart @@ -56,12 +56,14 @@ class IconInfo { BoxFit? fit, TextDirection? textDirection, }) { - return ImageViewer.icon(this, - color: color, - width: size, - height: size, - fit: fit, - iconDirection: textDirection); + return ImageViewer.icon( + this, + color: color, + width: size, + height: size, + fit: fit, + iconDirection: textDirection, + ); } } @@ -70,5 +72,4 @@ extension IconInfoExtension on IconData { IconInfo toIconInfo({Color? color, double? size}) { return IconInfo.icon(this, color: color, size: size); } - } diff --git a/lib/src/widgets/anim_search_bar.dart b/lib/src/widgets/anim_search_bar.dart index bd691f6..a278e8d 100644 --- a/lib/src/widgets/anim_search_bar.dart +++ b/lib/src/widgets/anim_search_bar.dart @@ -167,8 +167,9 @@ class _AnimSearchBarState extends State children: [ ///Using Animated Positioned widget to expand and shrink the widget AnimatedPositioned( - duration: - Duration(milliseconds: widget.animationDurationInMilli), + duration: Duration( + milliseconds: widget.animationDurationInMilli, + ), top: 6.0, right: 7.0, curve: Curves.easeOut, @@ -231,7 +232,8 @@ class _AnimSearchBarState extends State }, ///suffixIcon is of type Icon - child: widget.suffixIcon ?? + child: + widget.suffixIcon ?? Icon( Icons.close, size: 20.0, @@ -243,20 +245,22 @@ class _AnimSearchBarState extends State ), ), Directionality( - textDirection: - widget.rtl ? TextDirection.rtl : TextDirection.ltr, + textDirection: widget.rtl + ? TextDirection.rtl + : TextDirection.ltr, child: AnimatedPositioned( - duration: - Duration(milliseconds: widget.animationDurationInMilli), + duration: Duration( + milliseconds: widget.animationDurationInMilli, + ), left: widget.rtl ? null : (toggle == 0) - ? 20.0 - : 40.0, + ? 20.0 + : 40.0, right: widget.rtl ? (toggle == 0) - ? 20.0 - : 40.0 + ? 20.0 + : 40.0 : null, curve: Curves.easeOut, top: widget.rtl ? 6 : 11, @@ -299,7 +303,8 @@ class _AnimSearchBarState extends State }, ///style is of type TextStyle, the default is just a color black - style: widget.style ?? + style: + widget.style ?? const TextStyle(color: Colors.black), cursorColor: widget.cursorColor, decoration: InputDecoration( @@ -307,7 +312,8 @@ class _AnimSearchBarState extends State isDense: true, floatingLabelBehavior: FloatingLabelBehavior.never, labelText: widget.helpText, - labelStyle: widget.labelStyle ?? + labelStyle: + widget.labelStyle ?? TextStyle( color: const Color(0xff5B5B5B), fontSize: 14.0.sp, @@ -340,11 +346,11 @@ class _AnimSearchBarState extends State ///prefixIcon is of type Icon icon: widget.prefixIcon != null ? toggle == 1 - ? Icon( - Icons.arrow_back_ios, - color: widget.textFieldIconColor, - ) - : widget.prefixIcon! + ? Icon( + Icons.arrow_back_ios, + color: widget.textFieldIconColor, + ) + : widget.prefixIcon! : Icon( toggle == 1 ? Icons.arrow_back_ios : Icons.search, // search icon color when closed @@ -354,34 +360,32 @@ class _AnimSearchBarState extends State size: 20.0, ), onPressed: () { - setState( - () { - ///if the search bar is closed - if (toggle == 0) { - toggle = 1; - setState(() { - ///if the autoFocus is true, the keyboard will pop open, automatically - if (widget.autoFocus) { - FocusScope.of(context).requestFocus(focusNode); - } - }); - - ///forward == expand - _con.forward(); - } else { - ///if the search bar is expanded - toggle = 0; - - ///if the autoFocus is true, the keyboard will close, automatically - setState(() { - if (widget.autoFocus) unfocusKeyboard(); - }); - - ///reverse == close - _con.reverse(); - } - }, - ); + setState(() { + ///if the search bar is closed + if (toggle == 0) { + toggle = 1; + setState(() { + ///if the autoFocus is true, the keyboard will pop open, automatically + if (widget.autoFocus) { + FocusScope.of(context).requestFocus(focusNode); + } + }); + + ///forward == expand + _con.forward(); + } else { + ///if the search bar is expanded + toggle = 0; + + ///if the autoFocus is true, the keyboard will close, automatically + setState(() { + if (widget.autoFocus) unfocusKeyboard(); + }); + + ///reverse == close + _con.reverse(); + } + }); widget.searchBarOpen?.call(toggle); }, ), diff --git a/lib/src/widgets/auto_animated_list.dart b/lib/src/widgets/auto_animated_list.dart index 34ef054..1ad384b 100644 --- a/lib/src/widgets/auto_animated_list.dart +++ b/lib/src/widgets/auto_animated_list.dart @@ -2,8 +2,8 @@ import 'dart:math'; import 'package:flutter/material.dart'; -typedef ItemBuilder = Widget Function( - BuildContext context, S item, int index); +typedef ItemBuilder = + Widget Function(BuildContext context, S item, int index); /// Widget that automatically animates list of items when inserting or deleting any item. class AutoAnimatedList extends StatefulWidget { @@ -22,13 +22,14 @@ class AutoAnimatedList extends StatefulWidget { /// Footer widget that is displayed on the bottom of the list. final Widget? footer; - const AutoAnimatedList( - {super.key, - required this.items, - required this.itemBuilder, - this.header, - this.footer, - this.shouldAnimate = true}); + const AutoAnimatedList({ + super.key, + required this.items, + required this.itemBuilder, + this.header, + this.footer, + this.shouldAnimate = true, + }); @override State> createState() => _AutoAnimatedListState(); @@ -60,7 +61,11 @@ class _AutoAnimatedListState extends State> { return widget.footer ?? Container(); } return buildListItem( - context, currentItemsList[index - 1], animation, index - 1); + context, + currentItemsList[index - 1], + animation, + index - 1, + ); }, ); } @@ -73,15 +78,13 @@ class _AutoAnimatedListState extends State> { ) { return SizeTransition( key: Key(item.hashCode.toString()), - sizeFactor: - CurvedAnimation(parent: animation, curve: Curves.easeInOutCubic), + sizeFactor: CurvedAnimation( + parent: animation, + curve: Curves.easeInOutCubic, + ), child: FadeTransition( opacity: animation, - child: widget.itemBuilder( - context, - item, - index, - ), + child: widget.itemBuilder(context, item, index), ), ); } diff --git a/lib/src/widgets/center_loading.dart b/lib/src/widgets/center_loading.dart index f531db4..6a5d158 100644 --- a/lib/src/widgets/center_loading.dart +++ b/lib/src/widgets/center_loading.dart @@ -19,9 +19,9 @@ class CenterLoading extends StatelessWidget { this.color, this.isAnimating = true, this.radius = 10, - }) : _type = CenterLoadingType.cupertino, - backgroundColor = null, - strokeWidth = null; + }) : _type = CenterLoadingType.cupertino, + backgroundColor = null, + strokeWidth = null; const CenterLoading.adaptive({ super.key, @@ -38,8 +38,8 @@ class CenterLoading extends StatelessWidget { this.isAnimating = true, this.strokeWidth = 4, this.backgroundColor, - }) : _type = CenterLoadingType.material, - radius = null; + }) : _type = CenterLoadingType.material, + radius = null; @override Widget build(BuildContext context) { diff --git a/lib/src/widgets/dashed_line.dart b/lib/src/widgets/dashed_line.dart index 4f244c4..3e0feea 100644 --- a/lib/src/widgets/dashed_line.dart +++ b/lib/src/widgets/dashed_line.dart @@ -42,10 +42,7 @@ class _DashedLineState extends State { height: widget.height, child: RepaintBoundary( child: CustomPaint( - size: Size( - widget.width ?? double.infinity, - widget.height ?? 2, - ), + size: Size(widget.width ?? double.infinity, widget.height ?? 2), painter: DashedLinePainter( dashWidth: widget.dashWidth, dashSpace: widget.dashSpace, @@ -72,21 +69,25 @@ class DashedLinePainter extends CustomPainter { this.strokeWidth = 1, this.color = Colors.grey, }) : painter = Paint() - ..color = color - ..strokeWidth = strokeWidth; + ..color = color + ..strokeWidth = strokeWidth; @override void paint(Canvas canvas, Size size) { while (startX < size.width) { - canvas.drawLine(Offset(startX, size.height / 2), - Offset(startX + dashWidth, size.height / 2), painter); + canvas.drawLine( + Offset(startX, size.height / 2), + Offset(startX + dashWidth, size.height / 2), + painter, + ); startX += dashWidth + dashSpace; } } @override bool shouldRepaint(DashedLinePainter oldDelegate) { - final bool shouldRepaint = oldDelegate.color != color || + final bool shouldRepaint = + oldDelegate.color != color || oldDelegate.strokeWidth != strokeWidth || oldDelegate.dashWidth != dashWidth || oldDelegate.dashSpace != dashSpace; diff --git a/lib/src/widgets/fade_indexed_stack.dart b/lib/src/widgets/fade_indexed_stack.dart index 9a6c2e4..f933f81 100644 --- a/lib/src/widgets/fade_indexed_stack.dart +++ b/lib/src/widgets/fade_indexed_stack.dart @@ -51,9 +51,7 @@ class FadeIndexedStack extends StatefulWidget { super.key, required this.index, this.children = const [], - this.duration = const Duration( - milliseconds: 250, - ), + this.duration = const Duration(milliseconds: 250), this.alignment = AlignmentDirectional.topStart, this.textDirection, this.clipBehavior = Clip.hardEdge, @@ -66,8 +64,10 @@ class FadeIndexedStack extends StatefulWidget { class FadeIndexedStackState extends State with SingleTickerProviderStateMixin { - late final AnimationController _controller = - AnimationController(vsync: this, duration: widget.duration); + late final AnimationController _controller = AnimationController( + vsync: this, + duration: widget.duration, + ); @override void didUpdateWidget(FadeIndexedStack oldWidget) { diff --git a/lib/src/widgets/icon_viewer.dart b/lib/src/widgets/icon_viewer.dart index 66ace9b..68af4db 100644 --- a/lib/src/widgets/icon_viewer.dart +++ b/lib/src/widgets/icon_viewer.dart @@ -49,9 +49,9 @@ class IconViewer extends StatelessWidget { this.width, this.height, this.iconSize, - }) : svgIcon = null, - text = null, - iconImage = null; + }) : svgIcon = null, + text = null, + iconImage = null; const IconViewer.svg({ this.svgIcon, @@ -65,9 +65,9 @@ class IconViewer extends StatelessWidget { this.width, this.height, this.iconSize, - }) : icon = null, - text = null, - iconImage = null; + }) : icon = null, + text = null, + iconImage = null; const IconViewer.assetImage({ this.iconImage, @@ -81,9 +81,9 @@ class IconViewer extends StatelessWidget { this.width, this.height, this.iconSize, - }) : icon = null, - svgIcon = null, - text = null; + }) : icon = null, + svgIcon = null, + text = null; const IconViewer.text({ this.text, @@ -97,9 +97,9 @@ class IconViewer extends StatelessWidget { this.width, this.height, this.iconSize, - }) : icon = null, - svgIcon = null, - iconImage = null; + }) : icon = null, + svgIcon = null, + iconImage = null; @override Widget build(BuildContext context) { @@ -130,12 +130,7 @@ class IconViewer extends StatelessWidget { shape: BoxShape.circle, color: iconBackgroundColor, ), - child: Icon( - icon, - color: iconColor, - key: key, - size: iconSize, - ), + child: Icon(icon, color: iconColor, key: key, size: iconSize), ); } else if (svgIcon != null) { return isSelected @@ -153,10 +148,7 @@ class IconViewer extends StatelessWidget { height: fit == BoxFit.cover ? null : size.height, colorFilter: selectedIconColor == null ? null - : ColorFilter.mode( - selectedIconColor!, - BlendMode.srcIn, - ), + : ColorFilter.mode(selectedIconColor!, BlendMode.srcIn), fit: fit, key: key, ), @@ -174,10 +166,7 @@ class IconViewer extends StatelessWidget { height: fit == BoxFit.cover ? null : size.height, colorFilter: iconColor == null ? null - : ColorFilter.mode( - iconColor!, - BlendMode.srcIn, - ), + : ColorFilter.mode(iconColor!, BlendMode.srcIn), fit: fit, key: key, ), @@ -197,11 +186,7 @@ class IconViewer extends StatelessWidget { key: key, ), ) - : Image.asset( - iconImage!, - color: iconColor, - key: key, - ); + : Image.asset(iconImage!, color: iconColor, key: key); } else if (text != null) { return isSelected ? Container( @@ -215,10 +200,7 @@ class IconViewer extends StatelessWidget { padding: EdgeInsets.all(2.r), child: Text( text ?? '', - style: TextStyle( - fontSize: 8.sp, - color: selectedIconColor, - ), + style: TextStyle(fontSize: 8.sp, color: selectedIconColor), ), ) : Container( @@ -232,10 +214,7 @@ class IconViewer extends StatelessWidget { padding: EdgeInsets.all(2.r), child: Text( text ?? '', - style: TextStyle( - fontSize: 8.sp, - color: iconColor, - ), + style: TextStyle(fontSize: 8.sp, color: iconColor), ), ); } else { diff --git a/lib/src/widgets/image_viewer.dart b/lib/src/widgets/image_viewer.dart index 32f99cc..dba104a 100644 --- a/lib/src/widgets/image_viewer.dart +++ b/lib/src/widgets/image_viewer.dart @@ -11,10 +11,7 @@ import '../utils/icon_info.dart'; /// Signature used by [Image.errorBuilder] to create a replacement widget to /// render instead of the image. -typedef ErrorBuilder = Widget Function( - BuildContext context, - Object error, -); +typedef ErrorBuilder = Widget Function(BuildContext context, Object error); /// Builder function to create a placeholder widget. The function is called /// once while the ImageProvider is loading the image. @@ -154,14 +151,14 @@ class ImageViewer extends StatefulWidget { this.colorBlendMode, this.fit = BoxFit.cover, this.alignment = Alignment.center, - }) : _type = _ImageType.assetImage, - bytes = null, - file = null, - clipBehavior = null, - iconInfo = null, - iconDirection = null, - placeholderBuilder = null, - imageRenderMethodForWeb = ImageRenderMethodForWeb.HttpGet; + }) : _type = _ImageType.assetImage, + bytes = null, + file = null, + clipBehavior = null, + iconInfo = null, + iconDirection = null, + placeholderBuilder = null, + imageRenderMethodForWeb = ImageRenderMethodForWeb.HttpGet; const ImageViewer.network( String src, { @@ -174,14 +171,14 @@ class ImageViewer extends StatefulWidget { this.colorBlendMode, this.fit = BoxFit.cover, this.alignment = Alignment.center, - }) : _type = _ImageType.networkImage, - bytes = null, - file = null, - path = src, - iconInfo = null, - iconDirection = null, - clipBehavior = null, - imageRenderMethodForWeb = ImageRenderMethodForWeb.HttpGet; + }) : _type = _ImageType.networkImage, + bytes = null, + file = null, + path = src, + iconInfo = null, + iconDirection = null, + clipBehavior = null, + imageRenderMethodForWeb = ImageRenderMethodForWeb.HttpGet; const ImageViewer.file( File this.file, { @@ -193,14 +190,14 @@ class ImageViewer extends StatefulWidget { this.colorBlendMode, this.fit = BoxFit.cover, this.alignment = Alignment.center, - }) : _type = _ImageType.fileImage, - bytes = null, - clipBehavior = null, - path = null, - iconInfo = null, - iconDirection = null, - placeholderBuilder = null, - imageRenderMethodForWeb = ImageRenderMethodForWeb.HttpGet; + }) : _type = _ImageType.fileImage, + bytes = null, + clipBehavior = null, + path = null, + iconInfo = null, + iconDirection = null, + placeholderBuilder = null, + imageRenderMethodForWeb = ImageRenderMethodForWeb.HttpGet; const ImageViewer.memory( Uint8List this.bytes, { @@ -212,14 +209,14 @@ class ImageViewer extends StatefulWidget { this.colorBlendMode, this.fit = BoxFit.cover, this.alignment = Alignment.center, - }) : _type = _ImageType.memoryImage, - file = null, - clipBehavior = null, - path = null, - iconInfo = null, - iconDirection = null, - placeholderBuilder = null, - imageRenderMethodForWeb = ImageRenderMethodForWeb.HttpGet; + }) : _type = _ImageType.memoryImage, + file = null, + clipBehavior = null, + path = null, + iconInfo = null, + iconDirection = null, + placeholderBuilder = null, + imageRenderMethodForWeb = ImageRenderMethodForWeb.HttpGet; const ImageViewer.cachedNetwork( String src, { @@ -233,13 +230,13 @@ class ImageViewer extends StatefulWidget { this.errorBuilder, this.placeholderBuilder, this.imageRenderMethodForWeb = ImageRenderMethodForWeb.HttpGet, - }) : _type = _ImageType.cachedNetworkImage, - bytes = null, - file = null, - clipBehavior = null, - iconInfo = null, - iconDirection = null, - path = src; + }) : _type = _ImageType.cachedNetworkImage, + bytes = null, + file = null, + clipBehavior = null, + iconInfo = null, + iconDirection = null, + path = src; const ImageViewer.svgAsset( String this.path, { @@ -252,13 +249,13 @@ class ImageViewer extends StatefulWidget { this.clipBehavior = Clip.hardEdge, this.color, this.colorBlendMode, - }) : _type = _ImageType.svgAssetImage, - bytes = null, - file = null, - iconInfo = null, - iconDirection = null, - errorBuilder = null, - imageRenderMethodForWeb = ImageRenderMethodForWeb.HttpGet; + }) : _type = _ImageType.svgAssetImage, + bytes = null, + file = null, + iconInfo = null, + iconDirection = null, + errorBuilder = null, + imageRenderMethodForWeb = ImageRenderMethodForWeb.HttpGet; const ImageViewer.svgNetwork( String src, { @@ -271,14 +268,14 @@ class ImageViewer extends StatefulWidget { this.clipBehavior = Clip.hardEdge, this.color, this.colorBlendMode, - }) : _type = _ImageType.svgNetworkImage, - bytes = null, - file = null, - path = src, - iconInfo = null, - iconDirection = null, - errorBuilder = null, - imageRenderMethodForWeb = ImageRenderMethodForWeb.HttpGet; + }) : _type = _ImageType.svgNetworkImage, + bytes = null, + file = null, + path = src, + iconInfo = null, + iconDirection = null, + errorBuilder = null, + imageRenderMethodForWeb = ImageRenderMethodForWeb.HttpGet; const ImageViewer.svgMemory( Uint8List this.bytes, { @@ -291,13 +288,13 @@ class ImageViewer extends StatefulWidget { this.clipBehavior = Clip.hardEdge, this.color, this.colorBlendMode, - }) : _type = _ImageType.svgMemoryImage, - file = null, - errorBuilder = null, - iconInfo = null, - iconDirection = null, - path = null, - imageRenderMethodForWeb = ImageRenderMethodForWeb.HttpGet; + }) : _type = _ImageType.svgMemoryImage, + file = null, + errorBuilder = null, + iconInfo = null, + iconDirection = null, + path = null, + imageRenderMethodForWeb = ImageRenderMethodForWeb.HttpGet; const ImageViewer.icon( IconInfo this.iconInfo, { @@ -309,14 +306,14 @@ class ImageViewer extends StatefulWidget { this.color, this.iconDirection, this.imageRenderMethodForWeb = ImageRenderMethodForWeb.HttpGet, - }) : _type = null, - bytes = null, - file = null, - path = null, - colorBlendMode = null, - placeholderBuilder = null, - errorBuilder = null, - clipBehavior = null; + }) : _type = null, + bytes = null, + file = null, + path = null, + colorBlendMode = null, + placeholderBuilder = null, + errorBuilder = null, + clipBehavior = null; @override State createState() => _ImageViewerState(); @@ -350,9 +347,7 @@ class _ImageViewerState extends State { const SizedBox.shrink(); }, loadingBuilder: (ctx, child, event) { - return widget.placeholderBuilder?.call( - ctx, - ) ?? + return widget.placeholderBuilder?.call(ctx) ?? const SizedBox.shrink(); }, color: widget.color, @@ -417,7 +412,9 @@ class _ImageViewerState extends State { placeholderBuilder: widget.placeholderBuilder, colorFilter: widget.color != null ? ColorFilter.mode( - widget.color!, widget.colorBlendMode ?? BlendMode.srcIn) + widget.color!, + widget.colorBlendMode ?? BlendMode.srcIn, + ) : null, clipBehavior: widget.clipBehavior ?? Clip.hardEdge, ); @@ -431,7 +428,9 @@ class _ImageViewerState extends State { placeholderBuilder: widget.placeholderBuilder, colorFilter: widget.color != null ? ColorFilter.mode( - widget.color!, widget.colorBlendMode ?? BlendMode.srcIn) + widget.color!, + widget.colorBlendMode ?? BlendMode.srcIn, + ) : null, clipBehavior: widget.clipBehavior ?? Clip.hardEdge, ); @@ -445,7 +444,9 @@ class _ImageViewerState extends State { placeholderBuilder: widget.placeholderBuilder, colorFilter: widget.color != null ? ColorFilter.mode( - widget.color!, widget.colorBlendMode ?? BlendMode.srcIn) + widget.color!, + widget.colorBlendMode ?? BlendMode.srcIn, + ) : null, clipBehavior: widget.clipBehavior ?? Clip.hardEdge, ); @@ -466,7 +467,9 @@ class _ImageViewerState extends State { widget.iconInfo!.svgIcon!, colorFilter: color != null ? ColorFilter.mode( - color, widget.colorBlendMode ?? BlendMode.srcIn) + color, + widget.colorBlendMode ?? BlendMode.srcIn, + ) : null, width: widget.iconInfo!.size ?? widget.width, height: widget.iconInfo!.size ?? widget.height, diff --git a/lib/src/widgets/multi_value_listenable_builder.dart b/lib/src/widgets/multi_value_listenable_builder.dart index c7dad5a..16769e1 100644 --- a/lib/src/widgets/multi_value_listenable_builder.dart +++ b/lib/src/widgets/multi_value_listenable_builder.dart @@ -1,11 +1,8 @@ import 'package:flutter/foundation.dart'; import 'package:flutter/widgets.dart'; -typedef MultiValueWidgetBuilder = Widget Function( - BuildContext context, - List values, - Widget? child, -); +typedef MultiValueWidgetBuilder = + Widget Function(BuildContext context, List values, Widget? child); /// A widget that rebuilds whenever any of the provided [ValueListenable]s change. class MultiValueListenableBuilder extends StatefulWidget { diff --git a/lib/src/widgets/optimized_card.dart b/lib/src/widgets/optimized_card.dart index a08cd4a..aca3fa0 100644 --- a/lib/src/widgets/optimized_card.dart +++ b/lib/src/widgets/optimized_card.dart @@ -132,34 +132,32 @@ class OptimizedCard extends StatefulWidget { //Callback on tapping on the card. final VoidCallback? onPressed; - const OptimizedCard( - {super.key, - this.width, - this.height, - this.padding, - this.color, - this.shadowColor, - this.surfaceTintColor, - this.elevation = 3, - this.shape, - this.borderOnForeground = true, - this.clipBehavior = Clip.hardEdge, - this.margin, - this.innerCardShadowMargin, - this.semanticContainer = true, - this.customShadowColor, - this.shadowOffset = const Offset( - 0.0, - 1.0, - ), - this.shadowRadius = 5.0, - this.spreadRadius = 1.0, - this.shadowBorderRadius, - this.shadowBlurStyle = BlurStyle.normal, - this.shouldShowCustomShadow = true, - this.child, - this.borderRadius, - this.onPressed}); + const OptimizedCard({ + super.key, + this.width, + this.height, + this.padding, + this.color, + this.shadowColor, + this.surfaceTintColor, + this.elevation = 3, + this.shape, + this.borderOnForeground = true, + this.clipBehavior = Clip.hardEdge, + this.margin, + this.innerCardShadowMargin, + this.semanticContainer = true, + this.customShadowColor, + this.shadowOffset = const Offset(0.0, 1.0), + this.shadowRadius = 5.0, + this.spreadRadius = 1.0, + this.shadowBorderRadius, + this.shadowBlurStyle = BlurStyle.normal, + this.shouldShowCustomShadow = true, + this.child, + this.borderRadius, + this.onPressed, + }); @override State createState() => _OptimizedCardState(); @@ -176,23 +174,27 @@ class _OptimizedCardState extends State { onTap: widget.onPressed, borderRadius: widget.borderRadius ?? BorderRadius.circular(8.r), child: Card( - elevation: widget.elevation, - shadowColor: widget.shadowColor, - surfaceTintColor: widget.surfaceTintColor, - borderOnForeground: widget.borderOnForeground, - shape: widget.shape ?? - RoundedRectangleBorder( - borderRadius: widget.borderRadius ?? - BorderRadius.all(Radius.circular(8.r)), - ), - color: widget.color, - margin: widget.margin ?? - EdgeInsets.symmetric(vertical: 4.h, horizontal: 4.w), - clipBehavior: Clip.hardEdge, - child: Padding( - padding: widget.padding ?? EdgeInsets.zero, - child: widget.child, - )), + elevation: widget.elevation, + shadowColor: widget.shadowColor, + surfaceTintColor: widget.surfaceTintColor, + borderOnForeground: widget.borderOnForeground, + shape: + widget.shape ?? + RoundedRectangleBorder( + borderRadius: + widget.borderRadius ?? + BorderRadius.all(Radius.circular(8.r)), + ), + color: widget.color, + margin: + widget.margin ?? + EdgeInsets.symmetric(vertical: 4.h, horizontal: 4.w), + clipBehavior: Clip.hardEdge, + child: Padding( + padding: widget.padding ?? EdgeInsets.zero, + child: widget.child, + ), + ), ), ); } @@ -201,10 +203,12 @@ class _OptimizedCardState extends State { width: widget.width, height: widget.height, child: Container( - margin: widget.margin ?? + margin: + widget.margin ?? EdgeInsets.symmetric(vertical: 6.h, horizontal: 6.w), decoration: BoxDecoration( - borderRadius: widget.shadowBorderRadius ?? + borderRadius: + widget.shadowBorderRadius ?? BorderRadius.all(Radius.circular(8.r)), boxShadow: [ BoxShadow( @@ -214,31 +218,36 @@ class _OptimizedCardState extends State { // soften the shadow offset: widget.shadowOffset, blurStyle: widget.shadowBlurStyle, - ) + ), ], ), child: InkWell( onTap: widget.onPressed, borderRadius: widget.borderRadius ?? BorderRadius.circular(8.r), child: Card( - elevation: widget.elevation, - shadowColor: widget.shadowColor ?? - (isMaterial(context) ? Colors.transparent : null), - surfaceTintColor: widget.surfaceTintColor, - borderOnForeground: widget.borderOnForeground, - shape: widget.shape ?? - RoundedRectangleBorder( - borderRadius: widget.borderRadius ?? - BorderRadius.all(Radius.circular(10.r)), - ), - color: widget.color, - margin: widget.innerCardShadowMargin ?? - EdgeInsets.symmetric(vertical: 2.h, horizontal: 2.w), - clipBehavior: Clip.hardEdge, - child: Padding( - padding: widget.padding ?? EdgeInsets.zero, - child: widget.child, - )), + elevation: widget.elevation, + shadowColor: + widget.shadowColor ?? + (isMaterial(context) ? Colors.transparent : null), + surfaceTintColor: widget.surfaceTintColor, + borderOnForeground: widget.borderOnForeground, + shape: + widget.shape ?? + RoundedRectangleBorder( + borderRadius: + widget.borderRadius ?? + BorderRadius.all(Radius.circular(10.r)), + ), + color: widget.color, + margin: + widget.innerCardShadowMargin ?? + EdgeInsets.symmetric(vertical: 2.h, horizontal: 2.w), + clipBehavior: Clip.hardEdge, + child: Padding( + padding: widget.padding ?? EdgeInsets.zero, + child: widget.child, + ), + ), ), ), ); diff --git a/lib/src/widgets/optimized_list_tile.dart b/lib/src/widgets/optimized_list_tile.dart index 43e966b..99c6218 100644 --- a/lib/src/widgets/optimized_list_tile.dart +++ b/lib/src/widgets/optimized_list_tile.dart @@ -13,17 +13,18 @@ class OptimizedListTile extends StatelessWidget { final double? horizontalSpace; final bool shouldShowCardShadow; - const OptimizedListTile( - {super.key, - required this.title, - this.subtitle, - this.leading, - this.trailing, - this.contentPadding, - this.margin, - this.padding, - this.horizontalSpace, - this.shouldShowCardShadow = true}); + const OptimizedListTile({ + super.key, + required this.title, + this.subtitle, + this.leading, + this.trailing, + this.contentPadding, + this.margin, + this.padding, + this.horizontalSpace, + this.shouldShowCardShadow = true, + }); @override Widget build(BuildContext context) { @@ -35,37 +36,21 @@ class OptimizedListTile extends StatelessWidget { child: Row( children: [ if (leading != null) - Container( - padding: contentPadding, - child: leading, - ), - SizedBox( - width: horizontalSpace ?? 6.w, - ), + Container(padding: contentPadding, child: leading), + SizedBox(width: horizontalSpace ?? 6.w), Expanded( child: Column( mainAxisSize: MainAxisSize.min, children: [ - Container( - padding: contentPadding, - child: title, - ), + Container(padding: contentPadding, child: title), if (subtitle != null) - Container( - padding: contentPadding, - child: subtitle, - ), + Container(padding: contentPadding, child: subtitle), ], ), ), - SizedBox( - width: horizontalSpace ?? 6.w, - ), + SizedBox(width: horizontalSpace ?? 6.w), if (trailing != null) - Container( - padding: contentPadding, - child: trailing, - ), + Container(padding: contentPadding, child: trailing), ], ), ); diff --git a/lib/src/widgets/optimized_scroll_view.dart b/lib/src/widgets/optimized_scroll_view.dart index 7e9fc23..b722178 100644 --- a/lib/src/widgets/optimized_scroll_view.dart +++ b/lib/src/widgets/optimized_scroll_view.dart @@ -23,7 +23,7 @@ class OptimizedScrollView extends StatelessWidget { hasScrollBody: hasScrollBody, fillOverscroll: fillOverscroll, child: child, - ) + ), ], ); } diff --git a/lib/src/widgets/optimized_text_field.dart b/lib/src/widgets/optimized_text_field.dart index c03452d..b399191 100644 --- a/lib/src/widgets/optimized_text_field.dart +++ b/lib/src/widgets/optimized_text_field.dart @@ -8,11 +8,7 @@ import 'package:flutter_screenutil/flutter_screenutil.dart'; import '../utils/common_utils.dart'; -enum TextFieldType { - material, - cupertino, - adaptive, -} +enum TextFieldType { material, cupertino, adaptive } /// A customizable and feature-rich text field with auto-validation support. /// @@ -244,8 +240,10 @@ class OptimizedTextField extends StatefulWidget { this.formKey, this.onValidationChanged, this.textInputAction = TextInputAction.done, - this.contentPadding = - const EdgeInsets.symmetric(vertical: 10.0, horizontal: 10.0), + this.contentPadding = const EdgeInsets.symmetric( + vertical: 10.0, + horizontal: 10.0, + ), this.scrollPadding, this.border, this.focusedBorder, @@ -261,8 +259,8 @@ class OptimizedTextField extends StatefulWidget { this.autoValidateMode, this.debounceDuration, this.debounceValidation = false, - }) : _textFieldType = TextFieldType.material, - boxDecoration = null; + }) : _textFieldType = TextFieldType.material, + boxDecoration = null; const OptimizedTextField.adaptive({ super.key, @@ -301,8 +299,10 @@ class OptimizedTextField extends StatefulWidget { this.formKey, this.onValidationChanged, this.textInputAction = TextInputAction.done, - this.contentPadding = - const EdgeInsets.symmetric(vertical: 10.0, horizontal: 10.0), + this.contentPadding = const EdgeInsets.symmetric( + vertical: 10.0, + horizontal: 10.0, + ), this.scrollPadding, this.border, this.focusedBorder, @@ -358,8 +358,10 @@ class OptimizedTextField extends StatefulWidget { this.formKey, this.onValidationChanged, this.textInputAction = TextInputAction.done, - this.contentPadding = - const EdgeInsets.symmetric(vertical: 10.0, horizontal: 10.0), + this.contentPadding = const EdgeInsets.symmetric( + vertical: 10.0, + horizontal: 10.0, + ), this.scrollPadding, this.border, this.focusedBorder, @@ -391,7 +393,8 @@ class _CustomFieldState extends State { @override void initState() { - formKey = widget.formKey ?? + formKey = + widget.formKey ?? (widget.shouldAutoValidate ? GlobalKey() : null); super.initState(); } @@ -494,19 +497,14 @@ class _CustomFieldState extends State { widget.nextFocus?.requestFocus(); widget.onSubmitted?.call(v); }, - style: widget.style ?? - TextStyle( - fontSize: 16, - color: widget.textColor, - ), + style: + widget.style ?? TextStyle(fontSize: 16, color: widget.textColor), decoration: InputDecoration( fillColor: widget.fillColor, filled: widget.fillColor != null, - labelStyle: widget.labelStyle ?? - TextStyle( - color: widget.labelColor, - fontSize: 14, - ), + labelStyle: + widget.labelStyle ?? + TextStyle(color: widget.labelColor, fontSize: 14), hintText: widget.hint, prefixIcon: widget.prefix, labelText: widget.label, @@ -514,43 +512,54 @@ class _CustomFieldState extends State { icon: widget.icon, suffixIcon: widget.suffix, hintStyle: widget.hintStyle ?? TextStyle(color: widget.hintColor), - enabledBorder: widget.enabledBorder ?? + enabledBorder: + widget.enabledBorder ?? OutlineInputBorder( borderRadius: BorderRadius.circular(8.r), borderSide: BorderSide( - color: widget.borderColor ?? + color: + widget.borderColor ?? Theme.of(context).colorScheme.onSurface, width: 2, ), ), - focusedBorder: widget.focusedBorder ?? + focusedBorder: + widget.focusedBorder ?? OutlineInputBorder( borderSide: BorderSide( - color: widget.focusedBorderColor ?? + color: + widget.focusedBorderColor ?? Theme.of(context).colorScheme.primary, width: 2, ), borderRadius: BorderRadius.circular(8.r), ), - errorBorder: widget.errorBorder ?? + errorBorder: + widget.errorBorder ?? OutlineInputBorder( - borderSide: - BorderSide(color: widget.errorBorderColor ?? Colors.red), + borderSide: BorderSide( + color: widget.errorBorderColor ?? Colors.red, + ), borderRadius: BorderRadius.circular(8.r), ), - focusedErrorBorder: widget.errorBorder ?? + focusedErrorBorder: + widget.errorBorder ?? OutlineInputBorder( - borderSide: - BorderSide(color: widget.errorBorderColor ?? Colors.red), + borderSide: BorderSide( + color: widget.errorBorderColor ?? Colors.red, + ), borderRadius: BorderRadius.circular(8.r), ), errorStyle: TextStyle(color: widget.errorBorderColor ?? Colors.red), errorMaxLines: widget.errorMaxLines, - border: widget.border ?? + border: + widget.border ?? OutlineInputBorder( borderSide: BorderSide( - color: widget.borderColor ?? - Theme.of(context).colorScheme.onSurface), + color: + widget.borderColor ?? + Theme.of(context).colorScheme.onSurface, + ), borderRadius: BorderRadius.circular(8.r), ), ), @@ -563,56 +572,42 @@ class _CustomFieldState extends State { return Form( key: formKey, child: CupertinoTextFormFieldRow( - enabled: widget.enabled, - onTap: widget.onTap, - validator: widget.validator, - controller: widget.controller, - focusNode: widget.focus, - readOnly: widget.read, - maxLines: widget.maxLines, - minLines: widget.minLines, - obscureText: widget.obscureText, - keyboardType: widget.type, - autofillHints: widget.autoFillHints, - obscuringCharacter: widget.obscuringCharacter, - enableSuggestions: widget.enableSuggestions, - autocorrect: widget.autocorrect, - autovalidateMode: - widget.autoValidateMode ?? AutovalidateMode.disabled, - scrollPadding: - widget.scrollPadding ?? EdgeInsets.symmetric(vertical: 20.h), - onChanged: (String input) { - // ignore: prefer_null_aware_method_calls - if (widget.debounceDuration != null) { + enabled: widget.enabled, + onTap: widget.onTap, + validator: widget.validator, + controller: widget.controller, + focusNode: widget.focus, + readOnly: widget.read, + maxLines: widget.maxLines, + minLines: widget.minLines, + obscureText: widget.obscureText, + keyboardType: widget.type, + autofillHints: widget.autoFillHints, + obscuringCharacter: widget.obscuringCharacter, + enableSuggestions: widget.enableSuggestions, + autocorrect: widget.autocorrect, + autovalidateMode: widget.autoValidateMode ?? AutovalidateMode.disabled, + scrollPadding: + widget.scrollPadding ?? EdgeInsets.symmetric(vertical: 20.h), + onChanged: (String input) { + // ignore: prefer_null_aware_method_calls + if (widget.debounceDuration != null) { + if (_debounceTimer?.isActive ?? false) { + _debounceTimer?.cancel(); + } + _debounceTimer = Timer(widget.debounceDuration!, () { + widget.onChanged?.call(input); + }); + } else { + widget.onChanged?.call(input); + } + + if (widget.shouldAutoValidate) { + if (widget.debounceValidation && widget.debounceDuration != null) { if (_debounceTimer?.isActive ?? false) { _debounceTimer?.cancel(); } _debounceTimer = Timer(widget.debounceDuration!, () { - widget.onChanged?.call(input); - }); - } else { - widget.onChanged?.call(input); - } - - if (widget.shouldAutoValidate) { - if (widget.debounceValidation && - widget.debounceDuration != null) { - if (_debounceTimer?.isActive ?? false) { - _debounceTimer?.cancel(); - } - _debounceTimer = Timer(widget.debounceDuration!, () { - if (formKey != null) { - final formState = formKey!.currentState; - final isValid = formState != null && formState.validate(); - if (widget.onValidationChanged != null) { - if (_isFieldValid != isValid) { - widget.onValidationChanged!(isValid); - _isFieldValid = isValid; - } - } - } - }); - } else { if (formKey != null) { final formState = formKey!.currentState; final isValid = formState != null && formState.validate(); @@ -623,36 +618,49 @@ class _CustomFieldState extends State { } } } + }); + } else { + if (formKey != null) { + final formState = formKey!.currentState; + final isValid = formState != null && formState.validate(); + if (widget.onValidationChanged != null) { + if (_isFieldValid != isValid) { + widget.onValidationChanged!(isValid); + _isFieldValid = isValid; + } + } } } - }, - placeholder: widget.hint, - placeholderStyle: widget.hintStyle ?? - TextStyle( - fontWeight: FontWeight.w400, - color: widget.hintColor ?? CupertinoColors.placeholderText), - prefix: widget.prefix, - autofocus: widget.autofocus, - textInputAction: widget.textInputAction, - onFieldSubmitted: (v) { - widget.nextFocus?.requestFocus(); - widget.onSubmitted?.call(v); - }, - style: widget.style ?? - TextStyle( - fontSize: 16, - color: widget.textColor, + } + }, + placeholder: widget.hint, + placeholderStyle: + widget.hintStyle ?? + TextStyle( + fontWeight: FontWeight.w400, + color: widget.hintColor ?? CupertinoColors.placeholderText, + ), + prefix: widget.prefix, + autofocus: widget.autofocus, + textInputAction: widget.textInputAction, + onFieldSubmitted: (v) { + widget.nextFocus?.requestFocus(); + widget.onSubmitted?.call(v); + }, + style: widget.style ?? TextStyle(fontSize: 16, color: widget.textColor), + padding: widget.contentPadding, + decoration: + widget.boxDecoration ?? + BoxDecoration( + borderRadius: BorderRadius.circular(8), + border: Border.all( + color: + widget.borderColor ?? + Theme.of(context).colorScheme.onSurface, + width: 2, ), - padding: widget.contentPadding, - decoration: widget.boxDecoration ?? - BoxDecoration( - borderRadius: BorderRadius.circular(8), - border: Border.all( - color: widget.borderColor ?? - Theme.of(context).colorScheme.onSurface, - width: 2, - ), - )), + ), + ), ); } } diff --git a/lib/src/widgets/orientation_widget.dart b/lib/src/widgets/orientation_widget.dart index a48b5ba..7041deb 100644 --- a/lib/src/widgets/orientation_widget.dart +++ b/lib/src/widgets/orientation_widget.dart @@ -8,9 +8,7 @@ abstract class OrientationWidget extends StatelessWidget { Widget build(BuildContext context) { return MediaQuery.of(context).orientation == Orientation.landscape ? buildLandscape(context) - : buildPortrait( - context, - ); + : buildPortrait(context); } /// Builds the widget for portrait orientation. diff --git a/lib/src/widgets/read_more_text.dart b/lib/src/widgets/read_more_text.dart index dc7ac7d..f86c3a8 100644 --- a/lib/src/widgets/read_more_text.dart +++ b/lib/src/widgets/read_more_text.dart @@ -53,10 +53,9 @@ class _ReadMoreTextState extends State { text: _showLongDescription ? widget.readMoreExpandedText : widget.readMoreCollapsedText, - style: widget.readMoreTextStyle ?? - TextStyle( - color: Theme.of(context).primaryColor, - ), + style: + widget.readMoreTextStyle ?? + TextStyle(color: Theme.of(context).primaryColor), ), ], ), diff --git a/lib/src/widgets/timer_refresh_widget.dart b/lib/src/widgets/timer_refresh_widget.dart index be8ae0b..c665780 100644 --- a/lib/src/widgets/timer_refresh_widget.dart +++ b/lib/src/widgets/timer_refresh_widget.dart @@ -7,10 +7,11 @@ class TimerRefreshWidget extends StatefulWidget { final Widget Function(int time) builder; final Duration duration; - const TimerRefreshWidget( - {super.key, - required this.builder, - this.duration = const Duration(minutes: 1)}); + const TimerRefreshWidget({ + super.key, + required this.builder, + this.duration = const Duration(minutes: 1), + }); @override State createState() => _TimerRefreshWidgetState(); diff --git a/lib/src/widgets/vertical_dashed_line.dart b/lib/src/widgets/vertical_dashed_line.dart index f78a445..e4186fd 100644 --- a/lib/src/widgets/vertical_dashed_line.dart +++ b/lib/src/widgets/vertical_dashed_line.dart @@ -42,10 +42,7 @@ class _VerticalDashedLineState extends State { height: widget.height, child: RepaintBoundary( child: CustomPaint( - size: Size( - widget.width ?? 2, - widget.height ?? double.infinity, - ), + size: Size(widget.width ?? 2, widget.height ?? double.infinity), painter: DashedVerticalLinePainter( dashHeight: widget.dashHeight, dashSpace: widget.dashSpace, @@ -72,8 +69,8 @@ class DashedVerticalLinePainter extends CustomPainter { this.strokeWidth = 1, this.color = Colors.grey, }) : painter = Paint() - ..color = color - ..strokeWidth = strokeWidth; + ..color = color + ..strokeWidth = strokeWidth; @override void paint(Canvas canvas, Size size) { @@ -81,15 +78,19 @@ class DashedVerticalLinePainter extends CustomPainter { ..color = color ..strokeWidth = strokeWidth; while (startY < size.height) { - canvas.drawLine(Offset(size.width / 2, startY), - Offset(size.width / 2, startY + dashHeight), paint); + canvas.drawLine( + Offset(size.width / 2, startY), + Offset(size.width / 2, startY + dashHeight), + paint, + ); startY += dashHeight + dashSpace; } } @override bool shouldRepaint(DashedVerticalLinePainter oldDelegate) { - final bool shouldRepaint = oldDelegate.color != color || + final bool shouldRepaint = + oldDelegate.color != color || oldDelegate.strokeWidth != strokeWidth || oldDelegate.dashHeight != dashHeight || oldDelegate.dashSpace != dashSpace; diff --git a/pubspec.yaml b/pubspec.yaml index a7dc517..1646c86 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -12,7 +12,7 @@ topics: - material environment: - sdk: ">=3.8.0-0 <4.0.0" + sdk: ">=3.8.0 <4.0.0" flutter: ">=3.32.0"