Skip to content

Commit 8f62edc

Browse files
chrisbobbegnprice
authored andcommitted
deps: Upgrade Flutter to 3.25.0-1.0.pre.296
And update Flutter's supporting libraries to match. Also, as anticipated in zulip#920 (see PR description), handle some deprecations in the Color API from flutter/engine@eff1b76cf (rolled in flutter/flutter@8c1a93508). Deprecation warnings are "info"-level in analyzer output, and CI treats that as fatal, because we don't want to let those hang around. In particular, `withOpacity` is replaced with the new `withValues`. Also, `value` is newly deprecated, but we migrated off that in the previous commit.
1 parent 3041beb commit 8f62edc

11 files changed

+45
-45
lines changed

lib/widgets/channel_colors.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ class ChannelColorSwatch extends ColorSwatch<ChannelColorVariant> {
123123
// TODO fix bug where our results differ from the replit's (see unit tests)
124124
ChannelColorVariant.unreadCountBadgeBackground:
125125
clampLchLightness(baseAsColor, 30, 70)
126-
.withOpacity(0.3),
126+
.withValues(alpha: 0.3),
127127

128128
// Follows `.sidebar-row__icon` in Vlad's replit:
129129
// <https://replit.com/@VladKorobov/zulip-sidebar#script.js>
@@ -169,7 +169,7 @@ class ChannelColorSwatch extends ColorSwatch<ChannelColorVariant> {
169169
ChannelColorVariant.base: baseAsColor,
170170
ChannelColorVariant.unreadCountBadgeBackground:
171171
clampLchLightness(baseAsColor, 30, 70)
172-
.withOpacity(0.3),
172+
.withValues(alpha: 0.3),
173173
ChannelColorVariant.iconOnPlainBackground: clamped20to75,
174174

175175
// Follows the web app (as of zulip/zulip@db03369ac); see

lib/widgets/compose_box.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -846,12 +846,12 @@ class _SendButtonState extends State<_SendButton> {
846846

847847
// Copy FilledButton defaults (_FilledButtonDefaultsM3.backgroundColor)
848848
final backgroundColor = disabled
849-
? colorScheme.onSurface.withOpacity(0.12)
849+
? colorScheme.onSurface.withValues(alpha: 0.12)
850850
: colorScheme.primary;
851851

852852
// Copy FilledButton defaults (_FilledButtonDefaultsM3.foregroundColor)
853853
final foregroundColor = disabled
854-
? colorScheme.onSurface.withOpacity(0.38)
854+
? colorScheme.onSurface.withValues(alpha: 0.38)
855855
: colorScheme.onPrimary;
856856

857857
return Ink(

lib/widgets/content.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ class ContentTheme extends ThemeExtension<ContentTheme> {
6666
colorGlobalTimeBorder: const HSLColor.fromAHSL(0.4, 0, 0, 0).toColor(),
6767
colorMathBlockBorder: const HSLColor.fromAHSL(1, 240, 0.4, 0.4).toColor(),
6868
colorMessageMediaContainerBackground: const HSLColor.fromAHSL(0.03, 0, 0, 1).toColor(),
69-
colorThematicBreak: const HSLColor.fromAHSL(1, 0, 0, .87).toColor().withOpacity(0.2),
69+
colorThematicBreak: const HSLColor.fromAHSL(1, 0, 0, .87).toColor().withValues(alpha: 0.2),
7070
textStylePlainParagraph: _plainParagraphCommon(context).copyWith(
7171
color: const HSLColor.fromAHSL(0.75, 0, 0, 1).toColor(),
7272
debugLabel: 'ContentTheme.textStylePlainParagraph'),

lib/widgets/draggable_scrollable_modal_bottom_sheet.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ class _DragHandleLayer extends StatelessWidget {
7373
// https://m3.material.io/components/bottom-sheets/specs#7c093473-d9e1-48f3-9659-b75519c2a29d
7474
height: 4,
7575
width: 32,
76-
child: ColoredBox(color: colorScheme.onSurfaceVariant.withOpacity(0.40))))));
76+
child: ColoredBox(color: colorScheme.onSurfaceVariant.withValues(alpha: 0.40))))));
7777
}
7878
}
7979

lib/widgets/emoji_reaction.dart

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,23 +24,23 @@ class EmojiReactionTheme extends ThemeExtension<EmojiReactionTheme> {
2424
// want to check that against web when implementing the shadow.
2525
bgUnselected: const HSLColor.fromAHSL(0.08, 210, 0.50, 0.875).toColor(),
2626

27-
borderSelected: Colors.black.withOpacity(0.45),
27+
borderSelected: Colors.black.withValues(alpha: 0.45),
2828

2929
// TODO see TODO on [bgUnselected] about shadow effect
30-
borderUnselected: Colors.black.withOpacity(0.05),
30+
borderUnselected: Colors.black.withValues(alpha: 0.05),
3131

3232
textSelected: const HSLColor.fromAHSL(1, 210, 0.20, 0.20).toColor(),
3333
textUnselected: const HSLColor.fromAHSL(1, 210, 0.20, 0.25).toColor(),
3434
);
3535

3636
EmojiReactionTheme.dark() :
3737
this._(
38-
bgSelected: Colors.black.withOpacity(0.8),
39-
bgUnselected: Colors.black.withOpacity(0.3),
40-
borderSelected: Colors.white.withOpacity(0.75),
41-
borderUnselected: Colors.white.withOpacity(0.15),
42-
textSelected: Colors.white.withOpacity(0.85),
43-
textUnselected: Colors.white.withOpacity(0.75),
38+
bgSelected: Colors.black.withValues(alpha: 0.8),
39+
bgUnselected: Colors.black.withValues(alpha: 0.3),
40+
borderSelected: Colors.white.withValues(alpha: 0.75),
41+
borderUnselected: Colors.white.withValues(alpha: 0.15),
42+
textSelected: Colors.white.withValues(alpha: 0.85),
43+
textUnselected: Colors.white.withValues(alpha: 0.75),
4444
);
4545

4646
EmojiReactionTheme._({
@@ -168,7 +168,7 @@ class ReactionChip extends StatelessWidget {
168168
final labelColor = selfVoted ? reactionTheme.textSelected : reactionTheme.textUnselected;
169169
final backgroundColor = selfVoted ? reactionTheme.bgSelected : reactionTheme.bgUnselected;
170170
final splashColor = selfVoted ? reactionTheme.bgUnselected : reactionTheme.bgSelected;
171-
final highlightColor = splashColor.withOpacity(0.5);
171+
final highlightColor = splashColor.withValues(alpha: 0.5);
172172

173173
final borderSide = BorderSide(
174174
color: borderColor,

lib/widgets/lightbox.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ class _LightboxPageLayoutState extends State<_LightboxPageLayout> {
145145
Widget build(BuildContext context) {
146146
final themeData = Theme.of(context);
147147

148-
final appBarBackgroundColor = Colors.grey.shade900.withOpacity(0.87);
148+
final appBarBackgroundColor = Colors.grey.shade900.withValues(alpha: 0.87);
149149
const appBarForegroundColor = Colors.white;
150150
const appBarElevation = 0.0;
151151

lib/widgets/message_list.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class MessageListTheme extends ThemeExtension<MessageListTheme> {
3939
senderBotIcon: const HSLColor.fromAHSL(1, 180, 0.08, 0.65).toColor(),
4040
senderName: const HSLColor.fromAHSL(1, 0, 0, 0.2).toColor(),
4141
streamMessageBgDefault: Colors.white,
42-
streamRecipientHeaderChevronRight: Colors.black.withOpacity(0.3),
42+
streamRecipientHeaderChevronRight: Colors.black.withValues(alpha: 0.3),
4343

4444
// From the Figma mockup at:
4545
// https://www.figma.com/file/1JTNtYo9memgW7vV6d0ygq/Zulip-Mobile?node-id=132-9684
@@ -49,7 +49,7 @@ class MessageListTheme extends ThemeExtension<MessageListTheme> {
4949
// in both light and dark theme.)
5050
unreadMarker: const HSLColor.fromAHSL(1, 227, 0.78, 0.59).toColor(),
5151

52-
unreadMarkerGap: Colors.white.withOpacity(0.6),
52+
unreadMarkerGap: Colors.white.withValues(alpha: 0.6),
5353

5454
// TODO(design) this seems ad-hoc; is there a better color?
5555
unsubscribedStreamRecipientHeaderBg: const Color(0xfff5f5f5),
@@ -67,7 +67,7 @@ class MessageListTheme extends ThemeExtension<MessageListTheme> {
6767
senderBotIcon: const HSLColor.fromAHSL(1, 180, 0.05, 0.5).toColor(),
6868
senderName: const HSLColor.fromAHSL(0.85, 0, 0, 1).toColor(),
6969
streamMessageBgDefault: const HSLColor.fromAHSL(1, 0, 0, 0.15).toColor(),
70-
streamRecipientHeaderChevronRight: Colors.white.withOpacity(0.3),
70+
streamRecipientHeaderChevronRight: Colors.white.withValues(alpha: 0.3),
7171

7272
// 0.75 opacity from here:
7373
// https://www.figma.com/design/1JTNtYo9memgW7vV6d0ygq/Zulip-Mobile?node-id=807-33998&m=dev

lib/widgets/theme.dart

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ class DesignVariables extends ThemeExtension<DesignVariables> {
107107
DesignVariables.light() :
108108
this._(
109109
background: const Color(0xffffffff),
110-
bgCounterUnread: const Color(0xff666699).withOpacity(0.15),
110+
bgCounterUnread: const Color(0xff666699).withValues(alpha: 0.15),
111111
bgTopBar: const Color(0xfff5f5f5),
112112
borderBar: const Color(0x33000000),
113113
icon: const Color(0xff666699),
@@ -121,26 +121,26 @@ class DesignVariables extends ThemeExtension<DesignVariables> {
121121
errorBannerBackground: const HSLColor.fromAHSL(1, 4, 0.33, 0.90).toColor(),
122122
errorBannerBorder: const HSLColor.fromAHSL(0.4, 3, 0.57, 0.33).toColor(),
123123
errorBannerLabel: const HSLColor.fromAHSL(1, 4, 0.58, 0.33).toColor(),
124-
groupDmConversationIcon: Colors.black.withOpacity(0.5),
124+
groupDmConversationIcon: Colors.black.withValues(alpha: 0.5),
125125
groupDmConversationIconBg: const Color(0x33808080),
126126
loginOrDivider: const Color(0xffdedede),
127127
loginOrDividerText: const Color(0xff575757),
128128
sectionCollapseIcon: const Color(0x7f1e2e48),
129129
star: const HSLColor.fromAHSL(0.5, 47, 1, 0.41).toColor(),
130130
subscriptionListHeaderLine: const HSLColor.fromAHSL(0.2, 240, 0.1, 0.5).toColor(),
131131
subscriptionListHeaderText: const HSLColor.fromAHSL(1.0, 240, 0.1, 0.5).toColor(),
132-
unreadCountBadgeTextForChannel: Colors.black.withOpacity(0.9),
132+
unreadCountBadgeTextForChannel: Colors.black.withValues(alpha: 0.9),
133133
);
134134

135135
DesignVariables.dark() :
136136
this._(
137137
background: const Color(0xff000000),
138-
bgCounterUnread: const Color(0xff666699).withOpacity(0.37),
138+
bgCounterUnread: const Color(0xff666699).withValues(alpha: 0.37),
139139
bgTopBar: const Color(0xff242424),
140-
borderBar: Colors.black.withOpacity(0.41),
140+
borderBar: Colors.black.withValues(alpha: 0.41),
141141
icon: const Color(0xff7070c2),
142-
labelCounterUnread: const Color(0xffffffff).withOpacity(0.7),
143-
labelMenuButton: const Color(0xffffffff).withOpacity(0.85),
142+
labelCounterUnread: const Color(0xffffffff).withValues(alpha: 0.7),
143+
labelMenuButton: const Color(0xffffffff).withValues(alpha: 0.85),
144144
mainBackground: const Color(0xff1d1d1d),
145145
title: const Color(0xffffffff),
146146
channelColorSwatches: ChannelColorSwatches.dark,
@@ -151,7 +151,7 @@ class DesignVariables extends ThemeExtension<DesignVariables> {
151151
errorBannerBorder: const HSLColor.fromAHSL(0.4, 3, 0.73, 0.74).toColor(),
152152
errorBannerLabel: const HSLColor.fromAHSL(1, 2, 0.73, 0.80).toColor(),
153153
// TODO(design-dark) need proper dark-theme color (this is ad hoc)
154-
groupDmConversationIcon: Colors.white.withOpacity(0.5),
154+
groupDmConversationIcon: Colors.white.withValues(alpha: 0.5),
155155
// TODO(design-dark) need proper dark-theme color (this is ad hoc)
156156
groupDmConversationIconBg: const Color(0x33cccccc),
157157
loginOrDivider: const Color(0xff424242),
@@ -164,7 +164,7 @@ class DesignVariables extends ThemeExtension<DesignVariables> {
164164
subscriptionListHeaderLine: const HSLColor.fromAHSL(0.4, 240, 0.1, 0.75).toColor(),
165165
// TODO(design-dark) need proper dark-theme color (this is ad hoc)
166166
subscriptionListHeaderText: const HSLColor.fromAHSL(1.0, 240, 0.1, 0.75).toColor(),
167-
unreadCountBadgeTextForChannel: Colors.white.withOpacity(0.9),
167+
unreadCountBadgeTextForChannel: Colors.white.withValues(alpha: 0.9),
168168
);
169169

170170
DesignVariables._({

pubspec.lock

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ packages:
55
dependency: transitive
66
description:
77
name: _fe_analyzer_shared
8-
sha256: "45cfa8471b89fb6643fe9bf51bd7931a76b8f5ec2d65de4fb176dba8d4f22c77"
8+
sha256: f6dbf021f4b214d85c79822912c5fcd142a2c4869f01222ad371bc51f9f1c356
99
url: "https://pub.dev"
1010
source: hosted
11-
version: "73.0.0"
11+
version: "74.0.0"
1212
_flutterfire_internals:
1313
dependency: transitive
1414
description:
@@ -21,15 +21,15 @@ packages:
2121
dependency: transitive
2222
description: dart
2323
source: sdk
24-
version: "0.3.2"
24+
version: "0.3.3"
2525
analyzer:
2626
dependency: transitive
2727
description:
2828
name: analyzer
29-
sha256: "4959fec185fe70cce007c57e9ab6983101dbe593d2bf8bbfb4453aaec0cf470a"
29+
sha256: f7e8caf82f2d3190881d81012606effdf8a38e6c1ab9e30947149733065f817c
3030
url: "https://pub.dev"
3131
source: hosted
32-
version: "6.8.0"
32+
version: "6.9.0"
3333
analyzer_plugin:
3434
dependency: transitive
3535
description:
@@ -663,18 +663,18 @@ packages:
663663
dependency: transitive
664664
description:
665665
name: leak_tracker
666-
sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05"
666+
sha256: "7bb2830ebd849694d1ec25bf1f44582d6ac531a57a365a803a6034ff751d2d06"
667667
url: "https://pub.dev"
668668
source: hosted
669-
version: "10.0.5"
669+
version: "10.0.7"
670670
leak_tracker_flutter_testing:
671671
dependency: transitive
672672
description:
673673
name: leak_tracker_flutter_testing
674-
sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806"
674+
sha256: "9491a714cca3667b60b5c420da8217e6de0d1ba7a5ec322fab01758f6998f379"
675675
url: "https://pub.dev"
676676
source: hosted
677-
version: "3.0.5"
677+
version: "3.0.8"
678678
leak_tracker_testing:
679679
dependency: transitive
680680
description:
@@ -703,10 +703,10 @@ packages:
703703
dependency: transitive
704704
description:
705705
name: macros
706-
sha256: "0acaed5d6b7eab89f63350bccd82119e6c602df0f391260d0e32b5e23db79536"
706+
sha256: "1d9e801cd66f7ea3663c45fc708450db1fa57f988142c64289142c9b7ee80656"
707707
url: "https://pub.dev"
708708
source: hosted
709-
version: "0.1.2-main.4"
709+
version: "0.1.3-main.0"
710710
matcher:
711711
dependency: transitive
712712
description:
@@ -967,7 +967,7 @@ packages:
967967
dependency: transitive
968968
description: flutter
969969
source: sdk
970-
version: "0.0.99"
970+
version: "0.0.0"
971971
source_gen:
972972
dependency: transitive
973973
description:
@@ -1360,5 +1360,5 @@ packages:
13601360
source: path
13611361
version: "0.0.1"
13621362
sdks:
1363-
dart: ">=3.6.0-149.3.beta <4.0.0"
1364-
flutter: ">=3.25.0-1.0.pre.41"
1363+
dart: ">=3.6.0-217.0.dev <4.0.0"
1364+
flutter: ">=3.25.0-1.0.pre.296"

pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ environment:
1414
# We use a recent version of Flutter from its main channel, and
1515
# the corresponding recent version of the Dart SDK.
1616
# Feel free to update these regularly; see README.md for instructions.
17-
sdk: '>=3.6.0-149.3.beta <4.0.0'
18-
flutter: '>=3.25.0-1.0.pre.41'
17+
sdk: '>=3.6.0-217.0.dev <4.0.0'
18+
flutter: '>=3.25.0-1.0.pre.296'
1919

2020
# To update dependencies, see instructions in README.md.
2121
dependencies:

test/widgets/compose_box_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ void main() {
256256
final sendButtonWidget = sendButtonElement.widget as IconButton;
257257
final colorScheme = Theme.of(sendButtonElement).colorScheme;
258258
final expectedForegroundColor = expected
259-
? colorScheme.onSurface.withOpacity(0.38)
259+
? colorScheme.onSurface.withValues(alpha: 0.38)
260260
: colorScheme.onPrimary;
261261
check(sendButtonWidget.color).equals(expectedForegroundColor);
262262
}

0 commit comments

Comments
 (0)