mirror of
https://github.com/flutter/samples.git
synced 2026-04-20 05:52:21 +00:00
Add flutter_lints to null_safety (#828)
This commit is contained in:
@@ -5,13 +5,15 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
void main() {
|
||||
runApp(MyApp());
|
||||
runApp(const MyApp());
|
||||
}
|
||||
|
||||
// This app simulates possible null errors. Try running it and see if it fails.
|
||||
// You can then try to hot reload a few times; you should see it occasionally
|
||||
// failing and occasionally succeeding.
|
||||
class MyApp extends StatelessWidget {
|
||||
const MyApp({Key key}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
// Get data from services. Note: in a real application,
|
||||
@@ -28,7 +30,7 @@ class MyApp extends StatelessWidget {
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text('Temperature next 3 days:'),
|
||||
const Text('Temperature next 3 days:'),
|
||||
for (final t in temperatures) Text(t.round().toString()),
|
||||
],
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user