feat: enhance kill house - submit request module with submit request functionality, including new models, repository updates, and UI integration
This commit is contained in:
@@ -4,319 +4,137 @@ class AppColor {
|
||||
AppColor._();
|
||||
|
||||
//region --- Blue Colors ---
|
||||
static const Color blueLight = Color(
|
||||
0xFFeaefff,
|
||||
); // #eaefff rgb(234, 239, 255)
|
||||
static const Color blueLightHover = Color(
|
||||
0xFFe0e7ff,
|
||||
); // #e0e7ff rgb(224, 231, 255)
|
||||
static const Color blueLightActive = Color(
|
||||
0xFFbecdff,
|
||||
); // #becdff rgb(190, 205, 255)
|
||||
static const Color blueNormalOld = Color(
|
||||
0xFF2d5fff,
|
||||
); // #2d5fff rgb(45, 95, 255)
|
||||
static const Color blueLight = Color(0xFFeaefff); // #eaefff rgb(234, 239, 255)
|
||||
static const Color blueLightHover = Color(0xFFe0e7ff); // #e0e7ff rgb(224, 231, 255)
|
||||
static const Color blueLightActive = Color(0xFFbecdff); // #becdff rgb(190, 205, 255)
|
||||
static const Color blueNormalOld = Color(0xFF2d5fff); // #2d5fff rgb(45, 95, 255)
|
||||
static const Color blueNormal = blueDark;
|
||||
static const Color blueNormalHover = Color(
|
||||
0xFF2956e6,
|
||||
); // #2956e6 rgb(41, 86, 230)
|
||||
static const Color blueNormalActive = Color(
|
||||
0xFF244ccc,
|
||||
); // #244ccc rgb(36, 76, 204)
|
||||
static const Color blueNormalHover = Color(0xFF2956e6); // #2956e6 rgb(41, 86, 230)
|
||||
static const Color blueNormalActive = Color(0xFF244ccc); // #244ccc rgb(36, 76, 204)
|
||||
static const Color blueDark = Color(0xFF2247bf); // #2247bf rgb(34, 71, 191)
|
||||
static const Color blueDarkHover = Color(
|
||||
0xFF1b3999,
|
||||
); // #1b3999 rgb(27, 57, 153)
|
||||
static const Color blueDarkActive = Color(
|
||||
0xFF142b73,
|
||||
); // #142b73 rgb(20, 43, 115)
|
||||
static const Color blueDarkHover = Color(0xFF1b3999); // #1b3999 rgb(27, 57, 153)
|
||||
static const Color blueDarkActive = Color(0xFF142b73); // #142b73 rgb(20, 43, 115)
|
||||
static const Color blueDarker = Color(0xFF102159); // #102159 rgb(16, 33, 89)
|
||||
static const Color blueFlashing = Color(
|
||||
0xFF6F91FF,
|
||||
); // #6F91FF rgb(111, 145, 255)
|
||||
static const Color blueFlashing = Color(0xFF6F91FF); // #6F91FF rgb(111, 145, 255)
|
||||
//endregion
|
||||
|
||||
//region --- Green Colors ---
|
||||
static const Color greenLight = Color(
|
||||
0xFFe6faf5,
|
||||
); // #e6faf5 rgb(230, 250, 245)
|
||||
static const Color greenLightHover = Color(
|
||||
0xFFd9f7f0,
|
||||
); // #d9f7f0 rgb(217, 247, 240)
|
||||
static const Color greenLightActive = Color(
|
||||
0xFFb0efdf,
|
||||
); // #b0efdf rgb(176, 239, 223)
|
||||
static const Color greenNormal = Color(
|
||||
0xFF00cc99,
|
||||
); // #00cc99 rgb(0, 204, 153)
|
||||
static const Color greenNormalHover = Color(
|
||||
0xFF00b88a,
|
||||
); // #00b88a rgb(0, 184, 138)
|
||||
static const Color greenNormalActive = Color(
|
||||
0xFF00a37a,
|
||||
); // #00a37a rgb(0, 163, 122)
|
||||
static const Color greenLight = Color(0xFFe6faf5); // #e6faf5 rgb(230, 250, 245)
|
||||
static const Color greenLightHover = Color(0xFFd9f7f0); // #d9f7f0 rgb(217, 247, 240)
|
||||
static const Color greenLightActive = Color(0xFFb0efdf); // #b0efdf rgb(176, 239, 223)
|
||||
static const Color greenNormal = Color(0xFF00cc99); // #00cc99 rgb(0, 204, 153)
|
||||
static const Color greenNormalHover = Color(0xFF00b88a); // #00b88a rgb(0, 184, 138)
|
||||
static const Color greenNormalActive = Color(0xFF00a37a); // #00a37a rgb(0, 163, 122)
|
||||
static const Color greenDark = Color(0xFF009973); // #009973 rgb(0, 153, 115)
|
||||
static const Color greenDarkHover = Color(
|
||||
0xFF007a5c,
|
||||
); // #007a5c rgb(0, 122, 92)
|
||||
static const Color greenDarkActive = Color(
|
||||
0xFF005c45,
|
||||
); // #005c45 rgb(0, 92, 69)
|
||||
static const Color greenDarkHover = Color(0xFF007a5c); // #007a5c rgb(0, 122, 92)
|
||||
static const Color greenDarkActive = Color(0xFF005c45); // #005c45 rgb(0, 92, 69)
|
||||
static const Color greenDarker = Color(0xFF004736); // #004736 rgb(0, 71, 54)
|
||||
//endregion
|
||||
|
||||
//region --- Black Colors ---
|
||||
static const Color blackLight = Color(
|
||||
0xFFe6e6e6,
|
||||
); // #e6e6e6 rgb(230, 230, 230)
|
||||
static const Color blackLightHover = Color(
|
||||
0xFFd9d9d9,
|
||||
); // #d9d9d9 rgb(217, 217, 217)
|
||||
static const Color blackLightActive = Color(
|
||||
0xFFb0b0b0,
|
||||
); // #b0b0b0 rgb(176, 176, 176)
|
||||
static const Color blackLight = Color(0xFFe6e6e6); // #e6e6e6 rgb(230, 230, 230)
|
||||
static const Color blackLightHover = Color(0xFFd9d9d9); // #d9d9d9 rgb(217, 217, 217)
|
||||
static const Color blackLightActive = Color(0xFFb0b0b0); // #b0b0b0 rgb(176, 176, 176)
|
||||
static const Color blackNormal = Color(0xFF000000); // #000000 rgb(0, 0, 0)
|
||||
static const Color blackNormalHover = Color(
|
||||
0xFF000000,
|
||||
); // #000000 rgb(0, 0, 0)
|
||||
static const Color blackNormalActive = Color(
|
||||
0xFF000000,
|
||||
); // #000000 rgb(0, 0, 0)
|
||||
static const Color blackNormalHover = Color(0xFF000000); // #000000 rgb(0, 0, 0)
|
||||
static const Color blackNormalActive = Color(0xFF000000); // #000000 rgb(0, 0, 0)
|
||||
static const Color blackDark = Color(0xFF000000); // #000000 rgb(0, 0, 0)
|
||||
static const Color blackDarkHover = Color(0xFF000000); // #000000 rgb(0, 0, 0)
|
||||
static const Color blackDarkActive = Color(
|
||||
0xFF000000,
|
||||
); // #000000 rgb(0, 0, 0)
|
||||
static const Color blackDarkActive = Color(0xFF000000); // #000000 rgb(0, 0, 0)
|
||||
static const Color blackDarker = Color(0xFF000000); // #000000 rgb(0, 0, 0)
|
||||
//endregion
|
||||
|
||||
//region --- Grey Colors ---
|
||||
static const Color darkGreyLight = Color(
|
||||
0xFFeaeaea,
|
||||
); // #eaeaea rgb(234, 234, 234)
|
||||
static const Color darkGreyLightHover = Color(
|
||||
0xFFdfdfdf,
|
||||
); // #dfdfdf rgb(223, 223, 223)
|
||||
static const Color darkGreyLightActive = Color(
|
||||
0xFFbdbdbd,
|
||||
); // #bdbdbd rgb(189, 189, 189)
|
||||
static const Color darkGreyNormal = Color(
|
||||
0xFF2a2a2a,
|
||||
); // #2a2a2a rgb(42, 42, 42)
|
||||
static const Color darkGreyNormalHover = Color(
|
||||
0xFF262626,
|
||||
); // #262626 rgb(38, 38, 38)
|
||||
static const Color darkGreyNormalActive = Color(
|
||||
0xFF222222,
|
||||
); // #222222 rgb(34, 34, 34)
|
||||
static const Color darkGreyDark = Color(
|
||||
0xFF202020,
|
||||
); // #202020 rgb(32, 32, 32)
|
||||
static const Color darkGreyDarkHover = Color(
|
||||
0xFF191919,
|
||||
); // #191919 rgb(25, 25, 25)
|
||||
static const Color darkGreyDarkActive = Color(
|
||||
0xFF131313,
|
||||
); // #131313 rgb(19, 19, 19)
|
||||
static const Color darkGreyDarker = Color(
|
||||
0xFF0f0f0f,
|
||||
); // #0f0f0f rgb(15, 15, 15)
|
||||
static const Color darkGreyLight = Color(0xFFeaeaea); // #eaeaea rgb(234, 234, 234)
|
||||
static const Color darkGreyLightHover = Color(0xFFdfdfdf); // #dfdfdf rgb(223, 223, 223)
|
||||
static const Color darkGreyLightActive = Color(0xFFbdbdbd); // #bdbdbd rgb(189, 189, 189)
|
||||
static const Color darkGreyNormal = Color(0xFF2a2a2a); // #2a2a2a rgb(42, 42, 42)
|
||||
static const Color darkGreyNormalHover = Color(0xFF262626); // #262626 rgb(38, 38, 38)
|
||||
static const Color darkGreyNormalActive = Color(0xFF222222); // #222222 rgb(34, 34, 34)
|
||||
static const Color darkGreyDark = Color(0xFF202020); // #202020 rgb(32, 32, 32)
|
||||
static const Color darkGreyDarkHover = Color(0xFF191919); // #191919 rgb(25, 25, 25)
|
||||
static const Color darkGreyDarkActive = Color(0xFF131313); // #131313 rgb(19, 19, 19)
|
||||
static const Color darkGreyDarker = Color(0xFF0f0f0f); // #0f0f0f rgb(15, 15, 15)
|
||||
//endregion
|
||||
|
||||
//region ---Medium Grey Colors ---
|
||||
static const Color mediumGrey = Color(
|
||||
0xFF979797,
|
||||
); // #979797 rgb(151, 151, 151)
|
||||
static const Color mediumGreyLight = Color(
|
||||
0xFFf4f4f4,
|
||||
); // #f4f4f4 rgb(244, 244, 244)
|
||||
static const Color mediumGreyLightHover = Color(
|
||||
0xFFeeeeee,
|
||||
); // #eeeeee rgb(238, 238, 238)
|
||||
static const Color mediumGreyLightActive = Color(
|
||||
0xFFdcdcdc,
|
||||
); // #dcdcdc rgb(220, 220, 220)
|
||||
static const Color mediumGreyNormal = Color(
|
||||
0xFF8f8f8f,
|
||||
); // #8f8f8f rgb(143, 143, 143)
|
||||
static const Color mediumGreyNormalHover = Color(
|
||||
0xFF818181,
|
||||
); // #818181 rgb(129, 129, 129)
|
||||
static const Color mediumGreyNormalActive = Color(
|
||||
0xFF727272,
|
||||
); // #727272 rgb(114, 114, 114)
|
||||
static const Color mediumGreyDark = Color(
|
||||
0xFF6b6b6b,
|
||||
); // #6b6b6b rgb(107, 107, 107)
|
||||
static const Color mediumGreyDarkHover = Color(
|
||||
0xFF565656,
|
||||
); // #565656 rgb(86, 86, 86)
|
||||
static const Color mediumGreyDarkActive = Color(
|
||||
0xFF404040,
|
||||
); // #404040 rgb(64, 64, 64)
|
||||
static const Color mediumGreyDarker = Color(
|
||||
0xFF323232,
|
||||
); // #323232 rgb(50, 50, 50)
|
||||
static const Color customGrey = Color(
|
||||
0xFF808081,
|
||||
); // #808081 rgb(128, 128, 129)
|
||||
static const Color mediumGrey = Color(0xFF979797); // #979797 rgb(151, 151, 151)
|
||||
static const Color mediumGreyLight = Color(0xFFf4f4f4); // #f4f4f4 rgb(244, 244, 244)
|
||||
static const Color mediumGreyLightHover = Color(0xFFeeeeee); // #eeeeee rgb(238, 238, 238)
|
||||
static const Color mediumGreyLightActive = Color(0xFFdcdcdc); // #dcdcdc rgb(220, 220, 220)
|
||||
static const Color mediumGreyNormal = Color(0xFF8f8f8f); // #8f8f8f rgb(143, 143, 143)
|
||||
static const Color mediumGreyNormalHover = Color(0xFF818181); // #818181 rgb(129, 129, 129)
|
||||
static const Color mediumGreyNormalActive = Color(0xFF727272); // #727272 rgb(114, 114, 114)
|
||||
static const Color mediumGreyDark = Color(0xFF6b6b6b); // #6b6b6b rgb(107, 107, 107)
|
||||
static const Color mediumGreyDarkHover = Color(0xFF565656); // #565656 rgb(86, 86, 86)
|
||||
static const Color mediumGreyDarkActive = Color(0xFF404040); // #404040 rgb(64, 64, 64)
|
||||
static const Color mediumGreyDarker = Color(0xFF323232); // #323232 rgb(50, 50, 50)
|
||||
static const Color customGrey = Color(0xFF808081); // #808081 rgb(128, 128, 129)
|
||||
//endregion
|
||||
|
||||
//region ---Light Grey Colors ---
|
||||
static const Color lightGreyLight = Color(
|
||||
0xFFfdfdfd,
|
||||
); // #fdfdfd rgb(253, 253, 253)
|
||||
static const Color lightGreyLightHover = Color(
|
||||
0xFFfcfcfc,
|
||||
); // #fcfcfc rgb(252, 252, 252)
|
||||
static const Color lightGreyLightActive = Color(
|
||||
0xFFfafafa,
|
||||
); // #fafafa rgb(250, 250, 250)
|
||||
static const Color lightGreyNormal = Color(
|
||||
0xFFeeeeee,
|
||||
); // #eeeeee rgb(238, 238, 238)
|
||||
static const Color lightGreyNormalHover = Color(
|
||||
0xFFd6d6d6,
|
||||
); // #d6d6d6 rgb(214, 214, 214)
|
||||
static const Color lightGreyNormalActive = Color(
|
||||
0xFFbebebe,
|
||||
); // #bebebe rgb(190, 190, 190)
|
||||
static const Color lightGreyDark = Color(
|
||||
0xFFb3b3b3,
|
||||
); // #b3b3b3 rgb(179, 179, 179)
|
||||
static const Color lightGreyDarkHover = Color(
|
||||
0xFF8f8f8f,
|
||||
); // #8f8f8f rgb(143, 143, 143)
|
||||
static const Color lightGreyDarkActive = Color(
|
||||
0xFF6b6b6b,
|
||||
); // #6b6b6b rgb(107, 107, 107)
|
||||
static const Color lightGreyDarker = Color(
|
||||
0xFF535353,
|
||||
); // #535353 rgb(83, 83, 83)
|
||||
static const Color lightGreyLight = Color(0xFFfdfdfd); // #fdfdfd rgb(253, 253, 253)
|
||||
static const Color lightGreyLightHover = Color(0xFFfcfcfc); // #fcfcfc rgb(252, 252, 252)
|
||||
static const Color lightGreyLightActive = Color(0xFFfafafa); // #fafafa rgb(250, 250, 250)
|
||||
static const Color lightGreyNormal = Color(0xFFeeeeee); // #eeeeee rgb(238, 238, 238)
|
||||
static const Color lightGreyNormalHover = Color(0xFFd6d6d6); // #d6d6d6 rgb(214, 214, 214)
|
||||
static const Color lightGreyNormalActive = Color(0xFFbebebe); // #bebebe rgb(190, 190, 190)
|
||||
static const Color lightGreyDark = Color(0xFFb3b3b3); // #b3b3b3 rgb(179, 179, 179)
|
||||
static const Color lightGreyDarkHover = Color(0xFF8f8f8f); // #8f8f8f rgb(143, 143, 143)
|
||||
static const Color lightGreyDarkActive = Color(0xFF6b6b6b); // #6b6b6b rgb(107, 107, 107)
|
||||
static const Color lightGreyDarker = Color(0xFF535353); // #535353 rgb(83, 83, 83)
|
||||
//endregion
|
||||
|
||||
//region ---WhiteGrey Colors ---
|
||||
static const Color whiteGreyLight = Color(
|
||||
0xFFfefefe,
|
||||
); // #fefefe rgb(254, 254, 254)
|
||||
static const Color whiteGreyLightHover = Color(
|
||||
0xFFfefefe,
|
||||
); // #fefefe rgb(254, 254, 254)
|
||||
static const Color whiteGreyLightActive = Color(
|
||||
0xFFfdfdfd,
|
||||
); // #fdfdfd rgb(253, 253, 253)
|
||||
static const Color whiteGreyNormal = Color(
|
||||
0xFFf9f9f9,
|
||||
); // #f9f9f9 rgb(249, 249, 249)
|
||||
static const Color whiteGreyNormalHover = Color(
|
||||
0xFFe0e0e0,
|
||||
); // #e0e0e0 rgb(224, 224, 224)
|
||||
static const Color whiteGreyNormalActive = Color(
|
||||
0xFFc7c7c7,
|
||||
); // #c7c7c7 rgb(199, 199, 199)
|
||||
static const Color whiteGreyDark = Color(
|
||||
0xFFbbbbbb,
|
||||
); // #bbbbbb rgb(187, 187, 187)
|
||||
static const Color whiteGreyDarkHover = Color(
|
||||
0xFF959595,
|
||||
); // #959595 rgb(149, 149, 149)
|
||||
static const Color whiteGreyDarkActive = Color(
|
||||
0xFF707070,
|
||||
); // #707070 rgb(112, 112, 112)
|
||||
static const Color whiteGreyDarker = Color(
|
||||
0xFF575757,
|
||||
); // #575757 rgb(87, 87, 87)
|
||||
static const Color whiteGreyLight = Color(0xFFfefefe); // #fefefe rgb(254, 254, 254)
|
||||
static const Color whiteGreyLightHover = Color(0xFFfefefe); // #fefefe rgb(254, 254, 254)
|
||||
static const Color whiteGreyLightActive = Color(0xFFfdfdfd); // #fdfdfd rgb(253, 253, 253)
|
||||
static const Color whiteGreyNormal = Color(0xFFf9f9f9); // #f9f9f9 rgb(249, 249, 249)
|
||||
static const Color whiteGreyNormalHover = Color(0xFFe0e0e0); // #e0e0e0 rgb(224, 224, 224)
|
||||
static const Color whiteGreyNormalActive = Color(0xFFc7c7c7); // #c7c7c7 rgb(199, 199, 199)
|
||||
static const Color whiteGreyDark = Color(0xFFbbbbbb); // #bbbbbb rgb(187, 187, 187)
|
||||
static const Color whiteGreyDarkHover = Color(0xFF959595); // #959595 rgb(149, 149, 149)
|
||||
static const Color whiteGreyDarkActive = Color(0xFF707070); // #707070 rgb(112, 112, 112)
|
||||
static const Color whiteGreyDarker = Color(0xFF575757); // #575757 rgb(87, 87, 87)
|
||||
//endregion
|
||||
|
||||
//region ---White Colors ---
|
||||
static const Color whiteLight = Color(
|
||||
0xFFffffff,
|
||||
); // #ffffff rgb(255, 255, 255)
|
||||
static const Color whiteLightHover = Color(
|
||||
0xFFffffff,
|
||||
); // #ffffff rgb(255, 255, 255)
|
||||
static const Color whiteLightActive = Color(
|
||||
0xFFffffff,
|
||||
); // #ffffff rgb(255, 255, 255)
|
||||
static const Color whiteNormal = Color(
|
||||
0xFFffffff,
|
||||
); // #ffffff rgb(255, 255, 255)
|
||||
static const Color whiteNormalHover = Color(
|
||||
0xFFe6e6e6,
|
||||
); // #e6e6e6 rgb(230, 230, 230)
|
||||
static const Color whiteNormalActive = Color(
|
||||
0xFFcccccc,
|
||||
); // #cccccc rgb(204, 204, 204)
|
||||
static const Color whiteDark = Color(
|
||||
0xFFbfbfbf,
|
||||
); // #bfbfbf rgb(191, 191, 191)
|
||||
static const Color whiteDarkHover = Color(
|
||||
0xFF999999,
|
||||
); // #999999 rgb(153, 153, 153)
|
||||
static const Color whiteDarkActive = Color(
|
||||
0xFF737373,
|
||||
); // #737373 rgb(115, 115, 115)
|
||||
static const Color whiteLight = Color(0xFFffffff); // #ffffff rgb(255, 255, 255)
|
||||
static const Color whiteLightHover = Color(0xFFffffff); // #ffffff rgb(255, 255, 255)
|
||||
static const Color whiteLightActive = Color(0xFFffffff); // #ffffff rgb(255, 255, 255)
|
||||
static const Color whiteNormal = Color(0xFFffffff); // #ffffff rgb(255, 255, 255)
|
||||
static const Color whiteNormalHover = Color(0xFFe6e6e6); // #e6e6e6 rgb(230, 230, 230)
|
||||
static const Color whiteNormalActive = Color(0xFFcccccc); // #cccccc rgb(204, 204, 204)
|
||||
static const Color whiteDark = Color(0xFFbfbfbf); // #bfbfbf rgb(191, 191, 191)
|
||||
static const Color whiteDarkHover = Color(0xFF999999); // #999999 rgb(153, 153, 153)
|
||||
static const Color whiteDarkActive = Color(0xFF737373); // #737373 rgb(115, 115, 115)
|
||||
static const Color whiteDarker = Color(0xFF595959); // #595959 rgb(89, 89, 89)
|
||||
//endregion
|
||||
|
||||
//region --- green1 Colors ---
|
||||
static const Color green1Light = Color(
|
||||
0xFFe6f6f4,
|
||||
); // #e6f6f4 rgb(230, 246, 244)
|
||||
static const Color green1LightHover = Color(
|
||||
0xFFd9f2ef,
|
||||
); // #d9f2ef rgb(217, 242, 239)
|
||||
static const Color green1LightActive = Color(
|
||||
0xFFb0e4dd,
|
||||
); // #b0e4dd rgb(176, 228, 221)
|
||||
static const Color green1Normal = Color(
|
||||
0xFF00a991,
|
||||
); // #00a991 rgb(0, 169, 145)
|
||||
static const Color green1NormalHover = Color(
|
||||
0xFF009883,
|
||||
); // #009883 rgb(0, 152, 131)
|
||||
static const Color green1NormalActive = Color(
|
||||
0xFF008774,
|
||||
); // #008774 rgb(0, 135, 116)
|
||||
static const Color green1Light = Color(0xFFe6f6f4); // #e6f6f4 rgb(230, 246, 244)
|
||||
static const Color green1LightHover = Color(0xFFd9f2ef); // #d9f2ef rgb(217, 242, 239)
|
||||
static const Color green1LightActive = Color(0xFFb0e4dd); // #b0e4dd rgb(176, 228, 221)
|
||||
static const Color green1Normal = Color(0xFF00a991); // #00a991 rgb(0, 169, 145)
|
||||
static const Color green1NormalHover = Color(0xFF009883); // #009883 rgb(0, 152, 131)
|
||||
static const Color green1NormalActive = Color(0xFF008774); // #008774 rgb(0, 135, 116)
|
||||
static const Color green1Dark = Color(0xFF007f6d); // #007f6d rgb(0, 127, 109)
|
||||
static const Color green1DarkHover = Color(
|
||||
0xFF006557,
|
||||
); // #006557 rgb(0, 101, 87)
|
||||
static const Color green1DarkActive = Color(
|
||||
0xFF004c41,
|
||||
); // #004c41 rgb(0, 76, 65)
|
||||
static const Color green1DarkHover = Color(0xFF006557); // #006557 rgb(0, 101, 87)
|
||||
static const Color green1DarkActive = Color(0xFF004c41); // #004c41 rgb(0, 76, 65)
|
||||
static const Color green1Darker = Color(0xFF003b33); // #003b33 rgb(0, 59, 51)
|
||||
//endregion
|
||||
|
||||
//region --- Yellow Colors ---
|
||||
static const Color yellowLight = Color(
|
||||
0xFFfff9e6,
|
||||
); // #fff9e6 rgb(255, 249, 230)
|
||||
static const Color yellowLightHover = Color(
|
||||
0xFFfff6da,
|
||||
); // #fff6da rgb(255, 246, 218)
|
||||
static const Color yellowLightActive = Color(
|
||||
0xFFffecb2,
|
||||
); // #ffecb2 rgb(255, 236, 178)
|
||||
static const Color yellowNormal = Color(
|
||||
0xFFffc107,
|
||||
); // #ffc107 rgb(255, 193, 7)
|
||||
static const Color yellowNormal2 = Color(
|
||||
0xFFFF9800,
|
||||
); // #FF9800 rgb(255, 152, 0)
|
||||
static const Color yellowNormalHover = Color(
|
||||
0xFFe6ae06,
|
||||
); // #e6ae06 rgb(230, 174, 6)
|
||||
static const Color yellowNormalActive = Color(
|
||||
0xFFcc9a06,
|
||||
); // #cc9a06 rgb(204, 154, 6)
|
||||
static const Color yellowLight = Color(0xFFfff9e6); // #fff9e6 rgb(255, 249, 230)
|
||||
static const Color yellowLightHover = Color(0xFFfff6da); // #fff6da rgb(255, 246, 218)
|
||||
static const Color yellowLightActive = Color(0xFFffecb2); // #ffecb2 rgb(255, 236, 178)
|
||||
static const Color yellowNormal = Color(0xFFffc107); // #ffc107 rgb(255, 193, 7)
|
||||
static const Color yellowNormal2 = Color(0xFFFF9800); // #FF9800 rgb(255, 152, 0)
|
||||
static const Color yellowNormalHover = Color(0xFFe6ae06); // #e6ae06 rgb(230, 174, 6)
|
||||
static const Color yellowNormalActive = Color(0xFFcc9a06); // #cc9a06 rgb(204, 154, 6)
|
||||
static const Color yellowDark = Color(0xFFbf9105); // #bf9105 rgb(191, 145, 5)
|
||||
static const Color yellowDarkHover = Color(
|
||||
0xFF997404,
|
||||
); // #997404 rgb(153, 116, 4)
|
||||
static const Color yellowDarkActive = Color(
|
||||
0xFF735703,
|
||||
); // #735703 rgb(115, 87, 3)
|
||||
static const Color yellowDarkHover = Color(0xFF997404); // #997404 rgb(153, 116, 4)
|
||||
static const Color yellowDarkActive = Color(0xFF735703); // #735703 rgb(115, 87, 3)
|
||||
static const Color yellowDarker = Color(0xFF594402); // #594402 rgb(89, 68, 2)
|
||||
|
||||
// #594402 rgb(89, 68, 2)
|
||||
@@ -324,65 +142,31 @@ class AppColor {
|
||||
|
||||
//region --- red Colors ---
|
||||
static const Color redLight = Color(0xFFfdeeee); // #fdeeee rgb(253, 238, 238)
|
||||
static const Color redLightHover = Color(
|
||||
0xFFfce6e6,
|
||||
); // #fce6e6 rgb(252, 230, 230)
|
||||
static const Color redLightActive = Color(
|
||||
0xFFf9cbcb,
|
||||
); // #f9cbcb rgb(249, 203, 203)
|
||||
static const Color redLightHover = Color(0xFFfce6e6); // #fce6e6 rgb(252, 230, 230)
|
||||
static const Color redLightActive = Color(0xFFf9cbcb); // #f9cbcb rgb(249, 203, 203)
|
||||
static const Color redNormal = Color(0xFFeb5757); // #eb5757 rgb(235, 87, 87)
|
||||
static const Color redNormalHover = Color(
|
||||
0xFFd44e4e,
|
||||
); // #d44e4e rgb(212, 78, 78)
|
||||
static const Color redNormalActive = Color(
|
||||
0xFFbc4646,
|
||||
); // #bc4646 rgb(188, 70, 70)
|
||||
static const Color redNormalHover = Color(0xFFd44e4e); // #d44e4e rgb(212, 78, 78)
|
||||
static const Color redNormalActive = Color(0xFFbc4646); // #bc4646 rgb(188, 70, 70)
|
||||
static const Color redDark = Color(0xFFb04141); // #b04141 rgb(176, 65, 65)
|
||||
static const Color redDarkHover = Color(
|
||||
0xFF8d3434,
|
||||
); // #8d3434 rgb(141, 52, 52)
|
||||
static const Color redDarkActive = Color(
|
||||
0xFF6a2727,
|
||||
); // #6a2727 rgb(106, 39, 39)
|
||||
static const Color redDarkHover = Color(0xFF8d3434); // #8d3434 rgb(141, 52, 52)
|
||||
static const Color redDarkActive = Color(0xFF6a2727); // #6a2727 rgb(106, 39, 39)
|
||||
static const Color redDarker = Color(0xFF521e1e); // #521e1e rgb(82, 30, 30)
|
||||
static const Color redDarkerText = Color(
|
||||
0xFFD24E4E,
|
||||
); // #D34E4E rgba(211, 78, 78, 1)
|
||||
static const Color redDarkerText = Color(0xFFD24E4E); // #D34E4E rgba(211, 78, 78, 1)
|
||||
|
||||
static const Color redLight2 = Color(
|
||||
0xFFEDDCE0,
|
||||
); // #EDDCE0 rgb(237, 220, 224)
|
||||
static const Color redLightActive2 = Color(
|
||||
0xFFE0BCC5,
|
||||
); // #E0BCC5 rgb(224, 188, 197)
|
||||
static const Color redLight2 = Color(0xFFEDDCE0); // #EDDCE0 rgb(237, 220, 224)
|
||||
static const Color redLightActive2 = Color(0xFFE0BCC5); // #E0BCC5 rgb(224, 188, 197)
|
||||
//endregion
|
||||
|
||||
//region --- Teal Colors ---
|
||||
static const Color tealLight = Color(
|
||||
0xFFe8f6f8,
|
||||
); // #e8f6f8 rgb(232, 246, 248)
|
||||
static const Color tealLightHover = Color(
|
||||
0xFFdcf1f4,
|
||||
); // #dcf1f4 rgb(220, 241, 244)
|
||||
static const Color tealLightActive = Color(
|
||||
0xFFb7e2e9,
|
||||
); // #b7e2e9 rgb(183, 226, 233)
|
||||
static const Color tealNormal = Color(
|
||||
0xFF17a2b8,
|
||||
); // #17a2b8 rgb(23, 162, 184)
|
||||
static const Color tealNormalHover = Color(
|
||||
0xFF1592a6,
|
||||
); // #1592a6 rgb(21, 146, 166)
|
||||
static const Color tealNormalActive = Color(
|
||||
0xFF128293,
|
||||
); // #128293 rgb(18, 130, 147)
|
||||
static const Color tealLight = Color(0xFFe8f6f8); // #e8f6f8 rgb(232, 246, 248)
|
||||
static const Color tealLightHover = Color(0xFFdcf1f4); // #dcf1f4 rgb(220, 241, 244)
|
||||
static const Color tealLightActive = Color(0xFFb7e2e9); // #b7e2e9 rgb(183, 226, 233)
|
||||
static const Color tealNormal = Color(0xFF17a2b8); // #17a2b8 rgb(23, 162, 184)
|
||||
static const Color tealNormalHover = Color(0xFF1592a6); // #1592a6 rgb(21, 146, 166)
|
||||
static const Color tealNormalActive = Color(0xFF128293); // #128293 rgb(18, 130, 147)
|
||||
static const Color tealDark = Color(0xFF117a8a); // #117a8a rgb(17, 122, 138)
|
||||
static const Color tealDarkHover = Color(
|
||||
0xFF0e616e,
|
||||
); // #0e616e rgb(14, 97, 110)
|
||||
static const Color tealDarkActive = Color(
|
||||
0xFF0a4953,
|
||||
); // #0a4953 rgb(10, 73, 83)
|
||||
static const Color tealDarkHover = Color(0xFF0e616e); // #0e616e rgb(14, 97, 110)
|
||||
static const Color tealDarkActive = Color(0xFF0a4953); // #0a4953 rgb(10, 73, 83)
|
||||
static const Color tealDarker = Color(0xFF083940); // #083940 rgb(8, 57, 64)
|
||||
|
||||
static const Color bgLight = Color(0xFFF5F5F5); // #083940 rgb(8, 57, 64)
|
||||
@@ -390,12 +174,11 @@ class AppColor {
|
||||
static const Color bgDark = Color(0xFF979797); // #083940 rgb(8, 57, 64)
|
||||
static const Color textColor = Color(0xFF5B5B5B); // #083940 rgb(8, 57, 64)
|
||||
static const Color textColor2 = Color(0xFF636363); // #636363 rgb(99, 99, 99)
|
||||
static const Color textColor3 = Color(0xFF717171); // #717171 rgb(113, 113, 113)
|
||||
static const Color labelTextColor = Color(0xFF808080);
|
||||
static const Color textColorLight = Color(0xFFB2B2B2);
|
||||
static const Color iconColor = Color(0xFF444444); // #444444 rgb(68, 68, 68)
|
||||
static const Color borderColor = Color(
|
||||
0xFFC7CFCD,
|
||||
); // #C7CFCD rgb(199, 207, 205)`
|
||||
static const Color borderColor = Color(0xFFC7CFCD); // #C7CFCD rgb(199, 207, 205)`
|
||||
static const Color unselectTextColor = Color(0xFF888888); //
|
||||
static const Color accent1 = Color(0xffffe5ce); //
|
||||
static const Color bgLight2 = Color(0xFFEFEFEF); // #EFEFEF rgb(239, 239, 239)
|
||||
|
||||
@@ -9,15 +9,15 @@ extension ColorUtils on Color {
|
||||
return hslDarkerColor.toColor();
|
||||
}
|
||||
|
||||
get disabledColor{
|
||||
Color get disabledColor{
|
||||
return withAlpha(38);
|
||||
}
|
||||
|
||||
get hoverColor{
|
||||
Color get hoverColor{
|
||||
return _darken(0.5);
|
||||
}
|
||||
|
||||
get pressedColor{
|
||||
Color get pressedColor{
|
||||
return _darken(0.10);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,13 +1,15 @@
|
||||
import 'package:intl/intl.dart';
|
||||
|
||||
extension XDataTime on DateTime {
|
||||
String get formattedGregorianDate {
|
||||
|
||||
return "$year/${month.toString().padLeft(2, '0')}/${day.toString().padLeft(2, '0')}";
|
||||
}
|
||||
|
||||
String get formattedDashedGregorian {
|
||||
|
||||
return "$year-${month.toString().padLeft(2, '0')}-${day.toString().padLeft(2, '0')}";
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
String get formattedGregorianDateWithoutMillisecond {
|
||||
return DateFormat('yyyy-MM-dd HH:mm:ss').format(this).toString();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@ class ROutlinedElevated extends StatefulWidget {
|
||||
this.width,
|
||||
this.height,
|
||||
this.enabled = true,
|
||||
this.isFullWidth = false,
|
||||
}) : assert(text != null || child != null, 'Either text or child must be provided');
|
||||
|
||||
final String? text;
|
||||
@@ -32,6 +33,7 @@ class ROutlinedElevated extends StatefulWidget {
|
||||
TextStyle? textStyle;
|
||||
Widget? child;
|
||||
bool enabled;
|
||||
final bool isFullWidth;
|
||||
|
||||
@override
|
||||
State<ROutlinedElevated> createState() => _ROutlinedElevatedState();
|
||||
@@ -67,65 +69,65 @@ class _ROutlinedElevatedState extends State<ROutlinedElevated> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return ConstrainedBox(
|
||||
constraints: BoxConstraints.tightFor(
|
||||
width: widget.width ?? 150.w,
|
||||
height: widget.height ?? 40.h,
|
||||
),
|
||||
child: OutlinedButton(
|
||||
key: _widgetKey,
|
||||
statesController: _statesController,
|
||||
onPressed: widget.enabled ? widget.onPressed : null,
|
||||
style: ButtonStyle(
|
||||
side: WidgetStateProperty.resolveWith<BorderSide?>((states) {
|
||||
if (states.contains(WidgetState.pressed)) {
|
||||
return BorderSide(color: widget.borderColor ?? AppColor.blueNormal, width: 2);
|
||||
} else if (states.contains(WidgetState.disabled)) {
|
||||
return BorderSide(
|
||||
color: widget.borderColor?.disabledColor ?? AppColor.blueNormal.withAlpha(38),
|
||||
width: 2,
|
||||
);
|
||||
}
|
||||
return OutlinedButton(
|
||||
key: _widgetKey,
|
||||
statesController: _statesController,
|
||||
onPressed: widget.enabled ? widget.onPressed : null,
|
||||
style: ButtonStyle(
|
||||
side: WidgetStateProperty.resolveWith<BorderSide?>((states) {
|
||||
if (states.contains(WidgetState.pressed)) {
|
||||
return BorderSide(color: widget.borderColor ?? AppColor.blueNormal, width: 2);
|
||||
}),
|
||||
backgroundColor: WidgetStateProperty.resolveWith<Color?>((states) {
|
||||
if (states.contains(WidgetState.pressed)) {
|
||||
if (widget.pressedBackgroundColor != null) {
|
||||
return widget.pressedBackgroundColor;
|
||||
}
|
||||
return widget.backgroundColor?.pressedColor ?? widget.borderColor?.pressedColor;
|
||||
} else if (states.contains(WidgetState.hovered)) {
|
||||
return widget.backgroundColor?.hoverColor ?? AppColor.blueNormal.hoverColor;
|
||||
} else if (states.contains(WidgetState.disabled)) {
|
||||
return widget.backgroundColor?.disabledColor ?? Colors.transparent;
|
||||
} else if (states.contains(WidgetState.disabled)) {
|
||||
return BorderSide(
|
||||
color: widget.borderColor?.disabledColor ?? AppColor.blueNormal.withAlpha(38),
|
||||
width: 2,
|
||||
);
|
||||
}
|
||||
return BorderSide(color: widget.borderColor ?? AppColor.blueNormal, width: 2);
|
||||
}),
|
||||
backgroundColor: WidgetStateProperty.resolveWith<Color?>((states) {
|
||||
if (states.contains(WidgetState.pressed)) {
|
||||
if (widget.pressedBackgroundColor != null) {
|
||||
return widget.pressedBackgroundColor;
|
||||
}
|
||||
return widget.backgroundColor;
|
||||
}),
|
||||
foregroundColor: WidgetStateProperty.resolveWith<Color?>((states) {
|
||||
if (states.contains(WidgetState.pressed)) {
|
||||
return Colors.white;
|
||||
} else if (states.contains(WidgetState.disabled)) {
|
||||
return widget.foregroundColor?.disabledColor ??
|
||||
widget.borderColor?.disabledColor ??
|
||||
AppColor.blueNormal.disabledColor;
|
||||
}
|
||||
return widget.foregroundColor ?? widget.borderColor ?? AppColor.blueNormal;
|
||||
}),
|
||||
shape: WidgetStatePropertyAll(
|
||||
RoundedRectangleBorder(borderRadius: BorderRadius.circular(widget.radius ?? 8)),
|
||||
),
|
||||
fixedSize: WidgetStatePropertyAll(Size(widget.width ?? 150.w, widget.height ?? 56.h)),
|
||||
padding: WidgetStatePropertyAll(EdgeInsets.zero),
|
||||
textStyle: WidgetStateProperty.resolveWith<TextStyle?>((states) {
|
||||
if (states.contains(WidgetState.pressed)) {
|
||||
return widget.textStyle?.copyWith(color: Colors.white) ??
|
||||
AppFonts.yekan18.copyWith(color: Colors.white);
|
||||
}
|
||||
return widget.textStyle ?? AppFonts.yekan18.copyWith(color: AppColor.blueNormal);
|
||||
}),
|
||||
return widget.backgroundColor?.pressedColor ?? widget.borderColor?.pressedColor;
|
||||
} else if (states.contains(WidgetState.hovered)) {
|
||||
return widget.backgroundColor?.hoverColor ?? AppColor.blueNormal.hoverColor;
|
||||
} else if (states.contains(WidgetState.disabled)) {
|
||||
return widget.backgroundColor?.disabledColor ?? Colors.transparent;
|
||||
}
|
||||
return widget.backgroundColor;
|
||||
}),
|
||||
foregroundColor: WidgetStateProperty.resolveWith<Color?>((states) {
|
||||
if (states.contains(WidgetState.pressed)) {
|
||||
return Colors.white;
|
||||
} else if (states.contains(WidgetState.disabled)) {
|
||||
return widget.foregroundColor?.disabledColor ??
|
||||
widget.borderColor?.disabledColor ??
|
||||
AppColor.blueNormal.disabledColor;
|
||||
}
|
||||
return widget.foregroundColor ?? widget.borderColor ?? AppColor.blueNormal;
|
||||
}),
|
||||
shape: WidgetStatePropertyAll(
|
||||
RoundedRectangleBorder(borderRadius: BorderRadius.circular(widget.radius ?? 8)),
|
||||
),
|
||||
fixedSize: WidgetStatePropertyAll(Size(widget.width ?? 150.w, widget.height ?? 56.h)),
|
||||
padding: WidgetStatePropertyAll(EdgeInsets.zero),
|
||||
textStyle: WidgetStateProperty.resolveWith<TextStyle?>((states) {
|
||||
if (states.contains(WidgetState.pressed)) {
|
||||
return widget.textStyle?.copyWith(color: Colors.white) ??
|
||||
AppFonts.yekan18.copyWith(color: Colors.white);
|
||||
}
|
||||
return widget.textStyle ?? AppFonts.yekan18.copyWith(color: AppColor.blueNormal);
|
||||
}),
|
||||
minimumSize: WidgetStatePropertyAll(
|
||||
Size(
|
||||
widget.isFullWidth ? double.maxFinite : (widget.width ?? 150.w),
|
||||
widget.height ?? 40.h,
|
||||
),
|
||||
),
|
||||
child: widget.child ?? Text(widget.text ?? ''),
|
||||
),
|
||||
child: widget.child ?? Text(widget.text ?? ''),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@ import 'package:flutter/material.dart';
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
|
||||
class ROutlinedElevatedIcon extends StatefulWidget {
|
||||
ROutlinedElevatedIcon({
|
||||
const ROutlinedElevatedIcon({
|
||||
super.key,
|
||||
required this.text,
|
||||
required this.onPressed,
|
||||
|
||||
@@ -238,7 +238,7 @@ class GlassMorphismGrid extends StatelessWidget {
|
||||
const GlassMorphismGrid({super.key, required this.items, required this.onTap});
|
||||
|
||||
final List<GlassMorphismCardItem> items;
|
||||
final VoidCallback onTap;
|
||||
final void Function(GlassMorphismCardItem item) onTap;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@@ -254,7 +254,11 @@ class GlassMorphismGrid extends StatelessWidget {
|
||||
hitTestBehavior: HitTestBehavior.opaque,
|
||||
itemBuilder: (BuildContext context, int index) {
|
||||
var item = items[index];
|
||||
return GlassMorphismCardIcon(title: item.title, vecIcon: item.icon, onTap: onTap);
|
||||
return GlassMorphismCardIcon(
|
||||
title: item.title,
|
||||
vecIcon: item.icon,
|
||||
onTap: () => onTap(item),
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
@@ -30,7 +30,9 @@ class InformationTagData {
|
||||
|
||||
//global
|
||||
final int? width;
|
||||
final int? height;
|
||||
final double? height;
|
||||
final Color borderColor;
|
||||
final double radiusWidth;
|
||||
|
||||
InformationTagData({
|
||||
this.labelVecIcon,
|
||||
@@ -55,9 +57,11 @@ class InformationTagData {
|
||||
this.heightIcon,
|
||||
this.widthIcon,
|
||||
this.blendMode,
|
||||
this.borderColor = const Color(0xFFA9A9A9),
|
||||
this.radiusWidth = 0.5,
|
||||
}) : assert(
|
||||
(labelVecIcon != null) ^ (labelSvgIcon != null),
|
||||
'Either labelVecIcon or labelSvgIcon must be provided, but not both.',
|
||||
labelVecIcon == null || labelSvgIcon == null,
|
||||
'You cannot provide both labelVecIcon and labelSvgIcon.',
|
||||
),
|
||||
assert(isLoading || value != null, 'When isLoading is false, value must not be null.'),
|
||||
assert(
|
||||
@@ -91,8 +95,10 @@ class InformationTagData {
|
||||
TextStyle? unitStyle,
|
||||
Color? unitColor,
|
||||
int? width,
|
||||
int? height,
|
||||
double? height,
|
||||
BlendMode? blendMode,
|
||||
Color? borderColor,
|
||||
double? radiusWidth,
|
||||
}) {
|
||||
return InformationTagData(
|
||||
labelVecIcon: labelVecIcon ?? this.labelVecIcon,
|
||||
@@ -117,6 +123,8 @@ class InformationTagData {
|
||||
width: width ?? this.width,
|
||||
height: height ?? this.height,
|
||||
blendMode: blendMode ?? this.blendMode,
|
||||
borderColor: borderColor ?? this.borderColor,
|
||||
radiusWidth: radiusWidth ?? this.radiusWidth,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -131,8 +139,9 @@ class InformationTag extends StatelessWidget {
|
||||
return Container(
|
||||
height: (data.height ?? 82).h,
|
||||
decoration: BoxDecoration(
|
||||
border: Border.all(color: const Color(0xFFA9A9A9) ,width:0.50),
|
||||
borderRadius: BorderRadius.circular(8)),
|
||||
border: Border.all(color: data.borderColor, width: data.radiusWidth),
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
),
|
||||
clipBehavior: Clip.hardEdge,
|
||||
child: Row(
|
||||
children: [
|
||||
@@ -151,26 +160,29 @@ class InformationTag extends StatelessWidget {
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
spacing: 4,
|
||||
children: [
|
||||
data.labelVecIcon != null
|
||||
? ClipRRect(
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
child: SvgGenImage.vec(data.labelVecIcon!).svg(
|
||||
width: (data.widthIcon ?? 24).w,
|
||||
height: (data.heightIcon ?? 24).h,
|
||||
colorFilter: ColorFilter.mode(
|
||||
data.iconColor ?? AppColor.mediumGreyDarkActive,
|
||||
data.blendMode ?? BlendMode.srcIn,
|
||||
),
|
||||
),
|
||||
)
|
||||
: SvgGenImage(data.labelSvgIcon!).svg(
|
||||
width: (data.widthIcon ?? 24).w,
|
||||
height: (data.heightIcon ?? 24).h,
|
||||
colorFilter: ColorFilter.mode(
|
||||
data.iconColor ?? AppColor.mediumGreyDarkActive,
|
||||
data.blendMode ?? BlendMode.srcIn,
|
||||
),
|
||||
if (data.labelVecIcon != null)
|
||||
ClipRRect(
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
child: SvgGenImage.vec(data.labelVecIcon!).svg(
|
||||
width: (data.widthIcon ?? 24).w,
|
||||
height: (data.heightIcon ?? 24).h,
|
||||
colorFilter: ColorFilter.mode(
|
||||
data.iconColor ?? AppColor.mediumGreyDarkActive,
|
||||
data.blendMode ?? BlendMode.srcIn,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
if (data.labelSvgIcon != null)
|
||||
SvgGenImage(data.labelSvgIcon!).svg(
|
||||
width: (data.widthIcon ?? 24).w,
|
||||
height: (data.heightIcon ?? 24).h,
|
||||
colorFilter: ColorFilter.mode(
|
||||
data.iconColor ?? AppColor.mediumGreyDarkActive,
|
||||
data.blendMode ?? BlendMode.srcIn,
|
||||
),
|
||||
),
|
||||
|
||||
Visibility(
|
||||
visible: data.labelTitle != null,
|
||||
child: Text(
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
import 'draggable_bottom_sheet.dart';
|
||||
|
||||
/*class DraggableBottomSheetController extends GetxController {
|
||||
final RxList<DraggableBottomSheet> bottomSheets =
|
||||
|
||||
@@ -47,7 +47,7 @@ class RTextField extends StatefulWidget {
|
||||
final bool? autocorrect;
|
||||
final bool? enableSuggestions;
|
||||
final TextInputAction? textInputAction;
|
||||
final double? height;
|
||||
final double height;
|
||||
final Iterable<String>? autofillHints;
|
||||
final InputBorder? focusedBorder;
|
||||
|
||||
@@ -61,7 +61,7 @@ class RTextField extends StatefulWidget {
|
||||
this.onChanged,
|
||||
this.onSubmitted,
|
||||
this.onTap,
|
||||
this.height,
|
||||
this.height = 40,
|
||||
|
||||
// 🔸 Behavior
|
||||
this.obscure = false,
|
||||
@@ -158,7 +158,9 @@ class _RTextFieldState extends State<RTextField> {
|
||||
obscure = widget.obscure;
|
||||
|
||||
textDirection = _detectDirection(
|
||||
widget.controller.text.isNotEmpty ? widget.controller.text : widget.initText ?? 'سلام',
|
||||
widget.controller.text.isNotEmpty
|
||||
? widget.controller.text
|
||||
: widget.initText ?? 'سلام',
|
||||
);
|
||||
|
||||
widget.controller.addListener(_debouncedUpdateTextDirection);
|
||||
@@ -195,7 +197,7 @@ class _RTextFieldState extends State<RTextField> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return SizedBox(
|
||||
height: widget.height,
|
||||
height: (widget.height).h,
|
||||
child: Padding(
|
||||
padding: widget.padding ?? EdgeInsets.zero,
|
||||
child: TextFormField(
|
||||
@@ -218,7 +220,8 @@ class _RTextFieldState extends State<RTextField> {
|
||||
textDirection: textDirection,
|
||||
style: widget.style,
|
||||
keyboardType: widget.keyboardType,
|
||||
autovalidateMode: widget.autoValidateMode ?? AutovalidateMode.disabled,
|
||||
autovalidateMode:
|
||||
widget.autoValidateMode ?? AutovalidateMode.disabled,
|
||||
cursorColor: widget.cursorColor,
|
||||
textCapitalization: widget.textCapitalization,
|
||||
autocorrect: widget.autocorrect ?? true,
|
||||
@@ -241,7 +244,8 @@ class _RTextFieldState extends State<RTextField> {
|
||||
labelStyle: AppFonts.yekan14
|
||||
.copyWith(color: AppColor.lightGreyDarkActive)
|
||||
.merge(widget.labelStyle),
|
||||
filled: widget.filled || widget._noBorder || widget._passwordNoBorder,
|
||||
filled:
|
||||
widget.filled || widget._noBorder || widget._passwordNoBorder,
|
||||
fillColor: widget.filledColor,
|
||||
counter: widget.showCounter ? null : const SizedBox(),
|
||||
hintStyle: widget.hintStyle,
|
||||
|
||||
@@ -85,7 +85,7 @@ class ListItem extends StatelessWidget {
|
||||
duration: Duration(milliseconds: 300),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
SizedBox(
|
||||
width: 20,
|
||||
child: Center(
|
||||
child: SvgGenImage.vec(labelIcon).svg(
|
||||
|
||||
@@ -190,7 +190,7 @@ class ListItem2 extends StatelessWidget {
|
||||
child: child,
|
||||
),
|
||||
),
|
||||
Container(
|
||||
SizedBox(
|
||||
width: 20,
|
||||
child: Center(
|
||||
child: SvgGenImage.vec(labelIcon).svg(
|
||||
|
||||
@@ -81,7 +81,7 @@ class ListItemWithOutCounter extends StatelessWidget {
|
||||
),
|
||||
Visibility(
|
||||
visible: selected==false,
|
||||
child: Container(
|
||||
child: SizedBox(
|
||||
width: 20,
|
||||
child: Center(
|
||||
child: SvgGenImage.vec(labelIcon).svg(
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
|
||||
enum ListType { builder, separated }
|
||||
|
||||
@@ -6,7 +6,7 @@ class ResourceOverlayDropdown<T> extends StatefulWidget {
|
||||
final Resource<List<T>> items;
|
||||
final T? selectedItem;
|
||||
final T? initialValue;
|
||||
final int? height;
|
||||
final double? height;
|
||||
final Color? background;
|
||||
final bool? hasDropIcon;
|
||||
final Widget Function(T item) itemBuilder;
|
||||
@@ -31,10 +31,12 @@ class ResourceOverlayDropdown<T> extends StatefulWidget {
|
||||
});
|
||||
|
||||
@override
|
||||
State<ResourceOverlayDropdown<T>> createState() => _ResourceOverlayDropdownState<T>();
|
||||
State<ResourceOverlayDropdown<T>> createState() =>
|
||||
_ResourceOverlayDropdownState<T>();
|
||||
}
|
||||
|
||||
class _ResourceOverlayDropdownState<T> extends State<ResourceOverlayDropdown<T>> {
|
||||
class _ResourceOverlayDropdownState<T>
|
||||
extends State<ResourceOverlayDropdown<T>> {
|
||||
final GlobalKey _key = GlobalKey();
|
||||
OverlayEntry? _overlayEntry;
|
||||
bool _isOpen = false;
|
||||
@@ -100,7 +102,10 @@ class _ResourceOverlayDropdownState<T> extends State<ResourceOverlayDropdown<T>>
|
||||
child: Padding(
|
||||
padding:
|
||||
widget.contentPadding ??
|
||||
const EdgeInsets.symmetric(horizontal: 8, vertical: 4),
|
||||
const EdgeInsets.symmetric(
|
||||
horizontal: 8,
|
||||
vertical: 4,
|
||||
),
|
||||
child: widget.itemBuilder(item),
|
||||
),
|
||||
);
|
||||
@@ -139,13 +144,15 @@ class _ResourceOverlayDropdownState<T> extends State<ResourceOverlayDropdown<T>>
|
||||
builder: (context, constraints) {
|
||||
return GestureDetector(
|
||||
key: _key,
|
||||
onTap: (widget.isDisabled || widget.items.status == ResourceStatus.loading)
|
||||
onTap:
|
||||
(widget.isDisabled ||
|
||||
widget.items.status == ResourceStatus.loading)
|
||||
? null
|
||||
: () {
|
||||
_isOpen ? _removeOverlay() : _showOverlay();
|
||||
},
|
||||
child: Container(
|
||||
height: widget.height?.toDouble() ?? 40,
|
||||
height: widget.height?.toDouble() ?? 40.h,
|
||||
width: constraints.maxWidth,
|
||||
padding: const EdgeInsets.symmetric(horizontal: 12),
|
||||
decoration: BoxDecoration(
|
||||
@@ -171,14 +178,25 @@ class _ResourceOverlayDropdownState<T> extends State<ResourceOverlayDropdown<T>>
|
||||
children: [
|
||||
Expanded(child: widget.labelBuilder(selectedItem)),
|
||||
if (widget.hasDropIcon ?? true)
|
||||
Icon(_isOpen ? CupertinoIcons.chevron_up : CupertinoIcons.chevron_down, size: 14),
|
||||
Icon(
|
||||
_isOpen
|
||||
? CupertinoIcons.chevron_up
|
||||
: CupertinoIcons.chevron_down,
|
||||
size: 14,
|
||||
),
|
||||
],
|
||||
);
|
||||
case ResourceStatus.error:
|
||||
return Text('Error', style: AppFonts.yekan12.copyWith(color: AppColor.redNormal));
|
||||
return Text(
|
||||
'Error',
|
||||
style: AppFonts.yekan12.copyWith(color: AppColor.redNormal),
|
||||
);
|
||||
|
||||
case ResourceStatus.empty:
|
||||
return Text('بدون نتیجه', style: AppFonts.yekan12.copyWith(color: AppColor.textColor));
|
||||
return Text(
|
||||
'بدون نتیجه',
|
||||
style: AppFonts.yekan12.copyWith(color: AppColor.textColor),
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ class _PaginationFromUntilState extends State<PaginationFromUntil> {
|
||||
Positioned(
|
||||
left: 4,
|
||||
top: 4,
|
||||
child: Container(
|
||||
child: SizedBox(
|
||||
width: 40,
|
||||
height: 40,
|
||||
child: Stack(
|
||||
@@ -95,7 +95,7 @@ class _PaginationFromUntilState extends State<PaginationFromUntil> {
|
||||
Positioned(
|
||||
left: 0,
|
||||
top: 0,
|
||||
child: Container(
|
||||
child: SizedBox(
|
||||
width: 40,
|
||||
height: 40,
|
||||
child: Stack(
|
||||
@@ -103,7 +103,7 @@ class _PaginationFromUntilState extends State<PaginationFromUntil> {
|
||||
Positioned(
|
||||
left: 0,
|
||||
top: 0,
|
||||
child: Container(
|
||||
child: SizedBox(
|
||||
width: 40,
|
||||
height: 40,
|
||||
child: Stack(
|
||||
@@ -147,7 +147,7 @@ class _PaginationFromUntilState extends State<PaginationFromUntil> {
|
||||
Positioned(
|
||||
left: 8,
|
||||
top: 8,
|
||||
child: Container(width: 24, height: 24, child: Stack()),
|
||||
child: SizedBox(width: 24, height: 24, child: Stack()),
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -156,7 +156,7 @@ class _PaginationFromUntilState extends State<PaginationFromUntil> {
|
||||
Positioned(
|
||||
left: 120,
|
||||
top: 3,
|
||||
child: Container(
|
||||
child: SizedBox(
|
||||
width: 40,
|
||||
height: 40,
|
||||
child: Stack(
|
||||
@@ -176,7 +176,7 @@ class _PaginationFromUntilState extends State<PaginationFromUntil> {
|
||||
Positioned(
|
||||
left: 0,
|
||||
top: 0,
|
||||
child: Container(
|
||||
child: SizedBox(
|
||||
width: 40,
|
||||
height: 40,
|
||||
child: Stack(
|
||||
@@ -184,7 +184,7 @@ class _PaginationFromUntilState extends State<PaginationFromUntil> {
|
||||
Positioned(
|
||||
left: 0,
|
||||
top: 0,
|
||||
child: Container(
|
||||
child: SizedBox(
|
||||
width: 40,
|
||||
height: 40,
|
||||
child: Stack(
|
||||
@@ -229,7 +229,7 @@ class _PaginationFromUntilState extends State<PaginationFromUntil> {
|
||||
Positioned(
|
||||
left: 8,
|
||||
top: 8,
|
||||
child: Container(width: 24, height: 24, child: Stack()),
|
||||
child: SizedBox(width: 24, height: 24, child: Stack()),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:rasadyar_core/presentation/common/app_color.dart';
|
||||
import 'package:rasadyar_core/presentation/common/app_fonts.dart';
|
||||
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
import 'package:vector_graphics/vector_graphics.dart';
|
||||
|
||||
import '../common/assets.gen.dart';
|
||||
|
||||
|
||||
Widget vecWidgetWithOnTap({
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:dio/dio.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
|
||||
@@ -171,6 +171,25 @@ void defaultShowSuccessMessage(
|
||||
);
|
||||
}
|
||||
|
||||
void rawShowSuccessMessage(
|
||||
String message, {
|
||||
int durationInSeconds = 1500,
|
||||
VoidCallback? onDismissed,
|
||||
}) {
|
||||
Get.rawSnackbar(
|
||||
titleText: Text('موفقیت', style: AppFonts.yekan14.copyWith(color: Colors.white)),
|
||||
messageText: Text(message, style: AppFonts.yekan12.copyWith(color: Colors.white)),
|
||||
duration: Duration(milliseconds: durationInSeconds),
|
||||
snackPosition: SnackPosition.TOP,
|
||||
backgroundColor: Colors.green,
|
||||
snackbarStatus: (status) {
|
||||
if (status == SnackbarStatus.CLOSED) {
|
||||
onDismissed?.call();
|
||||
}
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
void defaultShowErrorMessage(String message) {
|
||||
Get.snackbar(
|
||||
'خطا',
|
||||
|
||||
Reference in New Issue
Block a user