随笔分类 -  flutter+dart

上一页 1 2 3 4 5 6 7 ··· 9 下一页
摘要:import 'package:flutter/material.dart'; import 'dart:io'; import 'dart:async'; import 'package:rxdart/rxdart.dart'; import 'package:path_provider/path_provider.dart'; import 'package:path/path.dart... 阅读全文
posted @ 2019-05-20 13:52 CrossPython 阅读(263) 评论(0) 推荐(0)
摘要:https://stackoverflow.com/questions/12682269/how-do-you-run-an-interactive-process-in-dart The test below attempts to run the less pager command and r 阅读全文
posted @ 2019-05-20 10:05 CrossPython 阅读(360) 评论(0) 推荐(0)
摘要:有点意思, 阅读全文
posted @ 2019-05-17 12:19 CrossPython 阅读(130) 评论(0) 推荐(0)
摘要:不要在一个屋檐下.... 阅读全文
posted @ 2019-05-17 11:14 CrossPython 阅读(154) 评论(0) 推荐(0)
摘要:main(){ List a = [ 0,2,0,2, 0,0,4,4, 2,0,4,0, 2,4,0,2 ]; List temp = right(a); //change to others later, List result = [[],[],[],[]]; for(int i=0; i<16; i++){ resu... 阅读全文
posted @ 2019-05-16 21:30 CrossPython 阅读(436) 评论(0) 推荐(0)
摘要:child: GestureDetector( onHorizontalDragEnd: (endDetails){ double velocity = endDetails.primaryVelocity; if (velocity < 0) { ... 阅读全文
posted @ 2019-05-16 11:20 CrossPython 阅读(456) 评论(0) 推荐(0)
摘要:https://medium.com/flutter-community/a-deep-dive-into-draggable-and-dragtarget-in-flutter-487919f6f1e4 This article is the sixth in a series of articl 阅读全文
posted @ 2019-05-16 09:55 CrossPython 阅读(646) 评论(0) 推荐(0)
摘要:方法一 使用alignment配合FractionalOffset:对于FractionalOffset的参数,我是这么理解的:相当于比例,第一个代表横向的权重,第二个代表竖向的权重,横0.9代表在横向十分之九的位置,竖0.1代表在竖向十分之一的位置 方法二 使用定位组件Positioned,其中的 阅读全文
posted @ 2019-05-16 09:40 CrossPython 阅读(396) 评论(0) 推荐(0)
摘要:return Scaffold( appBar: AppBar( elevation: 0.0, title: new Text("登陆"), ), resizeToAvoidBottomPadding: false, //输入框抵住键盘); 阅读全文
posted @ 2019-05-15 17:34 CrossPython 阅读(1666) 评论(0) 推荐(0)
摘要:https://www.jianshu.com/p/d68278d19f79 阅读全文
posted @ 2019-05-15 16:25 CrossPython 阅读(741) 评论(0) 推荐(0)
摘要:https://medium.com/@diegoveloper/flutter-widget-size-and-position-b0a9ffed9407 I have read many questions about how we can obtain the dimensions or po 阅读全文
posted @ 2019-05-15 15:42 CrossPython 阅读(371) 评论(0) 推荐(0)
摘要:并行动画 当多个动画定义同时指向某个组件,并使用动画控制器启动时,就产生了并行动画(Parallel Animation)。例如我们可以让一个组件: 移动的同时改变大小 旋转的同时边界颜色闪烁 圆形图片模糊的同时形状越来越方 总之,掌握了动画原理以后我们知道,只要能将一个动画抽象值与一个组件的某个外 阅读全文
posted @ 2019-05-15 14:43 CrossPython 阅读(476) 评论(0) 推荐(0)
摘要:import 'package:flutter/material.dart'; import 'dart:io'; import 'dart:async'; main() => runApp(MyApp()); class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { ... 阅读全文
posted @ 2019-05-15 13:56 CrossPython 阅读(237) 评论(0) 推荐(0)
摘要:class BuilderPage extends StatefulWidget { @override State createState() { // TODO: implement createState return BuilderPageState(); } } class BuilderPageState extends State with Sin... 阅读全文
posted @ 2019-05-15 12:52 CrossPython 阅读(572) 评论(0) 推荐(0)
摘要:AnimatedCrossFade让俩个子widget 交替淡入淡出。 AnimatedBuilder构建动画最常用的控件。AnimatedBuilder 由 animation,child,builder 三个参数。 当创建一个AnimationController时,需要传递一个vsync参数, 阅读全文
posted @ 2019-05-15 12:23 CrossPython 阅读(719) 评论(0) 推荐(0)
摘要:Flutter AnimatedBuilder 创建动画的widget Key key, @required Listenable animation, @required this.builder, this.child, animation:Animationcontroller //动画 ch 阅读全文
posted @ 2019-05-15 10:37 CrossPython 阅读(313) 评论(0) 推荐(0)
摘要:https://juejin.im/post/5cd91de4518825686b120921 https://juejin.im/entry/5b64292be51d451995676398 阅读全文
posted @ 2019-05-14 12:07 CrossPython 阅读(645) 评论(0) 推荐(0)
摘要:https://www.jianshu.com/p/2ea01ae02ffe Flutter:教你用CustomPaint画一个自定义的CircleProgressBar paint_page.dart paint.dart 阅读全文
posted @ 2019-05-13 21:33 CrossPython 阅读(829) 评论(1) 推荐(0)
摘要:最近在学习中需要用到裁剪图片,记录一下解决方法 思路: 使用canvas的drawImageRect()方法,对Image进行裁剪,这里的Image需要 'dart:ui' 库中的Image。 1. canvas的drawImageRect()方法 ①第一个参数是'dart:ui' 库中的Image 阅读全文
posted @ 2019-05-13 21:18 CrossPython 阅读(3573) 评论(1) 推荐(0)
摘要:实现原理很简单 ,自己绘制一个裁剪框, 根据手势 选择到适合的位置 ,然后将选中的区域绘制到一个新的图片上,从而完成裁剪 裁剪框的绘制 这里我是根据点来连线的 因为每个点上会绘制一个拉伸的标识符 源图片的绘制 ,根据屏幕大小 把图片缩放成适合长宽比例的图片 绘制完后 就是根据手势的偏移量来计算裁剪框 阅读全文
posted @ 2019-05-13 21:14 CrossPython 阅读(3412) 评论(0) 推荐(0)

上一页 1 2 3 4 5 6 7 ··· 9 下一页