Enable no_leading_underscores_for_local_identifiers (#96422)

This commit is contained in:
Michael Goderbauer
2022-01-21 14:43:59 -08:00
committed by GitHub
parent 53ca7f684a
commit 5684b9f69e
89 changed files with 948 additions and 949 deletions

View File

@@ -30,8 +30,8 @@ class MyStatelessWidget extends StatelessWidget {
@override
Widget build(BuildContext context) {
const int _rowCount = 48;
const int _columnCount = 6;
const int rowCount = 48;
const int columnCount = 6;
return InteractiveViewer(
alignPanAxis: true,
@@ -39,14 +39,14 @@ class MyStatelessWidget extends StatelessWidget {
scaleEnabled: false,
child: Table(
columnWidths: <int, TableColumnWidth>{
for (int column = 0; column < _columnCount; column += 1)
for (int column = 0; column < columnCount; column += 1)
column: const FixedColumnWidth(200.0),
},
children: <TableRow>[
for (int row = 0; row < _rowCount; row += 1)
for (int row = 0; row < rowCount; row += 1)
TableRow(
children: <Widget>[
for (int column = 0; column < _columnCount; column += 1)
for (int column = 0; column < columnCount; column += 1)
Container(
height: 26,
color: row % 2 + column % 2 == 1

View File

@@ -27,9 +27,9 @@ class MyStatelessWidget extends StatelessWidget {
@override
Widget build(BuildContext context) {
final List<String> _tabs = <String>['Tab 1', 'Tab 2'];
final List<String> tabs = <String>['Tab 1', 'Tab 2'];
return DefaultTabController(
length: _tabs.length, // This is the number of tabs.
length: tabs.length, // This is the number of tabs.
child: Scaffold(
body: NestedScrollView(
headerSliverBuilder: (BuildContext context, bool innerBoxIsScrolled) {
@@ -61,7 +61,7 @@ class MyStatelessWidget extends StatelessWidget {
forceElevated: innerBoxIsScrolled,
bottom: TabBar(
// These are the widgets to put in each tab in the tab bar.
tabs: _tabs.map((String name) => Tab(text: name)).toList(),
tabs: tabs.map((String name) => Tab(text: name)).toList(),
),
),
),
@@ -69,7 +69,7 @@ class MyStatelessWidget extends StatelessWidget {
},
body: TabBarView(
// These are the contents of the tab views, below the tabs.
children: _tabs.map((String name) {
children: tabs.map((String name) {
return SafeArea(
top: false,
bottom: false,

View File

@@ -25,19 +25,20 @@ class MyApp extends StatelessWidget {
class MyStatelessWidget extends StatelessWidget {
const MyStatelessWidget({Key? key}) : super(key: key);
static const List<String> _tabs = <String>['Months', 'Days'];
static const List<String> _months = <String>[
'January',
'February',
'March',
];
static const List<String> _days = <String>[
'Sunday',
'Monday',
'Tuesday',
];
@override
Widget build(BuildContext context) {
const List<String> _tabs = <String>['Months', 'Days'];
const List<String> _months = <String>[
'January',
'February',
'March',
];
const List<String> _days = <String>[
'Sunday',
'Monday',
'Tuesday',
];
return DefaultTabController(
length: _tabs.length,
child: Scaffold(