Unverified Commit b083bc14 authored by Jenn Magder's avatar Jenn Magder Committed by GitHub

Migrate android_sdk and application_package to null safety (#79611)

parent 75453e6a
......@@ -2,16 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// @dart = 2.8
import 'package:meta/meta.dart';
import 'base/context.dart';
import 'base/file_system.dart';
import 'build_info.dart';
abstract class ApplicationPackageFactory {
static ApplicationPackageFactory get instance => context.get<ApplicationPackageFactory>();
static ApplicationPackageFactory? get instance => context.get<ApplicationPackageFactory>();
/// Create an [ApplicationPackage] for the given platform.
Future<ApplicationPackage> getPackageForPlatform(
......@@ -22,17 +18,17 @@ abstract class ApplicationPackageFactory {
}
abstract class ApplicationPackage {
ApplicationPackage({ @required this.id })
ApplicationPackage({ required this.id })
: assert(id != null);
/// Package ID from the Android Manifest or equivalent.
final String id;
String get name;
String? get name;
String get displayName => name;
String? get displayName => name;
File get packagesFile => null;
File? get packagesFile => null;
@override
String toString() => displayName ?? id;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment