Skip to content

Commit c9bab80

Browse files
Update dependencies and add textWidget parameter to SignInWithAppleButton
1 parent 2471abc commit c9bab80

File tree

3 files changed

+69
-61
lines changed

3 files changed

+69
-61
lines changed

packages/sign_in_with_apple/sign_in_with_apple/example/pubspec.lock

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,10 @@ packages:
3737
dependency: transitive
3838
description:
3939
name: collection
40-
sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a
40+
sha256: a1ace0a119f20aabc852d165077c036cd864315bd99b7eaa10a60100341941bf
4141
url: "https://pub.dev"
4242
source: hosted
43-
version: "1.18.0"
43+
version: "1.19.0"
4444
fake_async:
4545
dependency: transitive
4646
description:
@@ -92,26 +92,26 @@ packages:
9292
dependency: transitive
9393
description:
9494
name: leak_tracker
95-
sha256: "78eb209deea09858f5269f5a5b02be4049535f568c07b275096836f01ea323fa"
95+
sha256: "7bb2830ebd849694d1ec25bf1f44582d6ac531a57a365a803a6034ff751d2d06"
9696
url: "https://pub.dev"
9797
source: hosted
98-
version: "10.0.0"
98+
version: "10.0.7"
9999
leak_tracker_flutter_testing:
100100
dependency: transitive
101101
description:
102102
name: leak_tracker_flutter_testing
103-
sha256: b46c5e37c19120a8a01918cfaf293547f47269f7cb4b0058f21531c2465d6ef0
103+
sha256: "9491a714cca3667b60b5c420da8217e6de0d1ba7a5ec322fab01758f6998f379"
104104
url: "https://pub.dev"
105105
source: hosted
106-
version: "2.0.1"
106+
version: "3.0.8"
107107
leak_tracker_testing:
108108
dependency: transitive
109109
description:
110110
name: leak_tracker_testing
111-
sha256: a597f72a664dbd293f3bfc51f9ba69816f84dcd403cdac7066cb3f6003f3ab47
111+
sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3"
112112
url: "https://pub.dev"
113113
source: hosted
114-
version: "2.0.1"
114+
version: "3.0.1"
115115
lints:
116116
dependency: transitive
117117
description:
@@ -132,18 +132,18 @@ packages:
132132
dependency: transitive
133133
description:
134134
name: material_color_utilities
135-
sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a"
135+
sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec
136136
url: "https://pub.dev"
137137
source: hosted
138-
version: "0.8.0"
138+
version: "0.11.1"
139139
meta:
140140
dependency: transitive
141141
description:
142142
name: meta
143-
sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04
143+
sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7
144144
url: "https://pub.dev"
145145
source: hosted
146-
version: "1.11.0"
146+
version: "1.15.0"
147147
path:
148148
dependency: transitive
149149
description:
@@ -166,26 +166,26 @@ packages:
166166
path: ".."
167167
relative: true
168168
source: path
169-
version: "6.1.0"
169+
version: "6.1.4"
170170
sign_in_with_apple_platform_interface:
171171
dependency: "direct overridden"
172172
description:
173173
path: "../../sign_in_with_apple_platform_interface"
174174
relative: true
175175
source: path
176-
version: "1.0.0"
176+
version: "1.1.0"
177177
sign_in_with_apple_web:
178178
dependency: "direct overridden"
179179
description:
180180
path: "../../sign_in_with_apple_web"
181181
relative: true
182182
source: path
183-
version: "2.0.0"
183+
version: "2.1.1"
184184
sky_engine:
185185
dependency: transitive
186186
description: flutter
187187
source: sdk
188-
version: "0.0.99"
188+
version: "0.0.0"
189189
source_span:
190190
dependency: transitive
191191
description:
@@ -198,10 +198,10 @@ packages:
198198
dependency: transitive
199199
description:
200200
name: stack_trace
201-
sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b"
201+
sha256: "9f47fd3630d76be3ab26f0ee06d213679aa425996925ff3feffdec504931c377"
202202
url: "https://pub.dev"
203203
source: hosted
204-
version: "1.11.1"
204+
version: "1.12.0"
205205
stream_channel:
206206
dependency: transitive
207207
description:
@@ -214,10 +214,10 @@ packages:
214214
dependency: transitive
215215
description:
216216
name: string_scanner
217-
sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde"
217+
sha256: "688af5ed3402a4bde5b3a6c15fd768dbf2621a614950b17f04626c431ab3c4c3"
218218
url: "https://pub.dev"
219219
source: hosted
220-
version: "1.2.0"
220+
version: "1.3.0"
221221
term_glyph:
222222
dependency: transitive
223223
description:
@@ -230,10 +230,10 @@ packages:
230230
dependency: transitive
231231
description:
232232
name: test_api
233-
sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b"
233+
sha256: "664d3a9a64782fcdeb83ce9c6b39e78fd2971d4e37827b9b06c3aa1edc5e760c"
234234
url: "https://pub.dev"
235235
source: hosted
236-
version: "0.6.1"
236+
version: "0.7.3"
237237
typed_data:
238238
dependency: transitive
239239
description:
@@ -254,10 +254,10 @@ packages:
254254
dependency: transitive
255255
description:
256256
name: vm_service
257-
sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957
257+
sha256: f6be3ed8bd01289b34d679c2b62226f63c0e69f9fd2e50a6b3c1c729a961041b
258258
url: "https://pub.dev"
259259
source: hosted
260-
version: "13.0.0"
260+
version: "14.3.0"
261261
web:
262262
dependency: transitive
263263
description:
@@ -267,5 +267,5 @@ packages:
267267
source: hosted
268268
version: "0.5.0"
269269
sdks:
270-
dart: ">=3.3.0 <4.0.0"
270+
dart: ">=3.4.0 <4.0.0"
271271
flutter: ">=3.19.1"

packages/sign_in_with_apple/sign_in_with_apple/lib/src/widgets/sign_in_with_apple_button.dart

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ class SignInWithAppleButton extends StatelessWidget {
1313
super.key,
1414
required this.onPressed,
1515
this.text = 'Sign in with Apple',
16+
this.textWidget,
1617
this.height = 44,
1718
this.style = SignInWithAppleButtonStyle.black,
1819
this.borderRadius = const BorderRadius.all(Radius.circular(8.0)),
@@ -49,6 +50,11 @@ class SignInWithAppleButton extends StatelessWidget {
4950
/// This defaults to [IconAlignment.center].
5051
final IconAlignment iconAlignment;
5152

53+
/// The text widget to display next to the Apple logo.
54+
///
55+
/// If this is set, the [text] parameter will be ignored.
56+
final Widget? textWidget;
57+
5258
/// Returns the background color of the button based on the current [style].
5359
Color get _backgroundColor {
5460
switch (style) {
@@ -95,18 +101,20 @@ class SignInWithAppleButton extends StatelessWidget {
95101
// per Apple's guidelines
96102
final fontSize = height * 0.43;
97103

98-
final textWidget = Text(
99-
text,
100-
textAlign: TextAlign.center,
101-
style: TextStyle(
102-
inherit: false,
103-
fontSize: fontSize,
104-
color: _contrastColor,
105-
// defaults styles aligned with https://github.com/flutter/flutter/blob/master/packages/flutter/lib/src/cupertino/text_theme.dart#L16
106-
fontFamily: '.SF Pro Text',
107-
letterSpacing: -0.41,
108-
),
109-
);
104+
// The text widget to display next to the Apple logo
105+
final textWidget = this.textWidget ??
106+
Text(
107+
text,
108+
textAlign: TextAlign.center,
109+
style: TextStyle(
110+
inherit: false,
111+
fontSize: fontSize,
112+
color: _contrastColor,
113+
// defaults styles aligned with https://github.com/flutter/flutter/blob/master/packages/flutter/lib/src/cupertino/text_theme.dart#L16
114+
fontFamily: '.SF Pro Text',
115+
letterSpacing: -0.41,
116+
),
117+
);
110118

111119
final appleIcon = Container(
112120
width: _appleIconSizeScale * height,

packages/sign_in_with_apple/sign_in_with_apple/pubspec.lock

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,10 @@ packages:
3737
dependency: transitive
3838
description:
3939
name: collection
40-
sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a
40+
sha256: a1ace0a119f20aabc852d165077c036cd864315bd99b7eaa10a60100341941bf
4141
url: "https://pub.dev"
4242
source: hosted
43-
version: "1.18.0"
43+
version: "1.19.0"
4444
fake_async:
4545
dependency: transitive
4646
description:
@@ -76,26 +76,26 @@ packages:
7676
dependency: transitive
7777
description:
7878
name: leak_tracker
79-
sha256: "78eb209deea09858f5269f5a5b02be4049535f568c07b275096836f01ea323fa"
79+
sha256: "7bb2830ebd849694d1ec25bf1f44582d6ac531a57a365a803a6034ff751d2d06"
8080
url: "https://pub.dev"
8181
source: hosted
82-
version: "10.0.0"
82+
version: "10.0.7"
8383
leak_tracker_flutter_testing:
8484
dependency: transitive
8585
description:
8686
name: leak_tracker_flutter_testing
87-
sha256: b46c5e37c19120a8a01918cfaf293547f47269f7cb4b0058f21531c2465d6ef0
87+
sha256: "9491a714cca3667b60b5c420da8217e6de0d1ba7a5ec322fab01758f6998f379"
8888
url: "https://pub.dev"
8989
source: hosted
90-
version: "2.0.1"
90+
version: "3.0.8"
9191
leak_tracker_testing:
9292
dependency: transitive
9393
description:
9494
name: leak_tracker_testing
95-
sha256: a597f72a664dbd293f3bfc51f9ba69816f84dcd403cdac7066cb3f6003f3ab47
95+
sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3"
9696
url: "https://pub.dev"
9797
source: hosted
98-
version: "2.0.1"
98+
version: "3.0.1"
9999
lints:
100100
dependency: transitive
101101
description:
@@ -116,18 +116,18 @@ packages:
116116
dependency: transitive
117117
description:
118118
name: material_color_utilities
119-
sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a"
119+
sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec
120120
url: "https://pub.dev"
121121
source: hosted
122-
version: "0.8.0"
122+
version: "0.11.1"
123123
meta:
124124
dependency: "direct main"
125125
description:
126126
name: meta
127-
sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04
127+
sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7
128128
url: "https://pub.dev"
129129
source: hosted
130-
version: "1.11.0"
130+
version: "1.15.0"
131131
path:
132132
dependency: transitive
133133
description:
@@ -156,15 +156,15 @@ packages:
156156
dependency: "direct main"
157157
description:
158158
name: sign_in_with_apple_web
159-
sha256: c009e9beeb6c376e86aaa154fcc8b4e075d4bad90c56286b9668a51cdb6129ea
159+
sha256: "2f7c38368f49e3f2043bca4b46a4a61aaae568c140a79aa0675dc59ad0ca49bc"
160160
url: "https://pub.dev"
161161
source: hosted
162-
version: "2.1.0"
162+
version: "2.1.1"
163163
sky_engine:
164164
dependency: transitive
165165
description: flutter
166166
source: sdk
167-
version: "0.0.99"
167+
version: "0.0.0"
168168
source_span:
169169
dependency: transitive
170170
description:
@@ -177,10 +177,10 @@ packages:
177177
dependency: transitive
178178
description:
179179
name: stack_trace
180-
sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b"
180+
sha256: "9f47fd3630d76be3ab26f0ee06d213679aa425996925ff3feffdec504931c377"
181181
url: "https://pub.dev"
182182
source: hosted
183-
version: "1.11.1"
183+
version: "1.12.0"
184184
stream_channel:
185185
dependency: transitive
186186
description:
@@ -193,10 +193,10 @@ packages:
193193
dependency: transitive
194194
description:
195195
name: string_scanner
196-
sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde"
196+
sha256: "688af5ed3402a4bde5b3a6c15fd768dbf2621a614950b17f04626c431ab3c4c3"
197197
url: "https://pub.dev"
198198
source: hosted
199-
version: "1.2.0"
199+
version: "1.3.0"
200200
term_glyph:
201201
dependency: transitive
202202
description:
@@ -209,10 +209,10 @@ packages:
209209
dependency: transitive
210210
description:
211211
name: test_api
212-
sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b"
212+
sha256: "664d3a9a64782fcdeb83ce9c6b39e78fd2971d4e37827b9b06c3aa1edc5e760c"
213213
url: "https://pub.dev"
214214
source: hosted
215-
version: "0.6.1"
215+
version: "0.7.3"
216216
vector_math:
217217
dependency: transitive
218218
description:
@@ -225,10 +225,10 @@ packages:
225225
dependency: transitive
226226
description:
227227
name: vm_service
228-
sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957
228+
sha256: f6be3ed8bd01289b34d679c2b62226f63c0e69f9fd2e50a6b3c1c729a961041b
229229
url: "https://pub.dev"
230230
source: hosted
231-
version: "13.0.0"
231+
version: "14.3.0"
232232
sdks:
233-
dart: ">=3.3.0 <4.0.0"
233+
dart: ">=3.4.0 <4.0.0"
234234
flutter: ">=3.19.0"

0 commit comments

Comments
 (0)