美文网首页
Flutter开发之Scaffold Widget

Flutter开发之Scaffold Widget

作者: 飞羽_ifeiyv | 来源:发表于2019-05-31 21:35 被阅读0次

Scaffold

实现基本材料设计视觉布局结构

构造函数(Constructors)

    Scaffold({
        Key key, 
        PreferredSizeWidget appBar, 
        Widget body,
        Widget floatingActionButton, 
        FloatingActionButtonLocation floatingActionButtonLocation, FloatingActionButtonAnimator floatingActionButtonAnimator, 
        List<Widget> persistentFooterButtons, 
        Widget drawer, 
        Widget endDrawer, 
        Widget bottomNavigationBar, 
        Widget bottomSheet, 
        Color backgroundColor, 
        bool resizeToAvoidBottomPadding, 
        bool resizeToAvoidBottomInset, 
        bool primary: true, 
        DragStartBehavior drawerDragStartBehavior: DragStartBehavior.start,
        bool extendBody: false 
    })

属性(Properties)

  • appBar → PreferredSizeWidget

    顶部导航栏

  • backgroundColor → Color

    背景色

  • body → Widget

    Scaffold的主要内容

  • bottomNavigationBar → Widget

    底部导航栏

  • bottomSheet → Widget

    The persistent bottom sheet to display. [...]

  • drawer → Widget

    显示在容器侧面的面板,通常隐藏在移动设备上。从左到右(TextDirection.ltr)或从右到左(TextDirection.rtl)滑入

  • drawerDragStartBehavior → DragStartBehavior

    确定处理拖动开始行为的方式

  • endDrawer → Widget

    显示在身体侧面的面板,通常隐藏在移动设备上。从右到左(TextDirection.ltr)或从左到右(TextDirection.rtl)滑动

  • extendBody → bool

    如果为true,并且指定了bottomNavigationBar或persistentFooterButtons,则body将延伸到Scaffold的底部,而不是仅延伸到bottomNavigationBar或persistentFooterButtons的顶部

  • floatingActionButton → Widget

    显示在容器上方的按钮,位于右下角

  • floatingActionButtonAnimator → FloatingActionButtonAnimator

    Animator将floatingActionButton移动到新的floatingActionButtonLocation

  • floatingActionButtonLocation → FloatingActionButtonLocation

    负责确定floatingActionButton的去向

  • persistentFooterButtons → List<Widget>

    一组显示在脚手架底部的按钮

  • primary → bool

    此脚手架是否显示在屏幕顶部

  • resizeToAvoidBottomInset → bool

    如果为true,则body和scaffold的浮动小部件应自行调整大小,以避免屏幕键盘的高度由环境MediaQuery的MediaQueryData.viewInsets底部属性定义

  • resizeToAvoidBottomPadding → bool

    不推荐使用此标志,请改用resizeToAvoidBottomInset,
    @Deprecated('使用resizeToAvoidBottomInset指定键盘出现时是否应调整主体大小')

相关文章

  • Flutter开发之Scaffold Widget

    Scaffold 实现基本材料设计视觉布局结构 构造函数(Constructors) 属性(Properties)...

  • Flutter学习

    一、基础 1、Scaffold、Widget 在Flutter中,大多数东西都是widget,widget是控件实...

  • Flutter Widget => Scaffold

    Scaffold 实现了基本的纸墨设计布局结构。在示例应用中,MyHomePage 所返回的就是一个 Scaffo...

  • Flutter学习资源整理

    Flutter快速上车之Widget 【开发经验】浅谈flutter的优点 Flutter Widgets Ele...

  • 4、MaterialApp和Scaffold

    MaterialApp和Scaffold是Flutter提供的两个Widget,其中: MaterialApp是一...

  • Flutter 基础布局 Scaffold Widget

    Flutter 基础布局 Scaffold Widget 顾名思义,脚手架,我们在此基础上进行搭建组建进行布局,只...

  • Flutter框架分析 - Widget

    Widget是Flutter开发应用中用到最多的概念,Flutter的理念是Every is Widget,Wid...

  • Flutter--Hello World

    1.Flutter中万物皆Widget之 2.Flutter开发一般嵌套太多,对代码进行抽取如:

  • Flutter(二十一)Scaffold

    Scaffold是Flutter提供的一个组合widget内部封装了常用的控件 导航栏 侧边抽屉 底部导航栏 一个...

  • Flutter之Scaffold

    Scaffold 实现了基本的纸墨设计布局结构。在示例应用中,MyHomePage 所返回的就是一个 Scaffo...

网友评论

      本文标题:Flutter开发之Scaffold Widget

      本文链接:https://www.haomeiwen.com/subject/ttlntctx.html