提交 a8ca8362 authored 作者: 王鹏飞's avatar 王鹏飞

fix: withOpacity → withValues(alpha:),消除 Flutter 3.x 废弃 API 警告

color.withOpacity(X) → color.withValues(alpha: X) color.opacity → color.a 分析器警告从 195 降至 73
上级 7b85d3a7
...@@ -49,7 +49,7 @@ class MyApp extends StatelessWidget { ...@@ -49,7 +49,7 @@ class MyApp extends StatelessWidget {
behavior: _NoShadowScrollBehavior(), behavior: _NoShadowScrollBehavior(),
child: OKToast( child: OKToast(
radius: 8.0, radius: 8.0,
backgroundColor: const Color(0xFF000000).withOpacity(0.2), backgroundColor: const Color(0xFF000000).withValues(alpha: 0.2),
textPadding: const EdgeInsets.symmetric( textPadding: const EdgeInsets.symmetric(
horizontal: 16.0, vertical: 10.0), horizontal: 16.0, vertical: 10.0),
position: ToastPosition.bottom, position: ToastPosition.bottom,
......
...@@ -39,7 +39,7 @@ class _AdPageState extends State<AdPage> { ...@@ -39,7 +39,7 @@ class _AdPageState extends State<AdPage> {
child: Container( child: Container(
padding: EdgeInsets.symmetric(horizontal: 12.0.w, vertical: 8.0.w), padding: EdgeInsets.symmetric(horizontal: 12.0.w, vertical: 8.0.w),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.black.withOpacity(0.6), color: Colors.black.withValues(alpha: 0.6),
borderRadius: BorderRadius.circular(8.0.w), borderRadius: BorderRadius.circular(8.0.w),
), ),
child: Text( child: Text(
......
...@@ -22,7 +22,7 @@ class _BookDetailPageState extends State<BookDetailPage> with SingleTickerProvid ...@@ -22,7 +22,7 @@ class _BookDetailPageState extends State<BookDetailPage> with SingleTickerProvid
init:BookDetailController(widget.bookId), init:BookDetailController(widget.bookId),
builder: (controller)=> Scaffold( builder: (controller)=> Scaffold(
appBar: CustomAppBar( appBar: CustomAppBar(
backgroundColor: const Color(0xFFAB1941).withOpacity(0.02), backgroundColor: const Color(0xFFAB1941).withValues(alpha: 0.02),
title: const Text('详情',style: TextStyle(fontSize: 17),), title: const Text('详情',style: TextStyle(fontSize: 17),),
actions: [ actions: [
CustomButton.icon( CustomButton.icon(
...@@ -191,7 +191,7 @@ class _BookDetailPageState extends State<BookDetailPage> with SingleTickerProvid ...@@ -191,7 +191,7 @@ class _BookDetailPageState extends State<BookDetailPage> with SingleTickerProvid
width: 0.5, width: 0.5,
color: Colours.c9 color: Colours.c9
), ),
// color: Colours.cE0.withOpacity(0.5), // color: Colours.cE0.withValues(alpha: 0.5),
), ),
// padding: EdgeInsets.symmetric(vertical: 8), // padding: EdgeInsets.symmetric(vertical: 8),
child: controller.bookDetails.isHave ==1 || controller.bookDetails.isFree == 1? Text('学习报告',style: TextStyle(fontSize: 13.w,color: Colours.c9,height: 1.5),):Text('加入书架',style: TextStyle(fontSize: 13.w,color: AppTheme.primary,height: 1.5),), child: controller.bookDetails.isHave ==1 || controller.bookDetails.isFree == 1? Text('学习报告',style: TextStyle(fontSize: 13.w,color: Colours.c9,height: 1.5),):Text('加入书架',style: TextStyle(fontSize: 13.w,color: AppTheme.primary,height: 1.5),),
...@@ -250,7 +250,7 @@ class _BookDetailPageState extends State<BookDetailPage> with SingleTickerProvid ...@@ -250,7 +250,7 @@ class _BookDetailPageState extends State<BookDetailPage> with SingleTickerProvid
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(17.5.w), borderRadius: BorderRadius.circular(17.5.w),
color: AppTheme.primary.withOpacity(0.1) color: AppTheme.primary.withValues(alpha: 0.1)
), ),
height: 35.w, height: 35.w,
alignment: Alignment.center, alignment: Alignment.center,
......
...@@ -20,7 +20,7 @@ class BuildBook extends StatelessWidget { ...@@ -20,7 +20,7 @@ class BuildBook extends StatelessWidget {
width: double.infinity, width: double.infinity,
height: 150, height: 150,
color: const Color(0xFFAB1941).withOpacity(0.02), color: const Color(0xFFAB1941).withValues(alpha: 0.02),
child: Row( child: Row(
children: [ children: [
///左侧 ///左侧
......
...@@ -43,7 +43,7 @@ class _BookPayPageState extends State<BookPayPage> { ...@@ -43,7 +43,7 @@ class _BookPayPageState extends State<BookPayPage> {
color: Colors.white, color: Colors.white,
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: Colours.cC7.withOpacity(0.5), color: Colours.cC7.withValues(alpha: 0.5),
spreadRadius: 2.w, spreadRadius: 2.w,
blurRadius: 5.w, blurRadius: 5.w,
offset: Offset(3.w, 0), // changes the position of the shadow offset: Offset(3.w, 0), // changes the position of the shadow
...@@ -78,7 +78,7 @@ class _BookPayPageState extends State<BookPayPage> { ...@@ -78,7 +78,7 @@ class _BookPayPageState extends State<BookPayPage> {
color: Colors.white, color: Colors.white,
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: Colours.cC7.withOpacity(0.5), color: Colours.cC7.withValues(alpha: 0.5),
spreadRadius: 2.w, spreadRadius: 2.w,
blurRadius: 5.w, blurRadius: 5.w,
offset: const Offset(3, 0), // changes the position of the shadow offset: const Offset(3, 0), // changes the position of the shadow
...@@ -127,7 +127,7 @@ class _BookPayPageState extends State<BookPayPage> { ...@@ -127,7 +127,7 @@ class _BookPayPageState extends State<BookPayPage> {
controller.show(); controller.show();
}, },
child: Container( child: Container(
color:const Color(0xFF000000).withOpacity(0.5), color:const Color(0xFF000000).withValues(alpha: 0.5),
child: Align( child: Align(
alignment: Alignment.bottomCenter, alignment: Alignment.bottomCenter,
child: ClipRRect( child: ClipRRect(
......
...@@ -15,7 +15,7 @@ class BuildItem extends StatelessWidget { ...@@ -15,7 +15,7 @@ class BuildItem extends StatelessWidget {
color: Colors.white, color: Colors.white,
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: const Color(0xFFC7C7C7).withOpacity(0.5), color: const Color(0xFFC7C7C7).withValues(alpha: 0.5),
spreadRadius: 2.w, spreadRadius: 2.w,
blurRadius: 5.w, blurRadius: 5.w,
offset: Offset(3.w, 0), // changes the position of the shadow offset: Offset(3.w, 0), // changes the position of the shadow
......
...@@ -17,7 +17,7 @@ class BuildItem extends StatelessWidget { ...@@ -17,7 +17,7 @@ class BuildItem extends StatelessWidget {
color: Colors.white, color: Colors.white,
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: Colours.cC7.withOpacity(0.5), color: Colours.cC7.withValues(alpha: 0.5),
offset: Offset(3.w, 0.w), offset: Offset(3.w, 0.w),
blurRadius: 4.w, blurRadius: 4.w,
spreadRadius: 0, spreadRadius: 0,
......
...@@ -17,7 +17,7 @@ class BookCell extends StatelessWidget { ...@@ -17,7 +17,7 @@ class BookCell extends StatelessWidget {
color: Colors.white, color: Colors.white,
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: model.selected?AppTheme.primary.withOpacity(0.21):const Color(0xFFC7C7C7).withOpacity(0.5), color: model.selected?AppTheme.primary.withValues(alpha: 0.21):const Color(0xFFC7C7C7).withValues(alpha: 0.5),
spreadRadius: 0.w, spreadRadius: 0.w,
blurRadius: 10.w, blurRadius: 10.w,
offset: Offset(3.w, 0), // changes the position of the shadow offset: Offset(3.w, 0), // changes the position of the shadow
......
...@@ -28,7 +28,7 @@ class _ChangePhonePageState extends State<ChangePhonePage> { ...@@ -28,7 +28,7 @@ class _ChangePhonePageState extends State<ChangePhonePage> {
color: const Color(0xFFF9F9F9), color: const Color(0xFFF9F9F9),
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: const Color(0xFFC7C7C7).withOpacity(0.35), color: const Color(0xFFC7C7C7).withValues(alpha: 0.35),
offset: Offset(3.w, 0), offset: Offset(3.w, 0),
blurRadius: 10.w, blurRadius: 10.w,
spreadRadius: 0.w, spreadRadius: 0.w,
...@@ -65,7 +65,7 @@ class _ChangePhonePageState extends State<ChangePhonePage> { ...@@ -65,7 +65,7 @@ class _ChangePhonePageState extends State<ChangePhonePage> {
color: const Color(0xFFF9F9F9), color: const Color(0xFFF9F9F9),
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: const Color(0xFFC7C7C7).withOpacity(0.35), color: const Color(0xFFC7C7C7).withValues(alpha: 0.35),
offset: Offset(3.w, 0), offset: Offset(3.w, 0),
blurRadius: 10.w, blurRadius: 10.w,
spreadRadius: 0.w, spreadRadius: 0.w,
......
...@@ -38,7 +38,7 @@ class _ChangePwdPageState extends State<ChangePwdPage> { ...@@ -38,7 +38,7 @@ class _ChangePwdPageState extends State<ChangePwdPage> {
color: const Color(0xFFF9F9F9), color: const Color(0xFFF9F9F9),
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: const Color(0xFFC7C7C7).withOpacity(0.35), color: const Color(0xFFC7C7C7).withValues(alpha: 0.35),
offset: Offset(3.w, 0), offset: Offset(3.w, 0),
blurRadius: 10.w, blurRadius: 10.w,
spreadRadius: 0.w, spreadRadius: 0.w,
...@@ -80,7 +80,7 @@ class _ChangePwdPageState extends State<ChangePwdPage> { ...@@ -80,7 +80,7 @@ class _ChangePwdPageState extends State<ChangePwdPage> {
color: const Color(0xFFF9F9F9), color: const Color(0xFFF9F9F9),
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: const Color(0xFFC7C7C7).withOpacity(0.35), color: const Color(0xFFC7C7C7).withValues(alpha: 0.35),
offset: Offset(3.w, 0), offset: Offset(3.w, 0),
blurRadius: 10.w, blurRadius: 10.w,
spreadRadius: 0.w, spreadRadius: 0.w,
......
...@@ -17,7 +17,7 @@ class Book extends StatelessWidget { ...@@ -17,7 +17,7 @@ class Book extends StatelessWidget {
color: const Color(0xFFF9F9F9), color: const Color(0xFFF9F9F9),
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: const Color(0xFFC7C7C7).withOpacity(0.5), color: const Color(0xFFC7C7C7).withValues(alpha: 0.5),
offset: Offset(3.w, 0), offset: Offset(3.w, 0),
blurRadius: 10.w, blurRadius: 10.w,
spreadRadius: 0.w, spreadRadius: 0.w,
...@@ -54,7 +54,7 @@ class Book extends StatelessWidget { ...@@ -54,7 +54,7 @@ class Book extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
Container( Container(
color: model.type ==0||model.type ==1 ?Colours.cEF :AppTheme.primary.withOpacity(0.1), color: model.type ==0||model.type ==1 ?Colours.cEF :AppTheme.primary.withValues(alpha: 0.1),
padding: EdgeInsets.symmetric(horizontal: 3.5.w), padding: EdgeInsets.symmetric(horizontal: 3.5.w),
child: Text(model.typeName,style: TextStyle(fontSize: 11.w,height: 1.3,color: model.type ==0||model.type ==1 ?Colours.c9:AppTheme.primary),), child: Text(model.typeName,style: TextStyle(fontSize: 11.w,height: 1.3,color: model.type ==0||model.type ==1 ?Colours.c9:AppTheme.primary),),
), ),
......
...@@ -33,7 +33,7 @@ class CreditPointsPage extends StatelessWidget { ...@@ -33,7 +33,7 @@ class CreditPointsPage extends StatelessWidget {
child: Container( child: Container(
padding: EdgeInsets.only(left: 17.w,top: 18.w,bottom: 24.w,right: 17.w), padding: EdgeInsets.only(left: 17.w,top: 18.w,bottom: 24.w,right: 17.w),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white.withOpacity(0.58), color: Colors.white.withValues(alpha: 0.58),
borderRadius: BorderRadius.circular(8.w), borderRadius: BorderRadius.circular(8.w),
border: Border.all(width: 2.w,color: Colors.white) border: Border.all(width: 2.w,color: Colors.white)
), ),
...@@ -82,7 +82,7 @@ class CreditPointsPage extends StatelessWidget { ...@@ -82,7 +82,7 @@ class CreditPointsPage extends StatelessWidget {
color: Colors.white, color: Colors.white,
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: Colours.cC7.withOpacity(0.5), color: Colours.cC7.withValues(alpha: 0.5),
offset: Offset(3.w, 0.w), offset: Offset(3.w, 0.w),
blurRadius: 4.w, blurRadius: 4.w,
spreadRadius: 0, spreadRadius: 0,
......
...@@ -162,7 +162,7 @@ class _LibraryPageState extends State<LibraryPage> { ...@@ -162,7 +162,7 @@ class _LibraryPageState extends State<LibraryPage> {
}, },
child: Container( child: Container(
padding: EdgeInsets.symmetric(vertical: 10.w,horizontal: 10.w), padding: EdgeInsets.symmetric(vertical: 10.w,horizontal: 10.w),
color: model.selected?const Color(0xFFC02D55).withOpacity(0.08):Colors.white, color: model.selected?const Color(0xFFC02D55).withValues(alpha: 0.08):Colors.white,
alignment: Alignment.center, alignment: Alignment.center,
child: Text(model.name??'',style: model.selected?TextStyle(fontSize: 14.w,color: AppTheme.primary,fontWeight: Fonts.boldSemi,):TextStyle(fontSize: 14.w,color: Colours.c9,),), child: Text(model.name??'',style: model.selected?TextStyle(fontSize: 14.w,color: AppTheme.primary,fontWeight: Fonts.boldSemi,):TextStyle(fontSize: 14.w,color: Colours.c9,),),
), ),
...@@ -187,7 +187,7 @@ class _LibraryPageState extends State<LibraryPage> { ...@@ -187,7 +187,7 @@ class _LibraryPageState extends State<LibraryPage> {
// child: TabBar( // child: TabBar(
// indicator: BoxDecoration( // indicator: BoxDecoration(
// border: const Border(bottom: BorderSide(color: Colors.transparent, width: 0.0)), // 将指示器的底边框颜色设置为透明 // border: const Border(bottom: BorderSide(color: Colors.transparent, width: 0.0)), // 将指示器的底边框颜色设置为透明
// color: const Color(0xFFC02D55).withOpacity(0.08) // color: const Color(0xFFC02D55).withValues(alpha: 0.08)
// ), // ),
// labelStyle: TextStyle(color: AppTheme.primary,fontSize: 14.w,height: 1.5,fontWeight: Fonts.medium), // labelStyle: TextStyle(color: AppTheme.primary,fontSize: 14.w,height: 1.5,fontWeight: Fonts.medium),
// unselectedLabelColor: Colours.c9, // unselectedLabelColor: Colours.c9,
......
...@@ -25,7 +25,7 @@ class LibraryCell extends StatelessWidget { ...@@ -25,7 +25,7 @@ class LibraryCell extends StatelessWidget {
borderRadius: BorderRadius.circular(8.w), borderRadius: BorderRadius.circular(8.w),
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: Colours.cC7.withOpacity(0.5), // 阴影颜色 color: Colours.cC7.withValues(alpha: 0.5), // 阴影颜色
spreadRadius: 2.w, // 阴影扩散半径 spreadRadius: 2.w, // 阴影扩散半径
blurRadius: 5.w, // 阴影模糊半径 blurRadius: 5.w, // 阴影模糊半径
offset: Offset(0, 2.w), // 阴影偏移 offset: Offset(0, 2.w), // 阴影偏移
......
...@@ -31,7 +31,7 @@ class _FilterPageState extends State<FilterPage> { ...@@ -31,7 +31,7 @@ class _FilterPageState extends State<FilterPage> {
widget.controller.setShow(widget.controller.show); widget.controller.setShow(widget.controller.show);
}, },
child: Container( child: Container(
color: const Color(0xFF000000).withOpacity(0.5), color: const Color(0xFF000000).withValues(alpha: 0.5),
// color: Colors.red, // color: Colors.red,
child: SingleChildScrollView( child: SingleChildScrollView(
child: Column( child: Column(
...@@ -80,7 +80,7 @@ class _FilterPageState extends State<FilterPage> { ...@@ -80,7 +80,7 @@ class _FilterPageState extends State<FilterPage> {
width: 0.5.w, width: 0.5.w,
color: Colours.c9 color: Colours.c9
), ),
// color: Colours.cE0.withOpacity(0.5), // color: Colours.cE0.withValues(alpha: 0.5),
), ),
// padding: EdgeInsets.symmetric(vertical: 8), // padding: EdgeInsets.symmetric(vertical: 8),
child: Text('重置',style: TextStyle(fontSize: 13.w,color: Colours.c9,height: 1.5),), child: Text('重置',style: TextStyle(fontSize: 13.w,color: Colours.c9,height: 1.5),),
...@@ -94,7 +94,7 @@ class _FilterPageState extends State<FilterPage> { ...@@ -94,7 +94,7 @@ class _FilterPageState extends State<FilterPage> {
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(17.5.w), borderRadius: BorderRadius.circular(17.5.w),
color: AppTheme.primary.withOpacity(0.1) color: AppTheme.primary.withValues(alpha: 0.1)
), ),
height: 35.w, height: 35.w,
alignment: Alignment.center, alignment: Alignment.center,
...@@ -151,7 +151,7 @@ class _FilterPageState extends State<FilterPage> { ...@@ -151,7 +151,7 @@ class _FilterPageState extends State<FilterPage> {
padding: const EdgeInsets.only(left: 15,right: 15), padding: const EdgeInsets.only(left: 15,right: 15),
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(13.5), borderRadius: BorderRadius.circular(13.5),
color: model.selected?const Color(0xFFC02D55).withOpacity(0.08): Colours.cF4, color: model.selected?const Color(0xFFC02D55).withValues(alpha: 0.08): Colours.cF4,
border: model.selected?Border.all(width: 0.5.w,color: AppTheme.primary):null border: model.selected?Border.all(width: 0.5.w,color: AppTheme.primary):null
), ),
......
...@@ -26,7 +26,7 @@ class BuildLabelWidget extends StatelessWidget { ...@@ -26,7 +26,7 @@ class BuildLabelWidget extends StatelessWidget {
color: Colors.white, color: Colors.white,
boxShadow: model.selected?[ boxShadow: model.selected?[
BoxShadow( BoxShadow(
color: AppTheme.primary.withOpacity(0.3), color: AppTheme.primary.withValues(alpha: 0.3),
offset: Offset(0, 1.w), offset: Offset(0, 1.w),
blurRadius: 2.w, blurRadius: 2.w,
spreadRadius: 0.w, spreadRadius: 0.w,
......
...@@ -52,7 +52,7 @@ class _MainPageState extends State<MainPage> with WidgetsBindingObserver{ ...@@ -52,7 +52,7 @@ class _MainPageState extends State<MainPage> with WidgetsBindingObserver{
color: Colors.white, color: Colors.white,
boxShadow:[ boxShadow:[
BoxShadow( BoxShadow(
color: const Color(0xFFE0E0E0).withOpacity(0.5), color: const Color(0xFFE0E0E0).withValues(alpha: 0.5),
spreadRadius: 0, spreadRadius: 0,
blurRadius: 4.5, blurRadius: 4.5,
offset: const Offset(0, 0), offset: const Offset(0, 0),
......
...@@ -134,7 +134,7 @@ class _MinePageState extends State<MinePage> { ...@@ -134,7 +134,7 @@ class _MinePageState extends State<MinePage> {
color: Colors.white, color: Colors.white,
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: const Color(0xFFC7C7C7).withOpacity(0.5), color: const Color(0xFFC7C7C7).withValues(alpha: 0.5),
offset: Offset(3.w, 0), offset: Offset(3.w, 0),
blurRadius: 10.w, blurRadius: 10.w,
spreadRadius: 0.w, spreadRadius: 0.w,
......
...@@ -18,7 +18,7 @@ class BuildAccount extends StatelessWidget { ...@@ -18,7 +18,7 @@ class BuildAccount extends StatelessWidget {
color:Colors.white, color:Colors.white,
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: const Color(0xFFC7C7C7).withOpacity(0.5), color: const Color(0xFFC7C7C7).withValues(alpha: 0.5),
offset: Offset(3.w, 0), offset: Offset(3.w, 0),
blurRadius: 10.w, blurRadius: 10.w,
spreadRadius: 0.w, spreadRadius: 0.w,
......
...@@ -37,7 +37,7 @@ class BuildRead extends StatelessWidget { ...@@ -37,7 +37,7 @@ class BuildRead extends StatelessWidget {
// color: Colors.transparent, // color: Colors.transparent,
// boxShadow: [ // boxShadow: [
// BoxShadow( // BoxShadow(
// color: const Color(0xFFC7C7C7).withOpacity(0.5), // color: const Color(0xFFC7C7C7).withValues(alpha: 0.5),
// offset: const Offset(3, 0), // offset: const Offset(3, 0),
// blurRadius: 10.w, // blurRadius: 10.w,
// spreadRadius: 0.w, // spreadRadius: 0.w,
......
...@@ -67,8 +67,8 @@ class BuildUser extends StatelessWidget { ...@@ -67,8 +67,8 @@ class BuildUser extends StatelessWidget {
borderRadius: BorderRadius.circular(21.w), borderRadius: BorderRadius.circular(21.w),
gradient: LinearGradient( gradient: LinearGradient(
colors: [ colors: [
AppTheme.primary.withOpacity(0.03), AppTheme.primary.withValues(alpha: 0.03),
AppTheme.primary.withOpacity(0.1) AppTheme.primary.withValues(alpha: 0.1)
], // 不可点击时的颜色,透明度为0.7 ], // 不可点击时的颜色,透明度为0.7
begin: Alignment.centerLeft, begin: Alignment.centerLeft,
end: Alignment.centerRight, end: Alignment.centerRight,
......
...@@ -42,7 +42,7 @@ class _PayCouponPageState extends State<PayCouponPage> with SingleTickerProvide ...@@ -42,7 +42,7 @@ class _PayCouponPageState extends State<PayCouponPage> with SingleTickerProvide
color: Colors.white, color: Colors.white,
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: const Color(0xFFC7C7C7).withOpacity(0.3), color: const Color(0xFFC7C7C7).withValues(alpha: 0.3),
spreadRadius: 2.w, spreadRadius: 2.w,
blurRadius: 5.w, blurRadius: 5.w,
offset: Offset(3.w, 0), // offset: Offset(3.w, 0), //
......
...@@ -18,7 +18,7 @@ class BuildItem extends StatelessWidget { ...@@ -18,7 +18,7 @@ class BuildItem extends StatelessWidget {
color: Colors.white, color: Colors.white,
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: const Color(0xFFC7C7C7).withOpacity(0.5), color: const Color(0xFFC7C7C7).withValues(alpha: 0.5),
offset: Offset(3.w, 0), offset: Offset(3.w, 0),
blurRadius: 10.w, blurRadius: 10.w,
spreadRadius: 0.w, spreadRadius: 0.w,
......
...@@ -447,7 +447,7 @@ class _ReadPageState extends State<ReadPage> { ...@@ -447,7 +447,7 @@ class _ReadPageState extends State<ReadPage> {
readController.clearAllDiscussInput(); readController.clearAllDiscussInput();
}, },
child: Container( child: Container(
color: const Color(0xFF000000).withOpacity(0.5), color: const Color(0xFF000000).withValues(alpha: 0.5),
child: SingleChildScrollView( child: SingleChildScrollView(
reverse: true, reverse: true,
child: Container( child: Container(
...@@ -605,7 +605,7 @@ class _ReadPageState extends State<ReadPage> { ...@@ -605,7 +605,7 @@ class _ReadPageState extends State<ReadPage> {
controller.chooseTool(model); controller.chooseTool(model);
}, },
child: Container( child: Container(
color: const Color(0xFF000000).withOpacity(0.5), color: const Color(0xFF000000).withValues(alpha: 0.5),
padding: padding:
EdgeInsets.only(top: MediaQuery.of(context).size.height * 0.2), EdgeInsets.only(top: MediaQuery.of(context).size.height * 0.2),
child: ClipRRect( child: ClipRRect(
......
...@@ -49,7 +49,7 @@ class _ReadCategoryPageState extends State<ReadCategoryPage> { ...@@ -49,7 +49,7 @@ class _ReadCategoryPageState extends State<ReadCategoryPage> {
borderRadius: BorderRadius.circular(17.5.w), borderRadius: BorderRadius.circular(17.5.w),
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: const Color(0xFFC7C7C7).withOpacity(0.5), color: const Color(0xFFC7C7C7).withValues(alpha: 0.5),
offset: Offset(3.w, 0), offset: Offset(3.w, 0),
blurRadius: 10.w, blurRadius: 10.w,
spreadRadius: 0.w, spreadRadius: 0.w,
......
...@@ -50,7 +50,7 @@ class _ReadDiscussPageState extends State<ReadDiscussPage> { ...@@ -50,7 +50,7 @@ class _ReadDiscussPageState extends State<ReadDiscussPage> {
borderRadius: BorderRadius.circular(17.5.w), borderRadius: BorderRadius.circular(17.5.w),
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: const Color(0xFFC7C7C7).withOpacity(0.5), color: const Color(0xFFC7C7C7).withValues(alpha: 0.5),
offset: Offset(3.w, 0), offset: Offset(3.w, 0),
blurRadius: 10.w, blurRadius: 10.w,
spreadRadius: 0.w, spreadRadius: 0.w,
...@@ -144,7 +144,7 @@ class _ReadDiscussPageState extends State<ReadDiscussPage> { ...@@ -144,7 +144,7 @@ class _ReadDiscussPageState extends State<ReadDiscussPage> {
}, },
child: Container( child: Container(
// color: Colors.white, // color: Colors.white,
color: const Color(0xFF000000).withOpacity(0.5), color: const Color(0xFF000000).withValues(alpha: 0.5),
child: SingleChildScrollView( child: SingleChildScrollView(
reverse: true, reverse: true,
child: GestureDetector( child: GestureDetector(
...@@ -184,7 +184,7 @@ class _ReadDiscussPageState extends State<ReadDiscussPage> { ...@@ -184,7 +184,7 @@ class _ReadDiscussPageState extends State<ReadDiscussPage> {
borderRadius: BorderRadius.circular(15.w), borderRadius: BorderRadius.circular(15.w),
color: AppTheme.primary, color: AppTheme.primary,
gradient: LinearGradient( gradient: LinearGradient(
colors: [const Color(0xFFD53676).withOpacity(0.9),AppTheme.primary] , // 不可点击时的颜色,透明度为0.7 colors: [const Color(0xFFD53676).withValues(alpha: 0.9),AppTheme.primary] , // 不可点击时的颜色,透明度为0.7
begin: Alignment.topCenter, begin: Alignment.topCenter,
end: Alignment.bottomCenter, end: Alignment.bottomCenter,
), ),
......
...@@ -250,7 +250,7 @@ class _ReadInputDiscussState extends State<ReadInputDiscuss> { ...@@ -250,7 +250,7 @@ class _ReadInputDiscussState extends State<ReadInputDiscuss> {
borderRadius: BorderRadius.circular(15.w), borderRadius: BorderRadius.circular(15.w),
color: AppTheme.primary, color: AppTheme.primary,
gradient: LinearGradient( gradient: LinearGradient(
colors: [const Color(0xFFD53676).withOpacity(0.9),AppTheme.primary] , // 不可点击时的颜色,透明度为0.7 colors: [const Color(0xFFD53676).withValues(alpha: 0.9),AppTheme.primary] , // 不可点击时的颜色,透明度为0.7
begin: Alignment.topCenter, begin: Alignment.topCenter,
end: Alignment.bottomCenter, end: Alignment.bottomCenter,
), ),
......
...@@ -50,7 +50,7 @@ class _ReadNotePageState extends State<ReadNotePage> { ...@@ -50,7 +50,7 @@ class _ReadNotePageState extends State<ReadNotePage> {
borderRadius: BorderRadius.circular(17.5.w), borderRadius: BorderRadius.circular(17.5.w),
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: const Color(0xFFC7C7C7).withOpacity(0.5), color: const Color(0xFFC7C7C7).withValues(alpha: 0.5),
offset: Offset(3.w, 0), offset: Offset(3.w, 0),
blurRadius: 10.w, blurRadius: 10.w,
spreadRadius: 0.w, spreadRadius: 0.w,
......
...@@ -17,7 +17,7 @@ class BuildDayItem extends StatelessWidget { ...@@ -17,7 +17,7 @@ class BuildDayItem extends StatelessWidget {
borderRadius: BorderRadius.circular(8.w), borderRadius: BorderRadius.circular(8.w),
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: Colours.cC7.withOpacity(0.5), color: Colours.cC7.withValues(alpha: 0.5),
offset: Offset(1, 3.w), offset: Offset(1, 3.w),
blurRadius: 10.w, blurRadius: 10.w,
spreadRadius: 0, spreadRadius: 0,
...@@ -101,7 +101,7 @@ class BuildDayItem extends StatelessWidget { ...@@ -101,7 +101,7 @@ class BuildDayItem extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
Container( Container(
color: AppTheme.primary.withOpacity(0.1), color: AppTheme.primary.withValues(alpha: 0.1),
padding: EdgeInsets.symmetric(horizontal: 3.5.w), padding: EdgeInsets.symmetric(horizontal: 3.5.w),
child: Text(courseModel.typeName,style: TextStyle(fontSize: 11.w,height: 1.3,color:AppTheme.primary),), child: Text(courseModel.typeName,style: TextStyle(fontSize: 11.w,height: 1.3,color:AppTheme.primary),),
), ),
......
...@@ -41,7 +41,7 @@ class _StudyReportPageState extends State<StudyReportPage> { ...@@ -41,7 +41,7 @@ class _StudyReportPageState extends State<StudyReportPage> {
color: Colors.white, color: Colors.white,
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: Colours.cC7.withOpacity(0.5), color: Colours.cC7.withValues(alpha: 0.5),
offset: Offset(1, 3.w), offset: Offset(1, 3.w),
blurRadius: 10.w, blurRadius: 10.w,
spreadRadius: 0, spreadRadius: 0,
...@@ -86,7 +86,7 @@ class _StudyReportPageState extends State<StudyReportPage> { ...@@ -86,7 +86,7 @@ class _StudyReportPageState extends State<StudyReportPage> {
color: Colors.white, color: Colors.white,
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: Colours.cC7.withOpacity(0.5), color: Colours.cC7.withValues(alpha: 0.5),
offset: Offset(1, 3.w), offset: Offset(1, 3.w),
blurRadius: 10.w, blurRadius: 10.w,
spreadRadius: 0, spreadRadius: 0,
...@@ -135,7 +135,7 @@ class _StudyReportPageState extends State<StudyReportPage> { ...@@ -135,7 +135,7 @@ class _StudyReportPageState extends State<StudyReportPage> {
color: Colors.white, color: Colors.white,
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: Colours.cC7.withOpacity(0.5), color: Colours.cC7.withValues(alpha: 0.5),
offset: Offset(1, 3.w), offset: Offset(1, 3.w),
blurRadius: 10.w, blurRadius: 10.w,
spreadRadius: 0, spreadRadius: 0,
...@@ -201,7 +201,7 @@ class _StudyReportPageState extends State<StudyReportPage> { ...@@ -201,7 +201,7 @@ class _StudyReportPageState extends State<StudyReportPage> {
color: Colors.white, color: Colors.white,
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: Colours.cC7.withOpacity(0.5), color: Colours.cC7.withValues(alpha: 0.5),
offset: Offset(1, 3.w), offset: Offset(1, 3.w),
blurRadius: 10.w, blurRadius: 10.w,
spreadRadius: 0, spreadRadius: 0,
......
...@@ -56,7 +56,7 @@ class _UserCoinPageState extends State<UserCoinPage> { ...@@ -56,7 +56,7 @@ class _UserCoinPageState extends State<UserCoinPage> {
color: Colors.white, color: Colors.white,
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: const Color(0xFFC7C7C7).withOpacity(0.5), color: const Color(0xFFC7C7C7).withValues(alpha: 0.5),
offset: Offset(3.w, 0), offset: Offset(3.w, 0),
blurRadius: 10.w, blurRadius: 10.w,
spreadRadius: 0.w, spreadRadius: 0.w,
......
...@@ -109,7 +109,7 @@ class _CoinRechargePageState extends State<CoinRechargePage> ...@@ -109,7 +109,7 @@ class _CoinRechargePageState extends State<CoinRechargePage>
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: model.selected color: model.selected
? AppTheme.primary.withOpacity(0.1) ? AppTheme.primary.withValues(alpha: 0.1)
: Colors.white, : Colors.white,
borderRadius: BorderRadius.circular(8.w), borderRadius: BorderRadius.circular(8.w),
border: Border.all( border: Border.all(
......
...@@ -22,7 +22,7 @@ class BuildItem extends StatelessWidget { ...@@ -22,7 +22,7 @@ class BuildItem extends StatelessWidget {
color: Colors.white, color: Colors.white,
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: const Color(0xFFC7C7C7).withOpacity(0.5), color: const Color(0xFFC7C7C7).withValues(alpha: 0.5),
offset: Offset(3.w, 0), offset: Offset(3.w, 0),
blurRadius: 10.w, blurRadius: 10.w,
spreadRadius: 0.w, spreadRadius: 0.w,
......
...@@ -37,7 +37,7 @@ class _UserDiscussDesPageState extends State<UserDiscussDesPage> { ...@@ -37,7 +37,7 @@ class _UserDiscussDesPageState extends State<UserDiscussDesPage> {
color: Colors.white, color: Colors.white,
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: const Color(0xFFC7C7C7).withOpacity(0.5), color: const Color(0xFFC7C7C7).withValues(alpha: 0.5),
offset: Offset(1.5.w, 0), offset: Offset(1.5.w, 0),
blurRadius: 7.w, blurRadius: 7.w,
spreadRadius: 0.w, spreadRadius: 0.w,
......
...@@ -32,7 +32,7 @@ class _BuildDiscussState extends State<BuildDiscuss> { ...@@ -32,7 +32,7 @@ class _BuildDiscussState extends State<BuildDiscuss> {
color: Colors.white, color: Colors.white,
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: const Color(0xFFC7C7C7).withOpacity(0.5), color: const Color(0xFFC7C7C7).withValues(alpha: 0.5),
offset: Offset(1.5.w, 0), offset: Offset(1.5.w, 0),
blurRadius: 7.w, blurRadius: 7.w,
spreadRadius: 0.w, spreadRadius: 0.w,
...@@ -355,7 +355,7 @@ class _BuildDiscussState extends State<BuildDiscuss> { ...@@ -355,7 +355,7 @@ class _BuildDiscussState extends State<BuildDiscuss> {
bottom: 0, bottom: 0,
child: Container( child: Container(
alignment: Alignment.center, alignment: Alignment.center,
// color: widget.model.isMy==1?Colours.c9.withOpacity(0.5):Colours.c9.withOpacity(1), // color: widget.model.isMy==1?Colours.c9.withValues(alpha: 0.5):Colours.c9.withValues(alpha: 1),
child: Text(_showImageStatus(widget.model,mediaModel),style: TextStyle(fontSize: 11.w,height: 1.5,color: AppTheme.primary),), child: Text(_showImageStatus(widget.model,mediaModel),style: TextStyle(fontSize: 11.w,height: 1.5,color: AppTheme.primary),),
) )
), ),
......
...@@ -16,7 +16,7 @@ class BuildItem extends StatelessWidget { ...@@ -16,7 +16,7 @@ class BuildItem extends StatelessWidget {
color: Colors.white, color: Colors.white,
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: const Color(0xFFC7C7C7).withOpacity(0.5), color: const Color(0xFFC7C7C7).withValues(alpha: 0.5),
offset: Offset(3.w, 0), offset: Offset(3.w, 0),
blurRadius: 10.w, blurRadius: 10.w,
spreadRadius: 0.w, spreadRadius: 0.w,
......
...@@ -52,7 +52,7 @@ class _BuildListPageState extends State<BuildListPage> with AutomaticKeepAliveCl ...@@ -52,7 +52,7 @@ class _BuildListPageState extends State<BuildListPage> with AutomaticKeepAliveCl
controller.setShow(); controller.setShow();
}, },
child: Container( child: Container(
color: const Color(0xFF000000).withOpacity(0.5), color: const Color(0xFF000000).withValues(alpha: 0.5),
child: SingleChildScrollView( child: SingleChildScrollView(
reverse: true, reverse: true,
child: GestureDetector( child: GestureDetector(
...@@ -92,7 +92,7 @@ class _BuildListPageState extends State<BuildListPage> with AutomaticKeepAliveCl ...@@ -92,7 +92,7 @@ class _BuildListPageState extends State<BuildListPage> with AutomaticKeepAliveCl
borderRadius: BorderRadius.circular(15.w), borderRadius: BorderRadius.circular(15.w),
color: AppTheme.primary, color: AppTheme.primary,
gradient: LinearGradient( gradient: LinearGradient(
colors: [const Color(0xFFD53676).withOpacity(0.9),AppTheme.primary] , // 不可点击时的颜色,透明度为0.7 colors: [const Color(0xFFD53676).withValues(alpha: 0.9),AppTheme.primary] , // 不可点击时的颜色,透明度为0.7
begin: Alignment.topCenter, begin: Alignment.topCenter,
end: Alignment.bottomCenter, end: Alignment.bottomCenter,
), ),
......
...@@ -230,7 +230,7 @@ class _UserEditNotePageState extends State<UserEditNotePage> { ...@@ -230,7 +230,7 @@ class _UserEditNotePageState extends State<UserEditNotePage> {
borderRadius: BorderRadius.circular(15.w), borderRadius: BorderRadius.circular(15.w),
color: AppTheme.primary, color: AppTheme.primary,
gradient: LinearGradient( gradient: LinearGradient(
colors: [const Color(0xFFD53676).withOpacity(0.9),AppTheme.primary] , // 不可点击时的颜色,透明度为0.7 colors: [const Color(0xFFD53676).withValues(alpha: 0.9),AppTheme.primary] , // 不可点击时的颜色,透明度为0.7
begin: Alignment.topCenter, begin: Alignment.topCenter,
end: Alignment.bottomCenter, end: Alignment.bottomCenter,
), ),
......
...@@ -35,7 +35,7 @@ class _UserGenderPageState extends State<UserGenderPage> { ...@@ -35,7 +35,7 @@ class _UserGenderPageState extends State<UserGenderPage> {
color: Colors.white, color: Colors.white,
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: const Color(0xFFC7C7C7).withOpacity(0.5), color: const Color(0xFFC7C7C7).withValues(alpha: 0.5),
offset: Offset(3.w, 0), offset: Offset(3.w, 0),
blurRadius: 10.w, blurRadius: 10.w,
spreadRadius: 0.w, spreadRadius: 0.w,
......
...@@ -30,7 +30,7 @@ class _UserInfoPageState extends State<UserInfoPage> { ...@@ -30,7 +30,7 @@ class _UserInfoPageState extends State<UserInfoPage> {
color: Colors.white, color: Colors.white,
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: const Color(0xFFC7C7C7).withOpacity(0.5), color: const Color(0xFFC7C7C7).withValues(alpha: 0.5),
offset: Offset(3.w, 0), offset: Offset(3.w, 0),
blurRadius: 10.w, blurRadius: 10.w,
spreadRadius: 0.w, spreadRadius: 0.w,
...@@ -138,7 +138,7 @@ class _UserInfoPageState extends State<UserInfoPage> { ...@@ -138,7 +138,7 @@ class _UserInfoPageState extends State<UserInfoPage> {
controller.show(); controller.show();
}, },
child: Container( child: Container(
color: const Color(0xFF000000).withOpacity(0.5), color: const Color(0xFF000000).withValues(alpha: 0.5),
child: Align( child: Align(
alignment: Alignment.bottomCenter, alignment: Alignment.bottomCenter,
child: ClipRRect( child: ClipRRect(
......
...@@ -19,7 +19,7 @@ class BuildItem extends StatelessWidget { ...@@ -19,7 +19,7 @@ class BuildItem extends StatelessWidget {
borderRadius: BorderRadius.circular(8.w), borderRadius: BorderRadius.circular(8.w),
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: Colours.cC7.withOpacity(0.5), // 阴影颜色 color: Colours.cC7.withValues(alpha: 0.5), // 阴影颜色
spreadRadius: 2.w, // 阴影扩散半径 spreadRadius: 2.w, // 阴影扩散半径
blurRadius: 5.w, // 阴影模糊半径 blurRadius: 5.w, // 阴影模糊半径
offset: Offset(0, 2.w), // 阴影偏移 offset: Offset(0, 2.w), // 阴影偏移
......
...@@ -32,7 +32,7 @@ class BuildItem extends StatelessWidget { ...@@ -32,7 +32,7 @@ class BuildItem extends StatelessWidget {
height: 30.w, height: 30.w,
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(15.w), borderRadius: BorderRadius.circular(15.w),
color: AppTheme.primary.withOpacity(0.1) color: AppTheme.primary.withValues(alpha: 0.1)
), ),
child: Image.asset( child: Image.asset(
'assets/images/msg.png', 'assets/images/msg.png',
......
...@@ -56,7 +56,7 @@ class _UserNickPageState extends State<UserNickPage> { ...@@ -56,7 +56,7 @@ class _UserNickPageState extends State<UserNickPage> {
height: 42.w, height: 42.w,
decoration: BoxDecoration(boxShadow: [ decoration: BoxDecoration(boxShadow: [
BoxShadow( BoxShadow(
color: Colours.cC7.withOpacity(0.5), color: Colours.cC7.withValues(alpha: 0.5),
spreadRadius: 0.w, spreadRadius: 0.w,
blurRadius: 10.w, blurRadius: 10.w,
offset: Offset(3.w, 0), offset: Offset(3.w, 0),
......
...@@ -17,7 +17,7 @@ class BuildItem extends StatelessWidget { ...@@ -17,7 +17,7 @@ class BuildItem extends StatelessWidget {
color: Colors.white, color: Colors.white,
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: const Color(0xFFC7C7C7).withOpacity(0.5), color: const Color(0xFFC7C7C7).withValues(alpha: 0.5),
offset: Offset(3.w, 0), offset: Offset(3.w, 0),
blurRadius: 10.w, blurRadius: 10.w,
spreadRadius: 0.w, spreadRadius: 0.w,
......
...@@ -18,7 +18,7 @@ class BuildHigh extends StatelessWidget { ...@@ -18,7 +18,7 @@ class BuildHigh extends StatelessWidget {
color: Colors.white, color: Colors.white,
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: const Color(0xFFC7C7C7).withOpacity(0.5), color: const Color(0xFFC7C7C7).withValues(alpha: 0.5),
offset: Offset(1.5.w, 0), offset: Offset(1.5.w, 0),
blurRadius: 7.w, blurRadius: 7.w,
spreadRadius: 0.w, spreadRadius: 0.w,
......
...@@ -16,7 +16,7 @@ class BuildItem extends StatelessWidget { ...@@ -16,7 +16,7 @@ class BuildItem extends StatelessWidget {
color: Colors.white, color: Colors.white,
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: const Color(0xFFC7C7C7).withOpacity(0.5), color: const Color(0xFFC7C7C7).withValues(alpha: 0.5),
offset: Offset(3.w, 0), offset: Offset(3.w, 0),
blurRadius: 10.w, blurRadius: 10.w,
spreadRadius: 0.w, spreadRadius: 0.w,
......
...@@ -18,7 +18,7 @@ class BuildLine extends StatelessWidget { ...@@ -18,7 +18,7 @@ class BuildLine extends StatelessWidget {
color: Colors.white, color: Colors.white,
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: const Color(0xFFC7C7C7).withOpacity(0.5), color: const Color(0xFFC7C7C7).withValues(alpha: 0.5),
offset: Offset(1.5.w, 0), offset: Offset(1.5.w, 0),
blurRadius: 7.w, blurRadius: 7.w,
spreadRadius: 0.w, spreadRadius: 0.w,
......
...@@ -23,7 +23,7 @@ class BuildNote extends StatelessWidget { ...@@ -23,7 +23,7 @@ class BuildNote extends StatelessWidget {
color: Colors.white, color: Colors.white,
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: const Color(0xFFC7C7C7).withOpacity(0.5), color: const Color(0xFFC7C7C7).withValues(alpha: 0.5),
offset: Offset(1.5.w, 0), offset: Offset(1.5.w, 0),
blurRadius: 7.w, blurRadius: 7.w,
spreadRadius: 0.w, spreadRadius: 0.w,
...@@ -187,7 +187,7 @@ class BuildNote extends StatelessWidget { ...@@ -187,7 +187,7 @@ class BuildNote extends StatelessWidget {
bottom: 0, bottom: 0,
child: Container( child: Container(
alignment: Alignment.center, alignment: Alignment.center,
// color: model.isMy==1?Colours.c9.withOpacity(0.5):Colours.c9.withOpacity(1), // color: model.isMy==1?Colours.c9.withValues(alpha: 0.5):Colours.c9.withValues(alpha: 1),
child: Text(_showMediaModelStatus(model,mediaModel),style: TextStyle(fontSize: 11.w,height: 1.5,color: AppTheme.primary),), child: Text(_showMediaModelStatus(model,mediaModel),style: TextStyle(fontSize: 11.w,height: 1.5,color: AppTheme.primary),),
) )
), ),
......
...@@ -25,7 +25,7 @@ class BuiltAwaiting extends StatelessWidget { ...@@ -25,7 +25,7 @@ class BuiltAwaiting extends StatelessWidget {
color: Colors.white, color: Colors.white,
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: const Color(0xFFC7C7C7).withOpacity(0.5), color: const Color(0xFFC7C7C7).withValues(alpha: 0.5),
offset: Offset(1.5.w, 0), offset: Offset(1.5.w, 0),
blurRadius: 7.w, blurRadius: 7.w,
spreadRadius: 0.w, spreadRadius: 0.w,
...@@ -62,7 +62,7 @@ class BuiltAwaiting extends StatelessWidget { ...@@ -62,7 +62,7 @@ class BuiltAwaiting extends StatelessWidget {
color: Colors.white, color: Colors.white,
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: const Color(0xFF707070).withOpacity(0.5), color: const Color(0xFF707070).withValues(alpha: 0.5),
offset: const Offset(0, 0), offset: const Offset(0, 0),
blurRadius: 4.5.w, blurRadius: 4.5.w,
spreadRadius: 0.w, spreadRadius: 0.w,
...@@ -310,7 +310,7 @@ class BuiltAwaiting extends StatelessWidget { ...@@ -310,7 +310,7 @@ class BuiltAwaiting extends StatelessWidget {
color: Colors.white, color: Colors.white,
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: const Color(0xFF707070).withOpacity(0.5), color: const Color(0xFF707070).withValues(alpha: 0.5),
offset: const Offset(0, 0), offset: const Offset(0, 0),
blurRadius: 4.5.w, blurRadius: 4.5.w,
spreadRadius: 0.w, spreadRadius: 0.w,
......
...@@ -20,7 +20,7 @@ class BuiltCanceled extends StatelessWidget { ...@@ -20,7 +20,7 @@ class BuiltCanceled extends StatelessWidget {
color: Colors.white, color: Colors.white,
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: const Color(0xFFC7C7C7).withOpacity(0.5), color: const Color(0xFFC7C7C7).withValues(alpha: 0.5),
offset: Offset(1.5.w, 0), offset: Offset(1.5.w, 0),
blurRadius: 7.w, blurRadius: 7.w,
spreadRadius: 0.w, spreadRadius: 0.w,
...@@ -71,7 +71,7 @@ class BuiltCanceled extends StatelessWidget { ...@@ -71,7 +71,7 @@ class BuiltCanceled extends StatelessWidget {
color: Colors.white, color: Colors.white,
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: const Color(0xFF707070).withOpacity(0.5), color: const Color(0xFF707070).withValues(alpha: 0.5),
offset: const Offset(0, 0), offset: const Offset(0, 0),
blurRadius: 4.5.w, blurRadius: 4.5.w,
spreadRadius: 0.w, spreadRadius: 0.w,
...@@ -222,7 +222,7 @@ class BuiltCanceled extends StatelessWidget { ...@@ -222,7 +222,7 @@ class BuiltCanceled extends StatelessWidget {
color: Colors.white, color: Colors.white,
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: const Color(0xFF707070).withOpacity(0.5), color: const Color(0xFF707070).withValues(alpha: 0.5),
offset: const Offset(0, 0), offset: const Offset(0, 0),
blurRadius: 4.5.w, blurRadius: 4.5.w,
spreadRadius: 0.w, spreadRadius: 0.w,
......
...@@ -44,7 +44,7 @@ class BuiltCoin extends StatelessWidget { ...@@ -44,7 +44,7 @@ class BuiltCoin extends StatelessWidget {
color: Colors.white, color: Colors.white,
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: const Color(0xFFC7C7C7).withOpacity(0.5), color: const Color(0xFFC7C7C7).withValues(alpha: 0.5),
offset: Offset(1.5.w, 0), offset: Offset(1.5.w, 0),
blurRadius: 7.w, blurRadius: 7.w,
spreadRadius: 0.w, spreadRadius: 0.w,
......
...@@ -28,7 +28,7 @@ class BuiltCompleted extends StatelessWidget { ...@@ -28,7 +28,7 @@ class BuiltCompleted extends StatelessWidget {
color: Colors.white, color: Colors.white,
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: const Color(0xFFC7C7C7).withOpacity(0.5), color: const Color(0xFFC7C7C7).withValues(alpha: 0.5),
offset: Offset(1.5.w, 0), offset: Offset(1.5.w, 0),
blurRadius: 7.w, blurRadius: 7.w,
spreadRadius: 0.w, spreadRadius: 0.w,
...@@ -78,7 +78,7 @@ class BuiltCompleted extends StatelessWidget { ...@@ -78,7 +78,7 @@ class BuiltCompleted extends StatelessWidget {
color: Colors.white, color: Colors.white,
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: const Color(0xFF707070).withOpacity(0.5), color: const Color(0xFF707070).withValues(alpha: 0.5),
offset: const Offset(0, 0), offset: const Offset(0, 0),
blurRadius: 4.5.w, blurRadius: 4.5.w,
spreadRadius: 0.w, spreadRadius: 0.w,
...@@ -243,7 +243,7 @@ class BuiltCompleted extends StatelessWidget { ...@@ -243,7 +243,7 @@ class BuiltCompleted extends StatelessWidget {
color: Colors.white, color: Colors.white,
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: const Color(0xFF707070).withOpacity(0.5), color: const Color(0xFF707070).withValues(alpha: 0.5),
offset: const Offset(0, 0), offset: const Offset(0, 0),
blurRadius: 4.5.w, blurRadius: 4.5.w,
spreadRadius: 0.w, spreadRadius: 0.w,
......
...@@ -18,7 +18,7 @@ class BuiltRefunded extends StatelessWidget { ...@@ -18,7 +18,7 @@ class BuiltRefunded extends StatelessWidget {
color: Colors.white, color: Colors.white,
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: const Color(0xFFC7C7C7).withOpacity(0.5), color: const Color(0xFFC7C7C7).withValues(alpha: 0.5),
offset: Offset(1.5.w, 0), offset: Offset(1.5.w, 0),
blurRadius: 7.w, blurRadius: 7.w,
spreadRadius: 0.w, spreadRadius: 0.w,
...@@ -68,7 +68,7 @@ class BuiltRefunded extends StatelessWidget { ...@@ -68,7 +68,7 @@ class BuiltRefunded extends StatelessWidget {
color: Colors.white, color: Colors.white,
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: const Color(0xFF707070).withOpacity(0.5), color: const Color(0xFF707070).withValues(alpha: 0.5),
offset: const Offset(0, 0), offset: const Offset(0, 0),
blurRadius: 4.5.w, blurRadius: 4.5.w,
spreadRadius: 0.w, spreadRadius: 0.w,
...@@ -203,7 +203,7 @@ class BuiltRefunded extends StatelessWidget { ...@@ -203,7 +203,7 @@ class BuiltRefunded extends StatelessWidget {
color: Colors.white, color: Colors.white,
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: const Color(0xFF707070).withOpacity(0.5), color: const Color(0xFF707070).withValues(alpha: 0.5),
offset: const Offset(0, 0), offset: const Offset(0, 0),
blurRadius: 4.5.w, blurRadius: 4.5.w,
spreadRadius: 0.w, spreadRadius: 0.w,
......
...@@ -48,7 +48,7 @@ class _UserOrderAwaitingState extends State<UserOrderAwaitingPage> { ...@@ -48,7 +48,7 @@ class _UserOrderAwaitingState extends State<UserOrderAwaitingPage> {
color: Colors.white, color: Colors.white,
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: Colours.cC7.withOpacity(0.5), color: Colours.cC7.withValues(alpha: 0.5),
offset: Offset(3.w, 0), offset: Offset(3.w, 0),
blurRadius: 10.w, blurRadius: 10.w,
spreadRadius: 0.w, spreadRadius: 0.w,
......
...@@ -29,7 +29,7 @@ class _UserOrderRefundedState extends State<UserOrderCancelDetailPage> { ...@@ -29,7 +29,7 @@ class _UserOrderRefundedState extends State<UserOrderCancelDetailPage> {
color: Colors.white, color: Colors.white,
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: Colours.cC7.withOpacity(0.5), color: Colours.cC7.withValues(alpha: 0.5),
offset: Offset(3.w, 0), offset: Offset(3.w, 0),
blurRadius: 10.w, blurRadius: 10.w,
spreadRadius: 0.w, spreadRadius: 0.w,
...@@ -210,7 +210,7 @@ class _UserOrderRefundedState extends State<UserOrderCancelDetailPage> { ...@@ -210,7 +210,7 @@ class _UserOrderRefundedState extends State<UserOrderCancelDetailPage> {
// color: Colors.white, // color: Colors.white,
// boxShadow: [ // boxShadow: [
// BoxShadow( // BoxShadow(
// color: Colours.cC7.withOpacity(0.5), // color: Colours.cC7.withValues(alpha: 0.5),
// offset: Offset(3.w, 0), // offset: Offset(3.w, 0),
// blurRadius: 10.w, // blurRadius: 10.w,
// spreadRadius: 0.w, // spreadRadius: 0.w,
......
...@@ -50,7 +50,7 @@ class _UserOrderCoinAwaitingState extends State<UserOrderCoinAwaitingPage> { ...@@ -50,7 +50,7 @@ class _UserOrderCoinAwaitingState extends State<UserOrderCoinAwaitingPage> {
color: Colors.white, color: Colors.white,
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: Colours.cC7.withOpacity(0.5), color: Colours.cC7.withValues(alpha: 0.5),
offset: Offset(3.w, 0), offset: Offset(3.w, 0),
blurRadius: 10.w, blurRadius: 10.w,
spreadRadius: 0.w, spreadRadius: 0.w,
......
...@@ -50,7 +50,7 @@ class _UserOrderCoinAwaitingState extends State<UserOrderCoinCancelPage> { ...@@ -50,7 +50,7 @@ class _UserOrderCoinAwaitingState extends State<UserOrderCoinCancelPage> {
color: Colors.white, color: Colors.white,
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: Colours.cC7.withOpacity(0.5), color: Colours.cC7.withValues(alpha: 0.5),
offset: Offset(3.w, 0), offset: Offset(3.w, 0),
blurRadius: 10.w, blurRadius: 10.w,
spreadRadius: 0.w, spreadRadius: 0.w,
......
...@@ -50,7 +50,7 @@ class _UserOrderCoinAwaitingState extends State<UserOrderCoinCompletedPage> { ...@@ -50,7 +50,7 @@ class _UserOrderCoinAwaitingState extends State<UserOrderCoinCompletedPage> {
color: Colors.white, color: Colors.white,
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: Colours.cC7.withOpacity(0.5), color: Colours.cC7.withValues(alpha: 0.5),
offset: Offset(3.w, 0), offset: Offset(3.w, 0),
blurRadius: 10.w, blurRadius: 10.w,
spreadRadius: 0.w, spreadRadius: 0.w,
......
...@@ -35,7 +35,7 @@ class _UserOrderCompletedState extends State<UserOrderCompletedPage> { ...@@ -35,7 +35,7 @@ class _UserOrderCompletedState extends State<UserOrderCompletedPage> {
color: Colors.white, color: Colors.white,
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: Colours.cC7.withOpacity(0.5), color: Colours.cC7.withValues(alpha: 0.5),
offset: Offset(3.w, 0), offset: Offset(3.w, 0),
blurRadius: 10.w, blurRadius: 10.w,
spreadRadius: 0.w, spreadRadius: 0.w,
......
...@@ -109,7 +109,7 @@ class _UserOrderEvaluatePageState extends State<UserOrderEvaluatePage> with Auto ...@@ -109,7 +109,7 @@ class _UserOrderEvaluatePageState extends State<UserOrderEvaluatePage> with Auto
color: const Color(0xFFF9F9F9), color: const Color(0xFFF9F9F9),
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: const Color(0xFFC7C7C7).withOpacity(0.5), color: const Color(0xFFC7C7C7).withValues(alpha: 0.5),
offset: Offset(3.w, 0), offset: Offset(3.w, 0),
blurRadius: 7.w, blurRadius: 7.w,
spreadRadius: 0.w, spreadRadius: 0.w,
...@@ -137,7 +137,7 @@ class _UserOrderEvaluatePageState extends State<UserOrderEvaluatePage> with Auto ...@@ -137,7 +137,7 @@ class _UserOrderEvaluatePageState extends State<UserOrderEvaluatePage> with Auto
color: Colors.white, color: Colors.white,
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: const Color(0xFF707070).withOpacity(0.5), color: const Color(0xFF707070).withValues(alpha: 0.5),
offset: const Offset(0, 0), offset: const Offset(0, 0),
blurRadius: 4.5.w, blurRadius: 4.5.w,
spreadRadius: 0.w, spreadRadius: 0.w,
......
...@@ -29,7 +29,7 @@ class _UserOrderRefundedState extends State<UserOrderRefundedPage> { ...@@ -29,7 +29,7 @@ class _UserOrderRefundedState extends State<UserOrderRefundedPage> {
color: Colors.white, color: Colors.white,
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: Colours.cC7.withOpacity(0.5), color: Colours.cC7.withValues(alpha: 0.5),
offset: Offset(3.w, 0), offset: Offset(3.w, 0),
blurRadius: 10.w, blurRadius: 10.w,
spreadRadius: 0.w, spreadRadius: 0.w,
...@@ -209,7 +209,7 @@ class _UserOrderRefundedState extends State<UserOrderRefundedPage> { ...@@ -209,7 +209,7 @@ class _UserOrderRefundedState extends State<UserOrderRefundedPage> {
color: Colors.white, color: Colors.white,
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: Colours.cC7.withOpacity(0.5), color: Colours.cC7.withValues(alpha: 0.5),
offset: Offset(3.w, 0), offset: Offset(3.w, 0),
blurRadius: 10.w, blurRadius: 10.w,
spreadRadius: 0.w, spreadRadius: 0.w,
......
...@@ -38,7 +38,7 @@ class _UserPointPageState extends State<UserPointPage> { ...@@ -38,7 +38,7 @@ class _UserPointPageState extends State<UserPointPage> {
color: Colors.white, color: Colors.white,
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: const Color(0xFFC7C7C7).withOpacity(0.5), color: const Color(0xFFC7C7C7).withValues(alpha: 0.5),
offset: Offset(3.w, 0), offset: Offset(3.w, 0),
blurRadius: 10.w, blurRadius: 10.w,
spreadRadius: 0.w, spreadRadius: 0.w,
......
...@@ -26,7 +26,7 @@ class _UserSecurityPageState extends State<UserSecurityPage> { ...@@ -26,7 +26,7 @@ class _UserSecurityPageState extends State<UserSecurityPage> {
color: Colors.white, color: Colors.white,
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: const Color(0xFFC7C7C7).withOpacity(0.5), color: const Color(0xFFC7C7C7).withValues(alpha: 0.5),
offset: Offset(3.w, 0), offset: Offset(3.w, 0),
blurRadius: 10.w, blurRadius: 10.w,
spreadRadius: 0.w, spreadRadius: 0.w,
...@@ -69,7 +69,7 @@ class _UserSecurityPageState extends State<UserSecurityPage> { ...@@ -69,7 +69,7 @@ class _UserSecurityPageState extends State<UserSecurityPage> {
color: Colors.white, color: Colors.white,
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: const Color(0xFFC7C7C7).withOpacity(0.5), color: const Color(0xFFC7C7C7).withValues(alpha: 0.5),
offset: Offset(3.w, 0), offset: Offset(3.w, 0),
blurRadius: 10.w, blurRadius: 10.w,
spreadRadius: 0.w, spreadRadius: 0.w,
......
...@@ -29,7 +29,7 @@ class _UserSetPageState extends State<UserSetPage> { ...@@ -29,7 +29,7 @@ class _UserSetPageState extends State<UserSetPage> {
color: Colors.white, color: Colors.white,
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: const Color(0xFFC7C7C7).withOpacity(0.5), color: const Color(0xFFC7C7C7).withValues(alpha: 0.5),
offset: Offset(3.w, 0), offset: Offset(3.w, 0),
blurRadius: 10.w, blurRadius: 10.w,
spreadRadius: 0.w, spreadRadius: 0.w,
...@@ -212,7 +212,7 @@ class _UserSetPageState extends State<UserSetPage> { ...@@ -212,7 +212,7 @@ class _UserSetPageState extends State<UserSetPage> {
color: Colors.white, color: Colors.white,
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: const Color(0xFFC7C7C7).withOpacity(0.5), color: const Color(0xFFC7C7C7).withValues(alpha: 0.5),
offset: Offset(3.w, 0), offset: Offset(3.w, 0),
blurRadius: 10.w, blurRadius: 10.w,
spreadRadius: 0.w, spreadRadius: 0.w,
......
...@@ -21,7 +21,7 @@ class BuildItem extends StatelessWidget { ...@@ -21,7 +21,7 @@ class BuildItem extends StatelessWidget {
color: Colors.white, color: Colors.white,
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: const Color(0xFFC7C7C7).withOpacity(0.5), color: const Color(0xFFC7C7C7).withValues(alpha: 0.5),
offset: const Offset(3, 0), offset: const Offset(3, 0),
blurRadius: 10.w, blurRadius: 10.w,
spreadRadius: 0.w, spreadRadius: 0.w,
......
...@@ -81,7 +81,7 @@ abstract class AppTheme { ...@@ -81,7 +81,7 @@ abstract class AppTheme {
onSecondary: Colors.white, onSecondary: Colors.white,
tertiary: Colors.white, tertiary: Colors.white,
outline: const Color(0xFFD5D5D5), outline: const Color(0xFFD5D5D5),
shadow: const Color(0xFFAB1941).withOpacity(0.08), shadow: const Color(0xFFAB1941).withValues(alpha: 0.08),
error: error, error: error,
onError: Colors.white, onError: Colors.white,
); );
...@@ -99,7 +99,7 @@ abstract class AppTheme { ...@@ -99,7 +99,7 @@ abstract class AppTheme {
onSecondary: Colors.white, onSecondary: Colors.white,
tertiary: const Color(0xFF141414), tertiary: const Color(0xFF141414),
outline: const Color(0xFF252525), outline: const Color(0xFF252525),
shadow: const Color(0xFF777777).withOpacity(0.08), shadow: const Color(0xFF777777).withValues(alpha: 0.08),
error: error, error: error,
onError: Colors.white, onError: Colors.white,
); );
...@@ -141,7 +141,7 @@ abstract class AppTheme { ...@@ -141,7 +141,7 @@ abstract class AppTheme {
), ),
appBarTheme: AppBarTheme( appBarTheme: AppBarTheme(
systemOverlayStyle: SystemUiOverlayStyle.dark, systemOverlayStyle: SystemUiOverlayStyle.dark,
backgroundColor: const Color(0xFFAB1941).withOpacity(0.02), backgroundColor: const Color(0xFFAB1941).withValues(alpha: 0.02),
scrolledUnderElevation: 0, scrolledUnderElevation: 0,
elevation: 0, elevation: 0,
centerTitle: true, centerTitle: true,
...@@ -191,7 +191,7 @@ abstract class AppTheme { ...@@ -191,7 +191,7 @@ abstract class AppTheme {
selectedLabelStyle: TextStyle(fontSize: 11.w, fontWeight: Fonts.medium), selectedLabelStyle: TextStyle(fontSize: 11.w, fontWeight: Fonts.medium),
unselectedIconTheme: IconThemeData( unselectedIconTheme: IconThemeData(
size: 15.w, size: 15.w,
color: scheme.onSurface.withOpacity(0.5), color: scheme.onSurface.withValues(alpha: 0.5),
), ),
selectedIconTheme: IconThemeData( selectedIconTheme: IconThemeData(
size: 15.w, size: 15.w,
...@@ -218,7 +218,7 @@ abstract class AppTheme { ...@@ -218,7 +218,7 @@ abstract class AppTheme {
), ),
helperStyle: TextStyle( helperStyle: TextStyle(
fontSize: 15.w, fontSize: 15.w,
color: scheme.onSurface.withOpacity(0.7), color: scheme.onSurface.withValues(alpha: 0.7),
), ),
contentPadding: EdgeInsets.symmetric( contentPadding: EdgeInsets.symmetric(
horizontal: 10.w, horizontal: 10.w,
...@@ -266,7 +266,7 @@ abstract class AppTheme { ...@@ -266,7 +266,7 @@ abstract class AppTheme {
), ),
dividerTheme: DividerThemeData( dividerTheme: DividerThemeData(
thickness: 1.w, thickness: 1.w,
color: scheme.onSurface.withOpacity(0.08), color: scheme.onSurface.withValues(alpha: 0.08),
), ),
); );
} }
......
...@@ -23,7 +23,7 @@ class CustomCard extends StatelessWidget { ...@@ -23,7 +23,7 @@ class CustomCard extends StatelessWidget {
borderRadius: borderRadius ?? BorderRadius.circular(3), borderRadius: borderRadius ?? BorderRadius.circular(3),
boxShadow: boxShadow ?? [ boxShadow: boxShadow ?? [
BoxShadow( BoxShadow(
color: const Color(0xFF707070).withOpacity(0.5), color: const Color(0xFF707070).withValues(alpha: 0.5),
spreadRadius: 0, spreadRadius: 0,
blurRadius: 4.5, blurRadius: 4.5,
offset: const Offset(0, 0), offset: const Offset(0, 0),
......
...@@ -99,12 +99,12 @@ class CustomButton extends StatelessWidget { ...@@ -99,12 +99,12 @@ class CustomButton extends StatelessWidget {
case CustomButtonType.ghost: case CustomButtonType.ghost:
case CustomButtonType.borderless: case CustomButtonType.borderless:
final color = foregroundColor ?? colorScheme.primary; final color = foregroundColor ?? colorScheme.primary;
final opacity = color.opacity / 2; final opacity = color.a / 2;
if (states.contains(WidgetState.pressed)) { if (states.contains(WidgetState.pressed)) {
return color.withOpacity(opacity); return color.withValues(alpha: opacity);
} }
if (states.contains(WidgetState.disabled)) { if (states.contains(WidgetState.disabled)) {
return color.withOpacity(opacity); return color.withValues(alpha: opacity);
} }
return color; return color;
} }
...@@ -113,13 +113,13 @@ class CustomButton extends StatelessWidget { ...@@ -113,13 +113,13 @@ class CustomButton extends StatelessWidget {
switch (type) { switch (type) {
case CustomButtonType.filled: case CustomButtonType.filled:
final color = backgroundColor ?? final color = backgroundColor ??
colorScheme.primary.withOpacity(isIcon ? 0.1 : 1); colorScheme.primary.withValues(alpha: isIcon ? 0.1 : 1);
final opacity = color.opacity / 2; final opacity = color.a / 2;
if (states.contains(WidgetState.pressed)) { if (states.contains(WidgetState.pressed)) {
return color.withOpacity(opacity); return color.withValues(alpha: opacity);
} }
if (states.contains(WidgetState.disabled)) { if (states.contains(WidgetState.disabled)) {
return color.withOpacity(opacity); return color.withValues(alpha: opacity);
} }
return color; return color;
case CustomButtonType.ghost: case CustomButtonType.ghost:
...@@ -134,15 +134,15 @@ class CustomButton extends StatelessWidget { ...@@ -134,15 +134,15 @@ class CustomButton extends StatelessWidget {
return BorderSide.none; return BorderSide.none;
case CustomButtonType.ghost: case CustomButtonType.ghost:
final color = foregroundColor ?? colorScheme.primary; final color = foregroundColor ?? colorScheme.primary;
final opacity = color.opacity / 2; final opacity = color.a / 2;
if (states.contains(WidgetState.pressed)) { if (states.contains(WidgetState.pressed)) {
return BorderSide( return BorderSide(
color: color.withOpacity(opacity), color: color.withValues(alpha: opacity),
width: 2.w, width: 2.w,
); );
} }
if (states.contains(WidgetState.disabled)) { if (states.contains(WidgetState.disabled)) {
return BorderSide(color: color.withOpacity(opacity)); return BorderSide(color: color.withValues(alpha: opacity));
} }
return BorderSide( return BorderSide(
color: color, color: color,
...@@ -182,7 +182,7 @@ class _ButtonWithIcon extends CustomButton { ...@@ -182,7 +182,7 @@ class _ButtonWithIcon extends CustomButton {
), ),
onPressed: onPressed, onPressed: onPressed,
foregroundColor: foregroundColor, foregroundColor: foregroundColor,
backgroundColor: backgroundColor ?? foregroundColor?.withOpacity(0.1), backgroundColor: backgroundColor ?? foregroundColor?.withValues(alpha: 0.1),
type: type, type: type,
size: size, size: size,
shape: shape, shape: shape,
...@@ -261,7 +261,7 @@ class CustomGradientButton extends StatelessWidget { ...@@ -261,7 +261,7 @@ class CustomGradientButton extends StatelessWidget {
borderRadius: BorderRadius.circular(21), borderRadius: BorderRadius.circular(21),
gradient: LinearGradient( gradient: LinearGradient(
colors: isEnabled colors: isEnabled
?[const Color(0xFFDE2E5E),const Color(0xFFC31F4C)]:[const Color(0xFFDE2E5E).withOpacity(0.7),const Color(0xFFC31F4C).withOpacity(0.7)] , // 不可点击时的颜色,透明度为0.7 ?[const Color(0xFFDE2E5E),const Color(0xFFC31F4C)]:[const Color(0xFFDE2E5E).withValues(alpha: 0.7),const Color(0xFFC31F4C).withValues(alpha: 0.7)] , // 不可点击时的颜色,透明度为0.7
begin: Alignment.centerLeft, begin: Alignment.centerLeft,
end: Alignment.centerRight, end: Alignment.centerRight,
), ),
......
...@@ -29,7 +29,7 @@ class CustomDialog extends StatelessWidget { ...@@ -29,7 +29,7 @@ class CustomDialog extends StatelessWidget {
}) { }) {
return showDialog<T>( return showDialog<T>(
context: context, context: context,
barrierColor: const Color(0xFF09101D).withOpacity(0.6), barrierColor: const Color(0xFF09101D).withValues(alpha: 0.6),
builder: (context) => CustomDialog( builder: (context) => CustomDialog(
title: title, title: title,
confirm: confirm, confirm: confirm,
......
...@@ -43,7 +43,7 @@ class CustomEmpty extends StatelessWidget { ...@@ -43,7 +43,7 @@ class CustomEmpty extends StatelessWidget {
begin: Alignment.topLeft, begin: Alignment.topLeft,
end: Alignment.bottomRight, end: Alignment.bottomRight,
colors: [ colors: [
Color.alphaBlend(color.withOpacity(0.6), Colors.white), Color.alphaBlend(color.withValues(alpha: 0.6), Colors.white),
color, color,
], ],
), ),
......
...@@ -363,7 +363,7 @@ class CustomInputSearch extends StatelessWidget { ...@@ -363,7 +363,7 @@ class CustomInputSearch extends StatelessWidget {
color: Colors.white, color: Colors.white,
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: Colours.c3.withOpacity(0.1), // 阴影颜色 color: Colours.c3.withValues(alpha: 0.1), // 阴影颜色
spreadRadius: 2, // 阴影扩散程度 spreadRadius: 2, // 阴影扩散程度
blurRadius: 4, // 阴影模糊程度 blurRadius: 4, // 阴影模糊程度
offset: const Offset(0, 2), // 阴影位置 offset: const Offset(0, 2), // 阴影位置
......
...@@ -96,7 +96,7 @@ class _RingPainter extends CustomPainter { ...@@ -96,7 +96,7 @@ class _RingPainter extends CustomPainter {
void paint(Canvas canvas, Size size) { void paint(Canvas canvas, Size size) {
final center = Offset(size.width / 2, size.height / 2); final center = Offset(size.width / 2, size.height / 2);
final radius = (min(size.width, size.height) - paintWidth) / 2; final radius = (min(size.width, size.height) - paintWidth) / 2;
trackPaint.color = trackColor.withOpacity(0.2); trackPaint.color = trackColor.withValues(alpha: 0.2);
canvas.drawCircle(center, radius, trackPaint); canvas.drawCircle(center, radius, trackPaint);
trackPaint.color = trackColor; trackPaint.color = trackColor;
canvas.drawArc( canvas.drawArc(
......
...@@ -12,7 +12,7 @@ abstract class CustomToast { ...@@ -12,7 +12,7 @@ abstract class CustomToast {
..radius = 20.w ..radius = 20.w
..boxShadow = [ ..boxShadow = [
BoxShadow( BoxShadow(
color: Theme.of(context).colorScheme.shadow.withOpacity(0.15), color: Theme.of(context).colorScheme.shadow.withValues(alpha: 0.15),
offset: const Offset(0, 0), offset: const Offset(0, 0),
blurRadius: 20.w, blurRadius: 20.w,
), ),
...@@ -31,7 +31,7 @@ abstract class CustomToast { ...@@ -31,7 +31,7 @@ abstract class CustomToast {
color: Theme.of(context).colorScheme.onSurface, color: Theme.of(context).colorScheme.onSurface,
) )
..maskType = EasyLoadingMaskType.clear ..maskType = EasyLoadingMaskType.clear
..maskColor = const Color(0xFF09101D).withOpacity(0.7) ..maskColor = const Color(0xFF09101D).withValues(alpha: 0.7)
..userInteractions = true ..userInteractions = true
..successWidget = const CustomToastSuccess() ..successWidget = const CustomToastSuccess()
..errorWidget = const CustomToastFail() ..errorWidget = const CustomToastFail()
......
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论