# NoticeBar
Widget to display a system message, event notice and so on.
# FLNoticeBar
FLNoticeBar is based on FLMarqueeLabel, adding default styles and factory methods.
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
property | description | type | default value |
---|---|---|---|
backgroundColor | background color | Color | |
textStyle | text style | TextStyle | |
loop | cyclic scroll | bool | true |
velocity | scroll velocity | double | 0.4 |
padding | padding | EdgeInsetsGeometry | |
textPadding | text area padding | EdgeInsetsGeometry | |
text | text string | String | |
space | space after text | double | |
height | height | double | 36 |
delay | delay duration when first render | Duration | |
prefixBuilder | prefix widget builder | FLNoticeBarItemBuilder | |
suffixBuilder | suffix widget builder | FLNoticeBarItemBuilder |