颤振中的弯曲半径按钮

时间:2018-09-18 11:03:40

标签: android ios dart flutter

我正在尝试在颤动中创建弯曲的按钮。但是对我而言,borderRadius标签不起作用。这是我的代码

from xml.dom import minidom
import xml.etree.ElementTree as ET
import xmltodict
xml_body = """ <soap:Body><ListCampaignsResponse xmlns="https://ws.campaigner.com/2013/01"><ListCampaignsResult><CampaignDescription><Id>30550904</Id><Name>Tuesday, September 11, 2018</Name><Status>Sent</Status><Type>OneOff</Type><FromName>testMPT.com</FromName><FromEmail>med_BAlday@Test.com</FromEmail><Subject>TestCampaignLink</Subject><ProjectId>0</ProjectId><Format>HTML</Format><CreatedDate>2018-09-11T10:48:03.497</CreatedDate><LastModifiedDate>2018-09-11T10:55:38.833</LastModifiedDate></CampaignDescription><CampaignDescription><Id>30634141</Id><Name>TestTemplateAPI_2</Name><Status>Sent</Status><Type>OneOff</Type><FromName>testMPT.com</FromName><FromEmail>med_BAlday@Test.com</FromEmail><Subject>TestCampaign_API2</Subject><ProjectId>0</ProjectId><Format>HTML</Format><CreatedDate>2018-09-18T09:44:11.047</CreatedDate><LastModifiedDate>2018-09-18T09:48:51.973</LastModifiedDate></CampaignDescription></ListCampaignsResult></ListCampaignsResponse></soap:Body>"""

my_xmltodict_csv = []
my_minidom_csv = []
my_ET_csv = []



#using  xmltodict - running okay
xmldict =xmltodict.parse(xml_body)
for row in xmldict['soap:Body']['ListCampaignsResponse']['ListCampaignsResult']['CampaignDescription']:
    print row['Id']
    my_xmltodict_csv.append(row)


#using ElementTree --not running
root = ET.fromstring(xml_body)
for CampaignDescription in root.iter('CampaignDescription'):
    print CampaignDescription.attrib
    row_ET={}
    row_ET['Id'] = CampaignDescription.text
    row_ET['Name'] = CampaignDescription.text
    my_minidom_csv.append(row_ET)


#using minidom --not running
xmldoc = minidom.parseString(xml_body)
itemlist = xmldoc.getElementsByTagName('CampaignDescription')
print(len(itemlist))
for child in itemlist:
    row_mini={}
    row_mini['Id'] = child.firstChild.nodeValue
    row_mini['Name'] = child.firstChild.nodeValue
    row_mini['Status'] = child.firstChild.nodeValue
    my_minidom_csv.append(row_mini)

我不会在这方面犯错。

1 个答案:

答案 0 :(得分:1)

    //Login Button
    final loginButton = Padding(
      padding: EdgeInsets.symmetric(vertical: 16.0),
      child: Material(
        borderRadius: BorderRadius.circular(30.0),
        shadowColor: Colors.lightBlueAccent.shade100,
        elevation: 5.0,
        Colors.lightBlueAccent,
        child: MaterialButton(
          minWidth: 200.0,
          height: 42.0,
          onPressed: () {
//            Navigator.of(context).pushNamed(HomePage.tag);
          },

          child: Text('Log In', style: TextStyle(color: Colors.white)),
        ),
      ),
    );

尝试上面的代码,我将颜色标签从MaterialButton上移到了Material小部件中。我已经对其进行了测试,并且可以在Flutter dev v0.7.1中正常运行。除非您解释一下它不起作用以及您希望它如何工作的意思,否则我将无济于事。