registerObserve method
Register observe callback with assets changes. 注册资源(图库)变化的监听回调
Implementation
void registerObserve([ValueChanged<MethodCall>? callback]) {
if (callback == null) {
return;
}
try {
PhotoManager.addChangeCallback(callback);
PhotoManager.startChangeNotify();
} catch (e, s) {
FlutterError.presentError(
FlutterErrorDetails(
exception: e,
stack: s,
library: packageName,
silent: true,
),
);
}
}