Skip to content

Commit 1503c7f

Browse files
committed
refactor(ui): add social login callbacks to auth layout template
1 parent 654f4f5 commit 1503c7f

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

src/lib/core/theme/auth_layout_template.dart

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ class AuthLayoutTemplate extends StatelessWidget {
1414
final bool useCard;
1515
final Widget? customHeaderIcon;
1616
final Widget? footerContent;
17+
final VoidCallback? onGoogleTap; // Login with Google
18+
final VoidCallback? onFacebookTap; // Login with Facebook
1719

1820
const AuthLayoutTemplate({
1921
super.key,
@@ -27,6 +29,8 @@ class AuthLayoutTemplate extends StatelessWidget {
2729
this.useCard = true,
2830
this.customHeaderIcon,
2931
this.footerContent,
32+
this.onGoogleTap,
33+
this.onFacebookTap,
3034
});
3135

3236
@override
@@ -200,7 +204,7 @@ class AuthLayoutTemplate extends StatelessWidget {
200204
children: [
201205
Expanded(
202206
child: OutlinedButton.icon(
203-
onPressed: () {},
207+
onPressed: onGoogleTap,
204208
icon: const Icon(
205209
Icons.g_mobiledata,
206210
color: Colors.red,
@@ -212,7 +216,7 @@ class AuthLayoutTemplate extends StatelessWidget {
212216
const SizedBox(width: 16),
213217
Expanded(
214218
child: OutlinedButton.icon(
215-
onPressed: () {},
219+
onPressed: onFacebookTap,
216220
icon: const Icon(Icons.facebook, color: Color(0xFF1877F2)),
217221
label: const Text('Facebook'),
218222
),

0 commit comments

Comments
 (0)