diff --git a/assets/icons/filter_outline.svg b/assets/icons/filter_outline.svg new file mode 100644 index 0000000..cd9d913 --- /dev/null +++ b/assets/icons/filter_outline.svg @@ -0,0 +1,4 @@ + + + + diff --git a/assets/icons/search.svg b/assets/icons/search.svg index 4a4e42d..e12b6da 100644 --- a/assets/icons/search.svg +++ b/assets/icons/search.svg @@ -1,6 +1,4 @@ - - - + + + diff --git a/assets/vec/filter_outline.svg.vec b/assets/vec/filter_outline.svg.vec new file mode 100644 index 0000000..0c4ac2d Binary files /dev/null and b/assets/vec/filter_outline.svg.vec differ diff --git a/assets/vec/search.svg.vec b/assets/vec/search.svg.vec index da0271d..2e7b5e0 100644 Binary files a/assets/vec/search.svg.vec and b/assets/vec/search.svg.vec differ diff --git a/packages/chicken/lib/presentation/pages/sales_out_of_province/view.dart b/packages/chicken/lib/presentation/pages/sales_out_of_province/view.dart index 7be0885..fe0710f 100644 --- a/packages/chicken/lib/presentation/pages/sales_out_of_province/view.dart +++ b/packages/chicken/lib/presentation/pages/sales_out_of_province/view.dart @@ -1,4 +1,3 @@ -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:rasadyar_chicken/data/models/response/steward_free_bar_dashboard/steward_free_bar_dashboard.dart'; import 'package:rasadyar_core/core.dart'; @@ -11,25 +10,108 @@ class SalesOutOfProvincePage extends GetView { @override Widget build(BuildContext context) { return Scaffold( - appBar: RAppBar( - title: 'رصدطیور', - iconTitle: Assets.vec.chickenSvg.path, - titleTextStyle:AppFonts.yekan16Bold.copyWith(color: Colors.white), - centerTitle: true, - hasBack: false, - leading: Row(children: [Text('مباشر', style: AppFonts.yekan16Bold.copyWith(color: Colors.white))]), - ), - body: SingleChildScrollView( - child: Column( + backgroundColor: AppColor.bgLight, + appBar: RAppBar( + title: 'رصدطیور', + iconTitle: Assets.vec.chickenSvg.path, + titleTextStyle: AppFonts.yekan16Bold.copyWith(color: Colors.white), + centerTitle: true, + hasBack: false, + leadingWidth: 130, + leading: Row( + mainAxisSize: MainAxisSize.min, + spacing: 6, children: [ - SizedBox(height: 12), - ObxValue( - (model) => summaryOfInformation(model.value), - controller.stewardFreeDashboard, + Assets.vec.cubeSearchSvg.svg( + width: 24, + height: 24, + colorFilter: const ColorFilter.mode(Colors.white, BlendMode.srcIn), ), + Text('خارج استان', style: AppFonts.yekan16Bold.copyWith(color: Colors.white)), ], ), + additionalActions: [ + Assets.vec.searchSvg.svg( + width: 24, + height: 24, + colorFilter: const ColorFilter.mode(Colors.white, BlendMode.srcIn), + ), + SizedBox(width: 8), + Assets.vec.filterOutlineSvg.svg( + width: 20, + height: 20, + colorFilter: const ColorFilter.mode(Colors.white, BlendMode.srcIn), + ), + SizedBox(width: 8), + ], ), + body: Column( + children: [ + SizedBox(height: 12), + ObxValue((model) => summaryOfInformation(model.value), controller.stewardFreeDashboard), + Expanded( + child: ListView.separated( + padding: const EdgeInsets.fromLTRB(8, 12, 8, 100), + shrinkWrap: true, + physics: BouncingScrollPhysics(), + itemBuilder: (BuildContext context, int index) { + return Container( + padding: EdgeInsets.symmetric(horizontal: 8, vertical: 10), + + decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(8)), + child: Column( + spacing: 8, + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Assets.vec.editSvg.svg( + width: 20, + height: 20, + colorFilter: ColorFilter.mode(AppColor.blueNormal, BlendMode.srcIn), + ), + + Text( + 'لرستان - خرم آباد', + textAlign: TextAlign.center, + style: AppFonts.yekan16.copyWith(color: AppColor.greenDark), + ), + + Assets.vec.trashSvg.svg( + width: 20, + height: 20, + colorFilter: ColorFilter.mode(AppColor.error, BlendMode.srcIn), + ), + ], + ), + Container( + height: 32, + padding: EdgeInsets.symmetric(horizontal: 4), + decoration: ShapeDecoration( + color: AppColor.blueLight, + shape: RoundedRectangleBorder( + side: BorderSide(width: 1, color: AppColor.blueLightHover), + borderRadius: BorderRadius.circular(8), + ), + ), + child: buildRow('تاریخ', '07:15:00 - 1402/07/01'), + ), + + buildRow('مشخصات فروشنده', 'افلاک - 09203659874'), + buildRow('وزن خریداری شده', '200 کیلوگرم'), + buildRow('لاشه خریداری شده', '200 عدد'), + ], + ), + ); + }, + separatorBuilder: (BuildContext context, int index) => SizedBox(height: 6), + itemCount: 3, + ), + ), + ], + ), + floatingActionButton: RFab.add(onPressed: () {}), + floatingActionButtonLocation: FloatingActionButtonLocation.startFloat, ); } @@ -39,14 +121,7 @@ class SalesOutOfProvincePage extends GetView { Padding( padding: const EdgeInsets.symmetric(horizontal: 8), child: Row( - children: [ - Text( - 'خلاصه اطلاعات', - style: AppFonts.yekan16Bold.copyWith( - color: AppColor.blueNormal, - ), - ), - ], + children: [Text('خلاصه اطلاعات', style: AppFonts.yekan16Bold.copyWith(color: AppColor.blueNormal))], ), ), Container( @@ -65,15 +140,9 @@ class SalesOutOfProvincePage extends GetView { spacing: 10, children: [ const SizedBox(height: 12), - buildRow( - 'تعداد کل بارها', - model.totalQuantity?.toString() ?? '0', - ), + buildRow('تعداد کل بارها', model.totalQuantity?.toString() ?? '0'), buildRow('تعداد کل', model.totalBars?.toString() ?? '0'), - buildRow( - 'وزن کل (کیلوگرم)', - model.totalWeight?.toString() ?? '0', - ), + buildRow('وزن کل (کیلوگرم)', model.totalWeight?.toString() ?? '0'), ], ), ), @@ -92,9 +161,7 @@ class SalesOutOfProvincePage extends GetView { child: Text( title, textAlign: TextAlign.right, - style: AppFonts.yekan14.copyWith( - color: AppColor.darkGreyDarkHover, - ), + style: AppFonts.yekan14.copyWith(color: AppColor.darkGreyDarkHover), ), ), Flexible( @@ -102,9 +169,7 @@ class SalesOutOfProvincePage extends GetView { child: Text( value, textAlign: TextAlign.left, - style: AppFonts.yekan14.copyWith( - color: AppColor.darkGreyDarkHover, - ), + style: AppFonts.yekan14.copyWith(color: AppColor.darkGreyDarkHover), ), ), ], @@ -112,8 +177,6 @@ class SalesOutOfProvincePage extends GetView { ); } - - /* Widget inventoryWidget() { return Padding( padding: const EdgeInsets.symmetric(horizontal: 8.0), diff --git a/packages/core/lib/presentation/common/assets.gen.dart b/packages/core/lib/presentation/common/assets.gen.dart index 9a2f111..76f24c7 100644 --- a/packages/core/lib/presentation/common/assets.gen.dart +++ b/packages/core/lib/presentation/common/assets.gen.dart @@ -72,6 +72,9 @@ class $AssetsIconsGen { /// File path: assets/icons/filter.svg SvgGenImage get filter => const SvgGenImage('assets/icons/filter.svg'); + /// File path: assets/icons/filter_outline.svg + SvgGenImage get filterOutline => const SvgGenImage('assets/icons/filter_outline.svg'); + /// File path: assets/icons/gps.svg SvgGenImage get gps => const SvgGenImage('assets/icons/gps.svg'); @@ -192,6 +195,7 @@ class $AssetsIconsGen { edit, excelDownload, filter, + filterOutline, gps, home, information, @@ -317,6 +321,9 @@ class $AssetsVecGen { /// File path: assets/vec/filter.svg.vec SvgGenImage get filterSvg => const SvgGenImage.vec('assets/vec/filter.svg.vec'); + /// File path: assets/vec/filter_outline.svg.vec + SvgGenImage get filterOutlineSvg => const SvgGenImage.vec('assets/vec/filter_outline.svg.vec'); + /// File path: assets/vec/gps.svg.vec SvgGenImage get gpsSvg => const SvgGenImage.vec('assets/vec/gps.svg.vec'); @@ -437,6 +444,7 @@ class $AssetsVecGen { editSvg, excelDownloadSvg, filterSvg, + filterOutlineSvg, gpsSvg, homeSvg, informationSvg, 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 c9e12bb..d48c8c2 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 @@ -1,9 +1,6 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:get/get.dart'; import 'package:rasadyar_core/core.dart'; -import 'package:rasadyar_core/presentation/common/app_color.dart'; -import 'package:rasadyar_core/presentation/common/app_fonts.dart'; class RAppBar extends StatelessWidget implements PreferredSizeWidget { final String title; @@ -48,23 +45,15 @@ class RAppBar extends StatelessWidget implements PreferredSizeWidget { titleTextStyle: titleTextStyle ?? AppFonts.yekan16.copyWith(color: Colors.white), title: Row( mainAxisAlignment: MainAxisAlignment.center, - mainAxisSize: MainAxisSize.min, - children: [Text(title), - if (iconTitle != null)...{ - const SizedBox(width: 8) - }, - if (iconTitle != null)...{ - SvgGenImage.vec(iconTitle!).svg( - width: 24, - height: 24, - - ) - } - - - ]), + mainAxisSize: MainAxisSize.min, + children: [ + Text(title), + if (iconTitle != null) ...{const SizedBox(width: 8)}, + if (iconTitle != null) ...{SvgGenImage.vec(iconTitle!).svg(width: 24, height: 24)}, + ], + ), 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: 6), child: leading) : null, titleSpacing: 8, actions: [ if (additionalActions != null) ...additionalActions!, diff --git a/packages/core/lib/presentation/widget/widget.dart b/packages/core/lib/presentation/widget/widget.dart index 52c3f21..20d3bdd 100644 --- a/packages/core/lib/presentation/widget/widget.dart +++ b/packages/core/lib/presentation/widget/widget.dart @@ -20,3 +20,4 @@ export 'chips/r_chips.dart'; export 'overlay_dropdown_widget/view.dart'; export 'inputs/input_fixed_hint.dart'; export 'bottom_sheet/base_bottom_sheet.dart'; +export 'buttons/fab.dart';