# NoticeBar

NoticeBar 一般用作系统提醒、活动提醒等通知。

# FLNoticeBar

FLNoticeBar 基于 FLMarqueeLabel, 增加了默认样式以及快捷的工厂方法。

FLNoticeBar(
    text: 'Notice: The arrival time of incomes and transfers of account will be delayed during National Day.',
);

# .notice

FLNoticeBar.notice(
    text: 'Notice: The arrival time of incomes and transfers of account will be delayed during National Day.',
    velocity: 0.6,
);

# .closable

FLNoticeBar.closable(
    text: 'Notice: The arrival time of incomes and transfers of account will be delayed during National Day.',
    velocity: 0.8,
    onPressed: () {
        FLToast.text(text: 'Close NoticeBar');
    },
)

# custom prefix & suffix

FLNoticeBar(
    text: 'Notice: The arrival time of incomes and transfers of account will be delayed during National Day.',
    prefix: Padding(
        padding: EdgeInsets.symmetric(horizontal: 4),
        child: Text('prefix', style: TextStyle(color: Colors.grey)),
    ),
    suffix: Padding(
        padding: EdgeInsets.symmetric(horizontal: 4),
        child: Text('suffix', style: TextStyle(color: Colors.grey)),
    )
)

# API

# FLNoticeBar

属性 描述 类型 默认值
backgroundColor 背景颜色 Color
textStyle 文字样式 TextStyle
loop 是否循环滚动 bool true
velocity 滚动速度 double 0.4
padding 内边距 EdgeInsetsGeometry
textPadding 文字区域内边距 EdgeInsetsGeometry
text 文字 String
space 文字后空白宽度 double
height 高度 double 36
delay 首次显示时时延 Duration
prefixBuilder 头部组件 FLNoticeBarItemBuilder
suffixBuilder 尾部组件 FLNoticeBarItemBuilder