- 博客(302)
- 资源 (3)
- 收藏
- 关注
原创 @Builder 函数无法被刷新 UI?????
shopItem({ title: "成立时间:", subTitle: this.brandDetailBean.establishTime })shopItem({ title: "主要产品:", subTitle: this.brandDetailBean.products })shopItem({ title: "公司名称:", subTitle: this.brandDetailBean.chName })例如 非list使用 但是需要多次调用 无法刷新。改成下面的 多次使用。
2024-04-03 16:29:56
609
原创 华为鸿蒙开发记录
错误 1No module found. Make sure the project sync is completed successfully and the module is set in Edit Configuration > General。应该是项目建立的是Apishi9 ,但是 华为远程模拟器是应该建立的是 8的,导致 版本过低。
2023-11-16 17:17:37
3931
1
原创 Internal Error occurred while analyzing this expression
R.文件找不到报错 原因就是 下面的版本不匹配。以下是官网 对应版本号。
2022-09-19 15:49:25
1104
原创 Android 开发Usb知识
做佳博打印机通过usb连接 打印usb信息后 * @return 设备信息Device[mName=/dev/bus/usb/001/040,mVendorId=1137,mProductId=85,mClass=2,mSubclass=0,mProtocol=0,mManufacturerName=Zhuhai Howbest Label Printer Co.,Ltd.,mProductName=Gprinter USB Printer,mVersion=2.0,mSerialNumber=0
2022-06-22 17:44:26
859
原创 flutter下拉插件失敗Could not resolve all files for configuration ‘:classpath‘. Could not find flutter
我是拉去融云推送聊天插件失败 cn.rongcloud.sdk:im_libcore:5.1.8但是 我的其他项目 融云拉取成功了 ,所以使用以前版本就行 。rongcloud_im_plugin: ^5.1.8 但是^ 要去掉 rongcloud_im_plugin: 5.1.8这样才能网上不会拉最新版本 使用 当前文件已拉取的版本...
2022-04-09 18:01:41
2953
原创 Not Foundpackage:pub/src/http.dart 232:5 _ThrowingClient.send HTTP error 404: No
HTTP error 404: Not Foundpackage:pub/src/http.dart 232:5 _ThrowingClient.send===== asynchronous gap ===========================package:pub/src/http.dart 380:18 _ThrottleClient.send===== asynchronous gap ============...
2022-03-18 08:08:12
192
原创 NDK matched the requested version 21.0.6113669. Versions available locally: 15.0.40757
意思编译NDK缺少 21.0.6113669 所以在androidSDK 下的SDKTOOLs 下的NDK 勾选 21.0.6113669 进行下载就可以了
2022-03-18 08:03:37
1980
原创 flutter model自动生成json_annotation 问题
1 三个插件json_annotation: ^4.0.1json_serializable: ^6.1.5build_runner: ^2.1.82 建立文件model@JsonSerializable()class BaseGridViewModel extends Object { //绑定小行业文本 String smallIndText; //绑定小行业id String smallIndId; BaseGridViewModel({this.small
2022-03-15 11:39:50
4165
原创 Android studio 提示 Manifest Merger 报错
在我们开发Android或者flutter问题是 报错,可点击下面的MergerManifest 里面提示棘突错误
2022-03-07 13:31:47
2503
转载 JIT和AOT
JIT:Just In TimeAOT:Ahead of Time含义:目前,程序主要有两种运行方式:静态编译与动态解释。静态编译的程序在执行前全部被翻译为机器码,通常将这种类型称为AOT (Ahead of time compiler)即 “提前编译”;如C、C++。判断标准是:程序执行前是否需要编译。而解释执行的则是一句一句边翻译边运行,通常将这种类型称为JIT(Just-in-time)即“即时编译”。如JavaScript、Python。程序运行的方式和具体的语言没有强制关系,比如Ja
2022-02-10 15:41:23
439
原创 Dart/Flutter中的字符串(例如电话号码)中提取数字?
gfg 就是你要处理的含有数字的字符串String result = gfg.replaceAll(new RegExp(r'[^0-9]'),'');
2021-12-09 09:03:44
1605
原创 prettier 格式化无效问题
我使用的是webstorm 需要在每个新建的项目中 加一个文件.prettierrc.json (文件名称 和内容如下前面还有一个点){ "printWidth": 200, "singleQuote": false, "bracketSpacing": true, "jsxBracketSameLine": true, "htmlWhitespaceSensitivity": "ignore" } ...
2021-11-29 15:07:07
1110
原创 【无标题】Flutter代码开发规范
Skip to content代码风格标识符三种类型大驼峰类、枚举、typedef和类型参数 class SliderMenu { ... } class HttpRequest { ... } typedef Predicate = bool Function<T>(T value);包括用于元数据注释的类 class Foo { const Foo([arg]); } @Foo(anArg) clas
2021-11-19 11:56:47
264
原创 flutter 网路请求后台需要字段太多问题
可以封装成一个类 例如如下class BrandListRequestEntity { String brandId; String storeId; String classifyOne; String classifyTwo; String province; String city; String priceMin; String priceMax; String sort; String keyword; int page;
2021-10-22 11:14:08
176
原创 flutter 打包提示 插件拉取失败或者插件方法为空 无法执行
1拉取失败 可能网路问题 2插件方法为空 在android/app/build.gradle 文件中在android 中加入加入一下提示 忽略异常提示 lintOptions { disable 'InvalidPackage' checkReleaseBuilds false abortOnError false}
2021-10-18 09:16:38
914
原创 webstorm 每次新建项目 prettier 格式配置
每次都要重新配置1 复制文件到新的项目中2 配置 后 点击apply3 配置 后 点击apply
2021-09-28 11:03:09
293
原创 WebStorm 中 prettier标签尾部>被换行
我是新手 项目中 建立 这个文件VS Code Prettier + ESlint 格式化Vue代码及遇到问题 - 知乎文件内容为{ "printWidth": 200, // 最大打印宽度,超出将换行 "singleQuote": false, // 默认单引号 ,false 默认使用双引号 "bracketSpacing": true, "jsxBracketSameLine": true, "htmlWhitespaceSensitivi..
2021-09-27 17:41:00
2004
原创 webstorm配置Prettier
一、准备工作1、webstorm(2018.1及以上,直接去官网下载安装)2、Prettier3 node.js 需要安装npm(这也是软件需要先安装,再执行命令)npm install --save-dev prettier# or globallynpm install --global prettieryarm(这也是软件需要先安装,再执行命令)yarn add prettier --dev --exact# or globallyyarn global...
2021-09-27 11:25:07
2230
2
原创 Flutter系列之Container宽度自适应
Container 外部包裹 row 可实现自适应Row( mainAxisAlignment: MainAxisAlignment.center, children: <Widget>[ Container( alignment: Alignment.center, padding: EdgeInsets.symmetric(horizontal: 18.w, vertical: 8.h), margin: EdgeInsets.sy.
2021-09-23 10:01:08
1577
原创 flutter 获取何时使用 GetX<Controller>、GetBuilder<Controller> 或 Obx()
Obxwhen my controller isalready registeredelsewhere and I want minimal code/noise a reactive widgetGetXwhen my controllerisn'tyet registered or I want to be very explicit/obvious which controller is being used or I need to run someinitStatec...
2021-09-02 15:51:21
4464
2
原创 flutter 问题记录
1、Text 的 TextOverflow.ellipsis 不生效有时候我们为 Text 设置 ellipsis ,却发现并没有生效,而是出现如下图左边提示 overflowed 的警告。其实大部分时候,这是 Text 内部的 RenderParagraph 在判断 final bool didOverflowWidth = size.width < textSize.width; 时, size.width 和 textSize.width 是相等导致的。所以.
2021-08-26 10:27:55
576
原创 flutter 中async和async*有什么区别?
在Dart中两个关键字,长得很像async和async*,可能还有的朋友还不知道他们两个有什么区别。现在简单介绍一下。简单答案简单回答这个问题就是:•async返回Future.•async*返回Stream.asyncasync不必多言,有了解的都知道这是异步调用。当一个函数被标记成async的时候,意味这个方法可能要从事耗时工作,比如说网络请求、处理图片等等。被async标记的方法会把返回值用Future包裹一下。Future<int> doSomeLong
2021-08-16 11:24:30
1167
原创 flutter使用 dialog 中包含输入框 ,输入后 键盘重置数据问题
解决方法 正常使用 StatefulWidget dan返回组件 还是 dialog ,后续j可以 展示dialogclass ConsultBrandDialog extends StatefulWidget { final Function(String validCode) submitButtonCallback; //自定义咨询提示语 final String contentValue; //是否需要验证码 final bool isNeedValidCode;.
2021-08-06 10:07:27
838
原创 flutter Flexible和 Expanded的区别
Flexible 例如 如下 你定义的控件 高度是 25,但是不同的手机显示 ,尺寸可能报越界,这是用Flexible 就可以自适应高度 后,也许实际效果展示高度是 SizedBox(height:10),经常使用于自定于dialog 展示,需要输入,并且输入框 弹出时会出现越界 。Flexible( child: SizedBox(height: 25),),Expanded 就是 扩充 剩余控件的所有高度...
2021-08-06 09:24:11
409
原创 flutter 输入法 和dialog 使用崩溃问题
可能你写的没问题A RenderViewport expected a child of type RenderSliver but received a child of type RenderErrorBox不应该 ValueListenableBuilder 包裹 SliverList
2021-08-05 17:48:36
735
原创 android studio 升级到最新版本白狐4.2 r: com/a/d/d has been compiled by a more recent version of the Java Runt
nternal error. Please refer to https://code.google.com/p/android/issuesjava.lang.Exception: As a workaround, you may uninstall or update JetBrains Marketplace Support plugin at C:\Users\hp\.AndroidStudio4.0\config\plugins\marketplace at com.intellij....
2021-07-30 14:34:11
1058
2
原创 sourtree 合并某个分支上 的 某一时间段代码
例如 你想合并 master 上我的头像往后日期的代码 点击我的头像一行点击分支 就出现一个新分支 代码只包含 我的头像时间段 往后的代码块。之后再进行后续操作
2021-07-22 11:27:31
220
原创 Get 使用 You cannot add event to closed Stream
You cannot add event to closed Stream或问题 [Get] the improper use of a GetX has been detected. You should only use GetX or Obx for the specific widget that will be updated. If you are seeing this error, you probably did not insert any ob...
2021-07-16 10:45:26
1252
原创 flutter TextField设置不可编辑
///键盘回车键的样式 /** * none 为不弹出键盘 * unspecified 换行 * none 为不弹出键盘 * done 完成或者done * go 前往或者go * search 搜索或者search * send 发送或者send * next 下一项或者next * previous...
2021-07-02 09:13:30
7658
原创 flutter ListView 动态控制高度
ConstrainedBox( constraints: BoxConstraints( maxHeight: 250.h, ), child: Container( color: Colors.white, child: ListView( shrinkWrap: true, children: [ Column( mainAxisSize: MainAxisSize.min, child.
2021-05-31 15:22:19
3250
原创 flutter 动态 修改 AppBar 中 高度 内容 是否显示等
直接 用要刷新的provide 控件或者其他控制 包裹 Scaffold 我这里用的 是 Getx这个三方状态管理的控件return Obx( () => Scaffold( appBar: PreferredSize( preferredSize: Size(MediaQuery.of(context).size.width, homeSearchController.isNeedHideAppbar.value ? 45.h : 80...
2021-05-28 17:43:23
1006
原创 flutter TabBar 和TabBarVIew 并且 TabBar 实现滑动隐藏
import 'dart:math';import 'package:flutter/material.dart';import 'package:jiameng_repast/base/base_packutils.dart';const url = 'http://www.pptbz.com/pptpic/UploadFiles_6909/201203/2012031220134655.jpg';class TestPage extends StatefulWidget { stat.
2021-05-27 09:28:25
1144
原创 git 删除所有的提交记录
删除 流程 https://www.caorui.net/blog/103676337255874560.html假如 报错 如下修改后 再重新执行You are not allowed to force push code to a protected branch on this project.git报错You are not allowed to force push code to a protected branch on this project当我们有时候回滚了代码...
2021-05-13 09:12:18
275
原创 flutter app 换马甲
在公司有多个项目开发中,我们回遇到这样的问题新开一个项目,签名是否可以用之前的?Android包名修改了,仍然可用以前的签名,用什么签名与包名无关。可以直接使用以前的包名
2021-05-12 17:13:41
1271
1
转载 Flutter为不同的项目设置不同的FlutterSDK版本
来源 ----Flutter多版本,为不同的项目设置不同的FlutterSDK版本 在Flutter学习与开发过程中,我们经常会运行别人的项目或者示例来查看运行效果,但是我们我们本地有时候安装的FlutterSDK版本不合适会导致项目运行失败,那么如何解决呢? 其实解决这个问题并不难:(使用 Android Studio 为项目单独指定 Flutter SDK 版本即可。)1、首先,下载对应的FlutterSDK,解压到本地。(例如我要运行 Flutter Gallery 项目,提示我需要 .
2021-05-08 16:58:09
3005
原创 Flutter全屏效果切换使用 实现
Flutter官方自带的splash启动页是在android或者ios的文件里面设置,但是不能添加倒计时之类的效果,自己做启动页需要全屏效果显示的时候,调用SystemChrome.setEnabledSystemUIOverlays([]); 这个方法把状态栏和虚拟按键隐藏掉,跳转到其他页面后需要调用SystemChrome.setEnabledSystemUIOverlays([SystemUiOverlay.top]);把状态栏显示出来,需要一起调用底部虚拟按键(华为系列某些手机有虚拟按键),则Sys
2021-05-07 16:23:00
1325
Genymotion-ARM-TranslationforAPK.zip
2020-09-15
MyJeptDemo.zip
2019-12-26
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人