Initialized Auth pages for future work

Implemented Login functionality
This commit is contained in:
Mohammad Salameh
2024-03-07 10:29:19 +03:00
parent 4087f9c71c
commit f734801e94
28 changed files with 728 additions and 110 deletions

View File

@ -4,6 +4,7 @@ import 'package:syncrow_app/utils/resource_manager/color_manager.dart';
class DefaultTextButton extends StatelessWidget {
const DefaultTextButton({
super.key,
this.enabled = true,
this.onPressed,
required this.text,
this.isSecondary = false,
@ -13,15 +14,17 @@ class DefaultTextButton extends StatelessWidget {
final String text;
final bool isSecondary;
final bool enabled;
@override
Widget build(BuildContext context) {
return TextButton(
onPressed: onPressed,
onPressed: enabled ? onPressed : null,
style: isSecondary
? null
: ButtonStyle(
backgroundColor:
MaterialStateProperty.all(ColorsManager.primaryColor),
backgroundColor: MaterialStateProperty.all(
enabled ? ColorsManager.primaryColor : Colors.grey),
shape: MaterialStateProperty.all(
RoundedRectangleBorder(
borderRadius: BorderRadius.circular(8),
@ -30,7 +33,12 @@ class DefaultTextButton extends StatelessWidget {
),
child: Text(
text,
style: TextStyle(color: isSecondary ? Colors.black : Colors.white),
style: TextStyle(
color: isSecondary
? Colors.black
: enabled
? Colors.white
: Colors.black),
),
);
}