Flutter ume 调试工具使用。

pub:https://pub.dev/packages/flutter_ume

1.引入依赖
dev_dependencies:
  flutter_ume: ^1.0.1
  flutter_ume_kit_ui: ^1.0.0
  flutter_ume_kit_device: ^1.0.0
  flutter_ume_kit_perf: ^1.0.0
  flutter_ume_kit_show_code: ^1.0.0
  flutter_ume_kit_console: ^1.0.0
  flutter_ume_kit_dio: ^1.0.0



2.使用
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
import 'package:flutter_ume/flutter_ume.dart';
import 'package:flutter_ume_kit_console/flutter_ume_kit_console.dart';
import 'package:flutter_ume_kit_device/flutter_ume_kit_device.dart';
import 'package:flutter_ume_kit_perf/flutter_ume_kit_perf.dart';
import 'package:flutter_ume_kit_show_code/flutter_ume_kit_show_code.dart';
import 'package:flutter_ume_kit_ui/flutter_ume_kit_ui.dart';
import 'package:get/get.dart';

import 'app/routes/app_pages.dart';

void main() {
  if (kDebugMode) {
    PluginManager.instance // 注册插件
      ..register(WidgetInfoInspector())
      ..register(WidgetDetailInspector())
      ..register(ColorSucker())
      ..register(AlignRuler())
      ..register(ColorPicker()) // 新插件
      ..register(TouchIndicator()) // 新插件
      ..register(Performance())
      ..register(ShowCode())
      ..register(MemoryInfoPage())
      ..register(CpuInfoPage())
      ..register(DeviceInfoPanel())
      ..register(Console());
    // ..register(DioInspector(dio: dio));                  // 传入你的 Dio 实例
    // flutter_ume 0.3.0 版本之后
    runApp(
      UMEWidget(
        enable: true,
        child: GetMaterialApp(
          title: "Application",
          initialRoute: AppPages.INITIAL,
          getPages: AppPages.routes,
        ),
      ),
    ); // 初始化
  } else {
    runApp(
      GetMaterialApp(
        title: "Application",
        initialRoute: AppPages.INITIAL,
        getPages: AppPages.routes,
      ),
    );
  }
}
图片[1]-Flutter ume 调试工具使用。-IT网络技术分享
THE END
喜欢就支持一下吧
点赞5 分享