diff --git a/packages/core/lib/presentation/widget/app_bar/r_app_bar.dart b/packages/core/lib/presentation/widget/app_bar/r_app_bar.dart index 67bec05..563a2c2 100644 --- a/packages/core/lib/presentation/widget/app_bar/r_app_bar.dart +++ b/packages/core/lib/presentation/widget/app_bar/r_app_bar.dart @@ -16,6 +16,20 @@ class RAppBar extends StatelessWidget implements PreferredSizeWidget { final int? leadingWidth; final Widget? leading; + const RAppBar.noBack({ + super.key, + required this.title, + this.backgroundColor = AppColor.blueNormal, + this.iconColor = Colors.white, + this.titleTextStyle, + this.onBackPressed, + this.additionalActions, + this.leading, + this.hasBack = false, + this.centerTitle = false, + this.leadingWidth, + }); + const RAppBar({ super.key, required this.title, @@ -27,7 +41,7 @@ class RAppBar extends StatelessWidget implements PreferredSizeWidget { this.leading, this.hasBack = true, this.centerTitle = false, - this.leadingWidth + this.leadingWidth, }); @override @@ -39,20 +53,15 @@ class RAppBar extends StatelessWidget implements PreferredSizeWidget { excludeHeaderSemantics: true, scrolledUnderElevation: 0, centerTitle: centerTitle, - titleTextStyle: - titleTextStyle ?? - AppFonts.yekan16.copyWith(color:Colors.white), + titleTextStyle: titleTextStyle ?? AppFonts.yekan16.copyWith(color: Colors.white), title: Text(title), leadingWidth: leadingWidth?.toDouble(), - leading:leading!=null ? Padding( - padding: const EdgeInsets.only(right: 16), - child: leading, - ) : null, + leading: leading != null ? Padding(padding: const EdgeInsets.only(right: 16), child: leading) : null, titleSpacing: 8, actions: [ if (additionalActions != null) ...additionalActions!, - if(hasBack)...{ + if (hasBack) ...{ Padding( padding: const EdgeInsets.symmetric(horizontal: 8), child: IconButton( @@ -61,10 +70,7 @@ class RAppBar extends StatelessWidget implements PreferredSizeWidget { color: iconColor, ), ), - } - - - + }, ], ); } diff --git a/packages/inspection/lib/presentation/filter/view.dart b/packages/inspection/lib/presentation/filter/view.dart index 3f7ee39..6a65bc1 100644 --- a/packages/inspection/lib/presentation/filter/view.dart +++ b/packages/inspection/lib/presentation/filter/view.dart @@ -11,6 +11,7 @@ class SupervisionFilterPage extends GetView { @override Widget build(BuildContext context) { return Scaffold( + appBar: RAppBar.noBack(title: 'نقشه'), body: PopScope( canPop: !controller.bottomSheetManager.isAnyVisible, onPopInvokedWithResult: (didPop, result) {