Flutter中如何修改NetworkGiffyDialog按钮颜色?
修改NetworkGiffyDialog确认按钮颜色
只需调整buttonOkColor参数的取值,替换当前的Colors.black为注释中的目标色值即可完成修改:
修改后的完整代码片段
builder: (_) => NetworkGiffyDialog( title: Text('لايوجد اتصال', textAlign: TextAlign.center, style: TextStyle(fontSize: 22.0, fontWeight: FontWeight.w600)), description: Text( 'يبدو أنك غير متصل بالانترنت.يرجى التحقق من اعدادات الشبكة الخاصة بك مرة أخرى', textAlign: TextAlign.center, ), entryAnimation: EntryAnimation.BOTTOM_RIGHT, onOkButtonPressed: () { Navigator.of(context).pop(); }, key: key, image: Image.asset("assets/no-internet.jpeg"), onCancelButtonPressed: () { Navigator.of(context).pop(); }, buttonOkColor: Color(0xff8e1538), buttonCancelColor: Color(0xff8e1538), buttonOkText: Text('تاكد'), buttonCancelText: Text("الغاء"), ));
修改要点
删除原buttonOkColor:Colors.black,代码,直接启用注释中的Color(0xff8e1538)作为按钮颜色参数值。
内容的提问来源于stack exchange,提问作者نواف الشهري
相关产品推荐
相关产品推荐

