Skip to content

Commit

Permalink
Merge pull request #627 from egovernments/component-update
Browse files Browse the repository at this point in the history
Updated components
  • Loading branch information
naveenr-egov authored Dec 12, 2024
2 parents 1068baf + 42d637b commit 8df830c
Show file tree
Hide file tree
Showing 28 changed files with 516 additions and 736 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ class ClosedHouseholdDetailsPageState
],
),
footer: DigitCard(
padding: EdgeInsets.all(theme.spacerTheme.spacer2),
margin: const EdgeInsets.only(top: spacer2),
children: [
BlocBuilder<LocationBloc, LocationState>(
builder: (context, locationState) {
Expand Down Expand Up @@ -143,8 +143,11 @@ class ClosedHouseholdDetailsPageState
]),
slivers: [
SliverToBoxAdapter(
child: DigitCard(children: [
child: DigitCard(
margin: const EdgeInsets.all(spacer2),
children: [
DigitTextBlock(
padding: const EdgeInsets.all(0),
heading: localizations.translate(
i18.closeHousehold.closeHouseHoldDetailLabel,
),
Expand All @@ -153,7 +156,6 @@ class ClosedHouseholdDetailsPageState
i18.closeHousehold.closeHouseHoldDetailDescLabel,
),
),
DigitCard(children: [
ReactiveWrapperField<String>(
formControlName: _administrationAreaKey,
showErrors: (control) =>
Expand Down Expand Up @@ -238,7 +240,6 @@ class ClosedHouseholdDetailsPageState
),
);
}),
]),
]),
),
],
Expand Down
16 changes: 13 additions & 3 deletions packages/closed_household/lib/pages/closed_household_summary.dart
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class ClosedHouseholdSummaryPageState
showcaseButton: ShowcaseButton(),
),
footer: DigitCard(
padding: EdgeInsets.all(theme.spacerTheme.spacer2),
margin: const EdgeInsets.only(top: spacer2),
children: [
BlocBuilder<DigitScannerBloc, DigitScannerState>(
builder: (context, scannerState) {
Expand Down Expand Up @@ -123,8 +123,11 @@ class ClosedHouseholdSummaryPageState
SliverToBoxAdapter(
child: Column(
children: [
DigitCard(children: [
DigitCard(
margin: const EdgeInsets.all(spacer2),
children: [
LabelValueSummary(
padding: EdgeInsets.zero,
heading: localizations.translate(
i18.closeHousehold.closeHouseholdSummaryLabel),
withDivider: false,
Expand All @@ -136,6 +139,7 @@ class ClosedHouseholdSummaryPageState
DateTime.now().millisecondsSinceEpoch,
dateFormat: 'dd MMM yyyy'))
.toString(),
labelFlex: 5,
),
LabelValueItem(
label: localizations.translate(
Expand All @@ -144,26 +148,31 @@ class ClosedHouseholdSummaryPageState
.boundary!
.name
.toString(),
labelFlex: 5,
),
LabelValueItem(
label: localizations.translate(
i18.closeHousehold.closeHouseholdHeadName),
value: householdState.householdHeadName ??
localizations
.translate(i18.common.coreCommonNA),
labelFlex: 5,
),
LabelValueItem(
label: localizations.translate(i18
.closeHousehold.closeHouseholdGpsAccuracyLabel),
value:
'${householdState.locationAccuracy.toStringAsFixed(2)} ${localizations.translate(i18.common.coreCommonMeters)}',
labelFlex: 5,
),
]),
]),
BlocBuilder<DigitScannerBloc, DigitScannerState>(
builder: (context, state) {
if (state.qrCodes.isNotEmpty) {
return DigitCard(children: [
return DigitCard(
margin: const EdgeInsets.all(spacer2),
children: [
LabelValueSummary(
heading: localizations.translate(i18.closeHousehold
.closeHouseholdVoucherSummaryLabel),
Expand All @@ -173,6 +182,7 @@ class ClosedHouseholdSummaryPageState
label: localizations.translate(i18.closeHousehold
.closeHouseholdVoucherCodeLabel),
value: state.qrCodes.first,
labelFlex: 5,
),
],
),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import 'package:auto_route/auto_route.dart';
import 'package:closed_household/blocs/app_localization.dart';
import 'package:closed_household/widgets/showcase/showcase_button.dart';
import 'package:digit_ui_components/theme/ComponentTheme/back_button_theme.dart';
import 'package:digit_ui_components/theme/digit_extended_theme.dart';
import 'package:digit_ui_components/widgets/atoms/digit_back_button.dart';
import 'package:flutter/material.dart';

import '../../utils/i18_key_constants.dart' as i18;
Expand Down Expand Up @@ -29,32 +31,32 @@ class BackNavigationHelpHeaderWidget extends StatelessWidget {
final theme = Theme.of(context);

return Padding(
padding: EdgeInsets.all( theme.spacerTheme.spacer2/ 2),
padding: EdgeInsets.all( theme.spacerTheme.spacer2),
child: Row(
children: [
Expanded(
child: Row(
children: [
if (showBackNavigation)
Flexible(
child: TextButton.icon(
style: TextButton.styleFrom(
foregroundColor: theme.colorScheme.surface,
padding: EdgeInsets.zero,
),
onPressed: () {
context.router.maybePop();
handleBack != null ? handleBack!() : null;
},
icon: const Icon(Icons.arrow_left_sharp),
label: Text(
ClosedHouseholdLocalization.of(context).translate(
i18.common.coreCommonBack,
),
overflow: TextOverflow.ellipsis,
DigitBackButton(label: ClosedHouseholdLocalization.of(context).translate(
i18.common.coreCommonBack,
),
digitBackButtonThemeData:
const DigitBackButtonThemeData().copyWith(
context: context,
backDigitButtonIcon: Icon(
Icons.arrow_left,
size: MediaQuery.of(context).size.width < 500
? Theme.of(context).spacerTheme.spacer5
: Theme.of(context).spacerTheme.spacer6,
color: Theme.of(context).colorTheme.primary.primary2,
),
),
),
handleBack: () {
context.router.maybePop();
handleBack != null ? handleBack!() : null;
},
)
],
),
),
Expand Down
122 changes: 7 additions & 115 deletions packages/closed_household/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "61.0.0"
_flutterfire_internals:
dependency: transitive
description:
name: _flutterfire_internals
sha256: "37a42d06068e2fe3deddb2da079a8c4d105f241225ba27b7122b37e9865fd8f7"
url: "https://pub.dev"
source: hosted
version: "1.3.35"
analyzer:
dependency: transitive
description:
Expand Down Expand Up @@ -380,10 +372,12 @@ packages:
dart_mappable_builder:
dependency: "direct dev"
description:
path: "../dart_mappable_builder"
relative: true
source: path
version: "4.2.3"
path: "packages/dart_mappable_builder"
ref: master
resolved-ref: "5595f37310a63a92b2c1c7e386c74fe39df5555d"
url: "https://github.com/egovernments/health-campaign-field-worker-app/"
source: git
version: "4.2.0"
dart_style:
dependency: transitive
description:
Expand Down Expand Up @@ -416,27 +410,13 @@ packages:
url: "https://pub.dev"
source: hosted
version: "0.4.1"
digit_components:
dependency: transitive
description:
path: "../digit_components"
relative: true
source: path
version: "1.0.2+1"
digit_data_model:
dependency: "direct main"
description:
path: "../digit_data_model"
relative: true
source: path
version: "1.0.5-dev.1"
digit_firebase_services:
dependency: "direct overridden"
description:
path: "../digit_firebase_services"
relative: true
source: path
version: "0.0.1"
digit_scanner:
dependency: "direct main"
description:
Expand Down Expand Up @@ -509,14 +489,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.18.0"
easy_stepper:
dependency: transitive
description:
name: easy_stepper
sha256: "63f66314a509ec690c8152a41288961fd96ba9e92ef184299f068a5e78bd16ad"
url: "https://pub.dev"
source: hosted
version: "0.8.5+1"
fake_async:
dependency: transitive
description:
Expand Down Expand Up @@ -581,46 +553,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "0.9.3+2"
firebase_core:
dependency: transitive
description:
name: firebase_core
sha256: "26de145bb9688a90962faec6f838247377b0b0d32cc0abecd9a4e43525fc856c"
url: "https://pub.dev"
source: hosted
version: "2.32.0"
firebase_core_platform_interface:
dependency: transitive
description:
name: firebase_core_platform_interface
sha256: b94b217e3ad745e784960603d33d99471621ecca151c99c670869b76e50ad2a6
url: "https://pub.dev"
source: hosted
version: "5.3.1"
firebase_core_web:
dependency: transitive
description:
name: firebase_core_web
sha256: "362e52457ed2b7b180964769c1e04d1e0ea0259fdf7025fdfedd019d4ae2bd88"
url: "https://pub.dev"
source: hosted
version: "2.17.5"
firebase_crashlytics:
dependency: transitive
description:
name: firebase_crashlytics
sha256: "9897c01efaa950d2f6da8317d12452749a74dc45f33b46390a14cfe28067f271"
url: "https://pub.dev"
source: hosted
version: "3.5.7"
firebase_crashlytics_platform_interface:
dependency: transitive
description:
name: firebase_crashlytics_platform_interface
sha256: "16a71e08fbf6e00382816e1b13397898c29a54fa0ad969c2c2a3b82a704877f0"
url: "https://pub.dev"
source: hosted
version: "3.6.35"
fixnum:
dependency: transitive
description:
Expand Down Expand Up @@ -666,14 +598,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "3.0.13"
flutter_focus_watcher:
dependency: transitive
description:
name: flutter_focus_watcher
sha256: a72ee539ae0237961308a25839887ca93a0b1cb6f87b0d492b139c8fccff8e79
url: "https://pub.dev"
source: hosted
version: "2.0.0"
flutter_keyboard_visibility:
dependency: "direct main"
description:
Expand Down Expand Up @@ -772,14 +696,6 @@ packages:
description: flutter
source: sdk
version: "0.0.0"
flutter_typeahead:
dependency: transitive
description:
name: flutter_typeahead
sha256: b9942bd5b7611a6ec3f0730c477146cffa4cd4b051077983ba67ddfc9e7ee818
url: "https://pub.dev"
source: hosted
version: "4.8.0"
flutter_web_plugins:
dependency: transitive
description: flutter
Expand Down Expand Up @@ -1361,14 +1277,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "8.0.0"
pointer_interceptor:
dependency: transitive
description:
name: pointer_interceptor
sha256: adf7a637f97c077041d36801b43be08559fd4322d2127b3f20bb7be1b9eebc22
url: "https://pub.dev"
source: hosted
version: "0.9.3+7"
pool:
dependency: transitive
description:
Expand Down Expand Up @@ -1401,14 +1309,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.3.0"
reactive_flutter_typeahead:
dependency: transitive
description:
name: reactive_flutter_typeahead
sha256: a5dbca4b537bd9dde245d4228e1a6ce937c05cd77c57ed45b9c05135540d5f1a
url: "https://pub.dev"
source: hosted
version: "2.1.1"
reactive_forms:
dependency: "direct main"
description:
Expand All @@ -1432,14 +1332,6 @@ packages:
relative: true
source: path
version: "1.0.4-dev.5"
remove_emoji_input_formatter:
dependency: transitive
description:
name: remove_emoji_input_formatter
sha256: "82d195984f890de7a8fea936c698848e78c1a67ccefe18db3baf9f7a3bc0177f"
url: "https://pub.dev"
source: hosted
version: "0.0.1+1"
rxdart:
dependency: transitive
description:
Expand Down Expand Up @@ -1590,7 +1482,7 @@ packages:
source: hosted
version: "1.2.0"
survey_form:
dependency: "direct overridden"
dependency: transitive
description:
path: "../survey_form"
relative: true
Expand Down
Loading

0 comments on commit 8df830c

Please sign in to comment.