navi static method

Widget navi(
  1. BuildContext context,
  2. String title, {
  3. bool? haveLeading = true,
  4. Color? color,
  5. double? height = FFNaviHeight,
})

Implementation

static Widget navi(
  BuildContext context,
  /**标题 */
  String title, {
  /**是否有返回按扭 */
  bool? haveLeading = true,
  /**背景颜色 */
  Color? color,
  /**高度 */
  double? height = FFNaviHeight,
}) {
  return FFNavi(
    color: color,
    height: height,
    leading: haveLeading == true
        ? FFImageButton(
            alignment: Alignment.center,
            width: 44,
            heigth: FFNaviHeight,
            padding: EdgeInsets.symmetric(horizontal: 10),
            image: AssetImage("assets/images/navi/icon_nav_back@3x.png"),
            onClick: () {
              if (Navigator.canPop(context)) Navigator.pop(context);
            },
          )
        : null,
    titleView: FFTextButton(
      alignment: Alignment.center,
      text: title,
      fontSize: 17,
      fontWeight: FontWeight.bold,
      heigth: FFNaviHeight,
    ),
    // actionView: FFImageButton(
    //   width: 120,
    //   color: Colors.white,
    //   image: Container(),
    // ),
  );
}