1
0
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:
Andrew Brogdon
2021-03-03 11:44:35 -08:00
committed by GitHub
parent 6c81510d6e
commit 8c1cd0b049
101 changed files with 1006 additions and 1040 deletions

View File

@@ -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,
),
);