import 'package:fis_theme/theme.dart';
import 'package:fis_ui/base_define/page.dart';
import 'package:fis_ui/index.dart';
import 'package:flutter/material.dart';

///手机端设备操作页面
class MobileDeviceCardItem extends FStatelessWidget implements FPage {
  MobileDeviceCardItem({
    required this.label,
    required this.onPressed,
    this.pageName = 'MobileDeviceCardItem',
  });
  @override
  final String pageName;

  ///标题文本
  final String label;

  ///点击回调
  final VoidCallback onPressed;

  @override
  FWidget build(BuildContext context) {
    return FOutlinedButton(
      businessParent: this,
      name: "$label",
      onPressed: onPressed,
      child: FColumn(
        mainAxisSize: MainAxisSize.min,
        children: [
          FText(
            label,
            style: TextStyle(
              fontSize: 12,
              color: Colors.black,
            ),
          ),
        ],
      ),
      style: ButtonStyle(
        minimumSize: MaterialStateProperty.all(
          Size(50, 31),
        ),
        side: MaterialStateProperty.all(
          BorderSide(color: FTheme.ins.colorScheme.line, width: 0.5),
        ),
        shape: MaterialStateProperty.all(
          RoundedRectangleBorder(
            borderRadius: BorderRadius.all(
              Radius.circular(15),
            ),
          ),
        ),
      ),
    );
  }
}
