自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(22)
  • 资源 (3)
  • 收藏
  • 关注

原创 Flutter BUG 关于RenderBox was not laid out: RenderViewport#680c1 NEEDS-LAYOUT NEEDS-PAINT

具体原因就是:在Flutter 的Column或者Rowt内使用ListView.builder()需要对改ListView的大小进行指定.具体的解决办法就是 在该ListView.builder()外嵌套一个SizeBox或者Container即可…比如:@override Widget build(BuildContext context) { return List...

2019-11-29 18:07:13 6565 1

原创 PhysicalModel 和ClipRRect 使用和区别

PhysicalModel({ //裁剪模式 this.clipBehavior = Clip.none, //四角圆度半径 this.borderRadius, //z轴高度// this.elevation = 0.0, //设置阴影颜色 this.shadowColor = const Color(0xFF000000), })...

2019-11-27 17:13:24 234 1

原创 Flutter 自定义appbar并动态改变背景

import 'package:flutter/material.dart';import 'package:flutter_swiper/flutter_swiper.dart';const APPBAR_SCROLL_OFFSET = 100;class HomePage extends StatefulWidget { @override _HomePageState ...

2019-11-27 10:18:12 1978

原创 Unhandled Exception: inheritFromWidgetOfExactType(_LocalizationsScope) or inheritFromElement() was c

@override void initState() { super.initState(); this._getCategories(); }包裹你的网路请求方法Future.delayed(Duration.zero, () { this._getCategories();});

2019-11-22 11:21:27 1865

原创 'package:flutter/src/rendering/shifted_box.dart': Failed assertion: line 321 pos 12: 'child.hasSize'

可能 嵌套的 子项Container 需要加上高度

2019-11-22 11:20:17 4909

原创 A RenderFlex overflowed by 11 pixels on the bottom.

在使用 SliverGrid 或者其他列表中 配置item项中 childAspectRatio比例原因 ,会报错 ,应该在加上Expanded 包裹子项class HomeGridItem extends StatelessWidget { @override Widget build(BuildContext context) { return SliverGrid(...

2019-11-21 17:20:54 4539

原创 he _ScaffoldLayout custom multichild layout delegate forgot to lay out the following children:

错误写法 @override Widget build(BuildContext context) { return Scaffold( appBar: CommonAppBar.buildAppBar("首页"), body: Container( alignment: Alignment.topCenter,...

2019-11-21 16:24:22 1429

原创 flutter 迁移(来拷贝项目问题)

你可能会把以前项目依赖都拷贝过 但是圈内包名名字一定回来Removing unused resources requires unused code shrinking to be turned on. 错误记录//混淆minifyEnabled true//Zipalign优化zipAlignEnabled true//只保留这个// 资源压缩shrinkResou...

2019-11-20 18:52:50 464

原创 flutter多个可滚动widget嵌套使用报错问题:Viewports expand in the scrolling direction to fill their container

RenderCustomMultiChildLayoutBox object was given an infinite size during layout.This probably means that it is a render object that tries to be as big as possible, but it was putinside another rende...

2019-11-19 12:15:36 1505

原创 flutter 刷新 加载EasyRefresh 使用记录

使用情况 可参考官网以下记录构造器使用import 'package:flutter/material.dart';import '../ball_pulse_footer.dart';import '../ball_pulse_header.dart';import './post_show.dart';import '../model/post.dart';import...

2019-11-19 10:21:24 6935

转载 flutter项目连接不了夜神模拟器的解决方案

https://blog.csdn.net/prince70/article/details/89080614#commentBox

2019-11-19 09:50:53 411

转载 Flutter ListView 用法详解 ListView的4种构造方式

Flutter ListView 用法详解ListView的4种构造方式默认构造函数(传入 List children)ListView( children: <Widget>[ ListTile(title: Text("普通ListView")), ListTile( title: Text("ListView.build"), onTap: () { Navig...

2019-11-18 17:32:45 2872

原创 Flutter 自定义 点击无返回值的回调方法

例如下面我统一定义一个空布局,方便全部使用import 'package:flutter/cupertino.dart';import 'package:flutter/material.dart';class EmptyViewUtils { static Widget emptyViewWidget({String text, VoidCallback onClick...

2019-11-18 16:11:52 1772

原创 flutter获取状态栏高度及安全区域

上下左右安全区域Widget build(BuildContext context) { return Material( color: Colors.blue, child: SafeArea( child: SizedBox.expand( child: Card(color: Colors.yellowAccent), ),...

2019-11-18 15:48:33 2773

原创 Dart 如何优雅的避空

class Animal { final String name; Animal(this.name);}void main() { Animal animal = new Animal('cat'); Animal empty = null; //1-----------animal 非空,?.作用返回 animal.name 的值 cat prin...

2019-11-18 11:09:09 799

原创 Unhandled Exception: Looking up a deactivated widget's ancestor is unsafe.

Unhandled Exception: Looking up a deactivated widget's ancestor is unsafe. At this point the state of the widget's element tree is no longer stable. To safely refer to a widget's ancestor in its d...

2019-11-15 16:37:59 2276

转载 Flutter开发中的一些问题

https://blog.csdn.net/qq_17766199/article/details/948490201. setState() called after dispose()这个是我偶然在控制台发现的,完整的错误信息如下:This error happens if you call setState() on a State object for a widget tha...

2019-11-15 13:47:53 424

转载 flutter生命周期

Flutter跟安卓的Activity、iOS的ViewController一样拥有自己的生命周期, Flutter中一切都是Widget,渲染方式有点像H5的DOM树。 先看生命周期图:Flutter生命周期可以分为3个阶段:1、实例化组件并添加到树, 即Navigator.push;2、状态变化,即打开新的widget或者依赖的上级widget发生变化;3、从树中...

2019-11-15 13:45:44 295

原创 VsVode安装 并编译dart语言 问题

1 Dart_LoadScriptFromKernel:Thebinaryprogramdoesnotcontain'main'.是因为没保存 就runcode的原因 ,应该是 先ctrl s 再运行

2019-11-12 17:48:09 466

原创 Flutter Dialog 禁止返回键返回

在showDialog方法中,安卓机型点击返回键,barrierDismissible不能阻止dialog pop,需要传异步方法进onWillPop,示例如下:Future&lt;Null> showPermissionAlert(BuildContext context) async { return showDialog&lt;Null>( ...

2019-11-11 12:10:21 5538 1

原创 Flutter组件 等待圈CircularProgressIndicator

strokeWidth:用于绘制圆的线条的宽度。backgroundColor:背景颜色。value:如果为非null,则该进度指示器的值为0.0,对应于没有进度,1.0对应于所有进度。valueColor:动画的颜色值。在flutter中 CircleProgressIndicator 默认颜色为 主题设定的颜色。CircleProgressIndicator的参数有3种:v...

2019-11-08 12:07:31 1999

原创 Android View的ScrollBar

原文链接:http://www.cnblogs.com/frydsh/archive/2012/09/18/2691011.htmlAndroid中的View对于ScrollBar和Scroll的支持是非常灵活的,不仅仅是UI样式可变,计算参数的方式也是可变的。 在Android中,任何View都可以显示出ScrollBar,唯一的条件是自身高度不足以显示全部内容。 在UI...

2019-11-05 17:12:54 235

Baidu_Claim_unsigned

Baidu_Claim_unsigned 百度移动开放平台认领应用--apk 空包签名

2021-01-17

Genymotion-ARM-TranslationforAPK.zip

Genymotion模拟器无法直接安装APP 使用Genymotion模拟器安装APP的过程中,将我们的apk拖进去模拟器报以下错误: 解压 后 拖拽进行 重启 模拟器

2020-09-15

MyJeptDemo.zip

本App是基于谷歌推出的Android Jetpack架构组件的干货集中营, app功能很简单, 基本上是针对 LiveData ViewModel Navigation Paging 的MVVM的练手demo,更多的强大功能, 参考https://developer.android.google.cn/jetpack/docs/getting-started 中文版

2019-12-26

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除