Skip to content

Commit 4384b5f

Browse files
committed
fix: replace deprecated withOpacity with withValues
1 parent 1502b56 commit 4384b5f

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

example/lib/features/listview/listview_dynamic_offset/listview_dynamic_offset_page.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ class _ListViewDynamicOffsetPageState extends State<ListViewDynamicOffsetPage> {
8181
},
8282
),
8383
Container(
84-
color: Colors.grey.withOpacity(_navBgAlpha),
84+
color: Colors.grey.withValues(alpha: _navBgAlpha),
8585
child: Column(
8686
mainAxisSize: MainAxisSize.min,
8787
children: [
@@ -158,8 +158,8 @@ class _ListViewDynamicOffsetPageState extends State<ListViewDynamicOffsetPage> {
158158
style: TextStyle(
159159
fontSize: 17,
160160
fontWeight: FontWeight.bold,
161-
color: Colors.black54.withOpacity(
162-
_isShowNavTitle ? 1 : 0,
161+
color: Colors.black54.withValues(
162+
alpha: _isShowNavTitle ? 1 : 0,
163163
),
164164
),
165165
),

example/lib/features/pageview/pageview_demo/pageview_parallax_item_listener_page.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ class _ParallaxItemViewState extends State<ParallaxItemView> {
231231
width: 80,
232232
height: 80,
233233
decoration: BoxDecoration(
234-
color: Colors.white.withOpacity(0.8),
234+
color: Colors.white.withValues(alpha: 0.8),
235235
borderRadius: BorderRadius.circular(10),
236236
),
237237
child: Text("Page $index"),

example/lib/features/pageview/pageview_demo/pageview_parallax_page.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ class _PageViewParallaxPageState extends State<PageViewParallaxPage> {
175175
width: 80,
176176
height: 80,
177177
decoration: BoxDecoration(
178-
color: Colors.white.withOpacity(0.8),
178+
color: Colors.white.withValues(alpha: 0.8),
179179
borderRadius: BorderRadius.circular(10),
180180
),
181181
child: Text("Page $index"),

0 commit comments

Comments
 (0)