Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgefspereira committed Oct 9, 2024
1 parent f73f2c0 commit f76f978
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 6 deletions.
3 changes: 2 additions & 1 deletion example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,8 @@ class _MyAppState extends State<MyApp> {
),
const SizedBox(height: 15),
ElevatedButton(
onPressed: _configuration != null ? () => PlaidLink.open() : null,
onPressed:
_configuration != null ? () => PlaidLink.open() : null,
child: const Text("Open"),
),
const SizedBox(height: 10),
Expand Down
8 changes: 6 additions & 2 deletions lib/src/core/link_configuration.dart
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,14 @@ class LinkTokenConfiguration {

@override
bool operator ==(Object other) =>
identical(this, other) || other is LinkTokenConfiguration && runtimeType == other.runtimeType && hashCode == other.hashCode;
identical(this, other) ||
other is LinkTokenConfiguration &&
runtimeType == other.runtimeType &&
hashCode == other.hashCode;

@override
int get hashCode => Object.hash(token.hashCode, noLoadingState.hashCode, receivedRedirectUri.hashCode);
int get hashCode => Object.hash(
token.hashCode, noLoadingState.hashCode, receivedRedirectUri.hashCode);
}

/// Data to submit during a Link session.
Expand Down
14 changes: 11 additions & 3 deletions lib/src/platform/plaid_flutter_web.dart
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@ class PlaidFlutterPlugin extends PlaidPlatformInterface {

/// onExit handler
options.onExit = allowInterop((error, metadata) {
Map<String, dynamic> data = {'metadata': mapFromExitMetadata(jsToMap(metadata))};
Map<String, dynamic> data = {
'metadata': mapFromExitMetadata(jsToMap(metadata))
};

if (error != null) {
data["error"] = mapFromError(jsToMap(error));
Expand Down Expand Up @@ -134,7 +136,10 @@ class PlaidFlutterPlugin extends PlaidPlatformInterface {

Map<dynamic, dynamic> institutionMap = jsToMap(data["institution"]);

result["institution"] = {"id": institutionMap["institution_id"] ?? "", "name": institutionMap["name"] ?? ""};
result["institution"] = {
"id": institutionMap["institution_id"] ?? "",
"name": institutionMap["name"] ?? ""
};
result["linkSessionId"] = data["link_session_id"] ?? "";

List<dynamic> accountsList = [];
Expand Down Expand Up @@ -168,7 +173,10 @@ class PlaidFlutterPlugin extends PlaidPlatformInterface {

if (data["institution"] != null) {
Map<dynamic, dynamic> institutionMap = jsToMap(data["institution"]);
result["institution"] = {"id": institutionMap["institution_id"] ?? "", "name": institutionMap["name"] ?? ""};
result["institution"] = {
"id": institutionMap["institution_id"] ?? "",
"name": institutionMap["name"] ?? ""
};
}

return result;
Expand Down

0 comments on commit f76f978

Please sign in to comment.