TF-2116 Create ContainerViewComposer for all platform on web
(cherry picked from commit d034974d854cdeda5cfaebaa823b977fbd8fc819)
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class DesktopContainerViewStyle {
|
||||
static const double radius = 28;
|
||||
static const double margin = 20;
|
||||
static const double elevation = 16;
|
||||
|
||||
static const Color backgroundColor = Colors.white;
|
||||
static const Color outSideBackgroundColor = Colors.black38;
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class MinimizeComposerWidgetStyle {
|
||||
static const double radius = 24;
|
||||
static const double elevation = 16;
|
||||
static const double width = 500;
|
||||
static const double height = 50;
|
||||
static const double space = 8;
|
||||
static const double iconSize = 20;
|
||||
|
||||
static const Color backgroundColor = Colors.white;
|
||||
static const Color iconColor = Colors.black;
|
||||
|
||||
static const EdgeInsetsGeometry padding = EdgeInsetsDirectional.symmetric(horizontal: 24);
|
||||
static const EdgeInsetsGeometry iconPadding = EdgeInsetsDirectional.all(3);
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class MobileContainerViewStyle {
|
||||
static const double radius = 28;
|
||||
static const double elevation = 16;
|
||||
|
||||
static const Color outSideBackgroundColor = Colors.white;
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
|
||||
import 'package:core/presentation/utils/responsive_utils.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class TabletContainerViewStyle {
|
||||
static const double radius = 28;
|
||||
static const double elevation = 16;
|
||||
|
||||
static const Color backgroundColor = Colors.white;
|
||||
static const Color outSideBackgroundColor = Colors.black38;
|
||||
|
||||
static EdgeInsetsGeometry getMargin(
|
||||
BuildContext context,
|
||||
ResponsiveUtils responsiveUtils
|
||||
) {
|
||||
if (responsiveUtils.isTablet(context)) {
|
||||
return const EdgeInsetsDirectional.all(24);
|
||||
} else {
|
||||
return const EdgeInsetsDirectional.symmetric(vertical: 24);
|
||||
}
|
||||
}
|
||||
|
||||
static double getWidth(
|
||||
BuildContext context,
|
||||
ResponsiveUtils responsiveUtils
|
||||
) {
|
||||
final currentWidth = responsiveUtils.getSizeScreenWidth(context);
|
||||
if (responsiveUtils.isTablet(context)) {
|
||||
return currentWidth;
|
||||
} else {
|
||||
return currentWidth * 0.7;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user