首页
壁纸
关于
Search
1
IObit Uninstaller 注册码
2,119 阅读
2
与元素类型 "application" 相关联的属性 "tools:replace" 的前缀 "tools" 未绑定。
336 阅读
3
常用的开源API记录
181 阅读
4
flutter 隐藏中间省略号
177 阅读
5
诗集收藏•明:陈曦/高启
147 阅读
默认
开发
随记
工具
游戏
番剧
关于猫的随笔
登录
Search
路过的假面骑士
累计撰写
87
篇文章
累计收到
2
条评论
首页
栏目
默认
开发
随记
工具
游戏
番剧
关于猫的随笔
页面
壁纸
关于
搜索到
58
篇与
的结果
2021-10-12
开发日记:全面屏移除底部的白色横条
开发时,使用小米10测试发现,小米10底部有个烦人的白条底边通过修改配置文件去除更新:最终不建议这样做,因为这样做应用在有虚拟按键下底部显示不太好,在代码层去做判断是否隐藏白边更好1.注释掉AndroidManifest.xml下的:<meta-data android:name="io.flutter.embedding.android.NormalTheme" android:resource="@style/NormalTheme" />2.styles.xml配置文件下增加<item name="android:windowTranslucentNavigation">true</item>
2021年10月12日
82 阅读
0 评论
0 点赞
2021-09-15
Flutter-浏览器
import 'package:flutter_inappwebview/flutter_inappwebview.dart'; class commonAppWebView extends StatefulWidget { final String url; final String? appbartitle; const commonAppWebView({Key? key, required this.url, this.appbartitle}) : super(key: key); @override State<commonAppWebView> createState() => _commonAppWebViewState(); } class _commonAppWebViewState extends State<commonAppWebView> { final GlobalKey webViewKey = GlobalKey(); InAppWebViewController? webViewController; int httpcode = 200; double loadprogress = 0; InAppWebViewGroupOptions options = InAppWebViewGroupOptions( crossPlatform: InAppWebViewOptions( useShouldOverrideUrlLoading: true, mediaPlaybackRequiresUserGesture: false, ), android: AndroidInAppWebViewOptions( useHybridComposition: true, ), ios: IOSInAppWebViewOptions( allowsInlineMediaPlayback: true, )); @override void initState() { super.initState(); } @override void dispose() { super.dispose(); } @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar( title: Text(widget.appbartitle == null ? '' : '${widget.appbartitle}'), leading: IconButton( icon: Icon(Icons.navigate_before_rounded), onPressed: () { Get.back(); }, ), actions: [ IconButton( onPressed: () { Get.back(); }, icon: Icon(Icons.close_rounded), ) ], ), body: Stack( alignment: Alignment.topCenter, children: [ httpcode == 200 ? WillPopScope( onWillPop: () async { Future<bool> canGoBack = webViewController!.canGoBack(); canGoBack.then((value) { if (value) { webViewController!.goBack(); } else { Get.back(); } }); return false; }, child: Padding( padding: EdgeInsets.all(0), child: InAppWebView( key: webViewKey, initialOptions: options, onWebViewCreated: (controller) { setState(() { webViewController = controller; }); }, initialUrlRequest: URLRequest(url: Uri.parse('${widget.url}')), onLoadError: (controller, url, code, message) { setState(() { httpcode = code; }); }, onLoadHttpError: (controller, url, statusCode, description) {}, onProgressChanged: (controller, progress) { setState(() { loadprogress = double.parse(progress.toString()); }); }, shouldOverrideUrlLoading: (controller, navigationAction) async { String url = navigationAction.request.url.toString(); if (![ // "http", // "https", "file", "chrome", "data", "javascript", "about", ].contains(url)) { launchUrlString(url, mode: LaunchMode.externalApplication); return NavigationActionPolicy.CANCEL; } return NavigationActionPolicy.ALLOW; }, ), ), ) : Center( child: GestureDetector( behavior: HitTestBehavior.opaque, onTap: () { setState(() { httpcode = 200; loadprogress = 0; }); webViewController!.loadUrl( urlRequest: URLRequest(url: Uri.parse(widget.url))); }, child: Image.asset( 'assets/images/1655122521085.png', width: 180.w, height: 180.h, ), ), ), Visibility( visible: loadprogress == 100 || httpcode != 200 ? false : true, child: LinearProgressIndicator( color: appColor.Primarythree, backgroundColor: appColor.Neutralgarydeep, minHeight: 2.h, value: loadprogress, ), ), Visibility( visible: loadprogress == 100 || httpcode != 200 ? false : true, child: Center( child: LoadingAnimationWidget.inkDrop( size: 20, color: appColor.Primarythree, ), ), ), ], ), ); } }
2021年09月15日
61 阅读
0 评论
0 点赞
2021-06-01
代码块记录:黑色遮罩
Container( width: 1.sw, height: 200.h, child: ShaderMask( shaderCallback: (Rect bounds) { return LinearGradient( colors: [ Colors.black.withOpacity(0.45), Colors.transparent, ], begin: Alignment.bottomCenter, end: Alignment.topCenter, stops: [0.0, 0.45], tileMode: TileMode.clamp, ).createShader(bounds); }, blendMode: BlendMode.darken, child: CachedNetworkImage( imageUrl: baseinfo.bannerinfo[index] ['covers'], fit: BoxFit.cover, ), ), ),
2021年06月01日
8 阅读
0 评论
0 点赞
2021-05-18
webview的返回上一页面,而不是直接返回上层
包裹一层willpopscopeWebViewController webViewController;WillPopScope( onWillPop: () async { Future<bool> canGoBack = webViewController!.canGoBack(); canGoBack.then((value) { if (value) { webViewController!.goBack(); } else { Get.back(); } }); return false; }, child: Widget()
2021年05月18日
16 阅读
0 评论
0 点赞
2021-05-16
解决The number of method references in a .dex file cannot exceed 64K的问题
在build.gradle defaultConfig中加入 multiDexEnabled truedefaultConfig { multiDexEnabled true }
2021年05月16日
16 阅读
0 评论
0 点赞
1
...
10
11
12