Standardize copyright and license, fix warning from new analysis options

This commit is contained in:
Stuart Morgan
2021-05-12 11:48:19 -04:00
parent ff494d9b7f
commit 07c803eada
4 changed files with 91 additions and 32 deletions

View File

@ -1,7 +1,7 @@
Copyright 2016, the Flutter project authors. All rights reserved. Copyright 2013 The Flutter Authors. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are Redistribution and use in source and binary forms, with or without modification,
met: are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright * Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer. notice, this list of conditions and the following disclaimer.
@ -13,14 +13,13 @@ met:
contributors may be used to endorse or promote products derived contributors may be used to endorse or promote products derived
from this software without specific prior written permission. from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

View File

@ -1,6 +1,6 @@
// Copyright 2017, the Flutter project authors. Please see the AUTHORS file // Copyright 2013 The Flutter Authors. All rights reserved.
// for details. All rights reserved. Use of this source code is governed by a // Use of this source code is governed by a BSD-style license that can be
// BSD-style license that can be found in the LICENSE file. // found in the LICENSE file.
/// Utilities for loading images from the network. /// Utilities for loading images from the network.
/// ///

View File

@ -1,6 +1,6 @@
// Copyright (c) 2017, the Flutter project authors. Please see the AUTHORS file // Copyright 2013 The Flutter Authors. All rights reserved.
// for details. All rights reserved. Use of this source code is governed by a // Use of this source code is governed by a BSD-style license that can be
// BSD-style license that can be found in the LICENSE file. // found in the LICENSE file.
import 'dart:async'; import 'dart:async';
import 'dart:io' show HttpOverrides; import 'dart:io' show HttpOverrides;

View File

@ -1,6 +1,6 @@
// Copyright (c) 2017, the Flutter project authors. Please see the AUTHORS file // Copyright 2013 The Flutter Authors. All rights reserved.
// for details. All rights reserved. Use of this source code is governed by a // Use of this source code is governed by a BSD-style license that can be
// BSD-style license that can be found in the LICENSE file. // found in the LICENSE file.
import 'dart:async'; import 'dart:async';
import 'dart:io'; import 'dart:io';
@ -8,8 +8,9 @@ import 'dart:io';
const int _kTestServerPort = 11111; const int _kTestServerPort = 11111;
Future<void> main() async { Future<void> main() async {
final HttpServer testServer = await HttpServer.bind(InternetAddress.loopbackIPv4, _kTestServerPort); final HttpServer testServer =
await for (HttpRequest request in testServer) { await HttpServer.bind(InternetAddress.loopbackIPv4, _kTestServerPort);
await for (final HttpRequest request in testServer) {
if (request.uri.path.endsWith('/immediate_success.png')) { if (request.uri.path.endsWith('/immediate_success.png')) {
request.response.add(_kTransparentImage); request.response.add(_kTransparentImage);
} else if (request.uri.path.endsWith('/error.png')) { } else if (request.uri.path.endsWith('/error.png')) {
@ -23,9 +24,68 @@ Future<void> main() async {
} }
const List<int> _kTransparentImage = <int>[ const List<int> _kTransparentImage = <int>[
0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A, 0x00, 0x00, 0x00, 0x0D, 0x49, 0x89,
0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x08, 0x06, 0x50,
0x00, 0x00, 0x00, 0x1F, 0x15, 0xC4, 0x89, 0x00, 0x00, 0x00, 0x0A, 0x49, 0x44, 0x4E,
0x41, 0x54, 0x78, 0x9C, 0x63, 0x00, 0x01, 0x00, 0x00, 0x05, 0x00, 0x01, 0x0D, 0x47,
0x0A, 0x2D, 0xB4, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4E, 0x44, 0xAE, 0x0D,
0x0A,
0x1A,
0x0A,
0x00,
0x00,
0x00,
0x0D,
0x49,
0x48,
0x44,
0x52,
0x00,
0x00,
0x00,
0x01,
0x00,
0x00,
0x00,
0x01,
0x08,
0x06,
0x00,
0x00,
0x00,
0x1F,
0x15,
0xC4,
0x89,
0x00,
0x00,
0x00,
0x0A,
0x49,
0x44,
0x41,
0x54,
0x78,
0x9C,
0x63,
0x00,
0x01,
0x00,
0x00,
0x05,
0x00,
0x01,
0x0D,
0x0A,
0x2D,
0xB4,
0x00,
0x00,
0x00,
0x00,
0x49,
0x45,
0x4E,
0x44,
0xAE,
]; ];