/*
 * @Author: XianKaiQun
 * @Date: 2020-09-30 16:40:50
 * @LastEditors: XianKaiQun
 * @LastEditTime: 2020-09-30 17:16:12
 * @Description: 
 */
import 'package:community_package/src/view_models/private_community_index.model.dart';
import 'package:flutter/cupertino.dart';
import 'package:wisdom_cli/wisdom_cli.dart';

/// 小区类型标签
class TypeTag extends StatelessWidget {
  const TypeTag({
    Key? key,
    this.type,
  }) : super(key: key);
  final type;
  @override
  Widget build(BuildContext context) {
    final store =
        Provider.of<PrivateCommunityIndexStore>(context, listen: true);

    return WTag(
      child: Text('${type.name}', maxLines: 1),
      margin: EdgeInsets.only(left: 5.pt, bottom: 10.pt),
      color: store.houseType[type.code]['color'],
    );
  }
}
