mirror of
https://github.com/flutter/samples.git
synced 2025-11-10 14:58:34 +00:00
Landing beta changes in master for the new stable release (#747)
This commit is contained in:
@@ -22,9 +22,9 @@ class NewsTab extends StatefulWidget {
|
||||
class _NewsTabState extends State<NewsTab> {
|
||||
static const _itemsLength = 20;
|
||||
|
||||
List<Color> colors;
|
||||
List<String> titles;
|
||||
List<String> contents;
|
||||
late final List<Color> colors;
|
||||
late final List<String> titles;
|
||||
late final List<String> contents;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
@@ -36,8 +36,6 @@ class _NewsTabState extends State<NewsTab> {
|
||||
}
|
||||
|
||||
Widget _listBuilder(BuildContext context, int index) {
|
||||
if (index >= _itemsLength) return null;
|
||||
|
||||
return SafeArea(
|
||||
top: false,
|
||||
bottom: false,
|
||||
@@ -101,6 +99,7 @@ class _NewsTabState extends State<NewsTab> {
|
||||
),
|
||||
body: Container(
|
||||
child: ListView.builder(
|
||||
itemCount: _itemsLength,
|
||||
itemBuilder: _listBuilder,
|
||||
),
|
||||
),
|
||||
@@ -111,6 +110,7 @@ class _NewsTabState extends State<NewsTab> {
|
||||
return CupertinoPageScaffold(
|
||||
navigationBar: CupertinoNavigationBar(),
|
||||
child: ListView.builder(
|
||||
itemCount: _itemsLength,
|
||||
itemBuilder: _listBuilder,
|
||||
),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user