问题描述
我正在创建一个员工生物数据页面,为此我有 4 到 5 个类别,例如个人数据、家庭信息、技能、员工履历。
我的输出应该是这样的
对于所有类别,我如何在颤振中创建它。
我已经这样做了
并希望将其转换为上述设计。
--------------编辑问题------------------------------ --
我做了下面的代码,但它不符合我的要求。
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),),))
这是它的输出
如果有人知道小部件的名称或如何创建它,请帮忙。
解决方法
您可以使用 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)
}
}
}
、Stack
和 Containers
Column
,
兄弟像这样将容器给定器边框带到容器中
decoration: BoxDecoration(
border: Border.all(color: Colors.blueAccent)
),
然后取输入框并使该框的边框不再像这样
borde:InputBorder.none
这样你就可以很容易地做到这一点