Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

【DoKit生态场景】-描述出现的问题 #958

Open
shaoting0730 opened this issue Nov 30, 2021 · 0 comments
Open

【DoKit生态场景】-描述出现的问题 #958

shaoting0730 opened this issue Nov 30, 2021 · 0 comments
Assignees
Labels
bug Something isn't working Platform: Flutter

Comments

@shaoting0730
Copy link

shaoting0730 commented Nov 30, 2021

It is recommended to refer to the following process before submitting issues:#745
If you still cannot solve your problem, you can submit your issue according to the following template

Please complete the following informations.

Android、iOS? OS version? Brand?
Expected behavior and actual behavior.
Steps to reproduce the problem.
More informations such as error messages and stack traces are welcomed.

建议提issues之前可以参考一下DoKit社区答疑流程:#745
假如还是无法解决你的问题,你可以按照以下模板来提交你的issue

请补充如下信息。

Android 还是 iOS?系统版本是多少?手机品牌是什么?(如有)
flutter ios&android
期望的表现和实际的表现。(如有)
去除警告
问题重现的步骤。(如有)

import 'dart:io';
import 'package:aid/pages/login/login_page.dart';
import 'package:aid/pages/splash/splash_page.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'utils/languages.dart';
import 'router/app_pages.dart';
import 'router/app_routes.dart';
import 'package:aid/utils/export_library.dart';

void main() async {
  WidgetsFlutterBinding.ensureInitialized(); // Add this
  await SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);

  DoKit.runApp(
    app: DoKitApp(MyApp()),
    useInRelease: true,
    releaseAction: () => {
      HttpOverrides.global = MyHttpOverrides(),
    },
    exceptionCallback: (dynamic obj, StackTrace trace) {
      print('ttt$obj');
    },
  );
}

final GlobalKey<NavigatorState> navigatorKey = GlobalKey<NavigatorState>();

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);
  @override
  Widget build(BuildContext context) {
    return ScreenUtilInit(
      designSize: const Size(750, 1334),
      builder: () => GetMaterialApp(
        navigatorKey: navigatorKey,
        translations: Languages(), // 你的翻译
        locale: const Locale('zh', 'CN'), // 将会按照此处指定的语言翻译
        fallbackLocale: const Locale('en', 'US'), // 添加一个回调语言选项,以备上面指定的语言翻译不存在
        initialRoute: AppRoutes.SPLASH,
        getPages: AppPages.list,
        debugShowCheckedModeBanner: false,
        themeMode: ThemeMode.system,
      ),
    );
  }
}

class MyHttpOverrides extends HttpOverrides {
  @override
  HttpClient createHttpClient(SecurityContext? context) {
    return super.createHttpClient(context)..badCertificateCallback = (X509Certificate cert, String host, int port) => true;
  }
}

其他的错误信息和堆栈信息如果有也可以一并提供出来。(如有)

警告:
image

@ChasonTang ChasonTang assigned maxiee and unassigned jtsky Dec 8, 2021
@ChasonTang ChasonTang added Platform: Flutter bug Something isn't working labels Dec 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Platform: Flutter
Projects
None yet
Development

No branches or pull requests

4 participants