在哪里存储字符串? 如何存储不同的语言 目前,最好的做法是创建一个名为Strings的类 class Strings{ static String welcomeMessage = "Welcome To Flutter"; } 然后在你的代码中,你可以像访问你的字符串一样:new Text(Strings.welcomeMessage)
生成序列化模板 flutter packages pub run build_runner build
//升级到0.5.7 对三个以上tab还是有问题,TabBarView放弃,使用PageView,实现两个control同步,GlobalKey也没问题了。 flutter/flutter#19809 flutter/flutter#11895 tab alive _debugUltimatePreviousSiblingOf GlobalKey可以记录state,但是需要跟随build创建 https://stackoverflow.com/questions/49862572
if you use AutomaticKeepAliveClientMixin to keep alive page item,you can't write like this:
PageView(
controller: _pageController,
onPageChanged: (index) {
onPageChanged(index);
},
children: [NewsList(),Text('page1'),Text('page2'),Text('page3')],
),
you should write like this:
List _list = [
NewsList(),
Text('page1'),
Text('page2'),
Text('page3')
];
PageView(
controller: _pageController,
onPageChanged: (index) {
onPageChanged(index);
},
children:_list,
),
flutter/flutter#19030 没有webview,残念 fluttercommunity/flutter_webview_plugin#23
flutter 的跨平台见兼容性意外的话,得益于flutter engine,skia的渲染,只需要canvas 所以第一次运行意外的没有兼容问题,特别是有生之年在ios上看到完全一模一样的下拉刷新
https://stackoverflow.com/questions/47114639/yellow-lines-under-text-widgets-in-flutter Dialog中,没使用Scaffold ,导致文本有黄色溢出线提示,可以使用Material ,color或者type为透明
hotload很有优势。
热更新的新包如果包含了原生代码,需要停止后重新运行哦。