![](https://img-blog.csdnimg.cn/20201014180756926.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
fluter
文章平均质量分 77
hexiekuaile
这个作者很懒,什么都没留下…
展开
-
flutter国际化,读取语言文件
地址:https://github.com/hexiekuaile/i18nstr可实时读取i18n目录下的语言文件,如zh_CN.json。约定:语言文件放在i18n文件夹下具体参看样例 https://github.com/hexiekuaile/i18nstr/tree/master/examplei18n/zh_CN.json ,在主要的、默认的语言文件中,可加入supported...原创 2020-04-12 21:15:40 · 678 阅读 · 0 评论 -
Flutter 国际化,字符串来自于json文件
一个Flutter StatelessWidget国际化简单示例,字符串来自于json文件。在学习flutter国际化过程中,走了一些弯路,所以共享了这小项目。关键还是要熟,谁来调用、调用什么、调用顺序。代码在i18n.dart、main.dart中,代码有详细说明。除此之外,还想实现个目标,即supportedLocales属性赋值通过json文件获得,但目前不知道从哪调用来实现,如有同...原创 2020-01-20 17:18:45 · 474 阅读 · 0 评论 -
flutter 删除组件
flutter中删除组件,思路如下:1、在上层widget中写删除方法,在生成下层组件的同时将删除方法作为构造参数传入 var rows = <Widget>[]; rows.add(new Row_meta(UniqueKey(), removeMetaRow));void removeMetaRow(Widget w) { rows.remove(w); ...原创 2019-11-29 11:04:13 · 4352 阅读 · 0 评论 -
flutter .map用法示例
Expanded( child: new DropdownButtonFormField( value: widget._type, style: TextStyle(color: Colors.red), icon: Icon(Icons.sort), items: <String>...原创 2019-11-28 16:38:16 · 3356 阅读 · 0 评论 -
flutter dio 和springboot2 controller在post上的对应关系,Restful URL
一、springboot2代码:@PostMappingpublic ResponseEntity<MetaInfo> post(@RequestBody MetaInfo m) {...}flutter 代码:var response = await dio.post("http://localhost:1112/metaInfo", data: body);//或u...原创 2019-11-25 09:34:03 · 1250 阅读 · 0 评论 -
Dart显式类型转换
目录Dart显式类型转换Dart显式类型转换 String s ='[{"type":"aaa","name":"bbb","zccl":"2018-10-10","value": 12}, {"type":"AAA","name":"BBB","zccl":"2019-10-10","value": 6}]'; var listDynamic = json...原创 2019-10-29 09:28:06 · 7734 阅读 · 0 评论