import 'package:flutter/material.dart';
import 'package:fis_ui/index.dart';
import 'package:flyinsono/pages/auth/clause_view/view.dart';
import 'package:flyinsono/architecture/router/router.dart';
import 'package:fis_theme/theme.dart';
import 'package:fis_ui/base_define/page.dart';

/// 手机端的页面
class ClausePage extends FStatelessWidget implements FPage {
  const ClausePage({
    super.key,
    required this.title,
  });
  final String title;

  @override
  String get pageName => 'ClausePage';
  @override
  FWidget build(BuildContext context) {
    return FScaffold(
      appBar: FAppBar(
        title: FText(
          title,
          style: TextStyle(fontSize: 16),
        ),
        centerTitle: true,
        backgroundColor: FTheme.ins.colorScheme.primary,
        elevation: 0,
        leading: FIconButton(
          icon: FIcon(Icons.close_rounded),
          onPressed: () {
            router.back();
          },
          businessParent: this,
          name: "Close",
        ),
      ),
      body: FSafeArea(
        child: FCenter(
          child: ClauseViewPage(),
        ),
      ),
    );
  }
}
