Skip to content

Commit 3551eb3

Browse files
ekjotmultaniekjotmultani
authored andcommitted
seperated bucket out into its own class instead of using a map
1 parent 1ee2ff6 commit 3551eb3

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2+
// SPDX-License-Identifier: Apache-2.0
3+
4+
5+
6+
/// {@template amplify_core.amplify_outputs.amazon_pinpoint_channel}
7+
/// Supported channels for Amazon Pinpoint.
8+
/// {@endtemplate}
9+
class StorageOutputBucket {
10+
StorageOutputBucket(this.name, this.bucketName, this.awsRegion);
11+
factory StorageOutputBucket.fromJson(Map<String, dynamic> json) => StorageOutputBucket(json['name'].toString(), json['bucket_name'].toString(), json['aws_region'].toString());
12+
String name;
13+
String bucketName;
14+
String awsRegion;
15+
Map<String, dynamic> toJson() => <String, dynamic>{'name':name, 'bucket_name':bucketName, 'aws_region':awsRegion};
16+
}

packages/amplify_core/lib/src/config/amplify_outputs/storage/storage_outputs.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ class StorageOutputs
1919
this.buckets,
2020
});
2121

22+
2223
factory StorageOutputs.fromJson(Map<String, Object?> json) =>
2324
_$StorageOutputsFromJson(json);
2425

0 commit comments

Comments
 (0)