fix: remove sizer

This commit is contained in:
mso7nueh
2024-09-11 13:56:33 +03:00
parent 220e13d525
commit 3aa9e8cba8
38 changed files with 359 additions and 413 deletions

View File

@@ -26,8 +26,8 @@ class AppbarLeadingImage extends StatelessWidget {
padding: margin ?? EdgeInsets.zero,
child: CustomImageView(
imagePath: imagePath,
height: 26.v,
width: 13.h,
height: 26,
width: 13,
fit: BoxFit.contain,
),
),

View File

@@ -23,11 +23,11 @@ class AppbarTitleCircleimage extends StatelessWidget {
padding: margin ?? EdgeInsets.zero,
child: CustomImageView(
imagePath: imagePath,
height: 40.adaptSize,
width: 40.adaptSize,
height: 40,
width: 40,
fit: BoxFit.contain,
radius: BorderRadius.circular(
20.h,
20,
),
),
),

View File

@@ -1,4 +1,3 @@
import 'package:eatvio_app/core/app_export.dart';
import 'package:flutter/material.dart';
// ignore: must_be_immutable
@@ -11,26 +10,19 @@ class CustomAppBar extends StatelessWidget implements PreferredSizeWidget {
this.title,
this.centerTitle,
this.actions,
}) : super(
key: key,
);
}) : super(key: key);
final double? height;
final double? leadingWidth;
final Widget? leading;
final Widget? title;
final bool? centerTitle;
final List<Widget>? actions;
@override
Widget build(BuildContext context) {
return AppBar(
toolbarHeight: height ?? 56.v,
toolbarHeight: height ?? 56,
automaticallyImplyLeading: false,
backgroundColor: Colors.transparent,
leadingWidth: leadingWidth ?? 0,
@@ -43,8 +35,5 @@ class CustomAppBar extends StatelessWidget implements PreferredSizeWidget {
}
@override
Size get preferredSize => Size(
mediaQueryData.size.width,
height ?? 56.v,
);
Size get preferredSize => Size(double.infinity, height ?? 56);
}

View File

@@ -270,7 +270,7 @@ class _ExpandableListState extends State<ExpandableList> {
onPressed: () => sendProfileData(state),
buttonStyle: CustomButtonStyles.outlinePrimaryTL15,
text: "save".tr.toUpperCase(),
margin: EdgeInsets.only(top: 20.h, bottom: 20.h),
margin: EdgeInsets.only(top: 20, bottom: 20),
),
],
);

View File

@@ -41,7 +41,7 @@ class CustomOutlinedButton extends BaseButton {
return Align(
alignment: alignment ?? Alignment.center,
child: Container(
height: this.height ?? 30.v,
height: this.height ?? 30,
width: this.width ?? double.maxFinite,
margin: margin,
decoration: decoration,
@@ -65,7 +65,7 @@ class CustomOutlinedButton extends BaseButton {
);
} else {
return Container(
height: this.height ?? 30.v,
height: this.height ?? 30,
width: this.width ?? double.maxFinite,
margin: margin,
decoration: decoration,
@@ -91,7 +91,7 @@ class CustomOutlinedButton extends BaseButton {
/*_buildAppBarbuildOutlinedButtonWidget() {
return Container(
height: this.height ?? 30.v,
height: this.height ?? 30,
width: this.width ?? double.maxFinite,
margin: margin,
decoration: decoration,

View File

@@ -41,7 +41,7 @@ class NextStepButton extends BaseButton {
? Align(
alignment: alignment!,
child: Container(
height: this.height ?? 30.v,
height: this.height ?? 30,
width: this.width ?? double.maxFinite,
margin: margin,
decoration: decoration,
@@ -64,7 +64,7 @@ class NextStepButton extends BaseButton {
),
)
: Container(
height: this.height ?? 30.v,
height: this.height ?? 30,
width: this.width ?? double.maxFinite,
margin: margin,
decoration: decoration,

View File

@@ -41,7 +41,7 @@ class NextStepButton extends BaseButton {
? Align(
alignment: alignment!,
child: Container(
height: this.height ?? 30.v,
height: this.height ?? 30,
width: this.width ?? double.maxFinite,
margin: margin,
decoration: decoration,
@@ -64,7 +64,7 @@ class NextStepButton extends BaseButton {
),
)
: Container(
height: this.height ?? 30.v,
height: this.height ?? 30,
width: this.width ?? double.maxFinite,
margin: margin,
decoration: decoration,