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

@ -17,7 +17,7 @@ class DefaultAppBar extends StatelessWidget implements PreferredSizeWidget {
final VoidCallback? onWillPopScope; final VoidCallback? onWillPopScope;
final TextStyle? titleStyle; 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 @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -43,30 +43,31 @@ class DefaultAppBar extends StatelessWidget implements PreferredSizeWidget {
titleSpacing: 16, titleSpacing: 16,
title: Row( title: Row(
children: [ children: [
if(showBackButton) if (showBackButton)
const Icon(Icons.arrow_back_ios).onPress(() { const Icon(Icons.arrow_back_ios).onPress(() {
if (onWillPopScope != null) { if (onWillPopScope != null) {
showDialog( showDialog(
context: context, context: context,
builder: (BuildContext cxt) => AcknowledgeWorkDialog( builder: (BuildContext cxt) => AcknowledgeWorkDialog(
onSave: onWillPopScope!, onSave: onWillPopScope!,
onDiscard: () { onDiscard: () {
Navigator.of(cxt).pop(); Navigator.of(cxt).pop();
}, },
), ),
); );
return; return;
} }
if (onBackPress != null) { if (onBackPress != null) {
onBackPress!(); onBackPress!();
} else { } else {
Navigator.of(context).pop(); Navigator.of(context).pop();
} }
}), }),
10.width, 10.width,
Text( Text(
title ?? "", 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, ).expanded,
], ],
), ),

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

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

Loading…
Cancel
Save