📜  自动保持活动颤振选项卡 - 无论代码示例

📅  最后修改于: 2022-03-11 14:58:40.207000             🧑  作者: Mango

代码示例2
Future<...> _loadingDeals;

@override
void initState() {
  _loadingDeals = loadDeals(); // only create the future once.
  super.initState();
}

@override
Widget build(BuildContext context) {
  super.build(context); // because we use the keep alive mixin.
  return new FutureBuilder(future: _loadingDeals, /* ... */);
}