import 'package:flutter/material.dart';
class ChinesePage extends StatefulWidget {
List list;
ChinesePage(this.list);
@override
_ChinesePageState createState() => _ChinesePageState();
}
class _ChinesePageState extends State<ChinesePage>
with AutomaticKeepAliveClientMixin {
@override
Widget build(BuildContext context) {
return Scaffold(
body: ListView.builder(
itemCount: widget.list.length,
itemBuilder: (build, index) {
return Container(
padding: EdgeInsets.only(top: 150),
child: Text("${widget.list[index]} ----- $index"));
}));
}
@override
// TODO: implement wantKeepAlive
bool get wantKeepAlive => true;
}
网友评论