DrawerBuilder class

创建Drawer

  • 把Drawer分成3部分,Header,Body, Footer。
  • header可以隐藏,Body使用列表形式表现,内容自行构建,Footer用于显示版本,公司名称用。
 +========================================+
 |                  |                     ]
 |    Header        |                     ]
 |                  |                     ]
 |                  |             S       ]
 |------------------|                     ]
 |                  |             C       ]
 |                  |                     ]
 |                  |             R       ]
 |    Body          |                     ]
 |                  |             E       ]
 |                  |                     ]
 |                  |             E       ]
 |                  |                     ]
 |                  |             N       ]
 |                  |                     ]
 |                  |                     ]
 |                  |                     ]
 |                  |                     ]
 |                  |                     ]
 |                  |                     ]
 |                  |                     ]
 |                  |                     ]
 |                  |                     ]
 |------------------|                     ]
 |   Footer         |                     ]
 +========================================+
Scaffold(
     drawer: DrawerBuilder.drawer(
        delegate: SimpleDrawBuilderDelegate(
            childCount: 3,
            builder: (context, index){
              return Text("");
            }),
        ),
     )
[example/lib/pages/page_framework_drawer.dart -- FrameworkDrawerPage]

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

endDrawer() → void
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

drawer(BuildContext context, {DrawerDelegate delegate = const DrawerChildListDelegate(children: [])}) Drawer
标准Drawer创建