Flutter:Android和iOS上的TextField样式差异

时间:2018-12-02 15:10:50

标签: dart flutter flutter-layout

我有TextField

Container(
  padding: const EdgeInsets.only(top: 50.0),
  child: TextField(
    style: new TextStyle(color: Colors.white),
    decoration: InputDecoration(
      prefixIcon: Container(
          padding: const EdgeInsets.only(bottom: 4),
          child: Image.asset('assets/images/profile.png')),
      labelText: Strings.whatIsYourName,
      labelStyle: TextStyle(color: Colors.white),
      helperStyle: TextStyle(color: Colors.white),
      enabledBorder: const OutlineInputBorder(
        borderSide: const BorderSide(color: Colors.white, width: 0.5),
        borderRadius: const BorderRadius.all(Radius.circular(10.0)),
      ),
      border: const OutlineInputBorder(
        borderRadius: const BorderRadius.all(Radius.circular(10.0)),
      ),
    ),
  ),
),

为什么相同的代码在Android和iOS上看起来有所不同? 为什么在Android中看起来像蜘蛛网

enter image description here

0 个答案:

没有答案