added colors

This commit is contained in:
hannathkadher
2024-10-08 10:41:40 +04:00
parent fc7ccb8ad8
commit cdd22f8d76
2 changed files with 17 additions and 16 deletions

View File

@ -1,8 +1,5 @@
import 'dart:ui_web';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart'; import 'package:flutter_svg/flutter_svg.dart';
import 'package:syncrow_web/common/custom_expansion_tile.dart';
import 'package:syncrow_web/pages/common/buttons/add_space_button.dart'; import 'package:syncrow_web/pages/common/buttons/add_space_button.dart';
import 'package:syncrow_web/pages/spaces_management/model/community_model.dart'; import 'package:syncrow_web/pages/spaces_management/model/community_model.dart';
import 'package:syncrow_web/pages/spaces_management/model/space_model.dart'; import 'package:syncrow_web/pages/spaces_management/model/space_model.dart';
@ -10,7 +7,6 @@ import 'package:syncrow_web/pages/spaces_management/view/dialogs/create_space_di
import 'package:syncrow_web/pages/spaces_management/view/sidebar_widget.dart'; import 'package:syncrow_web/pages/spaces_management/view/sidebar_widget.dart';
import 'package:syncrow_web/services/space_mana_api.dart'; import 'package:syncrow_web/services/space_mana_api.dart';
import 'package:syncrow_web/utils/color_manager.dart'; import 'package:syncrow_web/utils/color_manager.dart';
import 'package:syncrow_web/utils/constants/assets.dart';
class SpaceManagementPage extends StatefulWidget { class SpaceManagementPage extends StatefulWidget {
@override @override
@ -88,7 +84,7 @@ class SpaceManagementPageState extends State<SpaceManagementPage> {
color: ColorsManager.whiteColors, color: ColorsManager.whiteColors,
border: Border( border: Border(
left: BorderSide( left: BorderSide(
color: Colors.white, color: ColorsManager.whiteColors,
width: 1.0), // Light left border to match width: 1.0), // Light left border to match
), ),
), ),
@ -104,8 +100,8 @@ class SpaceManagementPageState extends State<SpaceManagementPage> {
color: ColorsManager.whiteColors, color: ColorsManager.whiteColors,
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: Colors.black color: ColorsManager
.withOpacity(0.2), // Subtle shadow .shadowBlackColor, // Subtle shadow
spreadRadius: 0, // No spread spreadRadius: 0, // No spread
blurRadius: 8, // Softer shadow edges blurRadius: 8, // Softer shadow edges
offset: Offset(0, 4), // Shadow only on the bottom offset: Offset(0, 4), // Shadow only on the bottom
@ -132,7 +128,7 @@ class SpaceManagementPageState extends State<SpaceManagementPage> {
child: Container( child: Container(
width: 2000, // Large canvas width: 2000, // Large canvas
height: 2000, // Large canvas height: 2000, // Large canvas
color: Colors.transparent, // Transparent background color: ColorsManager.transparentColor, // Transparent background
child: Stack( child: Stack(
clipBehavior: Clip.none, clipBehavior: Clip.none,
children: [ children: [
@ -180,8 +176,9 @@ class SpaceManagementPageState extends State<SpaceManagementPage> {
begin: Alignment.centerLeft, begin: Alignment.centerLeft,
end: Alignment.centerRight, end: Alignment.centerRight,
colors: [ colors: [
Color(0x3F000000).withOpacity(0.1), // Light gray ColorsManager.semiTransparentBlackColor
Colors.transparent, // Transparent fade .withOpacity(0.1), // Light gray
ColorsManager.transparentColor, // Transparent fade
], ],
), ),
), ),
@ -278,7 +275,7 @@ class SpaceManagementPageState extends State<SpaceManagementPage> {
width: 150, width: 150,
height: 60, height: 60,
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: ColorsManager.whiteColors,
borderRadius: BorderRadius.circular(15), borderRadius: BorderRadius.circular(15),
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
@ -295,7 +292,7 @@ class SpaceManagementPageState extends State<SpaceManagementPage> {
width: 40, width: 40,
height: 60, height: 60,
decoration: const BoxDecoration( decoration: const BoxDecoration(
color: Color(0xFF023DFE), color: ColorsManager.secondaryColor,
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
topLeft: Radius.circular(15), topLeft: Radius.circular(15),
bottomLeft: Radius.circular(15), bottomLeft: Radius.circular(15),
@ -306,7 +303,6 @@ class SpaceManagementPageState extends State<SpaceManagementPage> {
spaces[index].icon, spaces[index].icon,
width: 24, width: 24,
height: 24, height: 24,
color: Colors.white,
), ),
), ),
), ),
@ -353,7 +349,7 @@ class SpaceManagementPageState extends State<SpaceManagementPage> {
width: 30, width: 30,
height: 30, height: 30,
decoration: const BoxDecoration( decoration: const BoxDecoration(
color: Color(0xFF023DFE), color: ColorsManager.secondaryColor,
shape: BoxShape.circle, shape: BoxShape.circle,
), ),
child: const Icon(Icons.add, color: Colors.white, size: 20), child: const Icon(Icons.add, color: Colors.white, size: 20),
@ -400,7 +396,7 @@ class CurvedLinePainter extends CustomPainter {
@override @override
void paint(Canvas canvas, Size size) { void paint(Canvas canvas, Size size) {
final paint = Paint() final paint = Paint()
..color = Colors.black ..color = ColorsManager.blackColor
..strokeWidth = 2 ..strokeWidth = 2
..style = PaintingStyle.stroke; ..style = PaintingStyle.stroke;
@ -437,7 +433,7 @@ class CurvedLinePainter extends CustomPainter {
} }
// Draw small connection dots at the start and end points // Draw small connection dots at the start and end points
final dotPaint = Paint()..color = Colors.black; final dotPaint = Paint()..color = ColorsManager.blackColor;
canvas.drawCircle(start, 5, dotPaint); // Start dot canvas.drawCircle(start, 5, dotPaint); // Start dot
canvas.drawCircle(end, 5, dotPaint); // End dot canvas.drawCircle(end, 5, dotPaint); // End dot
} }

View File

@ -10,6 +10,8 @@ abstract class ColorsManager {
static const Color whiteColors = Colors.white; static const Color whiteColors = Colors.white;
static const Color secondaryColor = Color(0xFF023DFE); static const Color secondaryColor = Color(0xFF023DFE);
static const Color onSecondaryColor = Color(0xFF023DFE); static const Color onSecondaryColor = Color(0xFF023DFE);
static Color shadowBlackColor = Colors.black.withOpacity(0.2);
static Color dialogBlueTitle = Color(0xFF023DFE).withOpacity(0.6); static Color dialogBlueTitle = Color(0xFF023DFE).withOpacity(0.6);
@ -46,5 +48,8 @@ abstract class ColorsManager {
static const Color textGreen = Color(0xFF008905); static const Color textGreen = Color(0xFF008905);
static const Color yaGreen = Color(0xFFFFBF44); static const Color yaGreen = Color(0xFFFFBF44);
static const Color checkBoxFillColor = Color(0xFFF3F3F3); static const Color checkBoxFillColor = Color(0xFFF3F3F3);
static const Color semiTransparentBlackColor = Color(0x3F000000);
static const Color transparentColor = Color(0x00000000)
} }
//0036E6 //0036E6