1
0
mirror of https://github.com/flutter/samples.git synced 2025-11-10 14:58:34 +00:00

Add flutter_lints to null_safety (#828)

This commit is contained in:
Brett Morgan
2021-06-07 20:53:25 +10:00
committed by GitHub
parent 4069bfbe9e
commit 39b0049345
12 changed files with 86 additions and 12 deletions

View File

@@ -12,13 +12,15 @@ import 'services.dart';
// uncomment the for-loop and appBar lines below, and note how the new null
// safety static analysis immediately flags those lines as errors.
class BadMyApp extends StatelessWidget {
const BadMyApp({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
final localizedAppName = Config.getAppName();
final temperatures = WeatherService.getTemperatures();
var tempWidgets = [
Text('Temperature next 3 days:'),
const Text('Temperature next 3 days:'),
// for (final t in temperatures) Text(t.round().toString()),
];