EWAppBar.small constructor

EWAppBar.small({
  1. Key? key,
  2. String title = '',
  3. Widget? leading,
  4. bool isTitleCentered = false,
  5. TextStyle? titleStyle,
  6. List<Widget>? actions,
})

Implementation

factory EWAppBar.small({
  Key? key,
  String title = '',
  Widget? leading,
  bool isTitleCentered = false,
  TextStyle? titleStyle,
  List<Widget>? actions,
}) {
  final appBar = AppBar(
    title: Text(
      title,
      style: titleStyle,
    ),
    leading: leading,
    centerTitle: isTitleCentered,
    actions: actions,
  );
  return EWAppBar(
    key: key,
    isTitleCentered: isTitleCentered,
    appbarType: const Small(),
    title: title,
    leading: leading,
    titleStyle: titleStyle,
    actions: actions,
    preferredSize: const Size.fromHeight(kToolbarHeight),
    child: appBar, // preferredSize for Small
  );
}