微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

如何为颤振中的每个类别创建单独的框

如何解决如何为颤振中的每个类别创建单独的框

我正在创建一个员工生物数据页面,为此我有 4 到 5 个类别,例如个人数据、家庭信息、技能、员工履历。

我的输出应该是这样的

enter image description here

对于所有类别,我如何在颤振中创建它。

我已经这样做了

enter image description here

并希望将其转换为上述设计。

--------------编辑问题------------------------------ --

我做了下面的代码,但它不符合我的要求。

 Padding(padding: EdgeInsets.fromLTRB(15,5,50,0),child:Container(decoration: Boxdecoration(
                border: Border.all(color: Colors.blueAccent,width: 100) 
                   
            ),child:Padding(padding: EdgeInsets.fromLTRB(15,child: TextField(
              
              decoration: Inputdecoration(border: InputBorder.none),),))

这是它的输出

enter image description here

如果有人知道小部件的名称或如何创建它,请帮忙。

解决方法

您可以使用 struct ContentView: View { var body: some View { ZStack{ Color.red SceneView( scene: { let scene = SCNScene(named: "Earth.scn")! scene.background.contents = UIColor.green /// here! return scene }(),options: [.autoenablesDefaultLighting,.allowsCameraControl] ) .frame(width: UIScreen.main.bounds.width,height: UIScreen.main.bounds.height/2,alignment: .center) .border(Color.blue,width: 3) } } } StackContainers

获得此布局
Column

Output:

,

兄弟像这样将容器给定器边框带到容器中

 decoration: BoxDecoration(
    border: Border.all(color: Colors.blueAccent)
  ),

然后取输入框并使该框的边框不再像这样

borde:InputBorder.none

这样你就可以很容易地做到这一点

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。