roles_and_permission

This commit is contained in:
mohammad
2024-12-12 19:00:51 +03:00
parent 7ee335ab1a
commit 56d4c34321
36 changed files with 2739 additions and 87 deletions

View File

@ -2,51 +2,59 @@ import 'package:flutter/material.dart';
import 'color_manager.dart';
InputDecoration? textBoxDecoration({bool suffixIcon = false}) => InputDecoration(
InputDecoration? textBoxDecoration(
{bool suffixIcon = false, double radios = 8}) =>
InputDecoration(
focusColor: ColorsManager.grayColor,
suffixIcon: suffixIcon ? const Icon(Icons.search) : null,
hintText: 'Search',
filled: true, // Enable background filling
fillColor: const Color(0xffF5F6F7), // Set the background color
border: OutlineInputBorder(
borderRadius: BorderRadius.circular(8), // Add border radius
borderRadius: BorderRadius.circular(radios), // Add border radius
borderSide: BorderSide.none, // Remove the underline
),
enabledBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(8), // Add border radius
borderRadius: BorderRadius.circular(radios), // Add border radius
borderSide: BorderSide.none, // Remove the underline
),
focusedBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(8), // Add border radius
borderRadius: BorderRadius.circular(radios), // Add border radius
borderSide: BorderSide.none, // Remove the underline
),
errorBorder: OutlineInputBorder(
borderSide: const BorderSide(color: Colors.red, width: 2),
borderRadius: BorderRadius.circular(8),
borderRadius: BorderRadius.circular(radios),
),
focusedErrorBorder: OutlineInputBorder(
borderSide: const BorderSide(color: Colors.red, width: 2),
borderRadius: BorderRadius.circular(8),
borderRadius: BorderRadius.circular(radios),
),
);
BoxDecoration containerDecoration = BoxDecoration(boxShadow: [
BoxShadow(
color: Colors.grey.withOpacity(0.3),
spreadRadius: 2,
blurRadius: 4,
offset: const Offset(0, 5), // changes position of shadow
),
], color: ColorsManager.boxColor, borderRadius: const BorderRadius.all(Radius.circular(10)));
BoxDecoration containerDecoration = BoxDecoration(
boxShadow: [
BoxShadow(
color: Colors.grey.withOpacity(0.3),
spreadRadius: 2,
blurRadius: 4,
offset: const Offset(0, 5), // changes position of shadow
),
],
color: ColorsManager.boxColor,
borderRadius: const BorderRadius.all(Radius.circular(10)));
BoxDecoration containerWhiteDecoration = BoxDecoration(boxShadow: [
BoxShadow(
color: Colors.grey.withOpacity(0.3),
spreadRadius: 2,
blurRadius: 4,
offset: const Offset(0, 5), // changes position of shadow
),
], color: ColorsManager.whiteColors, borderRadius: const BorderRadius.all(Radius.circular(15)));
BoxDecoration containerWhiteDecoration = BoxDecoration(
boxShadow: [
BoxShadow(
color: Colors.grey.withOpacity(0.3),
spreadRadius: 2,
blurRadius: 4,
offset: const Offset(0, 5), // changes position of shadow
),
],
color: ColorsManager.whiteColors,
borderRadius: const BorderRadius.all(Radius.circular(15)));
BoxDecoration subSectionContainerDecoration = BoxDecoration(
color: ColorsManager.whiteColors,
@ -59,3 +67,30 @@ BoxDecoration subSectionContainerDecoration = BoxDecoration(
),
],
);
InputDecoration inputTextFormDeco({hintText}) => InputDecoration(
hintText: hintText,
border: const OutlineInputBorder(
borderSide: BorderSide(
width: 1,
color: ColorsManager.textGray, // Border color for unfocused state
),
borderRadius: BorderRadius.all(Radius.circular(10)),
),
focusedBorder: const OutlineInputBorder(
borderSide: BorderSide(
width: 2,
color: ColorsManager.textGray, // Border color when focused
),
borderRadius: BorderRadius.all(Radius.circular(10)),
),
enabledBorder: const OutlineInputBorder(
borderSide: BorderSide(
width: 1,
color: ColorsManager
.textGray // Border color for enabled (but unfocused) state
),
borderRadius: BorderRadius.all(Radius.circular(10)),
),
);