mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2025-07-16 10:06:16 +00:00
Initialized Auth pages for future work
Implemented Login functionality
This commit is contained in:
@ -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),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
Reference in New Issue
Block a user