/*
 * @Author: XianKaiQun
 * @Date: 2020-09-10 15:29:01
 * @LastEditors  : WuWei
 * @LastEditTime : 2023-07-24 15:16:13
 * @Description: 
 */
library oa_package;

import 'package:flutter/widgets.dart';
import 'package:get_it/get_it.dart';
import 'package:oa_package/src/pages/index/index.dart';

import 'src/pages/detail/index.dart';
import 'src/pages/management/index.dart';
import 'src/pages/process/index.dart';
import 'src/view_models/main_store.dart';
export 'src/pages/index/index.dart';

class OaPackage {
  static OaPackage? _instance;
  static OaPackage? get instance {
    _instance = _instance ?? OaPackage._();
    return _instance;
  }

  OaPackage._() {
    GetIt.I.registerLazySingleton(() => MainStore());
  }

  final Map<String, WidgetBuilder> routes = {
    'oa/index': (_) => IndexPage(),

    ///发起审批、发起记录
    'oa/process': (_) => ProcessPage(),

    ///审批管理列表
    'oa/management': (_) => ManagementPage(),

    'oa/detail': (_) => DetailPage(),
  };
}
