Skip to content

Commit

Permalink
Fix pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
cp-sneha-s committed Dec 3, 2024
1 parent 0503d6e commit 5430112
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 54 deletions.
12 changes: 6 additions & 6 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ Future<void> main() async {
return ErrorScreen(error: error);
};

if(!kIsWeb){
if(kDebugMode){
await getIt<FirebaseCrashlytics>().setCrashlyticsCollectionEnabled(false);
}else{
await getIt<FirebaseCrashlytics>().setCrashlyticsCollectionEnabled(true);
if (!kIsWeb) {
if (kDebugMode) {
await getIt<FirebaseCrashlytics>().setCrashlyticsCollectionEnabled(false);
} else {
await getIt<FirebaseCrashlytics>().setCrashlyticsCollectionEnabled(true);
}
}
}

PlatformDispatcher.instance.onError = (error, stack) {
getIt<FirebaseCrashlytics>().recordError(error, stack, fatal: true);
Expand Down
78 changes: 38 additions & 40 deletions lib/ui/user/leaves/apply_leave/widget/picker_card.dart
Original file line number Diff line number Diff line change
Expand Up @@ -28,47 +28,45 @@ class DatePickerCard extends StatelessWidget {
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(color: context.colorScheme.containerHigh))),
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: [
SvgPicture.asset(
Assets.images.icCalendar,
colorFilter: ColorFilter.mode(
context.colorScheme.textSecondary, BlendMode.srcIn),
),
const SizedBox(
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)),
],
),
],
),
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: [
SvgPicture.asset(
Assets.images.icCalendar,
colorFilter: ColorFilter.mode(
context.colorScheme.textSecondary, BlendMode.srcIn),
),
const SizedBox(
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)),
],
),
],
),
);
}
),
),
);
}),
));
}
}
11 changes: 5 additions & 6 deletions lib/ui/widget/date_time_picker.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
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<DateTime?> pickDate(
{required BuildContext context, required DateTime initialDate}) async {
Expand All @@ -17,10 +16,10 @@ Future<DateTime?> pickDate(

Future<TimeOfDay?> pickTime(
{required BuildContext context, required TimeOfDay initialTime}) async {
TimeOfDay? time =
await showTimePicker(
context: context, initialTime: initialTime,
barrierColor: context.colorScheme.surface,
);
TimeOfDay? time = await showTimePicker(
context: context,
initialTime: initialTime,
barrierColor: context.colorScheme.surface,
);
return time;
}
6 changes: 4 additions & 2 deletions test/unit_test/bloc/network/network_connection_bloc_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,10 @@ void main() {
test(
'Emits NetworkConnectionFailureState if device is not connected to mobile or wifi',
() {
when(connectivity.onConnectivityChanged).thenAnswer(
(_) => Stream.fromIterable([[ConnectivityResult.ethernet]]));
when(connectivity.onConnectivityChanged)
.thenAnswer((_) => Stream.fromIterable([
[ConnectivityResult.ethernet]
]));
networkConnectionBloc.add(NetworkConnectionObserveEvent());
expectLater(
networkConnectionBloc.stream, emits(NetworkConnectionFailureState()));
Expand Down

0 comments on commit 5430112

Please sign in to comment.