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);
}