ui improvements

design_3.0_medical_gas
Sikander Saleem 1 day ago
parent 9dc19354a2
commit 267a4445d1

@ -73,7 +73,7 @@ class RequestCategoryFragment extends StatelessWidget {
Widget getTabs({required BuildContext context, required DashBoardProvider requestsProvider, required UsersTypes? userType}) {
List<CategoryTabs> tabs = CategoryTabs.getTabs(userType: userType ?? UsersTypes.normal_user, context: context);
return SizedBox(
height: 44 + (context.isTablet() ? 36 : 16),
height: 44 + (context.isTablet() ? 36 : 16).toScreenHeight,
child: ListView.separated(
scrollDirection: Axis.horizontal,
separatorBuilder: (cxt, index) => 12.width,

@ -17,7 +17,7 @@ class DefaultAppBar extends StatelessWidget implements PreferredSizeWidget {
final VoidCallback? onWillPopScope;
final TextStyle? titleStyle;
const DefaultAppBar({this.title, this.onBackPress, this.onWillPopScope, this.actions,this.titleStyle, this.showHomeActionButton = false, this.showBackButton = true, Key? key}) : super(key: key);
const DefaultAppBar({this.title, this.onBackPress, this.onWillPopScope, this.actions, this.titleStyle, this.showHomeActionButton = false, this.showBackButton = true, Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
@ -43,30 +43,31 @@ class DefaultAppBar extends StatelessWidget implements PreferredSizeWidget {
titleSpacing: 16,
title: Row(
children: [
if(showBackButton)
const Icon(Icons.arrow_back_ios).onPress(() {
if (onWillPopScope != null) {
showDialog(
context: context,
builder: (BuildContext cxt) => AcknowledgeWorkDialog(
onSave: onWillPopScope!,
onDiscard: () {
Navigator.of(cxt).pop();
},
),
);
return;
}
if (onBackPress != null) {
onBackPress!();
} else {
Navigator.of(context).pop();
}
}),
if (showBackButton)
const Icon(Icons.arrow_back_ios).onPress(() {
if (onWillPopScope != null) {
showDialog(
context: context,
builder: (BuildContext cxt) => AcknowledgeWorkDialog(
onSave: onWillPopScope!,
onDiscard: () {
Navigator.of(cxt).pop();
},
),
);
return;
}
if (onBackPress != null) {
onBackPress!();
} else {
Navigator.of(context).pop();
}
}),
10.width,
Text(
title ?? "",
style:titleStyle?? AppTextStyles.heading3.copyWith(fontWeight: FontWeight.w500, color: context.isDark ? AppColor.neutral30 : AppColor.neutral50),
style: titleStyle ??
(context.isTablet() ? AppTextStyles.heading4 : AppTextStyles.heading3).copyWith(fontWeight: FontWeight.w500, color: context.isDark ? AppColor.neutral30 : AppColor.neutral50),
).expanded,
],
),

@ -114,7 +114,7 @@ class _MyRequestsPageState extends State<MyRequestsPage> {
mainAxisAlignment: MainAxisAlignment.center,
children: [
Container(
height: 40,
height: 40.toScreenHeight,
padding: const EdgeInsets.only(left: 16, right: 8),
alignment: Alignment.center,
decoration: ShapeDecoration(

@ -62,7 +62,7 @@ class AssetPicker extends StatelessWidget {
children: [
if (device == null && deviceList.isEmpty)
Container(
height: 50,
height: 50.toScreenHeight,
alignment: Alignment.center,
decoration: BoxDecoration(
color: buttonColor ?? backgroundColor ?? AppColor.blueStatus(context),

Loading…
Cancel
Save