GithubHelp home page GithubHelp logo

fliggy-mobile / fbroadcast Goto Github PK

View Code? Open in Web Editor NEW
115.0 115.0 20.0 227 KB

FBroadcast Help developers build an efficient broadcast system in the application.

License: Other

Dart 99.45% Shell 0.55%

fbroadcast's Issues

使用此插件导致app崩溃,无响应,卡住

我在getxController init函数初始化监听广播

@override
  void onInit() {
    log('D2ImageController 正在初始化...');
    // FBroadcast.instance().register('image_loaded', (value, callback) {
    //   final _val = value as ImageLoadCompleObj;
    //   onLoadComplate(_val.index, _val);
    // });
    cleanAll();
    super.onInit();
    log('D2ImageController 初始化完成');
  }

在widget中使用,逻辑是图片加载完成后通知controller 图片的相关信息

 Widget buildBody(D2ImageController imageController, BuildContext context) {
    return Container(
      child: Padding(
        padding: const EdgeInsets.only(right: 1),
        child: Tools.image(
            key: imageController.keysMap[image],
            url: image,
            completed: (Size size) {
              // log('屏幕宽度:${Get.width},图片:$image \n 尺寸大小:$size');
              final _obj = ImageLoadCompleObj(image, size, index);
              // FBroadcast.instance().broadcast('image_loaded', value: _obj); <<
            }),
      ),
    );
  }

我发现这个代码在debug模式下是没有问题的,能正常使用,但是profile和release模式下就导致app崩溃卡住无响应,注释掉FBroadcast相关操作也能正常运行,所以我估计是插件哪里出现bug了

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.