
import 'package:flutter/material.dart';
import 'package:zhiying_base_widget/pages/team_page/model/team_style_model.dart';
import 'package:zhiying_comm/zhiying_comm.dart';

class TeamAppBarWidget extends StatelessWidget {

  TeamStyleModel model;
  TeamAppBarWidget(this.model);

  @override
  Widget build(BuildContext context) {

    return SliverAppBar(
      // expandedHeight: 200.0,
      brightness: Brightness.light,
      leading: IconButton(
        icon: Icon(
          Icons.arrow_back_ios,
          size: 22,
          color: HexColor.fromHex('#333333'),
        ),
        onPressed: () => Navigator.maybePop(context),
      ),
      backgroundColor: HexColor.fromHex(model?.appBarBgColor ?? '#FFFFFF'),
      floating: true,
      pinned: true,
      title: Text(
        model?.appBarName ?? '我的团队',
        style: TextStyle(color: HexColor.fromHex(model?.appBarNameColor ?? '#333333'), fontWeight: FontWeight.bold, fontSize: 18),
      ),
      centerTitle: true,
      elevation: 0,
    );
  }
}
