/*
 * @Author: XianKaiQun
 * @Date: 2020-08-03 17:30:37
 * @LastEditors: ,: XianKaiQun
 * @LastEditTime: ,: 2020-10-20 11:34:01
 * @Description: 
 */
part of '../index.dart';

///顶部设备详情
class _DescComponent extends StatelessWidget {
  const _DescComponent({Key? key}) : super(key: key);
  @override
  Widget build(BuildContext context) {
    final store = Provider.of<PrivateRepairHandleStore>(context);
    final style = WTheme.of(context);
    final colorScheme = style.colorScheme;
    final theme = Theme.of(context);
    final textTheme = theme.textTheme;
    return Wisdom.row(
      margin: EdgeInsets.all(15.pt),
      children: <Widget>[
        Column(
          crossAxisAlignment: CrossAxisAlignment.stretch,
          children: <Widget>[
            Text(
              '${store.norm?.equipmentName ?? ''}',
              style: textTheme.titleMedium!.copyWith(
                fontWeight: FontWeight.bold,
              ),
            ),
            SizedBox(height: 5.pt),
            Text('设备编号：${store.norm?.equipmentNumber ?? ''}',
                style: textTheme.bodySmall),
          ],
        ).asExpanded(),
        WButton(
          shape: RoundedRectangleBorder(
            borderRadius: BorderRadius.circular(30.pt),
            side: BorderSide(
              color: colorScheme.primary,
            ),
          ),
          color: Colors.transparent,
          textColor: colorScheme.primary,
          onPressed: () => store.route2detail(),
          padding: EdgeInsets.symmetric(horizontal: 10.pt),
          height: 35.pt,
          child: Text('设备详情'),
        ),
      ],
    ).asSliver();
  }
}
