RCKExtensionMenuConfig class
扩展菜单配置
如果开发者需要修改默认的扩展菜单,可以用getDefaultGridItems方法获取默认的菜单项列表,修改以后,传入items参数 例如: final items = getDefaultGridItems( onTapBeforePermission: (context) async {}, );
items.removeLast(); items.add(RCKExtensionMenuItemConfig( title: '自定义菜单项', icon: Icon(Icons.add), onTapWithContext: (context) async {}, ));
RCKExtensionMenuConfig( items: items, ), )
Constructors
-
RCKExtensionMenuConfig.new({List<
RCKExtensionMenuItemConfig> ? items, int itemsPerPage = 8, int crossAxisCount = 4, Color? backgroundColor, double mainAxisSpacing = kInputExtentionItemSpaceV, double crossAxisSpacing = kInputExtentionItemSpaceH, EdgeInsets padding = const EdgeInsets.only(top: kInputExtentionPanelPaddingTop, left: kInputExtentionPanelPaddingH, right: kInputExtentionPanelPaddingH, bottom: kInputExtentionPanelPaddingBottom), Color indicatorSelectedColor = const Color(0xFF999999), Color indicatorUnselectedColor = const Color(0xFFD8D8D8), double height = kInputExtentionHeight}) -
const
Properties
- backgroundColor → Color?
-
菜单背景颜色
final
- crossAxisCount → int
-
每行显示的项目数量
final
- crossAxisSpacing → double
-
列间距
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- height → double
-
菜单高度
final
- indicatorSelectedColor → Color
-
页面指示器选中颜色
final
- indicatorUnselectedColor → Color
-
页面指示器未选中颜色
final
-
items
→ List<
RCKExtensionMenuItemConfig> -
菜单项列表
final
- itemsPerPage → int
-
每页展示的项目数量
final
- mainAxisSpacing → double
-
行间距
final
- padding → EdgeInsets
-
内边距
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
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