Skip to content

Commit

Permalink
Fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
michalowskim committed Jul 3, 2024
1 parent f2ff6bc commit 84e9819
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 10 deletions.
3 changes: 2 additions & 1 deletion lib/add_to_google_wallet.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@ class AddToGoogleWallet {
onCanceled: onCanceled,
);

Future<bool> get isGoogleWalletApiAvailable => AddToGoogleWalletPlatform.instance.isGoogleWalletApiAvailable;
Future<bool> get isGoogleWalletApiAvailable =>
AddToGoogleWalletPlatform.instance.isGoogleWalletApiAvailable;
}
4 changes: 3 additions & 1 deletion lib/add_to_google_wallet_method_channel.dart
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ class MethodChannelAddToGoogleWallet extends AddToGoogleWalletPlatform {

@override
Future<bool> get isGoogleWalletApiAvailable async {
final bool result = await methodChannel.invokeMethod<bool>('isGoogleWalletApiAvailable') ?? false;
final bool result =
await methodChannel.invokeMethod<bool>('isGoogleWalletApiAvailable') ??
false;
return result;
}
}
4 changes: 2 additions & 2 deletions lib/add_to_google_wallet_platform_interface.dart
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ abstract class AddToGoogleWalletPlatform extends PlatformInterface {
}) =>
throw UnimplementedError('saveLoyaltyPass() has not been implemented.');

Future<bool> get isGoogleWalletApiAvailable =>
throw UnimplementedError('isGoogleWalletApiAvailable has not been implemented.');
Future<bool> get isGoogleWalletApiAvailable => throw UnimplementedError(
'isGoogleWalletApiAvailable has not been implemented.');
}
14 changes: 8 additions & 6 deletions lib/widgets/add_to_google_wallet_button.dart
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ class AddToGoogleWalletButton extends StatelessWidget {
color: Colors.transparent,
child: InkWell(
onTap: _onAddToGoogleWalletTap,
borderRadius: const BorderRadius.all(Radius.circular(_buttonRadius)),
borderRadius:
const BorderRadius.all(Radius.circular(_buttonRadius)),
),
),
),
Expand All @@ -81,13 +82,14 @@ class AddToGoogleWalletButton extends StatelessWidget {
);

Future<String> _getButtonAssetPath(BuildContext context) async {
final String languageCode =
locale?.languageCode.toLowerCase() ?? View.of(context).platformDispatcher.locale.languageCode;
final String? countryCode =
locale?.countryCode?.toUpperCase() ?? View.of(context).platformDispatcher.locale.countryCode;
final String languageCode = locale?.languageCode.toLowerCase() ??
View.of(context).platformDispatcher.locale.languageCode;
final String? countryCode = locale?.countryCode?.toUpperCase() ??
View.of(context).platformDispatcher.locale.countryCode;

if (countryCode != null) {
final String? fullCodePath = await _validateAndReturnPath(languageCode + countryCode);
final String? fullCodePath =
await _validateAndReturnPath(languageCode + countryCode);

if (fullCodePath != null) {
return fullCodePath;
Expand Down

0 comments on commit 84e9819

Please sign in to comment.