05 2021 档案
摘要:只需要index list.asMap().keys.map((index) { return something; } List<String> list = ['a', 'b', 'c', 'd']; print(list.asMap()); // {0: a, 1: b, 2: c, 3: d
阅读全文
摘要:设置字体不随系统字体大小进行改变 APP全局: MaterialApp( debugShowCheckedModeBanner: false, title: 'Flutter_ScreenUtil', theme: ThemeData( primarySwatch: Colors.blue, ),
阅读全文
摘要:Flutter 屏幕适配flutter_screenutil使用心得
阅读全文
摘要:1、1.1.19版本一下的,可以设置resizeToAvoidBottomInset为false,键盘弹起不会resize。 Scaffold( appBar: AppBar(''), resizeToAvoidBottomPadding: false, //输入框抵住键盘 body:, ) 2、固
阅读全文
摘要:flutter 利用浮动按钮,实现导航栏中间放置圆形按钮效果
阅读全文
摘要:springmvc+mybatis下批量插入和批量更新
阅读全文
摘要:如何在Flutter中保存图像文件?使用Image_picker插件选择文件
阅读全文
摘要:Flutter图片选择 image_picker(官方)插件使用详解
阅读全文
摘要:Could not resolve com.android.tools.build:gradle:4.1.0-alpha01 这个是我报的错 然后就是谷歌。。。访问不了 解决方法: 1.在本地硬盘的C:\Users\Lenovo\.gradle下新建一个init.gradle的文件 内容为: all
阅读全文
摘要:Flutter从相册选择图片和相机拍照(image_picker)
阅读全文
摘要:如果正计划迁移并且保证项目能正常运行,你需要禁用健全的空安全,有2种方式 第一种:在 dart 和 flutter 命令里,加入 --no-sound-null-safety 标记禁用 $ dart --no-sound-null-safety run $ flutter run --no-soun
阅读全文
摘要:这个问题出现,是因为没有找到引用,控制台出现乱码。如: org.xml.sax.SAXParseException; systemId: file:/E:/xxx/AndroidManifest.xml; lineNumber: 49; columnNumber: 49; ��Ԫ������ "pr
阅读全文
摘要:这是因为Library项目中也定义了与主项目相同的属性,就会导致合并失败,比如都默认生成的android:label="@string/app_name" 或者 android:icon="@drawable/icon_logo" 红框中加入冲突的标签就可以解决问题 tools:replace="a
阅读全文
摘要:如下脚本设置启动参数,如题,在.vscode/launch.json文件中,红色部分设置运行参数 { // 使用 IntelliSense 了解相关属性。 // 悬停以查看现有属性的描述。 // 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid
阅读全文
摘要:Error: Cannot run with sound null safety, because the following dependencies,don't support null safety: - package:plugin_platform_interface 解决方法: Try
阅读全文
摘要:dart语言匿名函数与=>语法 => expr 等同于{ return expr; } 匿名函数的参照如下:([[Type] param1[, …]]) {codeBlock;}; 例子 (context) => HomePage(widget.isDark, themeChanger) 上面的语句
阅读全文
摘要:1.函数定义 int add(int x) { return x + 1; } 调用 add(1); 定义时函数类型可以省略 (不建议省略) 函数都有返回类型,void类型函数 实际返回null 函数可以在函数内部定义,无限嵌套 当函数只有一行表达式时,可以使用箭头简写 int add(int a)
阅读全文
摘要:I had this problem with :path_provider & aapt2-proto and fix it in this way: in project-folder/gradle/wrapper/gradle-wrapper.properties change this: d
阅读全文
摘要:Flutter入门坑一Could not resolve com.android.tools.build:gradle:3.2.1.
阅读全文
摘要:CircleAvatar( backgroundImage: NetworkImage(avatar), radius: 30, ),
阅读全文
摘要:MissingPluginException(No implementation found for method getDatabasesPath on channel com.tekartik.sqflite)
阅读全文
摘要:flutter应用打包、修改图标、启动页和app名字
阅读全文
摘要:import 'package:sqflite/sqflite.dart';// Get a location using getDatabasesPath var databasesPath = await getDatabasesPath(); String path = join(databa
阅读全文
摘要:Flutter解决神奇的ListView顶部多一段空白高度的问题
阅读全文
摘要:/** * 发现不添加Align时,CircleAvatar并没有显示为圆形, * 设置child为要显示的url时,并不能显示为圆形,只有设置backgroundColor或者backgroundImage时才显示为了圆形 * radius和minRadius与maxRadius不能同时使用; *
阅读全文
摘要:flutter 报错 DioError [DioErrorType.DEFAULT]: Bad state: Insecure HTTP is not allowed by platform
阅读全文
摘要:解决方案SingleChildScrollView 包装一下,否则键盘弹出会报空间溢出
阅读全文
摘要:flutter中行(Row)元素相互之间保持间距的几种方式?
阅读全文
摘要:github上的版本和本地版本冲突的解决方法 情景: 在github上创建项目,然后本地git init 然后没有git pull -f --all 然后git add . | git commit -am "init" 导致github上的版本里有readme文件和本地版本冲突,下面给出冲突原因:
阅读全文