initialized Application theme

This commit is contained in:
Mohammad Salameh
2024-02-15 14:00:09 +03:00
parent 16f47f744c
commit 3190361901
98 changed files with 871 additions and 1004 deletions

View File

@ -1,25 +1,25 @@
import 'package:flutter/material.dart';
import 'package:syncrow_app/resource_manager/color_manager.dart';
import 'package:syncrow_app/utils/resource_manager/color_manager.dart';
class DefaultTextButton extends StatelessWidget {
const DefaultTextButton({
super.key,
this.onPressed,
required this.text,
this.isPrimary = false,
this.isSecondary = false,
});
final void Function()? onPressed;
final String text;
final bool isPrimary;
final bool isSecondary;
@override
Widget build(BuildContext context) {
return TextButton(
onPressed: onPressed,
style: isPrimary
? ButtonStyle(
style: isSecondary
? null
: ButtonStyle(
backgroundColor:
MaterialStateProperty.all(ColorsManager.primaryColor),
shape: MaterialStateProperty.all(
@ -27,11 +27,10 @@ class DefaultTextButton extends StatelessWidget {
borderRadius: BorderRadius.circular(8),
),
),
)
: null,
),
child: Text(
text,
style: TextStyle(color: isPrimary ? Colors.white : Colors.black),
style: TextStyle(color: isSecondary ? Colors.black : Colors.white),
),
);
}