/*
 * @Author       : WuWei
 * @LastEditors: wuwei 
 * @Date         : 2022-08-22 10:48:59
 * @LastEditTime: 2025-03-13 14:55:14
 * @Description  : Do not edit
 */

import 'dart:io';

import 'package:app_package/app_package.dart';
import 'package:flutter/services.dart';
import 'package:flutter/widgets.dart';
import 'package:nested/nested.dart';
import 'package:provider/single_child_widget.dart';
// import 'package:jpush_flutter/jpush_flutter.dart';

// 引入地理定位
import 'package:bill_package/bill_package.dart' as bill_package;
import 'package:task_package/task_package.dart' as task_package;
// import 'package:track_package/track_package.dart' as track_package;
import 'package:news_package/news_package.dart' as news_package;
import 'package:search_package/search_package.dart' as search_package;
import 'package:notice_package/notice_package.dart' as notice_package;
import 'package:repair_package/repair_package.dart' as repair_package;
import 'package:report_package/report_package.dart' as report_package;
import 'package:overdue_package/overdue_package.dart' as overdue_package;
import 'package:service_center_package/service_center_package.dart'
    as service_center_package;

import 'package:receipt_package/receipt_package.dart' as receipt_package;
import 'package:pay_package/pay_package.dart' as pay_package;
import 'package:pay_record_package/pay_record_package.dart'
    as pay_record_package;

import 'package:qrcode_package/qrcode_package.dart' as qrcode_package;
import 'package:face_package/face_package.dart' as face_package;
import 'package:intelligent_package/intelligent_package.dart'
    as intelligent_package;

import 'package:service_package/service_package.dart' as service_package;
import 'package:dynamic_package/dynamic_package.dart' as dynamic_package;
import 'package:metered_package/metered_package.dart' as metered_package;
import 'package:community_package/community_package.dart' as community_package;
import 'package:oa_package/oa_package.dart' as oa_package;
import 'package:attendance_package/attendance_package.dart'
    as attendance_package;
import 'package:cabinet_package/cabinet_package.dart' as cabinet_packaage;
import 'package:smart_devices_package/smart_devices_package.dart'
    as smart_devices_package;
import 'package:statistics_package/statistics_package.dart'
    as statistics_package;

void entry({required bool isProdEnv}) {
  // JPush().setAuth(enable: false);
  Map<String, WidgetBuilder> routes = {
    ...bill_package.routes, //收费管理
    ...task_package.routes, //任务管理
    // ...track_package.routes, //地勤管理
    ...news_package.routes, //行业资讯
    ...search_package.routes, //信息查询
    ...notice_package.routes, //通知公告
    ...repair_package.routes, //报修管理
    ...receipt_package.routes, //手机收单
    ...report_package.routes, //反馈管理
    ...overdue_package.routes, //超期工单监控
    ...service_center_package.routes, // 企业客服中心
    ...pay_package.routes, //缴费记录
    ...pay_record_package.routes, // 收支记录
    ...qrcode_package.routes, //二维码相关
    ...face_package.routes, // 人脸通行
    ...intelligent_package.routes, //智能表管理
    ...service_package.routes, //客服工作台
    ...dynamic_package.routes, //服务动态
    ...metered_package.routes, //手机抄表
    ...community_package.routes, //小区管理
    ...attendance_package.routes, //考勤管理
    ...oa_package.OaPackage.instance!.routes, //oa审批（协同办公）
    ...cabinet_packaage.routes, //文件柜
    ...smart_devices_package.routes, // 智能设备
    ...statistics_package.routes, // 房管数据
  };
  List<SingleChildWidget> providers = [
    ...bill_package.providers, //收费管理
  ];
  WidgetsFlutterBinding.ensureInitialized();
  HttpClient.enableTimelineLogging = true;
  // JPush().setAuth(enable: false);

  /// 强制竖屏
  SystemChrome.setPreferredOrientations(
      [DeviceOrientation.portraitUp, DeviceOrientation.portraitDown]);
  // 初始化
  appMain(
    routes: routes,
    providers: providers,
    isProdEnv: isProdEnv,
  );
}
