import 'package:fis_ui/index.dart';
import 'package:flutter/material.dart';
import 'package:fis_ui/base_define/page.dart';
import 'package:fis_i18n/i18n.dart';

class RetryButton extends FStatelessWidget implements FPage {
  final VoidCallback onTap;
  @override
  String get pageName => "RetryButton";

  RetryButton({required this.onTap});

  @override
  FWidget build(BuildContext context) {
    return FMouseRegion(
      cursor: SystemMouseCursors.click,
      child: FGestureDetector(
        onTap: onTap,
        name: 'retry',
        businessParent: this,
        child: FColumn(
          mainAxisAlignment: MainAxisAlignment.center,
          children: [
            FIcon(
              Icons.refresh,
              size: 30,
              color: Colors.white,
            ),
            const FSizedBox(
              height: 20,
            ),
            FText(
              i18nBook.college.retry.t,
              style: TextStyle(color: Colors.white),
            ),
          ],
        ),
      ),
    );
  }
}
