failed to install packages: cannot download packages/p/perl-Socket-GetAddrInfo
1.2、Error [ERR_TLS_CERT_ALTNAME_INVALID]: Hostname/IP does not match certificate’s altnames: Host: dev2.api.xxx.com. is not in the cert’s altnames: DNS:dev.api.xxx.com
+ (CGImageRef)CGImageCreateDecoded:(CGImageRef)cgImage orientation:(CGImagePropertyOrientation)orientation { if (!cgImage) { returnNULL; } size_t width = CGImageGetWidth(cgImage); size_t height = CGImageGetHeight(cgImage); if (width == 0 || height == 0) returnNULL; size_t newWidth; size_t newHeight; switch (orientation) { case kCGImagePropertyOrientationLeft: case kCGImagePropertyOrientationLeftMirrored: case kCGImagePropertyOrientationRight: case kCGImagePropertyOrientationRightMirrored: { // These orientation should swap width & height newWidth = height; newHeight = width; } break; default: { newWidth = width; newHeight = height; } break; } BOOL hasAlpha = [selfCGImageContainsAlpha:cgImage]; // iOS prefer BGRA8888 (premultiplied) or BGRX8888 bitmapInfo for screen rendering, which is same as `UIGraphicsBeginImageContext()` or `- [CALayer drawInContext:]` // Though you can use any supported bitmapInfo (see: https://developer.apple.com/library/content/documentation/GraphicsImaging/Conceptual/drawingwithquartz2d/dq_context/dq_context.html#//apple_ref/doc/uid/TP30001066-CH203-BCIBHHBB ) and let Core Graphics reorder it when you call `CGContextDrawImage` // But since our build-in coders use this bitmapInfo, this can have a little performance benefit CGBitmapInfo bitmapInfo = kCGBitmapByteOrder32Host; bitmapInfo |= hasAlpha ? kCGImageAlphaPremultipliedFirst : kCGImageAlphaNoneSkipFirst; CGContextRef context = CGBitmapContextCreate(NULL, newWidth, newHeight, 8, 0, [self colorSpaceGetDeviceRGB], bitmapInfo); if (!context) { returnNULL; } // Apply transform CGAffineTransform transform = SDCGContextTransformFromOrientation(orientation, CGSizeMake(newWidth, newHeight)); CGContextConcatCTM(context, transform); CGContextDrawImage(context, CGRectMake(0, 0, width, height), cgImage); // The rect is bounding box of CGImage, don't swap width & height CGImageRef newImageRef = CGBitmapContextCreateImage(context); CGContextRelease(context); return newImageRef; }
adb: failed to install /Users/qian/Project/Bojue/app-paipal/follow_shot/build/app/outputs/flutter-apk/app.apk: Failure [INSTALL_PARSE_FAILED_MANIFEST_MALFORMED: Failed parse during installPackageLI: /data/app/vmdl1858238574.tmp/base.apk (at Binary XML file line #29): com.example.untitled.MainActivity: Targeting S+ (version 31 and above) requires that an explicit value for android:exported be defined when intent filters are present] Error: Failed to install APK again. Error launching application on sdk gphone64 arm64.
new RaisedButton( textColor: Colors.black, child: new Center( child: new Text('点击传递随机数给上层Widget'), ), onPressed: () { new TestNotification(count: new Random().nextInt(100)).dispatch(key.currentContext); }, )
3.父节点使用NotificationListener进行监听子节点发出的通知,并作出响应
1 2 3 4 5 6 7 8 9
new NotificationListener( onNotification: (TestNotification n) { scaffoldStateKey.currentState.showSnackBar(new SnackBar(content: new Text('随机数:${n.count}'))); returntrue; }, child: new TestAPage( key: key, ), )