摘要:/** 设置子控件透明度 const Opacity({ Key key, @required this.opacity,//透明度,0.0 到 1.0,0.0表示完全透明,1.0表示完全不透明 this.alwaysIncludeSemantics = false, Widget child, }
阅读全文
摘要:表单 Form 引入 validation_extensions 1.0.1 三方库 使用到了Flutter 中的扩展函数 import 'package:flutter/material.dart'; import 'package:validation_extensions/validation
阅读全文
摘要:PhysicalModel ,主要的功能就是设置widget四边圆角,可以设置阴影颜色,和z轴高度 PhysicalModel({ //裁剪模式 this.clipBehavior = Clip.none, //四角圆度半径 this.borderRadius, //z轴高度 this.elevat
阅读全文
摘要:Wrap({ Key key, this.direction = Axis.horizontal,//主轴(mainAxis)的方向,默认为水平。 this.alignment = WrapAlignment.start,//主轴方向上的对齐方式,默认为start。 this.spacing = 0
阅读全文
摘要:/** * 控制child是否显示 * 当offstage为true,控件隐藏; 当offstage为false,显示; 当Offstage不可见的时候,如果child有动画等,需要手动停掉,Offstage并不会停掉动画等操作。 const Offstage({ Key key, this.off
阅读全文
摘要:参考:https://www.lizenghai.com/archives/48633.html const Listener({ Key key, this.onPointerDown, this.onPointerMove, this.onPointerEnter, this.onPointer
阅读全文
摘要:滑动条 const Slider({ Key key, @required this.value, //当前值 @required this.onChanged, //改变回调 this.onChangeStart, this.onChangeEnd, this.min = 0.0, this.ma
阅读全文
摘要:LinearProgressIndicator & CircularProgressIndicator 条形 圆形进度条 class ProgressIndicatorWidget extends StatefulWidget { ProgressIndicatorWidget({Key key})
阅读全文
摘要:受限制的Box控件 const BoxConstraints({ this.minWidth = 0.0, this.maxWidth = double.infinity, this.minHeight = 0.0, this.maxHeight = double.infinity,}); clas
阅读全文
摘要:AnimatedContainerWidget AnimatedContainer({ Key key, this.alignment, this.padding, Color color, Decoration decoration, this.foregroundDecoration, doub
阅读全文
摘要:占位控件color: Colors.blue, // 设置占位符颜色 defalutBlue Grey 70strokeWidth: 5, //设置画笔宽度fallbackHeight: 200, //设置占位符宽度fallbackWidth: 200, //设置占位符高度 import 'pack
阅读全文
摘要:Clip的相关组件: ClipOval: 圆形裁剪 ClipRRect: 圆角矩形裁剪 ClipRect:矩形裁剪 ClipPath: 路径裁剪 参数: clipper:裁剪路径 CustomClipper<Path> 的实现 class ClipWidget extends StatelessWi
阅读全文
摘要:可折叠的控件 initiallyExpanded: true, 初始是否展开 class ExpansionTileWidget extends StatelessWidget { @override Widget build(BuildContext context) { return getLv
阅读全文
摘要:动画Padding 点击之后 有动画过渡 class AnimatedPaddingWidget extends StatefulWidget { @override State<StatefulWidget> createState() => AnimatedPaddingWidgetState(
阅读全文
摘要:FadeInImage.assetNetwork({ Key key, @required String placeholder,// @required String image, AssetBundle bundle, double placeholderScale, double imageS
阅读全文
摘要:/** * 集成自Stack,用来显示第index个child, * IndexedStack({ Key key, AlignmentGeometry alignment = AlignmentDirectional.topStart, TextDirection textDirection, S
阅读全文
摘要:Stack 这个是Flutter中布局用到的组件,跟Android中FrameLayout很像,都是可以叠加的现实View。 Stack({ Key key, this.alignment = AlignmentDirectional.topStart, this.textDirection, th
阅读全文