This commit is contained in:
2021-01-05 18:03:51 +06:30
parent 50763de3f3
commit 045d27945b
11 changed files with 90 additions and 103 deletions

View File

@@ -14,16 +14,18 @@ class Config {
final String reportURL;
final Level level;
final String reportProjectID;
final String bucketName;
factory Config(
{@required Flavor flavor,
@required String apiURL,
@required String reportURL,
@required String reportProjectID,
@required String bucketName,
Color color: Colors.blue,
Level level: Level.SEVERE}) {
_instance ??= Config._internal(flavor, FlavorNames[flavor.index], color,
apiURL, reportURL, level, reportProjectID);
apiURL, reportURL, level, reportProjectID, bucketName);
Logger.root.level = level;
Logger.root.onRecord.listen((record) {
@@ -35,7 +37,7 @@ class Config {
}
Config._internal(this.flavor, this.name, this.color, this.apiURL,
this.reportURL, this.level, this.reportProjectID);
this.reportURL, this.level, this.reportProjectID, this.bucketName);
static Config get instance {
return _instance;