https://ibb.co/r6jbxV3 大家好,我想要这样的屏幕,ı无法创建下拉按钮。我如何可以像这样创建屏幕? 请帮忙。
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
class ProfileupdateScreen extends StatelessWidget {
@override
Widget build(BuildContext context) {
// TODO: implement build
return MaterialApp();
}
}
答案 0 :(得分:1)
我只是给你一个想法。
class ProfileupdateScreen extends StatelessWidget {
@override
Widget build(BuildContext context) {
// TODO: implement build
return MaterialApp(home: MyPage());
}
}
class MyPage extends StatefulWidget {
@override
_MyPageState createState() => _MyPageState();
}
class _MyPageState extends State<MyPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
body: DecoratedBox(
decoration: BoxDecoration(gradient: ...),
child: SingleChildScrollView(
child: Column(
children: <Widget>[
Text("Profile detail"),
Image.asset("your_image"),
Text("Bilgi ..."),
TextField(), // Bugr...
TextField(), // Zenc...
TextField(), // email id
DropdownButton(), // Erkek
TextField(), // 10/12 ...
DropdownButton(), // Ogre...
],
),
),
),
bottomNavigationBar: BottomNavigationBar(...),
);
}
}