/*
 * @Author: WuXiangNan
 * @Date: 2021-03-04 16:27:02
 * @LastEditTime: 2021-03-04 17:06:45
 * @LastEditors: WuXiangNan
 * @Description: 地勤管理
 */

import 'package:flutter/material.dart';
import 'package:wisdom_cli/wisdom_cli.dart';
import './car_manager/index.dart';
import './event_warning/index.dart';
import './member_manager/index.dart';

class IndexPage extends StatelessWidget {
  const IndexPage({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return _PageView();
  }
}

class _PageView extends StatefulWidget {
  _PageView({Key? key}) : super(key: key);

  @override
  __PageViewState createState() => __PageViewState();
}

class __PageViewState extends State<_PageView> {
  @override
  Widget build(BuildContext context) {
    final colorScheme = WTheme.of(context).colorScheme;
    return Scaffold(
      appBar: WAppBar(
        brightness: Brightness.light,
        iconTheme: IconThemeData(
          color: colorScheme.mainTitle,
          size: 19.pt,
        ),
        backgroundColor: Colors.white,
        title: WisText('海口指挥中心',
            size: 19.pt, weight: FontWeight.w600, color: colorScheme.mainTitle),
      ),
      body: WisTabPage(
        tabs: [
          WisText('人员管理'),
          WisText('车辆管理'),
          WisText('事件预警'),
        ],
        views: [
          MemberManagePage(),
          CarManagePage(),
          EventWarningPage(),
        ],
        indicator: RoundUnderlineTabIndicator(
          width: 25.pt,
        ),
      ),
    );
  }
}
