上一页 1 ··· 14 15 16 17 18 19 20 21 22 ··· 25 下一页
摘要: https://stackoverflow.com/questions/46698751/permission-denied-at-externalstoragedirectory-access-via-flutter-plugin https://stackoverflow.com/questio 阅读全文
posted @ 2019-04-11 15:11 CrossPython 阅读(1682) 评论(0) 推荐(0)
摘要: import 'package:flutter/material.dart'; import 'dart:io'; import 'package:path_provider/path_provider.dart'; import 'package:rxdart/rxdart.dart'; main() => runApp( MyApp( storage: TextStor... 阅读全文
posted @ 2019-04-10 21:52 CrossPython 阅读(267) 评论(0) 推荐(0)
摘要: 记得家权限. 阅读全文
posted @ 2019-04-10 20:28 CrossPython 阅读(1414) 评论(0) 推荐(0)
摘要: 要访问SD卡,首先读取权限肯定是要有的,不然写再多代码都是无用功。在AndroidManifest.xml文件中添加 https://blog.csdn.net/xieluoxixi/article/details/86655016 https://www.jianshu.com/p/a332a20 阅读全文
posted @ 2019-04-10 16:04 CrossPython 阅读(3206) 评论(0) 推荐(0)
摘要: https://blog.csdn.net/weixin_34183910/article/details/86029912 https://blog.csdn.net/u013255127/article/details/88018997 https://www.jb51.net/article/ 阅读全文
posted @ 2019-04-10 12:39 CrossPython 阅读(269) 评论(0) 推荐(0)
摘要: import 'dart:async'; main(){ Future(()=>a1()) .then((x)=>a2(x)) .then((x)=>a3(x)) .then((x)=>a4(x)); // .whenComplete((x)=>print(x)); print('done'); } a1()async{ await Fu... 阅读全文
posted @ 2019-04-09 19:41 CrossPython 阅读(397) 评论(0) 推荐(0)
摘要: https://www.jianshu.com/p/88998af66e4b https://www.jianshu.com/p/7ac3ce2bc0c6 阅读全文
posted @ 2019-04-09 15:49 CrossPython 阅读(431) 评论(0) 推荐(0)
摘要: sqflite使用引入插件在pubspec.yaml文件中添加path_provider插件,2019年2月18号最新版本为1.1.0: dependencies: flutter: sdk: flutter #sqflite插件 sqflite: ^1.1.0执行 flutter packages 阅读全文
posted @ 2019-04-09 15:18 CrossPython 阅读(1919) 评论(0) 推荐(0)
摘要: 同时支持android和ios 1.添加依赖 dependencies: ... sqflite: any Dart Copy Dart Copy Dart Copy 2.导入依赖 import 'package:sqflite/sqflite.dart'; Dart Copy Dart Copy 阅读全文
posted @ 2019-04-09 15:17 CrossPython 阅读(10333) 评论(0) 推荐(0)
摘要: https://www.cnblogs.com/pjl43/p/9866753.html https://www.jianshu.com/p/55092eb06c17 requests: https://stackoverflow.com/questions/53101858/handling-co 阅读全文
posted @ 2019-04-09 11:30 CrossPython 阅读(2581) 评论(0) 推荐(0)
摘要: 在使用Options添加headers时,Map没有定义内部类型: Dio dio = new Dio(); Map headers = new Map(); headers['Cookie'] = cookie; Options options = new Options( headers:hea 阅读全文
posted @ 2019-04-09 10:38 CrossPython 阅读(2235) 评论(0) 推荐(0)
摘要: import 'package:flutter/material.dart'; import 'package:flutter/gestures.dart'; import 'package:url_launcher/url_launcher.dart'; import 'package:flutter_webview_plugin/flutter_webview_plugin.dart'; ... 阅读全文
posted @ 2019-04-08 11:04 CrossPython 阅读(345) 评论(0) 推荐(0)
摘要: showDialog 必须Stateful 因为需要context 阅读全文
posted @ 2019-04-06 21:36 CrossPython 阅读(188) 评论(0) 推荐(0)
摘要: SliverList 高度自动, SliverFixedExtentList 高度固定死. CustomScrollView( slivers:[ SliverList( delegate: SliverChildBuilderDelegate((context,... 阅读全文
posted @ 2019-04-05 19:10 CrossPython 阅读(3097) 评论(0) 推荐(1)
摘要: import 'package:flutter/material.dart';import 'package:xxx/bloc/bloc.dart';import 'package:xxx/model/model.dart';class ArticlePage extends StatelessWi 阅读全文
posted @ 2019-04-05 14:46 CrossPython 阅读(598) 评论(0) 推荐(0)
摘要: https://cloud.tencent.com/developer/ask/181703 https://github.com/flutter/flutter/blob/master/examples/flutter_gallery/lib/gallery/about.dart https:// 阅读全文
posted @ 2019-04-04 12:34 CrossPython 阅读(568) 评论(0) 推荐(0)
摘要: 首先要安装一个插件:flutter_webview_plugin 使用方法: FlutterWebviewPlugin 插件提供一个链接到唯一webview的单一实例,这样你就可以在app中的任何地方控制webview,比如监听事件: 隐藏webview: 关闭webview: 画一个内部矩形web 阅读全文
posted @ 2019-04-04 09:33 CrossPython 阅读(2068) 评论(0) 推荐(0)
摘要: Flutter 本身并未集成webview,所以当需要使用webview 的时候,使用flutter_webview_plugin插件,也就是使用的原生webview组件, flutter_webview_plugin 在使用过程中会iOS出现无法加载HTTP请求的情况, 但是Flutter 却可以 阅读全文
posted @ 2019-04-04 09:07 CrossPython 阅读(2068) 评论(0) 推荐(0)
摘要: flutter 加载webview 安装插件 flutter_webview_plugin: ^0.2.1 从listview点击item跳转页面加载详情页案例 阅读全文
posted @ 2019-04-04 08:41 CrossPython 阅读(879) 评论(0) 推荐(0)
摘要: const ListTile({ Key key, this.leading, // item 前置图标 this.title, // item 标题 this.subtitle, // item 副标题 this.trailing, // item 后置图标 this.isThreeLine = 阅读全文
posted @ 2019-04-02 22:34 CrossPython 阅读(380) 评论(0) 推荐(0)
摘要: +++++++++++++++ 可以通过指定shrinkWrap = true为了你ListView。 异常消息中说明了这一点。原因也在异常消息中说明。 在这个具体的案例中,我不确定哪一个Widget在树中造成这一点,但我认为它是不相关的。我不知道你的Container关于ListView是关于。我 阅读全文
posted @ 2019-04-01 16:16 CrossPython 阅读(511) 评论(0) 推荐(0)
摘要: import 'dart:async'; import 'package:semaphore/semaphore.dart'; Future main() async { var maxCount = 3; var sm = new LocalSemaphore(maxCount); var tasks = []; for (var i = 0; i []; for ... 阅读全文
posted @ 2019-04-01 09:58 CrossPython 阅读(248) 评论(0) 推荐(0)
摘要: 本文要介绍的知识点 用路由推出一个新页面 打开新页面时,传入参数 参数的回传 路由 做Android/iOS原生开发的时候,要打开一个新的页面,你得知道你的目标页面对象,然后初始化一个Intent或者ViewController,再通过startActivity或者pushViewControlle 阅读全文
posted @ 2019-03-31 21:18 CrossPython 阅读(2859) 评论(0) 推荐(0)
摘要: https://www.jianshu.com/p/024b19dea138 阅读全文
posted @ 2019-03-28 23:08 CrossPython 阅读(207) 评论(0) 推荐(0)
摘要: 可以通过指定shrinkWrap = true为了你ListView。 阅读全文
posted @ 2019-03-28 15:55 CrossPython 阅读(666) 评论(0) 推荐(0)
摘要: 来自: https://cloud.tencent.com/developer/article/1337184 字段 类型 navigatorKey(导航键) GlobalKey<NavigatorState> home(主页) Widget routes(路由) Map<String, Widge 阅读全文
posted @ 2019-03-28 09:28 CrossPython 阅读(492) 评论(0) 推荐(0)
摘要: https://blog.csdn.net/u011272795/article/details/83010974 https://segmentfault.com/a/1190000014219340 阅读全文
posted @ 2019-03-27 22:10 CrossPython 阅读(1624) 评论(0) 推荐(0)
摘要: children:[ButtonTheme.bar( child:ButtonBar( children:[ FlatButton... ], ),), ] 阅读全文
posted @ 2019-03-27 21:25 CrossPython 阅读(299) 评论(0) 推荐(0)
摘要: https://www.jianshu.com/p/366b2446eaab 阅读全文
posted @ 2019-03-26 22:17 CrossPython 阅读(210) 评论(0) 推荐(0)
摘要: import 'package:flutter/material.dart'; class LearnExpansionPanelList extends StatefulWidget{ @override State createState() { return new _LearnExpansionPanelList(); } } class _LearnExpansio... 阅读全文
posted @ 2019-03-26 21:29 CrossPython 阅读(2290) 评论(0) 推荐(0)
摘要: 现在的手机品牌和型号越来越多,导致我们平时写布局的时候会在个不同的移动设备上显示的效果不同, 比如我们的设计稿一个View的大小是300px,如果直接写300px,可能在当前设备显示正常,但到了其他设备可能就会偏小或者偏大,这就需要我们对屏幕进行适配。 安卓原生的话有自己的适配规则,可以根据不同的尺 阅读全文
posted @ 2019-03-26 12:22 CrossPython 阅读(2994) 评论(0) 推荐(0)
摘要: 1. 插件必须渲染好, 2. 可以通过context.size获取当前控件的尺寸和位置offset信息 阅读全文
posted @ 2019-03-26 12:16 CrossPython 阅读(9905) 评论(0) 推荐(0)
摘要: 在Dart中实现并发可以用Isolate,它是类似于线程(thread)但不共享内存的独立运行的worker,是一个独立的Dart程序执行环境。其实默认环境就是一个main isolate。 在Dart语言中,所有的Dart代码都运行在某个isolate中,代码只能使用所属isolate的类和值。不 阅读全文
posted @ 2019-03-25 10:31 CrossPython 阅读(1006) 评论(0) 推荐(0)
摘要: 由于前面的HTTP请求用到了异步操作,不少小伙伴都被这个问题折了下腰,今天总结分享下实战成果。Dart是一个单线程的语言,遇到有延迟的运算(比如IO操作、延时执行)时,线程中按顺序执行的运算就会阻塞,用户就会感觉到卡顿,于是通常用异步处理来解决这个问题。当遇到有需要延迟的运算(async)时,将其放 阅读全文
posted @ 2019-03-25 10:17 CrossPython 阅读(2865) 评论(0) 推荐(0)
摘要: 随意点开一个Widget,就会发现,可以传递一个参数Key.那这个Key到底是干啥子,有什么用呢? Flutter是受React启发的,所以Virtual Dom的diff算法也参考过来了(应该是略有修改),在diff的过程中如果节点有Key来比较的话,能够最大程度重用已有的节点(特别在列表的场景) 阅读全文
posted @ 2019-03-24 20:05 CrossPython 阅读(575) 评论(0) 推荐(0)
摘要: 一个 App 通常会有多个界面,每个界面实现不同的功能,并在多个界面之间跳转。在 Flutter 中多个界面的跳转是通过 Navigator 来实现的。 在 Flutter 中定义了一个 Overlay Widget 用来管理多个界面,Overlay 里面使用 Stack 来显示当前的界面。通常不直 阅读全文
posted @ 2019-03-22 13:25 CrossPython 阅读(2310) 评论(0) 推荐(0)
摘要: paddingwrapcontainercolumnrowtextexpandedflexFractionallySizedBox 阅读全文
posted @ 2019-03-21 13:29 CrossPython 阅读(470) 评论(0) 推荐(0)
摘要: import 'package:flutter/material.dart'; void main() { runApp(MaterialApp(home: new MyApp())); } class MyApp extends StatelessWidget { var width = 80.0; var height = 60.0; @override Widg... 阅读全文
posted @ 2019-03-21 13:16 CrossPython 阅读(439) 评论(0) 推荐(0)
摘要: 当需要在一个区域里面取百分比尺寸的时候,可以使用这个,比方说,高度40%宽度70%的区域。当然,AspectRatio也可以达到近似的效果。 阅读全文
posted @ 2019-03-21 12:32 CrossPython 阅读(268) 评论(0) 推荐(0)
摘要: import 'package:flutter/material.dart'; void main() { runApp(MaterialApp(home: new MyApp())); } class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { // TO... 阅读全文
posted @ 2019-03-21 11:49 CrossPython 阅读(516) 评论(0) 推荐(0)
上一页 1 ··· 14 15 16 17 18 19 20 21 22 ··· 25 下一页