@@ -645,7 +645,7 @@ class SfCalendar extends StatefulWidget {
645645 /// startTime: date,
646646 /// endTime: date.add(Duration(hours: 2)),
647647 /// enablePointerInteraction: false,
648- /// color: Colors.grey.withOpacity( 0.2),
648+ /// color: Colors.grey.withValues(alpha: 0.2),
649649 /// text: 'Break'));
650650 ///
651651 /// return regions;
@@ -1922,7 +1922,7 @@ class SfCalendar extends StatefulWidget {
19221922 /// startTime: DateTime.now(),
19231923 /// endTime: DateTime.now().add(Duration(hours: 1)),
19241924 /// enablePointerInteraction: false,
1925- /// color: Colors.grey.withOpacity( 0.2),
1925+ /// color: Colors.grey.withValues(alpha: 0.2),
19261926 /// text: 'Break'));
19271927 ///
19281928 /// return regions;
@@ -3879,15 +3879,15 @@ class _SfCalendarState extends State<SfCalendar>
38793879 ? .merge (widget.blackoutDatesTextStyle),
38803880 trailingDatesTextStyle: themeData.textTheme.bodyMedium!
38813881 .copyWith (
3882- color: colorScheme.onSurface.withOpacity ( 0.54 ),
3882+ color: colorScheme.onSurface.withValues (alpha : 0.54 ),
38833883 fontSize: isMaterial3 ? 14 : 13 ,
38843884 )
38853885 .merge (calendarThemeData.trailingDatesTextStyle)
38863886 .merge (
38873887 widget.monthViewSettings.monthCellStyle.trailingDatesTextStyle),
38883888 leadingDatesTextStyle: themeData.textTheme.bodyMedium!
38893889 .copyWith (
3890- color: colorScheme.onSurface.withOpacity ( 0.54 ),
3890+ color: colorScheme.onSurface.withValues (alpha : 0.54 ),
38913891 fontSize: isMaterial3 ? 14 : 13 ,
38923892 )
38933893 .merge (calendarThemeData.leadingDatesTextStyle)
@@ -3902,37 +3902,37 @@ class _SfCalendarState extends State<SfCalendar>
39023902 .merge (widget.todayTextStyle),
39033903 headerTextStyle: themeData.textTheme.bodyLarge!
39043904 .copyWith (
3905- color: colorScheme.onSurface.withOpacity ( 0.87 ),
3905+ color: colorScheme.onSurface.withValues (alpha : 0.87 ),
39063906 fontSize: isMaterial3 ? 16 : 18 ,
39073907 fontWeight: FontWeight .w400,
39083908 )
39093909 .merge (calendarThemeData.headerTextStyle)
39103910 .merge (widget.headerStyle.textStyle),
39113911 activeDatesTextStyle: themeData.textTheme.bodyMedium!
39123912 .copyWith (
3913- color: colorScheme.onSurface.withOpacity ( 0.87 ),
3913+ color: colorScheme.onSurface.withValues (alpha : 0.87 ),
39143914 fontSize: 13 ,
39153915 )
39163916 .merge (calendarThemeData.activeDatesTextStyle)
39173917 .merge (widget.monthViewSettings.monthCellStyle.textStyle),
39183918 timeTextStyle: themeData.textTheme.bodySmall!
39193919 .copyWith (
3920- color: colorScheme.onSurface.withOpacity ( 0.54 ),
3920+ color: colorScheme.onSurface.withValues (alpha : 0.54 ),
39213921 fontSize: isMaterial3 ? 12 : 10 ,
39223922 fontWeight: FontWeight .w500,
39233923 )
39243924 .merge (calendarThemeData.timeTextStyle)
39253925 .merge (widget.timeSlotViewSettings.timeTextStyle),
39263926 viewHeaderDateTextStyle: themeData.textTheme.bodyMedium!
39273927 .copyWith (
3928- color: colorScheme.onSurface.withOpacity ( 0.87 ),
3928+ color: colorScheme.onSurface.withValues (alpha : 0.87 ),
39293929 fontSize: isMaterial3 ? 14 : 15 ,
39303930 )
39313931 .merge (calendarThemeData.viewHeaderDateTextStyle)
39323932 .merge (widget.viewHeaderStyle.dateTextStyle),
39333933 viewHeaderDayTextStyle: themeData.textTheme.bodySmall!
39343934 .copyWith (
3935- color: colorScheme.onSurface.withOpacity ( 0.87 ),
3935+ color: colorScheme.onSurface.withValues (alpha : 0.87 ),
39363936 fontSize: isMaterial3 ? 12 : 11 ,
39373937 )
39383938 .merge (calendarThemeData.viewHeaderDayTextStyle)
@@ -3947,7 +3947,7 @@ class _SfCalendarState extends State<SfCalendar>
39473947 .merge (widget.resourceViewSettings.displayNameTextStyle),
39483948 weekNumberTextStyle: themeData.textTheme.bodyMedium!
39493949 .copyWith (
3950- color: colorScheme.onSurface.withOpacity ( 0.87 ),
3950+ color: colorScheme.onSurface.withValues (alpha : 0.87 ),
39513951 fontSize: isMaterial3 ? 14 : 13 ,
39523952 )
39533953 .merge (calendarThemeData.weekNumberTextStyle)
@@ -5803,7 +5803,7 @@ class _SfCalendarState extends State<SfCalendar>
58035803 final double dividerHeight = _useMobilePlatformUI ? 0 : 1 ;
58045804 Color dividerColor =
58055805 widget.cellBorderColor ?? _calendarTheme.cellBorderColor! ;
5806- dividerColor = dividerColor.withOpacity ( dividerColor.opacity * 0.5 );
5806+ dividerColor = dividerColor.withValues (alpha : dividerColor.a * 0.5 );
58075807 int numberOfEvents = 0 ;
58085808
58095809 double appointmentHeight = 0 ;
@@ -9523,7 +9523,7 @@ class _CalendarHeaderViewState extends State<_CalendarHeaderView> {
95239523 final Color headerBackgroundColor = widget.headerStyle.backgroundColor ??
95249524 widget.calendarTheme.headerBackgroundColor! ;
95259525 final Color arrowColor =
9526- headerTextColor.withOpacity ( headerTextColor.opacity * 0.6 );
9526+ headerTextColor.withValues (alpha : headerTextColor.a * 0.6 );
95279527 Color prevArrowColor = arrowColor;
95289528 Color nextArrowColor = arrowColor;
95299529 final TextStyle style = TextStyle (color: arrowColor);
@@ -9761,7 +9761,7 @@ class _CalendarHeaderViewState extends State<_CalendarHeaderView> {
97619761 widget.maxDate,
97629762 dates,
97639763 widget.nonWorkingDays)) {
9764- nextArrowColor = nextArrowColor.withOpacity ( nextArrowColor.opacity * 0.5 );
9764+ nextArrowColor = nextArrowColor.withValues (alpha : nextArrowColor.a * 0.5 );
97659765 }
97669766
97679767 if (! DateTimeHelper .canMoveToPreviousView (
@@ -9771,7 +9771,7 @@ class _CalendarHeaderViewState extends State<_CalendarHeaderView> {
97719771 widget.maxDate,
97729772 dates,
97739773 widget.nonWorkingDays)) {
9774- prevArrowColor = prevArrowColor.withOpacity ( prevArrowColor.opacity * 0.5 );
9774+ prevArrowColor = prevArrowColor.withValues (alpha : prevArrowColor.a * 0.5 );
97759775 }
97769776
97779777 MainAxisAlignment getAlignmentFromTextAlign () {
@@ -9923,7 +9923,7 @@ class _CalendarHeaderViewState extends State<_CalendarHeaderView> {
99239923 decoration: BoxDecoration (
99249924 color:
99259925 widget.showDatePickerButton && widget.isPickerShown
9926- ? Colors .grey.withOpacity ( 0.3 )
9926+ ? Colors .grey.withValues (alpha : 0.3 )
99279927 : headerBackgroundColor,
99289928 ),
99299929
@@ -10330,7 +10330,7 @@ class _CalendarHeaderViewState extends State<_CalendarHeaderView> {
1033010330 padding: EdgeInsets .all (useMobilePlatformUI ? 2 : 4 ),
1033110331 child: Material (
1033210332 color: isHighlighted && (isNeedIcon || useMobilePlatformUI)
10333- ? Colors .grey.withOpacity ( 0.3 )
10333+ ? Colors .grey.withValues (alpha : 0.3 )
1033410334 : headerBackgroundColor,
1033510335 child: InkWell (
1033610336 splashColor: calendarViewSplashColor,
@@ -10642,7 +10642,7 @@ class _ScheduleLabelPainter extends CustomPainter {
1064210642 final Rect rect = Rect .fromLTWH (
1064310643 0 , padding, size.width - 2 , size.height - (2 * padding));
1064410644 _backgroundPainter.color =
10645- calendarTheme.selectionBorderColor! .withOpacity ( 0.4 );
10645+ calendarTheme.selectionBorderColor! .withValues (alpha : 0.4 );
1064610646 _backgroundPainter.style = PaintingStyle .stroke;
1064710647 _backgroundPainter.strokeWidth = 2 ;
1064810648 canvas.drawRect (rect, _backgroundPainter);
@@ -10654,7 +10654,7 @@ class _ScheduleLabelPainter extends CustomPainter {
1065410654 padding + viewPadding,
1065510655 size.width - (isRTL ? viewPadding : padding),
1065610656 size.height - (2 * (viewPadding + padding)));
10657- _backgroundPainter.color = Colors .grey.withOpacity ( 0.1 );
10657+ _backgroundPainter.color = Colors .grey.withValues (alpha : 0.1 );
1065810658 canvas.drawRRect (
1065910659 RRect .fromRectAndRadius (rect, const Radius .circular (4 )),
1066010660 _backgroundPainter);
@@ -11090,7 +11090,7 @@ class _CustomSplash extends InteractiveInkFeature {
1109011090 ..addListener (controller.markNeedsPaint)
1109111091 ..addStatusListener (_handleAlphaStatusChanged);
1109211092 _alpha = _alphaController! .drive (IntTween (
11093- begin: color.alpha ,
11093+ begin: ( color.a * 255 ). toInt () ,
1109411094 end: 0 ,
1109511095 ));
1109611096
@@ -11260,7 +11260,7 @@ class _AgendaDateTimePainter extends CustomPainter {
1126011260 /// Holds the default agenda day text style from framework text theme.
1126111261 final TextStyle agendaDayThemeTextStyle =
1126211262 themeData.textTheme.bodySmall! .copyWith (
11263- color: themeData.colorScheme.onSurface.withOpacity ( 0.54 ),
11263+ color: themeData.colorScheme.onSurface.withValues (alpha : 0.54 ),
1126411264 fontSize: 10 ,
1126511265 fontWeight: FontWeight .w500,
1126611266 );
@@ -11394,11 +11394,11 @@ class _AgendaDateTimePainter extends CustomPainter {
1139411394 yPosition + _textPainter.height >
1139511395 agendaDateNotifier.value! .hoveringOffset.dy) {
1139611396 _linePainter.color = isToday
11397- ? Colors .black.withOpacity ( 0.1 )
11397+ ? Colors .black.withValues (alpha : 0.1 )
1139811398 : (themeData.brightness == Brightness .dark
1139911399 ? Colors .white
1140011400 : Colors .black87)
11401- .withOpacity ( 0.04 );
11401+ .withValues (alpha : 0.04 );
1140211402 _drawTodayCircle (canvas, xPosition, yPosition, padding);
1140311403 }
1140411404 }
@@ -11460,11 +11460,11 @@ class _AgendaDateTimePainter extends CustomPainter {
1146011460 (yPosition + _textPainter.height) >
1146111461 agendaDateNotifier.value! .hoveringOffset.dy) {
1146211462 _linePainter.color = isToday
11463- ? Colors .black.withOpacity ( 0.1 )
11463+ ? Colors .black.withValues (alpha : 0.1 )
1146411464 : (themeData.brightness == Brightness .dark
1146511465 ? Colors .white
1146611466 : Colors .black87)
11467- .withOpacity ( 0.04 );
11467+ .withValues (alpha : 0.04 );
1146811468 _drawTodayCircle (canvas, dateTextStartPosition, yPosition, padding);
1146911469 }
1147011470 }
0 commit comments