Flutter:Alertdialog 和字体上的边框颜色

Pau*_*aul 2 border colors android-alertdialog flutter

我是颤振新手,我正在尝试将边框颜色添加到 AlertDialog 中。我找不到办法做到这一点,所以我尝试用容器替换它,但字体不一样,我找不到正确的字体。这是我试图复制的 AlertDialog。该字体与 FlatButton 标签使用的字体相同,但我仍然找不到它。

AlertDialog(
          backgroundColor: Theme.of(context).primaryColor,
          contentPadding: EdgeInsets.all(0),
          title:Center(child:Text(contact.name + " "+ contact.familyName)),
          content:Column(
            children: <Widget>[
              Text(_role,style: _style),
              Divider(
                color: Colors.blueGrey,
              ),
              FlatButton.icon(
                label: Text(
                  "Voir le profil",
                ),
                icon:Icon(
                  Icons.account_circle,
                  color: Colors.black,
                ),
                onPressed:(){
                  Navigator.push(
                    context,
                    MaterialPageRoute(builder: (context) => UserProfileScreen(userId:contact.id)),
                  );
                },
              ),
              FlatButton.icon(
                label: Text(
                  "Ajouter en ami",
                  style:TextStyle(color:Colors.green),
                ),
                icon:Icon(
                  Icons.add,
                  color: Colors.green,
                ),

                onPressed:()=>Navigator.pop(context,RoleActions.AJOUT_AMI),
              ),
              _buildPermissions(),
            ],
          ),
        ),
Run Code Online (Sandbox Code Playgroud)

正确的警报对话框 使用对话框时发出警报对话框副本

J. *_*Saw 5

如果您只是寻找边框,可以使用以下命令进行设置shape

return AlertDialog(
    backgroundColor: Colors.black,
    shape: RoundedRectangleBorder(
        side: BorderSide(color: Colors.red)),
);

Run Code Online (Sandbox Code Playgroud)