• Stars
    star
    2,001
  • Rank 22,170 (Top 0.5 %)
  • Language
    Dart
  • License
    MIT License
  • Created almost 3 years ago
  • Updated 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

UME is an in-app debug kits platform for Flutter. Produced by Flutter Infra team of ByteDance

flutter_ume

简体中文

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

platforms license

pub package pub package pub package pub package pub package

Since ^1.0.0, flutter_ume starts adapting to the Flutter 3. See [Quick Start] to learn more.

banner

Scan QR code or click link to download apk. Try it now! https://github.com/bytedance/flutter_ume/releases/download/v0.2.1.0/app-debug.apk

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 flutter_ume stronger.

Quick Start

All packages whose names are prefixed with flutter_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:
      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

    ↓ Null-safety version, compatible with Flutter 2.x

    dev_dependencies: # Don't use UME in release mode
      flutter_ume: ^0.3.0+1
      flutter_ume_kit_ui: ^0.3.0+1
      flutter_ume_kit_device: ^0.3.0
      flutter_ume_kit_perf: ^0.3.0
      flutter_ume_kit_show_code: ^0.3.0
      flutter_ume_kit_console: ^0.3.0
      flutter_ume_kit_dio: ^0.3.0

    ↓ Non-null-safety version, compatible with Flutter 1.x

    dev_dependencies: # Don't use UME in release mode
      flutter_ume: ^0.1.1
      flutter_ume_kit_ui: ^0.1.1
      flutter_ume_kit_device: ^0.1.1
      flutter_ume_kit_perf: ^0.1.1
      flutter_ume_kit_show_code: ^0.1.1
      flutter_ume_kit_console: ^0.1.1 
  2. Run flutter pub get

  3. Import packages

    import 'package:flutter_ume/flutter_ume.dart'; // UME framework
    import 'package:flutter_ume_kit_ui/flutter_ume_kit_ui.dart'; // UI kits
    import 'package:flutter_ume_kit_perf/flutter_ume_kit_perf.dart'; // Performance kits
    import 'package:flutter_ume_kit_show_code/flutter_ume_kit_show_code.dart'; // Show Code
    import 'package:flutter_ume_kit_device/flutter_ume_kit_device.dart'; // Device info
    import 'package:flutter_ume_kit_console/flutter_ume_kit_console.dart'; // Show debugPrint
    import 'package:flutter_ume_kit_dio/flutter_ume_kit_dio.dart'; // Dio Inspector
  4. Edit main method of your app, register plugin kits and initial UME

    void main() {
      if (kDebugMode) {
        PluginManager.instance                                 // Register plugin kits
          ..register(WidgetInfoInspector())
          ..register(WidgetDetailInspector())
          ..register(ColorSucker())
          ..register(AlignRuler())
          ..register(ColorPicker())                            // New feature
          ..register(TouchIndicator())                         // New feature
          ..register(Performance())
          ..register(ShowCode())
          ..register(MemoryInfoPage())
          ..register(CpuInfoPage())
          ..register(DeviceInfoPanel())
          ..register(Console())
          ..register(DioInspector(dio: dio));                  // Pass in your Dio instance
        // After flutter_ume 0.3.0
        runApp(UMEWidget(child: MyApp(), enable: true));
        // Before flutter_ume 0.3.0
        runApp(injectUMEWidget(child: MyApp(), enable: true));
      } else {
        runApp(MyApp());
      }
    }
  5. flutter run for running or flutter build apk --debugflutter 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

Develop plugin kits for UME

UME plugins are located in the ./kits directory, and each one is a package. You can refer to the example in ./custom_plugin_example about this chapter.

  1. Run flutter create -t package custom_plugin to create your custom plugin kit, it could be package or plugin.

  2. Edit pubspec.yaml of the custom plugin kit to add UME framework dependency.

    dependencies:
      flutter_ume: '>=0.3.0 <0.4.0'
  3. Create the class of the plugin kit which should implement Pluggable.

    import 'package:flutter_ume/flutter_ume.dart';
    
    class CustomPlugin implements Pluggable {
      CustomPlugin({Key key});
    
      @override
      Widget buildWidget(BuildContext context) => Container(
        color: Colors.white
        width: 100,
        height: 100,
        child: Center(
          child: Text('Custom Plugin')
        ),
      ); // The panel of the plugin kit
    
      @override
      String get name => 'CustomPlugin'; // The name of the plugin kit
    
      @override
      String get displayName => 'CustomPlugin';
    
      @override
      void onTrigger() {} // Call when tap the icon of plugin kit
    
      @override
      ImageProvider<Object> get iconImageProvider => NetworkImage('url'); // The icon image of the plugin kit
    }
  4. Use your custom plugin kit in project

    1. Edit pubspec.yaml of host app project to add custom_plugin dependency.

      dev_dependencies:
        custom_plugin:
          path: path/to/custom_plugin
    2. Run flutter pub get

    3. Import package

      import 'package:custom_plugin/custom_plugin.dart';
  5. Edit main method of your app, register your custom_plugin plugin kit

    if (kDebugMode) {
      PluginManager.instance
        ..register(CustomPlugin());
      runApp(
        UMEWidget(
          child: MyApp(), 
          enable: true
        )
      );
    } else {
      runApp(MyApp());
    }
  6. Run your app

Access the nested widget debug kits quickly

We introduce the PluggableWithNestedWidget from 0.3.0. It is used to insert nested Widgets in the Widget tree and quickly access embedded kits with nested widget.

For more details, see ./kits/flutter_ume_kit_ui/lib/components/color_picker/color_picker.dart and ./kits/flutter_ume_kit_ui/lib/components/touch_indicator/touch_indicator.dart.

The key steps are as follows:

  1. The class of your plugin should implement PluggableWithNestedWidget.
  2. Implements Widget buildNestedWidget(Widget child). Handling the nested widgets and returning the new Widget.

How to use UME in Release/Profile mode

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

The maintainer of flutter_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, flutter_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 flutter_ume_kit_ui: ^1.1.0 and above version when you are using Flutter 3.7 and above.

Coverage

Package master develop develop_nullsafety
flutter_ume Coverage Coverage Coverage
flutter_ume_kit_device Coverage Coverage Coverage
flutter_ume_kit_perf Coverage Coverage Coverage
flutter_ume_kit_show_code Coverage Coverage Coverage
flutter_ume_kit_ui Coverage Coverage Coverage
flutter_ume_kit_console Coverage Coverage Coverage
flutter_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.

More Repositories

1

IconPark

🍎Transform an SVG icon into multiple themes, and generate React icons,Vue icons,svg icons
TypeScript
7,890
star
2

xgplayer

A HTML5 video player with a parser that saves traffic
JavaScript
7,820
star
3

sonic

A blazingly fast JSON serializing & deserializing library
Assembly
6,268
star
4

byteps

A high performance and generic framework for distributed DNN training
Python
3,547
star
5

monoio

Rust async runtime based on io-uring.
Rust
3,366
star
6

lightseq

LightSeq: A High Performance Library for Sequence Processing and Generation
C++
3,098
star
7

ByteX

ByteX is a bytecode plugin platform based on Android Gradle Transform API and ASM. 字节码插件开发平台
Java
2,865
star
8

AlphaPlayer

AlphaPlayer is a video animation engine.
Java
2,090
star
9

Elkeid

Elkeid is an open source solution that can meet the security requirements of various workloads such as hosts, containers and K8s, and serverless. It is derived from ByteDance's internal best practices.
Go
2,078
star
10

scene

Android Single Activity Applications framework without Fragment.
Java
2,024
star
11

terarkdb

A RocksDB compatible KV storage engine with better performance
C++
1,989
star
12

bhook

🔥 ByteHook is an Android PLT hook library which supports armeabi-v7a, arm64-v8a, x86 and x86_64.
C
1,923
star
13

btrace

🔥🔥 btrace(AKA RheaTrace) is a high performance Android trace tool which is based on Perfetto, it support to define custom events automatically during building apk and using bhook to provider more native events like Render/Binder/IO etc.
Kotlin
1,812
star
14

bitsail

BitSail is a distributed high-performance data integration engine which supports batch, streaming and incremental scenarios. BitSail is widely used to synchronize hundreds of trillions of data every day.
Java
1,579
star
15

gopkg

Universal Utilities for Go
Go
1,534
star
16

go-tagexpr

An interesting go struct tag expression syntax for field validation, etc.
Go
1,470
star
17

android-inline-hook

🔥 ShadowHook is an Android inline hook library which supports thumb, arm32 and arm64.
C
1,445
star
18

GiantMIDI-Piano

Python
1,431
star
19

appshark

Appshark is a static taint analysis platform to scan vulnerabilities in an Android app.
Kotlin
1,363
star
20

piano_transcription

Python
1,247
star
21

AabResGuard

The tool of obfuscated aab resources.(Android app bundle资源混淆工具)
Java
1,247
star
22

CodeLocator

Kotlin
1,163
star
23

BoostMultiDex

BoostMultiDex is a solution for quickly loading multiple dex files on low Android version devices (4.X and below, SDK <21).
Java
1,106
star
24

music_source_separation

Python
1,039
star
25

Fastbot_Android

Fastbot(2.0) is a model-based testing tool for modeling GUI transitions to discover app stability problems
C++
971
star
26

memory-leak-detector

C
919
star
27

fedlearner

A multi-party collaborative machine learning framework
Python
877
star
28

SALMONN

SALMONN: Speech Audio Language Music Open Neural Network
Python
786
star
29

godlp

sensitive information protection toolkit
Go
770
star
30

monolith

ByteDance's Recommendation System
Python
765
star
31

sonic-cpp

A fast JSON serializing & deserializing library, accelerated by SIMD.
C++
747
star
32

tailor

C
669
star
33

RealRichText

A Tricky Solution for Implementing Inline-Image-In-Text Feature in Flutter.
Dart
657
star
34

guide

A new feature guide component by react 🧭
TypeScript
639
star
35

ibot

iBOT 🤖: Image BERT Pre-Training with Online Tokenizer (ICLR 2022)
Jupyter Notebook
608
star
36

MVDream

Multi-view Diffusion for 3D Generation
Python
588
star
37

magic-microservices

Make Web Components easier and powerful!😘
TypeScript
556
star
38

Fastbot_iOS

About Fastbot(2.0) is a model-based testing tool for modeling GUI transitions to discover app stability problems
Objective-C
537
star
39

res-adapter

Official implementation of "ResAdapter: Domain Consistent Resolution Adapter for Diffusion Models".
Python
508
star
40

mockey

a simple and easy-to-use golang mock library
Go
494
star
41

effective_transformer

Running BERT without Padding
C++
439
star
42

Next-ViT

Python
426
star
43

flow-builder

A highly customizable streaming flow builder.
TypeScript
421
star
44

unpub

Self-hosted private Dart Pub server for Enterprise
Dart
411
star
45

ByteTransformer

optimized BERT transformer inference on NVIDIA GPU. https://arxiv.org/abs/2210.03052
C++
407
star
46

MVDream-threestudio

3D generation code for MVDream
Python
397
star
47

matxscript

A high-performance, extensible Python AOT compiler.
C++
389
star
48

syllepsis

Syllepsis is an out-of-the-box rich text editor.
TypeScript
338
star
49

bytemd

ByteMD v1 repository
TypeScript
336
star
50

OMGD

Online Multi-Granularity Distillation for GAN Compression (ICCV2021)
Python
323
star
51

uss

Python
306
star
52

neurst

Neural end-to-end Speech Translation Toolkit
Python
293
star
53

byteir

A model compilation solution for various hardware
MLIR
291
star
54

danmu.js

HTML5 danmu (danmaku) plugin for any DOM element
JavaScript
273
star
55

CloudShuffleService

Cloud Shuffle Service(CSS) is a general purpose remote shuffle solution for compute engines, including Spark/Flink/MapReduce.
Java
231
star
56

g3

Enterprise-oriented Generic Proxy Solutions
Rust
227
star
57

lynx-llm

paper: https://arxiv.org/abs/2307.02469 page: https://lynx-llm.github.io/
Python
225
star
58

xgplayer-vue

Vue component for xgplayer, a HTML5 video player with a parser that saves traffic
JavaScript
219
star
59

vArmor

vArmor is a cloud native container sandbox based on AppArmor/BPF/Seccomp. It also includes multiple built-in protection rules that are ready to use out of the box.
Go
214
star
60

particle-sfm

ParticleSfM: Exploiting Dense Point Trajectories for Localizing Moving Cameras in the Wild. ECCV 2022.
C++
213
star
61

trace-irqoff

Interrupts-off or softirqs-off latency tracer
C
195
star
62

ParaGen

ParaGen is a PyTorch deep learning framework for parallel sequence generation.
Python
180
star
63

AWERTL

An non-invasive iOS framework for quickly adapting Right-To-Left style UI
Objective-C
172
star
64

Bytedance-UnionAD

Ruby
164
star
65

react-model

The next generation state management library for React
TypeScript
162
star
66

keyhouse

Keyhouse is a skeleton of general-purpose Key Management System written in Rust.
Rust
162
star
67

LargeBatchCTR

Large batch training of CTR models based on DeepCTR with CowClip.
Python
153
star
68

primus

Java
148
star
69

diat

A CLI tool to help with diagnosing Node.js processes basing on inspector.
JavaScript
141
star
70

ic_flow_platform

IFP (ic flow platform) is an integrated circuit design flow platform, mainly used for IC process specification management and data flow contral.
Python
137
star
71

Hammer

An efficient toolkit for training deep models.
Python
136
star
72

DanmakuRenderEngine

DanmakuRenderEngine is a lightweight and scalable Android danmaku library. 轻量级高扩展安卓弹幕渲染引擎
Kotlin
127
star
73

ns-x

An easy-to-use, flexible network simulator library in Go.
Go
116
star
74

pv3d

Python
113
star
75

fc-clip

This repo contains the code for our paper Convolutions Die Hard: Open-Vocabulary Segmentation with Single Frozen Convolutional CLIP
Python
109
star
76

RLFN

Winner of runtime track in NTIRE 2022 challenge on Efficient Super-Resolution
Python
106
star
77

trace-noschedule

Trace noschedule thread
C
99
star
78

DCFrame

DCFrame is a powerful UI collection framework, which can easily create complex UI.
Swift
96
star
79

TWIST

Official codes: Self-Supervised Learning by Estimating Twin Class Distribution
Python
95
star
80

tar-wasm

A faster experimental wasm-based tar implementation for browsers.
Rust
94
star
81

magic-portal

⚡ A blazing fast micro-component and micro-frontend solution uses web-components under the hood.
TypeScript
90
star
82

xgplayer-react

React component for xgplayer, a HTML5 video player with a parser that saves traffic
JavaScript
84
star
83

fe-foundation

UI Foundation for React Hooks and Vue Composition Api
TypeScript
81
star
84

nnproxy

Scalable NameNode RPC Proxy for HDFS Federation
Java
79
star
85

dbatman

Go
74
star
86

Elkeid-HUB

Elkeid HUB is a rule/event processing engine maintained by the Elkeid Team that supports streaming/offline (not yet supported by the community edition) data processing. The original intention is to solve complex data/event processing and external system linkage requirements through standardized rules.
Python
74
star
87

FreeSeg

Python
69
star
88

pull_to_refresh

Flutter pull_to_refresh widget
Dart
67
star
89

ByteMLPerf

AI Accelerator Benchmark focuses on evaluating AI Accelerators from a practical production perspective, including the ease of use and versatility of software and hardware.
Python
63
star
90

Jeddak-DPSQL

DPSQL (Privacy Protection SQL Query Service) - This project is a microservice Middleware located between the database engine ( Hive , Clickhouse , etc.) and the application system. It provides transparent SQL query result desensitization capabilities.
Python
62
star
91

trace-runqlat

C
61
star
92

kernel

ByteDance kernel for use on cloud.
C
57
star
93

terark-zip

A data structure and algorithm library built for TerarkDB
C++
56
star
94

scroll_kit

Dart
54
star
95

ovs-dpdk

This is a fork of Open vSwitch, we focus DPDK based Open vSwitch
C
50
star
96

RangersAppLog

Bytedance AppLog SDK
Objective-C
47
star
97

kvm-utils

C
47
star
98

arishem

A high performance and lightweight rule engine written by Golang.
Go
46
star
99

markov-molecular-sampling

Python
46
star
100

node-unix-socket

Unix dgram, seqpacket, etc binding for Node.js.
Rust
46
star