This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Thanks to: https://gist.github.com/bennyhuo/af7c43cc4831661193605e124f539942 | |
val urlMappings = mapOf( | |
"https://dl.google.com/dl/android/maven2" to "https://mirrors.tencent.com/nexus/repository/maven-public/", | |
"https://repo.maven.apache.org/maven2" to "https://mirrors.tencent.com/nexus/repository/maven-public/", | |
"https://plugins.gradle.org/m2" to "https://mirrors.tencent.com/nexus/repository/gradle-plugins/" | |
) | |
fun RepositoryHandler.mirroring() { | |
all { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
void main() => runApp(MyApp()); | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( | |
title: 'Flutter Demo', | |
debugShowCheckedModeBanner: false, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
typedef OnMySliverAppBarScroll = void Function(double shrinkOffset); | |
///Sliver App bar | |
class MySliverAppBar extends StatefulWidget { | |
final Color backgroundColor; | |
final double expandedHeight; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-(void)getPixelBuffer:(CVPixelBufferRef *)pbuf { | |
@synchronized (self) { | |
if(!_pFrame || !_pFrame->data[0]) | |
return; | |
NSDictionary *options = [NSDictionary dictionaryWithObjectsAndKeys: | |
// [NSNumber numberWithBool:YES], kCVPixelBufferCGImageCompatibilityKey, | |
// [NSNumber numberWithBool:YES], kCVPixelBufferCGBitmapContextCompatibilityKey, | |
@(_pFrame->linesize[0]), kCVPixelBufferBytesPerRowAlignmentKey, |