From 0503d6ed752ef35fe76b98ac088eae36f9e60f05 Mon Sep 17 00:00:00 2001 From: Sneha Canopas Date: Tue, 3 Dec 2024 11:19:42 +0530 Subject: [PATCH] Fix pipeline --- .github/workflows/android_build.yml | 12 ++-- .github/workflows/android_deploy.yml | 6 +- lib/style/colors.dart | 6 +- .../apply_leave/widget/picker_card.dart | 64 ++++++++++--------- lib/ui/widget/date_time_picker.dart | 8 ++- 5 files changed, 52 insertions(+), 44 deletions(-) diff --git a/.github/workflows/android_build.yml b/.github/workflows/android_build.yml index f9797a24..ebb315d2 100644 --- a/.github/workflows/android_build.yml +++ b/.github/workflows/android_build.yml @@ -14,10 +14,10 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: set up JDK 1.8 - uses: actions/setup-java@v1 + uses: actions/setup-java@v4 with: java-version: 17.0.6 cache: 'gradle' @@ -57,7 +57,7 @@ jobs: APKSIGN_KEY_PASS: ${{ secrets.APKSIGN_KEY_PASS }} - name: Upload APK Artifact - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: ProjectUnity APK path: ProjectUnity*.apk @@ -70,10 +70,10 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: set up JDK 1.8 - uses: actions/setup-java@v1 + uses: actions/setup-java@v4 with: java-version: 17.0.6 cache: 'gradle' @@ -113,7 +113,7 @@ jobs: APKSIGN_KEY_PASS: ${{ secrets.APKSIGN_KEY_PASS }} - name: Upload AAB Artifact - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: ProjectUnity AAB path: app-release.aab diff --git a/.github/workflows/android_deploy.yml b/.github/workflows/android_deploy.yml index 00a9ed3f..8a43823b 100644 --- a/.github/workflows/android_deploy.yml +++ b/.github/workflows/android_deploy.yml @@ -13,10 +13,10 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: set up JDK 1.8 - uses: actions/setup-java@v1 + uses: actions/setup-java@v4 with: java-version: 17.0.6 cache: 'gradle' @@ -27,8 +27,6 @@ jobs: channel: 'stable' cache: true - - uses: actions/checkout@v2 - - name: Set up ruby env uses: ruby/setup-ruby@v1 with: diff --git a/lib/style/colors.dart b/lib/style/colors.dart index 535d91dc..e60e0259 100644 --- a/lib/style/colors.dart +++ b/lib/style/colors.dart @@ -65,17 +65,17 @@ final ThemeData materialThemeDataDark = _materialDarkTheme.copyWith( primaryColor: primaryColor, scaffoldBackgroundColor: surfaceDarkColor, dividerColor: outlineDarkColor, - colorScheme: _materialLightTheme.colorScheme.copyWith( + colorScheme: _materialDarkTheme.colorScheme.copyWith( onPrimary: primaryColor, onSecondary: textSecondaryDarkColor, surface: surfaceDarkColor, onSurface: textPrimaryDarkColor), - appBarTheme: _materialLightTheme.appBarTheme.copyWith( + appBarTheme: _materialDarkTheme.appBarTheme.copyWith( backgroundColor: surfaceDarkColor, titleTextStyle: AppTextStyle.style20, foregroundColor: textPrimaryDarkColor, centerTitle: true), - popupMenuTheme: _materialLightTheme.popupMenuTheme.copyWith( + popupMenuTheme: _materialDarkTheme.popupMenuTheme.copyWith( surfaceTintColor: surfaceDarkColor, color: surfaceDarkColor, ), diff --git a/lib/ui/user/leaves/apply_leave/widget/picker_card.dart b/lib/ui/user/leaves/apply_leave/widget/picker_card.dart index 8ec2a650..7a273417 100644 --- a/lib/ui/user/leaves/apply_leave/widget/picker_card.dart +++ b/lib/ui/user/leaves/apply_leave/widget/picker_card.dart @@ -28,42 +28,46 @@ class DatePickerCard extends StatelessWidget { decoration: BoxDecoration( border: Border( bottom: BorderSide(color: context.colorScheme.containerHigh))), - child: InkWell( - borderRadius: BorderRadius.circular(12), - onTap: onPress, - child: Padding( - padding: const EdgeInsets.all(12), - child: Row( - crossAxisAlignment: CrossAxisAlignment.end, - children: [ - SvgPicture.asset( - Assets.images.icCalendar, - colorFilter: ColorFilter.mode( - context.colorScheme.textSecondary, BlendMode.srcIn), - ), - const SizedBox( - width: 10, - ), - Column( - crossAxisAlignment: CrossAxisAlignment.start, + child: Builder( + builder: (context) { + return InkWell( + borderRadius: BorderRadius.circular(12), + onTap: onPress, + child: Padding( + padding: const EdgeInsets.all(12), + child: Row( + crossAxisAlignment: CrossAxisAlignment.end, children: [ - Text( - title, - style: AppTextStyle.style14 - .copyWith(color: context.colorScheme.textSecondary), + SvgPicture.asset( + Assets.images.icCalendar, + colorFilter: ColorFilter.mode( + context.colorScheme.textSecondary, BlendMode.srcIn), ), const SizedBox( - height: 5, + width: 10, + ), + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + title, + style: AppTextStyle.style14 + .copyWith(color: context.colorScheme.textSecondary), + ), + const SizedBox( + height: 5, + ), + Text(localization.date_format_yMMMd(date), + style: AppTextStyle.style18.copyWith( + color: context.colorScheme.textPrimary, + textBaseline: TextBaseline.alphabetic)), + ], ), - Text(localization.date_format_yMMMd(date), - style: AppTextStyle.style18.copyWith( - color: context.colorScheme.textPrimary, - textBaseline: TextBaseline.alphabetic)), ], ), - ], - ), - ), + ), + ); + } ), )); } diff --git a/lib/ui/widget/date_time_picker.dart b/lib/ui/widget/date_time_picker.dart index 6f544ddc..e7b9703e 100644 --- a/lib/ui/widget/date_time_picker.dart +++ b/lib/ui/widget/date_time_picker.dart @@ -1,10 +1,13 @@ import 'package:flutter/material.dart'; +import 'package:projectunity/data/core/extensions/context_extension.dart'; import 'package:projectunity/data/core/extensions/date_time.dart'; +import 'package:projectunity/ui/admin/forms/create_form/create_form.dart'; Future pickDate( {required BuildContext context, required DateTime initialDate}) async { DateTime? pickDate = await showDatePicker( context: context, + barrierColor: context.colorScheme.surface, initialDate: initialDate, firstDate: DateTime(1990), lastDate: DateTime(DateTime.now().futureDateSelectionYear), @@ -15,6 +18,9 @@ Future pickDate( Future pickTime( {required BuildContext context, required TimeOfDay initialTime}) async { TimeOfDay? time = - await showTimePicker(context: context, initialTime: initialTime); + await showTimePicker( + context: context, initialTime: initialTime, + barrierColor: context.colorScheme.surface, + ); return time; }