-
Notifications
You must be signed in to change notification settings - Fork 1
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
1 parent
9f6ad85
commit a7b5e44
Showing
4 changed files
with
34 additions
and
52 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
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
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 |
---|---|---|
@@ -1,32 +1,31 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:flutter/material.dart'; | ||
|
||
class MyButton extends StatelessWidget { | ||
class MyButton extends StatelessWidget { | ||
final Function()? onTap; | ||
const MyButton({super.key, required this.onTap}); | ||
|
||
final Function()? onTap; | ||
const MyButton({super.key,required this.onTap}); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return GestureDetector( | ||
onTap: onTap, | ||
child: Container( | ||
padding: const EdgeInsets.all(25), | ||
margin: const EdgeInsets.symmetric(horizontal: 25), | ||
decoration: BoxDecoration( | ||
color: Colors.black, | ||
borderRadius: BorderRadius.circular(8), | ||
), | ||
child: const Center( | ||
child: Text( | ||
"Sign In", | ||
style: TextStyle( | ||
color: Colors.white, | ||
fontWeight: FontWeight.bold, | ||
fontSize: 16, | ||
), | ||
), | ||
@override | ||
Widget build(BuildContext context) { | ||
return GestureDetector( | ||
onTap: onTap, | ||
child: Container( | ||
padding: const EdgeInsets.all(25), | ||
margin: const EdgeInsets.symmetric(horizontal: 25), | ||
decoration: BoxDecoration( | ||
color: Colors.black, | ||
borderRadius: BorderRadius.circular(8), | ||
), | ||
child: const Center( | ||
child: Text( | ||
"Sign In", | ||
style: TextStyle( | ||
color: Colors.white, | ||
fontWeight: FontWeight.bold, | ||
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