-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
63 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:flutter_svg/svg.dart'; | ||
|
||
class AuthCard extends StatelessWidget { | ||
final String iconPath; | ||
final String label; | ||
final Function() onTap; | ||
|
||
const AuthCard({ | ||
super.key, | ||
required this.iconPath, | ||
required this.label, | ||
required this.onTap, | ||
}); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return InkWell( | ||
onTap: onTap, | ||
child: Card( | ||
margin: const EdgeInsets.fromLTRB(20, 20, 20, 0), | ||
shape: RoundedRectangleBorder( | ||
borderRadius: BorderRadius.circular(10), | ||
), | ||
elevation: 0, | ||
child: Padding( | ||
padding: const EdgeInsets.all(15), | ||
child: Row( | ||
mainAxisAlignment: MainAxisAlignment.start, | ||
children: [ | ||
const SizedBox(width: 20), | ||
SvgPicture.asset( | ||
iconPath, | ||
height: 30, | ||
width: 30, | ||
), | ||
const SizedBox(width: 20), | ||
Text(label, style: const TextStyle(fontSize: 16)), | ||
], | ||
), | ||
), | ||
), | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters