Skip to main content

ume 2.1.0 copy "ume: ^2.1.0" to clipboard
ume: ^2.1.0 copied to clipboard

Community Version of UME is an in-app debug kits platform for Flutter apps.

ume #

简体中文

[Community Version] UME is an in-app debug kits platform for Flutter apps.

platforms license

pub package pub package pub package pub package pub package

Scan QR code or click link to download apk. Try it now! https://github.com/insightop/ume/releases

There are 13 plugin kits built in the latest open source version of UME. Developer could create custom plugin kits, and integrate them into UME. Visit Develop plugin kits for UME for more details.

Please see Plugins from community to make your ume stronger.

Quick Start #

All packages whose names are prefixed with ume_kit_ are function plug-ins of UME, and users can access them according to demand

  1. Edit pubspec.yaml, and add dependencies.

    Compatible with Flutter 3 since version 1.0.0.

    dev_dependencies:
      ume: ^2.0.0
    
  2. Run flutter pub get

  3. Import packages

    import 'package:ume/ume.dart'; // UME framework
    
  4. Edit main method of your app, register plugin kits and initial UME

    void main() {
      if (kDebugMode) {
        PluginManager.instance
         // Channel monitor
         ..register(ChannelMonitor())
    
         // Channel observer
         ..register(ChannelObserver())
    
         // Clean local data
         ..register(DataCleanPanel())
    
         // Console
         ..register(Console())
    
         // Database
         ..register(DatabasePanel(databases: []))
    
         // Designer check
         ..register(DesignerCheck())
    
         // Device
         ..register(CpuInfoPage())
         ..register(DeviceInfoPanel())
    
         // Dio
         ..register(DioInspector(dio: dio))
    
         // GetConnect
         ..register(GetConnectInspector(connect: get_connect))
    
         // Memory detector
         ..register(MemoryDetectorButton())
    
         // ..register(const DBViewer())
    
         // Monitor
         ..register(MonitorPlugin())
         ..register(const MonitorActionsPlugin())
    
         // Perf
         ..register(Performance())
         ..register(MemoryInfoPage())
    
         // SharedPreferences
         ..register(SharedPreferencesInspector())
    
         // Show code
         ..register(ShowCode())
    
         // Slow animation
         ..register(SlowAnimation())
         // UI inspector
         ..register(WidgetInfoInspector())
         ..register(WidgetDetailInspector())
         ..register(ColorSucker())
         ..register(AlignRuler())
         ..register(ColorPicker())
         ..register(TouchIndicator())
    
         // Custom router
         ..register(CustomRouterPluggable());
    
        runApp(UMEWidget(child: MyApp(), enable: true));
      } else {
        runApp(MyApp());
      }
    }
    
  5. flutter run for running or flutter build apk --debug、flutter build ios --debug for building productions.

Some functions rely on VM Service, and additional parameters need to be added for local operation to ensure that it can connect to the VM Service.

Flutter 2.0.x, 2.2.x and other versions run on real devices, flutter run needs to add the --disable-dds parameter. After Pull Request #80900 merging, --disable-dds was renamed to --no-dds.

IMPORTANT #

From 0.1.1/0.2.1 version,we don't need set useRootNavigator: false. The following section only applies to versions before version 0.1.1/0.2.1 .

Since UME manages the routing stack at the top level, methods such as showDialog use rootNavigator to pop up by default, therefore must pass in the parameter useRootNavigator: false in showDialog, showGeneralDialog and other 'show dialog' methods to avoid navigator errors.

showDialog(
  context: context,
  builder: (ctx) => AlertDialog(
        title: const Text('Dialog'),
        actions: <Widget>[
          TextButton(
              onPressed: () => Navigator.pop(context),
              child: const Text('OK'))
        ],
      ),
  useRootNavigator: false); // <===== It's very IMPORTANT!

Features #

There are 13 plugin kits built in the current open source version of UME.

UI kits

Widget Info
Widget Info
Widget Detail
Widget Detail
Align Ruler
Align Ruler
Color Picker
Color Picker
Color Sucker
Color Sucker
Touch Indicator
Touch Indicator

Performance Kits

Memory Info
Memory Info
Perf Overlay
Perf Overlay

Device Info Kits

CPU Info
CPU Info
Device Info
Device Info

Show Code

Show Code
Show Code

Console

Console
Console

Dio Inspector

Dio Inspector
Dio Inspector

How to use UME in Release/Profile mode #

Once you use ume in Release/Profile mode, you agree that you will bear the relevant risks by yourself.

The maintainer of ume does not assume any responsibility for the accident caused by this.

We recommend not to use it in Release/Profile mode for the following reasons:

  1. VM Service is not available in these environments, so some functions are not available
  2. In this environment, developers need to isolate the app distribution channels by themselves to avoid submitting relevant debugging code to the production environment

In order to use in Release/Profile mode, the details that need to be adjusted in the normal access process:

  1. In pubspec.yaml, ume and plugins should be write below dependencies rather than dev_dependencies.
  2. Don't put the code which call PluginManager.instance.register() and UMEWidget(child: App()) into conditionals which represent debug mode. (Such as kDebugMode)
  3. Ensure the above details, run flutter clean and flutter pub get, then build your app.

About version #

Compatibility #

UME version 1.12.13 1.22.3 2.0.1 2.2.3 2.5.3 2.8.0 3.0.5 3.3.1
0.1.x ✅ ✅ ✅ ✅ ⚠️ ⚠️ ❌ ❌
0.2.x ❌ ❌ ✅ ✅ ✅ ⚠️ ❌ ❌
0.3.x ❌ ❌ ✅ ✅ ✅ ✅ ❌ ❌
1.0.x ❌ ❌ ⚠️ ⚠️ ⚠️ ⚠️ ✅ ✅
1.1.x ❌ ❌ ⚠️ ⚠️ ⚠️ ⚠️ ✅ ✅

⚠️ means the version has not been fully tested for compatibility.

Special case #

  • Please use ume_kit_ui: ^1.1.0 and above version when you are using Flutter 3.7 and above.

Coverage #

Package master develop develop_nullsafety
ume Coverage Coverage Coverage
ume_kit_device Coverage Coverage Coverage
ume_kit_perf Coverage Coverage Coverage
ume_kit_show_code Coverage Coverage Coverage
ume_kit_ui Coverage Coverage Coverage
ume_kit_console Coverage Coverage Coverage
ume_kit_dio Coverage N/A Coverage

Version upgrade rules #

Please refer to Semantic versions for details.

Change log #

Changelog

Contributing #

Contributing rules: Contributing

Contributors #

Thanks to the following contributors (names not listed in order):

ShirelyC ShirelyC
lpylpyleo lpylpyleo
Alex Li Alex Li
Swain Swain
mengdouer mengdouer
LAIIIHZ LAIIIHZ
XinLei XinLei
suli suli
wei-spring wei-spring

Plugins from community #

About the third-party open-source project dependencies #

  • The TouchIndicator use the pub touch_indicator, the ColorPicker use the pub cyclop.
  • We fork the package cyclop and modify some code meet our functional needs. We should depend cyclop by pub version after the PR being merged.

LICENSE #

This project is licensed under the MIT License - visit the LICENSE for details.

Contact the author #

Maybe...

  • Found a bug in the code, or an error in the documentation
  • Produces an exception when you use the UME
  • UME is not compatible with the new version Flutter
  • Have a good idea or suggestion

You can submit an issue in any of the above situations.

Maybe...

  • Communicate with the author
  • Communicate with more community developers
  • Cooperate with UME

Welcome to Join the ByteDance Flutter Exchange Group.

Or contact author.

Host app Git revision #

Replace flutter with dart run ume:flutter when running, testing or building from your app checkout:

dart run ume:flutter run --flavor dev -t lib/main_dev.dart
dart run ume:flutter build apk --release --flavor dev -t lib/main_dev.dart

Keep ume in the app dependencies (dev dependencies work). Git and Flutter must be on PATH. UME captures the app's local HEAD, branch, commit message, author, committer timestamp and dirty state, then injects temporary compiler definitions. No app-specific collection script or assets are needed. Temporary files are removed when Flutter exits; arguments, terminal streams and exit status are preserved. run, build and test receive metadata; other commands and help requests pass through. Git capture failure logs a warning and continues without revision metadata. No network or Git is needed on the installed device, including release builds.

Register PluginManager.instance.register(const GitInfo()); for the copyable panel supplied by the independent ume_kit_git package. Without injection the panel omits Git details. Dirty state records a flag, not the uncommitted diff.

For IDE breakpoint debugging, run dart run ume:git_info as a pre-launch task and add --dart-define-from-file=.dart_tool/ume_git_info.json to the launch configuration's toolArgs. The generator refreshes the file before each launch and replaces stale data with empty JSON and returns success if capture fails. See the Git guide for a full VS Code task example. The generator also accepts a custom output path.

Git Info also embeds up to five commits before the build revision (or fewer when history is limited). The current build details remain at the top, followed by a collapsed history list with short hash, subject, author and timestamp. Tap a record to copy its full hash and details. Existing CLI and IDE commands work without changes; this local history is not a diff against the previous build.

Current source integration notes #

This section adds guidance for the current checkout. Earlier documentation, examples, compatibility tables and upstream information above remain unchanged. Current APIs and SDK constraints should be checked against this checkout's code and pubspec, rather than inferred from the historical examples.

Current plugin registration example #

DeviceInfo is the current device panel. Git metadata is implemented separately in ume_kit_git and re-exported by the facade. Register the panels needed by your app before wrapping it with UMEWidget:

import 'package:ume/ume.dart';

PluginManager.instance
  ..register(DeviceInfo())
  ..register(const GitInfo());

The facade's current source SDK constraint is Dart >=3.11.0 <4.0.0. The Git APIs and commands require a matching source dependency or a package release that contains them. An unchanged local version number does not establish feature availability in the same pub.dev archive.

Git CLI and native IDE workflows #

Scenario Steps
Terminal / internal build script Replace flutter with dart run ume:flutter, retaining the remaining arguments
IDE breakpoint debugging Before launch, run dart run ume:git_info; append --dart-define-from-file=.dart_tool/ume_git_info.json to Flutter arguments

Both call the collector inside ume_kit_git from the app checkout. The wrapper uses a temporary file deleted after Flutter exits. The IDE task overwrites the persistent .dart_tool/ume_git_info.json before each launch. A capture failure continues without Git details; the IDE generator writes {} and returns success. File-write errors and Flutter errors still report failure.

Current build details appear first, followed by a collapsed list of up to five recent commits. Tap fields or records to copy. Metadata is compiled into the app; hot reload/restart do not refresh compiler definitions. Stop and run again to capture a newer revision. The installed app needs no Git, network or original JSON.

The Git icon is embedded and uses MemoryImage, so no app asset declaration is required even when UME is a dev dependency. Include the Git plugin in the desired internal release entry point; debug-only registration does not appear in release.

See the complete Git guide for standalone dependencies, Android Studio Before launch → Run Another Configuration, VS Code/Cursor, custom output paths, shallow CI history, failure behavior and troubleshooting. The repository overview documents the workspace structure and validation commands. Git tests now run in the CI package matrix, with a separate run using injected build metadata.

Plugin development notes #

Kits depend on ume_core; the facade depends on the kits it exports. Keep ume/lib/ume.dart export-only and build-time dart:io tooling in a separate CLI library. A plugin implements Pluggable, providing a unique name, visible displayName, iconImageProvider, buildWidget(context) and onTrigger(). Most built-in kits use shared embedded image bytes and MemoryImage; the menu caches icons by plugin name. PluggableWithNestedWidget additionally supplies buildNestedWidget(child) for tools wrapping the app subtree.

Current workspace development and release notes supplement the historical contribution instructions in Contributing.