如何使个人资料页面像这样..?

时间:2019-09-04 17:05:45

标签: flutter flutter-layout

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();
  }
}

1 个答案:

答案 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(...),
    );
  }
}