小编Vin*_*han的帖子

如何在颤动中滚动页面

我的页面代码是这样的.我需要在appbar下方滚动部分.

@override
  Widget build(BuildContext context) {
    return new Scaffold(
      appBar: new AppBar(... ),
      body: new Stack(
        children: <Widget>[
          new Container(
            decoration: BoxDecoration(
                image: DecorationImage(...),
          new Column(children: [
            new Container(...),
            new Container(...... ),
            new Padding(
              child: SizedBox(
                child: RaisedButton(..),
            ),
            new Divider(),
            new Column(
              children: <Widget>[
                new Container(
                  child: new Row(
                    children: <Widget>[
                      new Expanded(
                        child: new Text(  ),
                      ),
                      new IconButton(
                        icon: IconButton(..),
                        onPressed: () {
                          _changed(true, "type");
                        },
                      ),
                    ],
                  ),
                ),
                visibilityPropertyType
                    ? new Container(
                        margin: EdgeInsets.all(24.0),
                        child: …
Run Code Online (Sandbox Code Playgroud)

scrollview dart flutter flutter-layout

22
推荐指数
6
解决办法
3万
查看次数

我们如何在Flutter中更改Appbar背景颜色

我正在尝试为应用设置通用主题,因此我需要将appbar颜色更改为表示十六进制代码#0f0a1a的颜色

const MaterialColor toolbarColor = const MaterialColor(
    0xFF151026, const <int, Color>{0: const Color(0xFF151026)});
Run Code Online (Sandbox Code Playgroud)

我尝试使用这段代码来制作自定义颜色,但失败了。我该如何从themeData做到这一点?

dart flutter flutter-layout

8
推荐指数
5
解决办法
1万
查看次数

更新复选框并从对话框抖动中返回值

我正在尝试将某些城市列表添加到带有复选框的对话中,以便我需要对项目进行多次单击。下面是我想做的事情。

onPressed 从按钮调用Rest Service,然后在成功结果上我只显示一个对话

void showCityDialog(BuildContext context) {
    SimpleDialog dialog = new SimpleDialog(
      title: Row(
        mainAxisAlignment: MainAxisAlignment.spaceBetween,
        children: <Widget>[
          new Text(
            "CITIES",
            style: TextStyle(fontSize: 18.0, color: Colors.black),
            textAlign: TextAlign.center,
          ),
          new RaisedButton(
            onPressed: () {print("clicked");},
            color: Color(0xFFfab82b),
            child: new Text(
              "Done",
              style: TextStyle(color: Colors.white),
            ),)],),
      children: <Widget>[
        Column(
          mainAxisAlignment: MainAxisAlignment.start,
          crossAxisAlignment: CrossAxisAlignment.start,
          children: <Widget>[
            new Container(
              constraints: BoxConstraints(maxHeight: 500.0),
              child: ListView.builder(
                scrollDirection: Axis.vertical,
                itemCount: cityData.length,
                itemBuilder: (context, position) {
                  return new CheckboxListTile(
                    value: checkboxValueCity,
                    onChanged: (bool value) {
                      setState(() { …
Run Code Online (Sandbox Code Playgroud)

checkbox dialog dart flutter

5
推荐指数
3
解决办法
4928
查看次数

将提交按钮添加到 SearchView

我尝试实现一个SearchViewin ToolBar. 当我尝试使用此选项提交查询时,提交按钮位于ToolBar. 但是,我需要SearchView.

我怎样才能定制SearchView

android kotlin searchview android-toolbar

4
推荐指数
1
解决办法
1478
查看次数