diff --git a/assets/images/dashboard/sort_descending.svg b/assets/images/dashboard/sort_descending.svg new file mode 100644 index 00000000..b784b09b --- /dev/null +++ b/assets/images/dashboard/sort_descending.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/assets/images/search.svg b/assets/images/search.svg index a991c00a..0c641a0a 100644 --- a/assets/images/search.svg +++ b/assets/images/search.svg @@ -1,3 +1,3 @@ - - + + diff --git a/lib/dashboard_latest/widgets/progress_fragment.dart b/lib/dashboard_latest/widgets/progress_fragment.dart index a7606f20..0e30c087 100644 --- a/lib/dashboard_latest/widgets/progress_fragment.dart +++ b/lib/dashboard_latest/widgets/progress_fragment.dart @@ -235,65 +235,73 @@ class ProgressFragment extends StatelessWidget { mainAxisAlignment: MainAxisAlignment.spaceEvenly, spacing: 60.toScreenWidth, children: [ - SizedBox( - height: 124.toScreenWidth, - width: 124.toScreenWidth, - child: PieChart( - dataMap: {for (var v in chartData) v.x: v.y}, - animationDuration: const Duration(milliseconds: 750), - chartLegendSpacing: 0, - chartRadius: 124, - colorList: chartData.map((element) => element.color).toList(), - initialAngleInDegree: 270, - chartType: ChartType.ring, - ringStrokeWidth: 32, - legendOptions: LegendOptions( - showLegendsInRow: true, - legendPosition: LegendPosition.top, - showLegends: false, - legendTextStyle: AppTextStyles.textStyle9, - ), - chartValuesOptions: ChartValuesOptions( - showChartValueBackground: true, - chartValueBackgroundColor: const Color(0xff226187).withValues(alpha: .75), - chartValueStyle: AppTextStyles.textStyle9.copyWith(height: 1.5, color: Colors.white), - showChartValues: true, - showChartValuesInPercentage: true, - showChartValuesOutside: true, - decimalPlaces: 0, - ), - ).toShimmer(isShow: snapshot.isAllCountLoading, radius: 250, context: context).paddingAll(0), + Expanded( + flex: 3, + child: SizedBox( + height: 124.toScreenWidth, + width: 124.toScreenWidth, + child: PieChart( + dataMap: {for (var v in chartData) v.x: v.y}, + animationDuration: const Duration(milliseconds: 750), + chartLegendSpacing: 0, + chartRadius: 124, + colorList: chartData.map((element) => element.color).toList(), + initialAngleInDegree: 270, + chartType: ChartType.ring, + ringStrokeWidth: 32, + legendOptions: LegendOptions( + showLegendsInRow: true, + legendPosition: LegendPosition.top, + showLegends: false, + legendTextStyle: AppTextStyles.textStyle9, + ), + chartValuesOptions: ChartValuesOptions( + showChartValueBackground: true, + chartValueBackgroundColor: const Color(0xff226187).withValues(alpha: .75), + chartValueStyle: AppTextStyles.tinyFont2.copyWith(height: 1.5, color: Colors.white), + showChartValues: true, + showChartValuesInPercentage: true, + showChartValuesOutside: true, + decimalPlaces: 0, + ), + ).toShimmer(isShow: snapshot.isAllCountLoading, radius: 250, context: context).paddingAll(0), + ), ), - Column( - mainAxisAlignment: MainAxisAlignment.end, - spacing: 8, - children: [ - for (int i = 0; i < chartData.length; i++) - Row( - spacing: 16, - children: [ - chartData[i].icon.toSvgAsset(height: 26, width: 26, color: chartData[i].color).toShimmer(isShow: snapshot.isAllCountLoading, context: context), - Column( - spacing: 4, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text(chartData[i].x, style: AppTextStyles.textStyle9.copyWith(color: AppColor.text9Color(context))).toShimmer(isShow: snapshot.isAllCountLoading, context: context), - RichText( - text: TextSpan( - text: "${chartData[i].y.toInt()}", - style: AppTextStyles.bodyText.copyWith(color: AppColor.headingTextColor(context)), - children: [ - TextSpan(text: " | ", style: AppTextStyles.bodyText.copyWith(color: AppColor.headingTextColor(context))), - TextSpan(text: "${chartData[i].y}", style: AppTextStyles.bodyText.copyWith(color: AppColor.headingTextColor(context))), - ], + Expanded( + flex: 2, + child: Column( + mainAxisAlignment: MainAxisAlignment.end, + crossAxisAlignment: CrossAxisAlignment.start, + spacing: 8, + children: [ + for (int i = 0; i < chartData.length; i++) + Row( + spacing: 16, + children: [ + chartData[i].icon.toSvgAsset(height: 26, width: 26, color: chartData[i].color).toShimmer(isShow: snapshot.isAllCountLoading, context: context), + Column( + spacing: 4, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text(chartData[i].x, style: AppTextStyles.textStyle9.copyWith(color: AppColor.text9Color(context))) + .toShimmer(isShow: snapshot.isAllCountLoading, context: context), + RichText( + text: TextSpan( + text: "${chartData[i].y.toInt()}", + style: AppTextStyles.bodyText.copyWith(color: AppColor.headingTextColor(context)), + children: [ + // TextSpan(text: " | ", style: AppTextStyles.bodyText.copyWith(color: AppColor.headingTextColor(context))), + // TextSpan(text: "${chartData[i].y}", style: AppTextStyles.bodyText.copyWith(color: AppColor.headingTextColor(context))), + ], + ), ), - ), - ], - ) - ], - ) - ], - ) + ], + ) + ], + ) + ], + ), + ), ], ).expanded, ], diff --git a/lib/dashboard_latest/widgets/request_category_fragment.dart b/lib/dashboard_latest/widgets/request_category_fragment.dart index 2b70da8f..322c4a41 100644 --- a/lib/dashboard_latest/widgets/request_category_fragment.dart +++ b/lib/dashboard_latest/widgets/request_category_fragment.dart @@ -1,3 +1,4 @@ +import 'package:date_picker_timeline/extra/color.dart'; import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; import 'package:test_sa/controllers/providers/api/user_provider.dart'; @@ -10,6 +11,7 @@ import 'package:test_sa/extensions/widget_extensions.dart'; import 'package:test_sa/models/enums/user_types.dart'; import 'package:test_sa/models/new_models/dashboard_detail.dart'; import 'package:test_sa/modules/cm_module/views/components/weekly_calendar_fragment.dart'; +import 'package:test_sa/new_views/app_style/app_color.dart'; import 'package:test_sa/new_views/common_widgets/tab_button.dart'; import 'package:test_sa/views/widgets/loaders/no_data_found.dart'; import 'package:test_sa/controllers/providers/settings/setting_provider.dart'; @@ -33,7 +35,7 @@ class RequestCategoryFragment extends StatelessWidget { ? Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - context.translation.allWorkOrder.heading4(context), + Text(context.translation.allWorkOrder, style: AppTextStyles.heading4.copyWith(color: AppColor.headingTextColor(context))), // Row( // mainAxisAlignment: MainAxisAlignment.spaceBetween, // children: [ @@ -53,17 +55,35 @@ class RequestCategoryFragment extends StatelessWidget { : const SizedBox(), ], ).paddingOnly(start: 14, end: 12) - : isFMSEngineer - ? Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - context.translation.allWorkOrder.heading4(context), - 'search'.toSvgAsset(width: 20, height: 20).onPress(() { - Navigator.of(context).pushNamed('/cleaner_search'); - }), - ], - ).paddingOnly(start: 16, end: 16) - : context.translation.allWorkOrder.heading4(context).paddingOnly(start: 16, end: 16), + : Row( + spacing: 16, + children: [ + Text(context.translation.allWorkOrder, style: AppTextStyles.heading4.copyWith(color: AppColor.headingTextColor(context))).expanded, + if (!isFMSEngineer) + 'search'.toSvgAsset(width: 24, height: 24, color: AppColor.headingTextColor(context)).onPress(() { + Navigator.of(context).pushNamed('/cleaner_search'); + }), + Transform.flip( + flipY: false, + child: 'dashboard/sort_descending'.toSvgAsset(width: 24, height: 24, color: AppColor.headingTextColor(context)).onPress(() { + Navigator.of(context).pushNamed('/cleaner_search'); + }), + ) + ], + ).paddingOnly(start: 16, end: 16), + + // isFMSEngineer + // ? Row( + // mainAxisAlignment: MainAxisAlignment.spaceBetween, + // children: [ + // context.translation.allWorkOrder.heading4(context), + // 'search'.toSvgAsset(width: 24, height: 24, color: AppColor.headingTextColor(context)).onPress(() { + // Navigator.of(context).pushNamed('/cleaner_search'); + // }), + // ], + // ).paddingOnly(start: 16, end: 16) + // : context.translation.allWorkOrder.heading4(context).paddingOnly(start: 16, end: 16), + getTabs( requestsProvider: dashboardProvider, context: context, diff --git a/lib/dashboard_latest/widgets/request_category_list.dart b/lib/dashboard_latest/widgets/request_category_list.dart index e48f9f7f..375d0996 100644 --- a/lib/dashboard_latest/widgets/request_category_list.dart +++ b/lib/dashboard_latest/widgets/request_category_list.dart @@ -36,7 +36,7 @@ class RequestCategoryList extends StatelessWidget { separatorBuilder: (cxt, index) => 16.height, itemBuilder: (context, index) { if (index == list.length) { - return const CircularProgressIndicator(color: AppColor.primary10, strokeWidth: 1).center; + return CircularProgressIndicator(color: AppColor.loadingColor(context), strokeWidth: 1).center; } return _buildRequestItem(list[index]); }, diff --git a/lib/modules/asset_delivery_module/pages/asset_delivery_page.dart b/lib/modules/asset_delivery_module/pages/asset_delivery_page.dart index cfa28e26..250f5608 100644 --- a/lib/modules/asset_delivery_module/pages/asset_delivery_page.dart +++ b/lib/modules/asset_delivery_module/pages/asset_delivery_page.dart @@ -83,7 +83,7 @@ class _AssetDeliveryPageState extends State { selector: (_, provider) => provider.assetDeliveryDataModel, builder: (context, dataModel, child) { if (loading) { - return const CircularProgressIndicator(color: AppColor.primary10).center; + return CircularProgressIndicator(color: AppColor.loadingColor(context),).center; } if (dataModel == null) { return const NoDataFound().center; @@ -306,7 +306,7 @@ class _AssetDeliveryPageState extends State { Widget assetDeliveryTableList({required BuildContext context, required AssetDeliveryProvider assetDeliveryProvider}) { List assetDeliveryTableList = assetDeliveryProvider.assetDeliveryTableList; return assetDeliveryProvider.isDeliveryTableListLoading - ? SizedBox(height: 200.toScreenHeight, child: const CircularProgressIndicator(color: AppColor.primary10).center) + ? SizedBox(height: 200.toScreenHeight, child: CircularProgressIndicator(color: AppColor.loadingColor(context)).center) : assetDeliveryTableList.isEmpty ? const NoDataFound().center : ListView.separated( diff --git a/lib/modules/asset_delivery_module/pages/delivery_inspection/cost_center_form_view.dart b/lib/modules/asset_delivery_module/pages/delivery_inspection/cost_center_form_view.dart index 2fdfe356..b272c886 100644 --- a/lib/modules/asset_delivery_module/pages/delivery_inspection/cost_center_form_view.dart +++ b/lib/modules/asset_delivery_module/pages/delivery_inspection/cost_center_form_view.dart @@ -113,7 +113,7 @@ class _CostCenterFormViewState extends State { ), body: Consumer(builder: (context, provider, child) { return provider.isLoading - ? const CircularProgressIndicator(color: AppColor.primary10).center + ? CircularProgressIndicator(color: AppColor.loadingColor(context)).center : Column( children: [ itemDetails(), diff --git a/lib/modules/asset_delivery_module/pages/delivery_inspection/delivery_inspection_form_view.dart b/lib/modules/asset_delivery_module/pages/delivery_inspection/delivery_inspection_form_view.dart index ce0566e0..be2fa195 100644 --- a/lib/modules/asset_delivery_module/pages/delivery_inspection/delivery_inspection_form_view.dart +++ b/lib/modules/asset_delivery_module/pages/delivery_inspection/delivery_inspection_form_view.dart @@ -96,7 +96,7 @@ class _DeliveryInspectionFormViewState extends State return Scaffold( backgroundColor: Theme.of(context).scaffoldBackgroundColor, body: isLoading - ? const CircularProgressIndicator(color: AppColor.primary10).center + ? CircularProgressIndicator(color: AppColor.loadingColor(context)).center : Form( key: _formKey, child: Column( @@ -177,7 +177,7 @@ class _DeliveryInspectionFormViewState extends State return Consumer(builder: (context, provider, child) { List linesList = provider.deliveryLinesList; return provider.isDeliveryLineListLoading - ? SizedBox.expand(child: const CircularProgressIndicator(color: AppColor.primary10).center) + ? SizedBox.expand(child: CircularProgressIndicator(color: AppColor.loadingColor(context)).center) : linesList.isEmpty ? const NoDataFound().center : ListView.separated( diff --git a/lib/modules/asset_delivery_module/pages/end_user_acceptance/end_user_cost_center_list_view.dart b/lib/modules/asset_delivery_module/pages/end_user_acceptance/end_user_cost_center_list_view.dart index 0084d570..dc81b8dc 100644 --- a/lib/modules/asset_delivery_module/pages/end_user_acceptance/end_user_cost_center_list_view.dart +++ b/lib/modules/asset_delivery_module/pages/end_user_acceptance/end_user_cost_center_list_view.dart @@ -79,7 +79,7 @@ class _EndUserCostCenterLIstViewState extends State { body: Form( key: _formKey, child: isLoading - ? const CircularProgressIndicator(color: AppColor.primary10).center + ? CircularProgressIndicator(color: AppColor.loadingColor(context)).center : Column( children: [ //Refactor this diff --git a/lib/modules/asset_delivery_module/pages/end_user_acceptance/update_end_user_cost_center_details_view.dart b/lib/modules/asset_delivery_module/pages/end_user_acceptance/update_end_user_cost_center_details_view.dart index 3b5d74bb..15bbc980 100644 --- a/lib/modules/asset_delivery_module/pages/end_user_acceptance/update_end_user_cost_center_details_view.dart +++ b/lib/modules/asset_delivery_module/pages/end_user_acceptance/update_end_user_cost_center_details_view.dart @@ -147,7 +147,7 @@ class _UpdateEndUserCostCenterDetailsViewState extends State 8.height, diff --git a/lib/modules/asset_delivery_module/pages/history_log_view.dart b/lib/modules/asset_delivery_module/pages/history_log_view.dart index a74863ad..9ad8c1fc 100644 --- a/lib/modules/asset_delivery_module/pages/history_log_view.dart +++ b/lib/modules/asset_delivery_module/pages/history_log_view.dart @@ -56,7 +56,7 @@ class _AssetDeliveryHistoryLogViewState extends State { key: _formKey, child: Consumer(builder: (context, provider, child) { return provider.isChildAssetDataLoading - ? const CircularProgressIndicator(color: AppColor.primary10).center + ? CircularProgressIndicator(color: AppColor.loadingColor(context)).center : Column( children: [ SingleChildScrollView( diff --git a/lib/modules/asset_delivery_module/pages/technical_inpection/update_parent_asset_view.dart b/lib/modules/asset_delivery_module/pages/technical_inpection/update_parent_asset_view.dart index 41beefcb..ecd22117 100644 --- a/lib/modules/asset_delivery_module/pages/technical_inpection/update_parent_asset_view.dart +++ b/lib/modules/asset_delivery_module/pages/technical_inpection/update_parent_asset_view.dart @@ -110,7 +110,7 @@ class _UpdateParentAssetViewState extends State { key: _formKey, child: Consumer(builder: (context, provider, child) { return provider.isLoading - ? const CircularProgressIndicator(color: AppColor.primary10).center + ? CircularProgressIndicator(color: AppColor.loadingColor(context)).center : Column( children: [ SingleChildScrollView( diff --git a/lib/modules/asset_delivery_module/pages/technical_inpection/update_technical_inspection_lines_view.dart b/lib/modules/asset_delivery_module/pages/technical_inpection/update_technical_inspection_lines_view.dart index 9edda2f6..2f74c9ef 100644 --- a/lib/modules/asset_delivery_module/pages/technical_inpection/update_technical_inspection_lines_view.dart +++ b/lib/modules/asset_delivery_module/pages/technical_inpection/update_technical_inspection_lines_view.dart @@ -85,7 +85,7 @@ class _UpdateTechnicalInspectionLinesViewState extends State { return DefaultTabController( length: 2, child: provider.isLoading - ? const CircularProgressIndicator(color: AppColor.primary10).center + ? CircularProgressIndicator(color: AppColor.loadingColor(context)).center : Column( mainAxisSize: MainAxisSize.min, children: [ diff --git a/lib/modules/asset_inventory_module/pages/asset_inventory_site_information_page.dart b/lib/modules/asset_inventory_module/pages/asset_inventory_site_information_page.dart index 6eec71d9..3e2f1dd4 100644 --- a/lib/modules/asset_inventory_module/pages/asset_inventory_site_information_page.dart +++ b/lib/modules/asset_inventory_module/pages/asset_inventory_site_information_page.dart @@ -149,7 +149,7 @@ class _SiteInformationPageState extends State { if (provider.isLoading) { return SizedBox( height: 300.toScreenHeight, - child: const CircularProgressIndicator(color: AppColor.primary10).center, + child: CircularProgressIndicator(color: AppColor.loadingColor(context)).center, ); } diff --git a/lib/modules/cleaner_module/pages/cleaner_search_form_view.dart b/lib/modules/cleaner_module/pages/cleaner_search_form_view.dart index bb9fb739..071a36c7 100644 --- a/lib/modules/cleaner_module/pages/cleaner_search_form_view.dart +++ b/lib/modules/cleaner_module/pages/cleaner_search_form_view.dart @@ -194,30 +194,19 @@ class _CleanerSearchFormViewState extends State { @override Widget build(BuildContext context) { return Scaffold( - appBar: DefaultAppBar( - title: 'Search Request', - titleStyle: AppTextStyles.heading3.copyWith( - fontWeight: FontWeight.w500, - color: Theme.of(context).brightness == Brightness.dark ? AppColor.neutral30 : AppColor.neutral50, - ), - ), + appBar: const DefaultAppBar(title: 'Search Request'), body: Column( children: [ Expanded( child: SingleChildScrollView( child: Column( crossAxisAlignment: CrossAxisAlignment.start, + spacing: 8, children: [ // Site Autocomplete Field Container( - padding: EdgeInsets.symmetric( - horizontal: 16.toScreenWidth, - vertical: 8.toScreenHeight, - ), - decoration: BoxDecoration( - color: AppColor.fieldBgColor(context), - borderRadius: BorderRadius.circular(10), - ), + padding: EdgeInsets.symmetric(horizontal: 16.toScreenWidth, vertical: 8.toScreenHeight), + decoration: BoxDecoration(color: AppColor.fieldBgColor(context), borderRadius: BorderRadius.circular(16), border: Border.all(color: AppColor.borderColor(context))), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ @@ -296,13 +285,10 @@ class _CleanerSearchFormViewState extends State { ), ), if (_isLoadingSites) - const SizedBox( + SizedBox( width: 20, height: 20, - child: CircularProgressIndicator( - strokeWidth: 2, - color: AppColor.primary10, - ), + child: CircularProgressIndicator(strokeWidth: 2, color: AppColor.loadingColor(context)), ) else if (controller.text.isNotEmpty) GestureDetector( @@ -336,7 +322,6 @@ class _CleanerSearchFormViewState extends State { ], ), ), - const SizedBox(height: 18), // Building Dropdown SingleItemDropDownMenu( @@ -345,7 +330,7 @@ class _CleanerSearchFormViewState extends State { initialValue: selectedBuilding, showShadow: false, showAsBottomSheet: true, - backgroundColor: AppColor.fieldBgColor(context), + // backgroundColor: AppColor.fieldBgColor(context), enabled: _buildingOptions.isNotEmpty, loading: _isLoadingBuildings, staticData: _buildingOptions, @@ -354,7 +339,6 @@ class _CleanerSearchFormViewState extends State { setState(() { _siteOptions = []; - print('site options length ${_siteOptions.length}'); selectedBuilding = value; selectedFloor = null; selectedLocationDescription = null; @@ -370,7 +354,6 @@ class _CleanerSearchFormViewState extends State { } }, ), - const SizedBox(height: 18), // Floor Dropdown SingleItemDropDownMenu( @@ -379,7 +362,7 @@ class _CleanerSearchFormViewState extends State { initialValue: selectedFloor, showShadow: false, showAsBottomSheet: true, - backgroundColor: AppColor.fieldBgColor(context), + // backgroundColor: AppColor.fieldBgColor(context), enabled: _floorOptions.isNotEmpty, loading: _isLoadingFloors, staticData: _floorOptions, @@ -402,7 +385,6 @@ class _CleanerSearchFormViewState extends State { } }, ), - const SizedBox(height: 18), // Location Description Dropdown SingleItemDropDownMenu( @@ -411,7 +393,7 @@ class _CleanerSearchFormViewState extends State { initialValue: selectedLocationDescription, showShadow: false, showAsBottomSheet: true, - backgroundColor: AppColor.fieldBgColor(context), + // backgroundColor: AppColor.fieldBgColor(context), enabled: _locationDescriptionOptions.isNotEmpty, loading: _isLoadingLocationDescriptions, staticData: _locationDescriptionOptions, @@ -425,7 +407,6 @@ class _CleanerSearchFormViewState extends State { _autoSelectDepartmentRoom(); }, ), - const SizedBox(height: 18), // Department & Room Combined Dropdown SingleItemDropDownMenu( diff --git a/lib/modules/cm_module/views/components/history_log_view.dart b/lib/modules/cm_module/views/components/history_log_view.dart index 53114b71..5d898b19 100644 --- a/lib/modules/cm_module/views/components/history_log_view.dart +++ b/lib/modules/cm_module/views/components/history_log_view.dart @@ -25,7 +25,7 @@ class HistoryLogView extends StatelessWidget { Widget build(BuildContext context) { return Consumer(builder: (context, requestProvider, _) { return requestProvider.isLoading - ? const CircularProgressIndicator(color: AppColor.primary10).center + ? CircularProgressIndicator(color: AppColor.loadingColor(context)).center : (requestProvider.currentWorkOrder == null || (requestProvider.currentWorkOrder?.data?.workOrderHistory.isEmpty ?? true) ? const NoDataFound() : Stack( diff --git a/lib/modules/cm_module/views/components/service_request_detail_view.dart b/lib/modules/cm_module/views/components/service_request_detail_view.dart index 1310fb79..ca3dff26 100644 --- a/lib/modules/cm_module/views/components/service_request_detail_view.dart +++ b/lib/modules/cm_module/views/components/service_request_detail_view.dart @@ -69,7 +69,7 @@ class _ServiceRequestDetailViewState extends State { } return requestProvider.isLoading - ? const CircularProgressIndicator(color: AppColor.primary10).center + ? CircularProgressIndicator(color: AppColor.loadingColor(context)).center : requestProvider.currentWorkOrder == null ? const NoDataFound() : Column( diff --git a/lib/modules/cm_module/views/components/verify_arrival_view.dart b/lib/modules/cm_module/views/components/verify_arrival_view.dart index 64ae33e7..6b00e0f8 100644 --- a/lib/modules/cm_module/views/components/verify_arrival_view.dart +++ b/lib/modules/cm_module/views/components/verify_arrival_view.dart @@ -50,7 +50,7 @@ class _VerifyArrivalViewState extends State { body: Consumer(builder: (context, CMDetailProvider requestDetailProvider, child) { return SafeArea( child: requestDetailProvider.isArrivalLoading || requestDetailProvider.isLoading - ? const CircularProgressIndicator(color: AppColor.primary10).center + ? CircularProgressIndicator(color: AppColor.loadingColor(context)).center : requestDetailProvider.arrivalTypeList.isEmpty ? const NoDataFound().center : ListView.builder( @@ -104,7 +104,7 @@ class _VerifyArrivalViewState extends State { ), ), 12.width, - SizedBox(width: 24, height: 24, child: isLoading ? const CircularProgressIndicator(color: AppColor.primary10, strokeWidth: 2) : const SizedBox()) + SizedBox(width: 24, height: 24, child: isLoading ? CircularProgressIndicator(color: AppColor.loadingColor(context), strokeWidth: 2) : const SizedBox()) ], ).paddingAll(12), ), diff --git a/lib/modules/cm_module/views/forms/spare_part/spare_part_request.dart b/lib/modules/cm_module/views/forms/spare_part/spare_part_request.dart index feeb9b70..289d4778 100644 --- a/lib/modules/cm_module/views/forms/spare_part/spare_part_request.dart +++ b/lib/modules/cm_module/views/forms/spare_part/spare_part_request.dart @@ -388,7 +388,7 @@ class PartDetailBottomSheetSheet extends StatelessWidget { 'Parts Availability'.heading6(context).paddingOnly(top: 12, start: 12), Consumer(builder: (context, requestDetailProvider, child) { return requestDetailProvider.isLoading - ? const CircularProgressIndicator(color: AppColor.primary10).center + ? CircularProgressIndicator(color: AppColor.loadingColor(context)).center : requestDetailProvider.storeAvailability.isEmpty ? const NoDataFound().center : ListView.separated( diff --git a/lib/modules/cx_module/chat/chat_page.dart b/lib/modules/cx_module/chat/chat_page.dart index 7f92f9ca..c3e351cc 100644 --- a/lib/modules/cx_module/chat/chat_page.dart +++ b/lib/modules/cx_module/chat/chat_page.dart @@ -208,7 +208,7 @@ class _ChatPageState extends State { loginResponse: provider.chatLoginResponse, ), builder: (context, connectionState, child) { - if (connectionState.isLoading) return const CircularProgressIndicator(color: AppColor.primary10, strokeWidth: 3).center; + if (connectionState.isLoading) return CircularProgressIndicator(color: AppColor.loadingColor(context), strokeWidth: 3).center; if (connectionState.loginResponse == null) { return Column( diff --git a/lib/modules/cx_module/chat/helper/chat_file_viewer.dart b/lib/modules/cx_module/chat/helper/chat_file_viewer.dart index 6d9c99d9..9eee8c44 100644 --- a/lib/modules/cx_module/chat/helper/chat_file_viewer.dart +++ b/lib/modules/cx_module/chat/helper/chat_file_viewer.dart @@ -42,7 +42,7 @@ class ChatFileViewer extends StatelessWidget { borderRadius: BorderRadius.circular(32), ), ), - child: const CircularProgressIndicator(color: AppColor.primary10, strokeWidth: 2).center, + child: CircularProgressIndicator(color: AppColor.primary10, strokeWidth: 2).center, ); } if (snapshot.data == null) { diff --git a/lib/modules/cx_module/chat/view_all_attachment_page.dart b/lib/modules/cx_module/chat/view_all_attachment_page.dart index 331997ee..4e865e42 100644 --- a/lib/modules/cx_module/chat/view_all_attachment_page.dart +++ b/lib/modules/cx_module/chat/view_all_attachment_page.dart @@ -116,7 +116,7 @@ class AttachmentFileViewer extends StatelessWidget { borderRadius: BorderRadius.circular(32), ), ), - child: SizedBox(width: 24, height: 24, child: const CircularProgressIndicator(color: AppColor.primary10, strokeWidth: 2).center), + child: SizedBox(width: 24, height: 24, child: CircularProgressIndicator(color: AppColor.loadingColor(context), strokeWidth: 2).center), ); } widget = const SizedBox(width: 24, height: 24, child: CircularProgressIndicator(color: AppColor.primary10, strokeWidth: 2)); diff --git a/lib/modules/cx_module/survey/survey_page.dart b/lib/modules/cx_module/survey/survey_page.dart index e061050c..12b61418 100644 --- a/lib/modules/cx_module/survey/survey_page.dart +++ b/lib/modules/cx_module/survey/survey_page.dart @@ -78,7 +78,7 @@ class _SurveyPageState extends State { backgroundColor: AppColor.neutral100, appBar: const DefaultAppBar(title: "Survey"), body: loading - ? const CircularProgressIndicator(color: AppColor.primary10, strokeWidth: 3).center + ? CircularProgressIndicator(color: AppColor.loadingColor(context), strokeWidth: 3).center : (questionnaire == null) ? Column( mainAxisSize: MainAxisSize.min, diff --git a/lib/modules/demo_module/demo_activities_page.dart b/lib/modules/demo_module/demo_activities_page.dart index c4252970..f9a7dc2c 100644 --- a/lib/modules/demo_module/demo_activities_page.dart +++ b/lib/modules/demo_module/demo_activities_page.dart @@ -23,7 +23,7 @@ class DemoActivitiesPage extends StatelessWidget { body: FutureBuilder( future: Future.delayed(Duration(seconds: 1)), builder: (BuildContext context, AsyncSnapshot snapshot) { - if (snapshot.connectionState == ConnectionState.waiting) return const CircularProgressIndicator(color: AppColor.primary10).center; + if (snapshot.connectionState == ConnectionState.waiting) return CircularProgressIndicator(color: AppColor.loadingColor(context)).center; List allAttachments = []; return Column( children: [ diff --git a/lib/modules/demo_module/demo_detail_view_page.dart b/lib/modules/demo_module/demo_detail_view_page.dart index 8d4d30ad..cac6e356 100644 --- a/lib/modules/demo_module/demo_detail_view_page.dart +++ b/lib/modules/demo_module/demo_detail_view_page.dart @@ -86,7 +86,7 @@ class _DemoDetailViewPageState extends State { body: FutureBuilder( future: Provider.of(context, listen: false).getDemoById(widget.demoId), builder: (BuildContext context, AsyncSnapshot snapshot) { - if (snapshot.connectionState == ConnectionState.waiting) return const CircularProgressIndicator(color: AppColor.primary10).center; + if (snapshot.connectionState == ConnectionState.waiting) return CircularProgressIndicator(color: AppColor.loadingColor(context)).center; if (snapshot.data == null) return const NoDataFound().center; List allAttachments = snapshot.data!.demoAttachments! ?? []; diff --git a/lib/modules/demo_module/update_demo-request_view.dart b/lib/modules/demo_module/update_demo-request_view.dart index bdf6408d..d7b1ffe9 100644 --- a/lib/modules/demo_module/update_demo-request_view.dart +++ b/lib/modules/demo_module/update_demo-request_view.dart @@ -180,7 +180,7 @@ class _UpdateDemoRequestViewState extends State with Tick key: _scaffoldKey, appBar: DefaultAppBar(title: 'Update Request'.addTranslation), body: isLoading - ? const CircularProgressIndicator(color: AppColor.primary10).center + ? CircularProgressIndicator(color: AppColor.loadingColor(context)).center : Form( key: _formKey, child: Column( diff --git a/lib/modules/incident_module/create_incident_request_page.dart b/lib/modules/incident_module/create_incident_request_page.dart index 5ceb5dca..2c1fc2cd 100644 --- a/lib/modules/incident_module/create_incident_request_page.dart +++ b/lib/modules/incident_module/create_incident_request_page.dart @@ -418,7 +418,7 @@ class _CreateIncidentRequestPageState extends State { ? SizedBox( width: 16.toScreenHeight, height: 16.toScreenHeight, - child: const CircularProgressIndicator(color: AppColor.primary10, strokeWidth: 2), + child: CircularProgressIndicator(color: AppColor.loadingColor(context), strokeWidth: 2), ) : isOvrVerified ? const Row( diff --git a/lib/modules/incident_module/incident_detail_page.dart b/lib/modules/incident_module/incident_detail_page.dart index 2484a9e9..d4ae8e57 100644 --- a/lib/modules/incident_module/incident_detail_page.dart +++ b/lib/modules/incident_module/incident_detail_page.dart @@ -42,7 +42,7 @@ class IncidentDetailPage extends StatelessWidget { body: FutureBuilder( future: Provider.of(context, listen: false).getIncidentById(incidentId), builder: (BuildContext context, AsyncSnapshot snapshot) { - if (snapshot.connectionState == ConnectionState.waiting) return const CircularProgressIndicator(color: AppColor.primary10).center; + if (snapshot.connectionState == ConnectionState.waiting) return CircularProgressIndicator(color: AppColor.loadingColor(context)).center; if (snapshot.data == null) return const NoDataFound().center; List allAttachments = snapshot.data!.incidentAttachments!; @@ -116,7 +116,7 @@ class IncidentDetailPage extends StatelessWidget { return FutureBuilder?>( future: Provider.of(context, listen: false).getOvrTicketDetails(ovrNumber), builder: (BuildContext context, AsyncSnapshot?> snapshot) { - if (snapshot.connectionState == ConnectionState.waiting) return const CircularProgressIndicator(color: AppColor.primary10).center; + if (snapshot.connectionState == ConnectionState.waiting) return CircularProgressIndicator(color: AppColor.loadingColor(context)).center; if (snapshot.data == null) return const NoDataFound().center; Map? data = snapshot.data; diff --git a/lib/modules/internal_audit_module/pages/system_internal_audit/system_audit_work_order_auto_complete_field.dart b/lib/modules/internal_audit_module/pages/system_internal_audit/system_audit_work_order_auto_complete_field.dart index 9aa79453..b354a38f 100644 --- a/lib/modules/internal_audit_module/pages/system_internal_audit/system_audit_work_order_auto_complete_field.dart +++ b/lib/modules/internal_audit_module/pages/system_internal_audit/system_audit_work_order_auto_complete_field.dart @@ -109,7 +109,7 @@ class _SystemAuditWoAutoCompleteFieldState extends State { child: FutureBuilder( future: Provider.of(context, listen: false).getLoanById(widget.loanId), builder: (BuildContext context, AsyncSnapshot snapshot) { - if (snapshot.connectionState == ConnectionState.waiting) return const CircularProgressIndicator(color: AppColor.primary10).center; + if (snapshot.connectionState == ConnectionState.waiting) return CircularProgressIndicator(color: AppColor.loadingColor(context)).center; if (snapshot.data == null) return const NoDataFound().center; List allAttachments = snapshot.data!.loanAttachments!; diff --git a/lib/modules/medical_gas_inspection/create_medical_gas_request_page.dart b/lib/modules/medical_gas_inspection/create_medical_gas_request_page.dart index 88813f58..c4c9042f 100644 --- a/lib/modules/medical_gas_inspection/create_medical_gas_request_page.dart +++ b/lib/modules/medical_gas_inspection/create_medical_gas_request_page.dart @@ -107,7 +107,7 @@ class _CreateMedicalGasRequestPageState extends State( future: Provider.of(context, listen: false).getLoanById(0), builder: (BuildContext context, AsyncSnapshot snapshot) { - if (snapshot.connectionState == ConnectionState.waiting) return const CircularProgressIndicator(color: AppColor.primary10).center; + if (snapshot.connectionState == ConnectionState.waiting) return CircularProgressIndicator(color: AppColor.loadingColor(context)).center; // if (snapshot.data == null) return const NoDataFound().center; // diff --git a/lib/modules/tm_module/tasks/create_task_view.dart b/lib/modules/tm_module/tasks/create_task_view.dart index 8644ec0e..ef88a1af 100644 --- a/lib/modules/tm_module/tasks/create_task_view.dart +++ b/lib/modules/tm_module/tasks/create_task_view.dart @@ -117,7 +117,7 @@ class _CreateTaskViewState extends State with TickerProviderStat attachment: attachments, buttonColor: AppColor.black10, onlyImages: false, - buttonIcon: 'image-plus'.toSvgAsset(color:context.isDark?AppColor.primary10: AppColor.neutral120), + buttonIcon: 'image-plus'.toSvgAsset(color: context.isDark ? AppColor.primary10 : AppColor.neutral120), //verify this if not required delete this .. onChange: (attachments) { attachments = attachments; @@ -162,7 +162,7 @@ class _CreateTaskViewState extends State with TickerProviderStat title: context.translation.destinationSite, initialValue: _addTaskModel?.site, showAsBottomSheet: true, - backgroundColor: AppColor.neutral100, + // backgroundColor: AppColor.neutral100, showShadow: false, onSelect: (value) { _addTaskModel?.site = value; @@ -176,7 +176,7 @@ class _CreateTaskViewState extends State with TickerProviderStat SingleItemDropDownMenu( context: context, title: context.translation.building, - backgroundColor: AppColor.neutral100, + // backgroundColor: AppColor.neutral100, showAsBottomSheet: true, showShadow: false, initialValue: _addTaskModel?.building, @@ -193,7 +193,7 @@ class _CreateTaskViewState extends State with TickerProviderStat SingleItemDropDownMenu( context: context, showAsBottomSheet: true, - backgroundColor: AppColor.neutral100, + // backgroundColor: AppColor.neutral100, showShadow: false, title: context.translation.floor, initialValue: _addTaskModel?.floor, @@ -209,7 +209,7 @@ class _CreateTaskViewState extends State with TickerProviderStat SingleItemDropDownMenu( context: context, title: context.translation.department, - backgroundColor: AppColor.neutral100, + // backgroundColor: AppColor.neutral100, showAsBottomSheet: true, showShadow: false, initialValue: _addTaskModel?.department, @@ -225,7 +225,7 @@ class _CreateTaskViewState extends State with TickerProviderStat SingleItemDropDownMenu( context: context, title: context.translation.room, - backgroundColor: AppColor.neutral100, + // backgroundColor: AppColor.neutral100, showShadow: false, showAsBottomSheet: true, initialValue: _addTaskModel?.room, diff --git a/lib/modules/traf_module/asset_auto_complete_field.dart b/lib/modules/traf_module/asset_auto_complete_field.dart index e215c4a7..832345ae 100644 --- a/lib/modules/traf_module/asset_auto_complete_field.dart +++ b/lib/modules/traf_module/asset_auto_complete_field.dart @@ -107,7 +107,7 @@ class _AssetAutoCompleteFieldState extends State { floatingLabelStyle: AppTextStyle.body1.copyWith(fontWeight: FontWeight.w500, color: context.isDark ? null : AppColor.neutral20), labelText: "Name/Oracle Code", labelStyle: AppTextStyles.tinyFont.copyWith(color: AppColor.textColor(context)), - suffixIcon: loading ? const CircularProgressIndicator(color: AppColor.primary10, strokeWidth: 3.0).paddingOnly(end: 8) : null, + suffixIcon: loading ? CircularProgressIndicator(color: AppColor.loadingColor(context), strokeWidth: 3.0).paddingOnly(end: 8) : null, ), textInputAction: TextInputAction.search, onChanged: (text) { diff --git a/lib/modules/traf_module/users_auto_complete_field.dart b/lib/modules/traf_module/users_auto_complete_field.dart index c5d04db7..bb55f457 100644 --- a/lib/modules/traf_module/users_auto_complete_field.dart +++ b/lib/modules/traf_module/users_auto_complete_field.dart @@ -109,7 +109,7 @@ class _UsersAutoCompleteFieldState extends State { floatingLabelStyle: AppTextStyle.body1.copyWith(fontWeight: FontWeight.w500, color: context.isDark ? null : AppColor.neutral20), labelText: "Users going to use technology", labelStyle: AppTextStyles.tinyFont.copyWith(color: AppColor.textColor(context)), - suffixIcon: loading ? const CircularProgressIndicator(color: AppColor.primary10, strokeWidth: 3.0).paddingOnly(end: 8) : null, + suffixIcon: loading ? CircularProgressIndicator(color: AppColor.loadingColor(context), strokeWidth: 3.0).paddingOnly(end: 8) : null, ), textInputAction: TextInputAction.search, onChanged: (text) { diff --git a/lib/new_views/app_style/app_color.dart b/lib/new_views/app_style/app_color.dart index 67b993be..c2b9b5cb 100644 --- a/lib/new_views/app_style/app_color.dart +++ b/lib/new_views/app_style/app_color.dart @@ -109,7 +109,9 @@ class AppColor { static Color yellowIcon(BuildContext context) => context.isDark ? const Color(0xffFFC945) : orange70; static Color background(BuildContext context) => context.isDark ? containerDark : Colors.white; + static Color scaffoldBackground(BuildContext context) => context.isDark ? backgroundDark : backgroundLight; + static Color assetGroupBackground(BuildContext context) => context.isDark ? containerDark : Colors.white30; static Color backgroundTabBarColor(BuildContext context) => context.isDark ? backgroundTabBarDark : Colors.white; diff --git a/lib/new_views/common_widgets/app_text_form_field.dart b/lib/new_views/common_widgets/app_text_form_field.dart index 8b301d11..4af550da 100644 --- a/lib/new_views/common_widgets/app_text_form_field.dart +++ b/lib/new_views/common_widgets/app_text_form_field.dart @@ -64,7 +64,7 @@ class AppTextFormField extends StatefulWidget { this.initialValue, // Provide default value this.enable = true, this.showSpeechToText = false, - this.showBorder = false, + this.showBorder = true, this.style, this.contentPadding, this.textAlign, diff --git a/lib/new_views/common_widgets/single_item_drop_down_menu.dart b/lib/new_views/common_widgets/single_item_drop_down_menu.dart index 94383f67..d40e47fc 100644 --- a/lib/new_views/common_widgets/single_item_drop_down_menu.dart +++ b/lib/new_views/common_widgets/single_item_drop_down_menu.dart @@ -232,7 +232,7 @@ class _SingleItemDropDownMenuState { controller: search!.searchBySelectedValue?.controller, labelText: search!.searchBySelectedValue?.label, textInputType: search!.searchBySelectedValue?.inputType, - labelStyle: AppTextStyles.bodyText2, + // labelStyle: AppTextStyles.bodyText2, + style: TextStyle(fontWeight: FontWeight.w500, fontSize: context.isTablet() ? 16 : 12, color: context.isDark ? Colors.white : const Color(0xff3B3D4A)), + floatingLabelStyle: TextStyle(fontWeight: FontWeight.w500, fontSize: context.isTablet() ? 16 : 12, color: context.isDark ? Colors.white : const Color(0xff3B3D4A)), + labelStyle: TextStyle(fontWeight: FontWeight.w500, fontSize: context.isTablet() ? 16 : 12, color: context.isDark ? Colors.white : const Color(0xff767676)), + + showBorder: true, onChange: (text) { search!.searchBySelectedValue?.controller?.text = text; search!.searchBySelectedValue?.controller?.selection = TextSelection.fromPosition(TextPosition(offset: search!.searchBySelectedValue!.controller!.text.length)); diff --git a/lib/new_views/pages/login_page.dart b/lib/new_views/pages/login_page.dart index d5b2ef6f..a962bcdc 100644 --- a/lib/new_views/pages/login_page.dart +++ b/lib/new_views/pages/login_page.dart @@ -111,34 +111,35 @@ class _LoginPageState extends State { AppTextFormField( initialValue: _user.userName ?? "", controller: userNameController, - backgroundColor: AppColor.fieldBgColor(context), + showBorder: true, + // backgroundColor: AppColor.fieldBgColor(context), validator: (value) => Validator.hasValue(value!) ? null : context.translation.requiredField, labelText: context.translation.username, style: TextStyle(fontWeight: FontWeight.w500, fontSize: context.isTablet() ? 16 : 12, color: context.isDark ? Colors.white : const Color(0xff3B3D4A)), floatingLabelStyle: TextStyle(fontWeight: FontWeight.w500, fontSize: context.isTablet() ? 16 : 12, color: context.isDark ? Colors.white : const Color(0xff3B3D4A)), labelStyle: TextStyle(fontWeight: FontWeight.w500, fontSize: context.isTablet() ? 16 : 12, color: context.isDark ? Colors.white : const Color(0xff767676)), textInputType: TextInputType.text, - showWithoutDecoration: true, + // showWithoutDecoration: true, contentPadding: EdgeInsets.symmetric(horizontal: 16.toScreenWidth, vertical: 12.toScreenHeight), onSaved: (value) { _user.userName = value; }, ), - 16.height, + 12.height, AppTextFormField( initialValue: _user.password ?? "", - showWithoutDecoration: true, + // showWithoutDecoration: true, + showBorder: true, labelText: context.translation.password, - backgroundColor: AppColor.fieldBgColor(context), + // backgroundColor: AppColor.fieldBgColor(context), style: TextStyle(fontWeight: FontWeight.w500, fontSize: context.isTablet() ? 16 : 12, color: context.isDark ? Colors.white : const Color(0xff3B3D4A)), labelStyle: TextStyle(fontWeight: FontWeight.w500, fontSize: context.isTablet() ? 16 : 12, color: context.isDark ? Colors.white : const Color(0xff767676)), floatingLabelStyle: TextStyle(fontWeight: FontWeight.w500, fontSize: context.isTablet() ? 16 : 12, color: context.isDark ? Colors.white : const Color(0xff3B3D4A)), contentPadding: EdgeInsets.symmetric(horizontal: 16.toScreenWidth, vertical: 12.toScreenHeight), obscureText: !_passwordVisible, suffixIcon: Icon( - // Based on passwordVisible state choose the icon _passwordVisible ? Icons.visibility : Icons.visibility_off, - color: context.isDark ? AppColor.neutral10 : AppColor.neutral20, + color: AppColor.headingTextColor(context), ).paddingOnly(end: 12).onPress(() { setState(() { _passwordVisible = !_passwordVisible; @@ -180,27 +181,34 @@ class _LoginPageState extends State { Checkbox( value: rememberMe, activeColor: AppColor.blueStatus(context), + side: BorderSide(color: AppColor.loadingColor(context), width: 1.0), + visualDensity: const VisualDensity(horizontal: -4.0, vertical: -4.0), materialTapTargetSize: MaterialTapTargetSize.shrinkWrap, onChanged: (value) { setState(() { rememberMe = value!; }); }), + 8.width, "Remember Me".bodyText(context).custom(color: context.isDark ? AppColor.primary50 : AppColor.neutral50).expanded, ], ), + 8.height, Row( crossAxisAlignment: CrossAxisAlignment.center, children: [ Checkbox( value: privacyPolicyChecked, + side: BorderSide(color: AppColor.loadingColor(context), width: 1.0), activeColor: AppColor.blueStatus(context), + visualDensity: const VisualDensity(horizontal: -4.0, vertical: -4.0), materialTapTargetSize: MaterialTapTargetSize.shrinkWrap, onChanged: (value) { if (value == null) return; privacyPolicyChecked = value; setState(() {}); }), + 8.width, RichText( text: TextSpan(text: "I have read and agree to ", style: AppTextStyles.bodyText.copyWith(color: context.isDark ? AppColor.primary50 : AppColor.neutral50), children: [ TextSpan( diff --git a/lib/new_views/swipe_module/utils/swipe_general_utils.dart b/lib/new_views/swipe_module/utils/swipe_general_utils.dart index 58343f4a..122f14b9 100644 --- a/lib/new_views/swipe_module/utils/swipe_general_utils.dart +++ b/lib/new_views/swipe_module/utils/swipe_general_utils.dart @@ -620,7 +620,7 @@ class SwipeGeneralUtils { top: Radius.circular(20), ), ), - backgroundColor: Theme.of(context).scaffoldBackgroundColor, + backgroundColor: AppColor.bottomSheetColor(context), clipBehavior: Clip.antiAliasWithSaveLayer, builder: (BuildContext context) => Padding( padding: EdgeInsets.only( diff --git a/lib/views/pages/user/notifications/unread_chat_list.dart b/lib/views/pages/user/notifications/unread_chat_list.dart index cb5c325d..429f557b 100644 --- a/lib/views/pages/user/notifications/unread_chat_list.dart +++ b/lib/views/pages/user/notifications/unread_chat_list.dart @@ -22,7 +22,7 @@ class UnReadChatList extends StatelessWidget { body: FutureBuilder>( future: Provider.of(context, listen: false).getUnReadMessages(context.userProvider.user!.employeeId ?? context.userProvider.user!.username!), builder: (BuildContext context, AsyncSnapshot> snapshot) { - if (snapshot.connectionState == ConnectionState.waiting) return const CircularProgressIndicator(color: AppColor.primary10).center; + if (snapshot.connectionState == ConnectionState.waiting) return CircularProgressIndicator(color: AppColor.loadingColor(context)).center; if (snapshot.data?.isEmpty ?? true) return const NoDataFound().center; List messages = snapshot.data!; diff --git a/lib/views/pages/user/profile_page.dart b/lib/views/pages/user/profile_page.dart index f1a0650a..38184ab6 100644 --- a/lib/views/pages/user/profile_page.dart +++ b/lib/views/pages/user/profile_page.dart @@ -197,7 +197,7 @@ class _ProfilePageState extends State { width: MediaQuery.sizeOf(context).width / 2, padding: EdgeInsets.all(4), icon: isLoading - ? const SizedBox(height: 16, width: 16, child: CircularProgressIndicator(color: AppColor.primary10, strokeWidth: 2)) + ? SizedBox(height: 16, width: 16, child: CircularProgressIndicator(color: AppColor.loadingColor(context), strokeWidth: 2)) : 'attachment_icon'.toSvgAsset(height: 24, width: 24), buttonColor: AppColor.primary10, onPressed: () async { diff --git a/lib/views/widgets/dialogs/loading_dialog.dart b/lib/views/widgets/dialogs/loading_dialog.dart index 1a72e452..86cd0cd4 100644 --- a/lib/views/widgets/dialogs/loading_dialog.dart +++ b/lib/views/widgets/dialogs/loading_dialog.dart @@ -22,7 +22,7 @@ class UploadingDialog extends StatelessWidget { child: Column( mainAxisSize: MainAxisSize.min, children: [ - const CircularProgressIndicator(strokeWidth: 3), + CircularProgressIndicator(strokeWidth: 3), 16.height, Text( "Uploading...", diff --git a/lib/views/widgets/equipment/single_device_picker.dart b/lib/views/widgets/equipment/single_device_picker.dart index 77bbad17..20f3516e 100644 --- a/lib/views/widgets/equipment/single_device_picker.dart +++ b/lib/views/widgets/equipment/single_device_picker.dart @@ -219,7 +219,7 @@ class _MyAssetsPageState extends State { }, ), ), - if (_devicesProvider.isLoading) Align(alignment: Alignment.bottomCenter, child: const CircularProgressIndicator().paddingOnly(top: 16, bottom: 16)), + if (_devicesProvider.isLoading) Align(alignment: Alignment.bottomCenter, child: CircularProgressIndicator().paddingOnly(top: 16, bottom: 16)), ], ), )), diff --git a/lib/views/widgets/loaders/app_loading.dart b/lib/views/widgets/loaders/app_loading.dart index 2aff9421..4e5c7454 100644 --- a/lib/views/widgets/loaders/app_loading.dart +++ b/lib/views/widgets/loaders/app_loading.dart @@ -7,6 +7,6 @@ class ALoading extends StatelessWidget { @override Widget build(BuildContext context) { - return const CircularProgressIndicator(color: AppColor.primary10).center; + return CircularProgressIndicator(color: AppColor.loadingColor(context)).center; } } diff --git a/lib/views/widgets/qr/asset_scan_qr.dart b/lib/views/widgets/qr/asset_scan_qr.dart index 03ba6062..92128459 100644 --- a/lib/views/widgets/qr/asset_scan_qr.dart +++ b/lib/views/widgets/qr/asset_scan_qr.dart @@ -207,7 +207,7 @@ class _AssetScanQrState extends State { body: Column( children: [ _isLoading - ? const CircularProgressIndicator(color: AppColor.primary10).center + ? CircularProgressIndicator(color: AppColor.loadingColor(context)).center : Stack( children: [ _isHuawei @@ -259,9 +259,9 @@ class _AssetScanQrState extends State { shape: BoxShape.circle, color: Colors.white, ), - child: const CircularProgressIndicator( - color: AppColor.primary10, - strokeWidth: 3, + child: CircularProgressIndicator( + color: AppColor.loadingColor(context), + strokeWidth: 3 ), ).center, ], diff --git a/lib/views/widgets/qr/scan_qr.dart b/lib/views/widgets/qr/scan_qr.dart index 5aa6e031..4f1dda84 100644 --- a/lib/views/widgets/qr/scan_qr.dart +++ b/lib/views/widgets/qr/scan_qr.dart @@ -85,7 +85,7 @@ class _ScanQrState extends State { Widget build(BuildContext context) { return Scaffold( body: _isLoading - ? const CircularProgressIndicator(color: AppColor.primary10).center + ? CircularProgressIndicator(color: AppColor.loadingColor(context)).center : Stack( children: [ _isHuawei