140 lines
3.9 KiB
Dart
140 lines
3.9 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:eatvio_app/core/app_export.dart';
|
|
|
|
class AppDecoration {
|
|
// Fill decorations
|
|
static BoxDecoration get fillOnPrimary => BoxDecoration(
|
|
color: theme.colorScheme.onPrimary,
|
|
);
|
|
|
|
// Outline decorations
|
|
static BoxDecoration get outlineBlueA => BoxDecoration(
|
|
color: theme.colorScheme.onPrimary,
|
|
border: Border.all(
|
|
color: appTheme.blueA400,
|
|
width: 1.h,
|
|
),
|
|
);
|
|
static BoxDecoration get outlinePrimary => BoxDecoration(
|
|
color: theme.colorScheme.onPrimary,
|
|
border: Border.all(
|
|
color: theme.colorScheme.primary,
|
|
width: 1.h,
|
|
),
|
|
);
|
|
static BoxDecoration get fillDeepOrange => BoxDecoration(
|
|
color: appTheme.deepOrange900.withOpacity(0.8),
|
|
);
|
|
static BoxDecoration get fillGray => BoxDecoration(
|
|
color: appTheme.gray50,
|
|
);
|
|
static BoxDecoration get fillGray100 => BoxDecoration(
|
|
color: appTheme.gray100,
|
|
);
|
|
static BoxDecoration get fillGray60002 => BoxDecoration(
|
|
color: appTheme.gray60002,
|
|
);
|
|
static BoxDecoration get fillGreenA => BoxDecoration(
|
|
color: appTheme.greenA700.withOpacity(0.8),
|
|
);
|
|
static BoxDecoration get fillPrimary => BoxDecoration(
|
|
color: theme.colorScheme.primary,
|
|
);
|
|
static BoxDecoration get fillWhiteA => BoxDecoration(
|
|
color: appTheme.whiteA700,
|
|
);
|
|
static BoxDecoration get outlineBlueGray => BoxDecoration(
|
|
border: Border.all(
|
|
color: appTheme.blueGray800,
|
|
width: 1.h,
|
|
strokeAlign: strokeAlignOutside,
|
|
),
|
|
);
|
|
}
|
|
|
|
class BorderRadiusStyle {
|
|
// Circle borders
|
|
static BorderRadius get circleBorder8 => BorderRadius.circular(
|
|
8.h,
|
|
);
|
|
|
|
// Rounded borders
|
|
static BorderRadius get roundedBorder1 => BorderRadius.circular(
|
|
1.h,
|
|
);
|
|
|
|
// Outline decorations
|
|
static BoxDecoration get outlineBlack => BoxDecoration(
|
|
color: appTheme.whiteA700,
|
|
boxShadow: [
|
|
BoxShadow(
|
|
color: appTheme.black900.withOpacity(0.15),
|
|
spreadRadius: 2.h,
|
|
blurRadius: 2.h,
|
|
offset: Offset(
|
|
0,
|
|
2,
|
|
),
|
|
),
|
|
],
|
|
);
|
|
static BoxDecoration get outlineBlueGray => BoxDecoration(
|
|
border: Border.all(
|
|
color: appTheme.blueGray800,
|
|
width: 1.h,
|
|
strokeAlign: strokeAlignOutside,
|
|
),
|
|
);
|
|
// Circle borders
|
|
static BorderRadius get circleBorder17 => BorderRadius.circular(
|
|
17.h,
|
|
);
|
|
static BorderRadius get circleBorder20 => BorderRadius.circular(
|
|
20.h,
|
|
);
|
|
static BorderRadius get circleBorder62 => BorderRadius.circular(
|
|
62.h,
|
|
);
|
|
|
|
// Custom borders
|
|
static BorderRadius get customBorderBL8 => BorderRadius.only(
|
|
bottomLeft: Radius.circular(8.h),
|
|
);
|
|
static BorderRadius get customBorderTL5 => BorderRadius.vertical(
|
|
top: Radius.circular(5.h),
|
|
);
|
|
static BorderRadius get customBorderTL51 => BorderRadius.only(
|
|
topLeft: Radius.circular(5.h),
|
|
bottomRight: Radius.circular(5.h),
|
|
);
|
|
|
|
// Rounded borders
|
|
static BorderRadius get roundedBorder12 => BorderRadius.circular(
|
|
12.h,
|
|
);
|
|
static BorderRadius get roundedBorder5 => BorderRadius.circular(
|
|
5.h,
|
|
);
|
|
static BorderRadius get roundedBorder8 => BorderRadius.circular(
|
|
8.h,
|
|
);
|
|
}
|
|
|
|
// Comment/Uncomment the below code based on your Flutter SDK version.
|
|
|
|
// For Flutter SDK Version 3.7.2 or greater.
|
|
|
|
double get strokeAlignInside => BorderSide.strokeAlignInside;
|
|
|
|
double get strokeAlignCenter => BorderSide.strokeAlignCenter;
|
|
|
|
double get strokeAlignOutside => BorderSide.strokeAlignOutside;
|
|
|
|
// For Flutter SDK Version 3.7.1 or less.
|
|
|
|
// StrokeAlign get strokeAlignInside => StrokeAlign.inside;
|
|
//
|
|
// StrokeAlign get strokeAlignCenter => StrokeAlign.center;
|
|
//
|
|
// StrokeAlign get strokeAlignOutside => StrokeAlign.outside;
|