Skip to content

Commit

Permalink
reformat code
Browse files Browse the repository at this point in the history
  • Loading branch information
Tiska committed Dec 14, 2022
1 parent d3b4a36 commit b9d3daa
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
4 changes: 1 addition & 3 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,7 @@ class _MyAppState extends State<MyApp> {
@override
Widget build(BuildContext context) {
return MaterialApp(
localizationsDelegates: const [
I18nGoogleWallet.delegate
],
localizationsDelegates: const [I18nGoogleWallet.delegate],
home: Scaffold(
appBar: AppBar(
title: const Text('Plugin example app'),
Expand Down
15 changes: 11 additions & 4 deletions lib/widget/add_to_google_wallet_button.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,13 @@ class AddtoGoogleWalletButton extends StatelessWidget {
final bool removeSvgPackage;

const AddtoGoogleWalletButton(
{Key? key, this.onPress, this.badgeButton = false, required this.langue, bool? removeSvgPackage})
: removeSvgPackage = removeSvgPackage ?? false, super(key: key);
{Key? key,
this.onPress,
this.badgeButton = false,
required this.langue,
bool? removeSvgPackage})
: removeSvgPackage = removeSvgPackage ?? false,
super(key: key);

@override
Widget build(BuildContext context) {
Expand All @@ -22,8 +27,10 @@ class AddtoGoogleWalletButton extends StatelessWidget {
button: true,
label: '${I18nGoogleWallet.of(context).add_to} Google Wallet',
child: GestureDetector(
onTap: onPress,
child: SvgPicture.asset(package: removeSvgPackage ? null : 'flutter_google_wallet', path)),
onTap: onPress,
child: SvgPicture.asset(
package: removeSvgPackage ? null : 'flutter_google_wallet',
path)),
);
}
}
3 changes: 2 additions & 1 deletion test/langue_utils_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ import 'package:flutter_google_wallet/utils/langue_utils.dart';
import 'package:flutter_test/flutter_test.dart';

void main() {
test('GIVEN locale THEN normalizedLocale() return normalized locale', () async {
test('GIVEN locale THEN normalizedLocale() return normalized locale',
() async {
expect(normalizedLocale(locale: 'fr'), 'frFR');
expect(normalizedLocale(locale: 'de'), 'de');
expect(normalizedLocale(locale: 'en'), 'enGB');
Expand Down

0 comments on commit b9d3daa

Please sign in to comment.