mirror of
https://github.com/flutter/samples.git
synced 2026-06-01 03:50:57 +00:00
Upgrading samples to flutter_lints, part 1 of n (#804)
This commit is contained in:
@@ -41,7 +41,7 @@ class _NewsTabState extends State<NewsTab> {
|
||||
bottom: false,
|
||||
child: Card(
|
||||
elevation: 1.5,
|
||||
margin: EdgeInsets.fromLTRB(6, 12, 6, 0),
|
||||
margin: const EdgeInsets.fromLTRB(6, 12, 6, 0),
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(4),
|
||||
),
|
||||
@@ -58,22 +58,22 @@ class _NewsTabState extends State<NewsTab> {
|
||||
backgroundColor: colors[index],
|
||||
child: Text(
|
||||
titles[index].substring(0, 1),
|
||||
style: TextStyle(color: Colors.white),
|
||||
style: const TextStyle(color: Colors.white),
|
||||
),
|
||||
),
|
||||
Padding(padding: EdgeInsets.only(left: 16)),
|
||||
const Padding(padding: EdgeInsets.only(left: 16)),
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
titles[index],
|
||||
style: TextStyle(
|
||||
style: const TextStyle(
|
||||
fontSize: 15,
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
),
|
||||
Padding(padding: EdgeInsets.only(top: 8)),
|
||||
const Padding(padding: EdgeInsets.only(top: 8)),
|
||||
Text(
|
||||
contents[index],
|
||||
),
|
||||
@@ -95,20 +95,18 @@ class _NewsTabState extends State<NewsTab> {
|
||||
Widget _buildAndroid(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: Text(NewsTab.title),
|
||||
title: const Text(NewsTab.title),
|
||||
),
|
||||
body: Container(
|
||||
child: ListView.builder(
|
||||
itemCount: _itemsLength,
|
||||
itemBuilder: _listBuilder,
|
||||
),
|
||||
body: ListView.builder(
|
||||
itemCount: _itemsLength,
|
||||
itemBuilder: _listBuilder,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildIos(BuildContext context) {
|
||||
return CupertinoPageScaffold(
|
||||
navigationBar: CupertinoNavigationBar(),
|
||||
navigationBar: const CupertinoNavigationBar(),
|
||||
child: ListView.builder(
|
||||
itemCount: _itemsLength,
|
||||
itemBuilder: _listBuilder,
|
||||
|
||||
Reference in New Issue
Block a user