Health
PlatformDomainAcademyDesign SystemFeedback
v1.5
v1.5
  • 👋Introducing Health
    • Release Notes
      • HCM v1.5 Release Notes
        • Migration from v1.4 to v1.5
        • Service Build Updates
        • Release Checklist
      • HCM v1.4 Release Notes
        • Migration from v1.3 to v1.4
        • Service Build Updates
        • Release Checklist
      • v1.3 Release Notes
      • v1.3 Tech Release Summary
        • Master Data Management Service (MDMS) & Configuration Updates
        • Test Cases
        • Service Build Updates
      • v1.2 Release Notes
      • v1.0 Release Notes
  • Product Roadmap
  • 💙HEALTH CAMPAIGN MANAGEMENT
    • Understanding Health Campaign Management (HCM)
    • Value Proposition
  • 🎯HCM PRODUCT SUITE
    • Functional Specifications
      • Campaign Type Setup
      • Campaign Setup
      • Inventory
      • Boundary Hierarchy
      • Beneficiary
      • Boundary Data Specs
      • Draft System User Setup
      • Role Action Mapping
    • Building Blocks & Services
    • Health Products
      • DIGIT HCM App
        • User Manual
          • Single Round Campaigns
            • Registration & Delivery
              • Registration & Delivery: IRS
                • Product Requirement Document
          • Multi-Round Campaigns
            • Registration & Delivery
            • Download Beneficiary Data
          • Common Functions
            • User Management
            • 2D Voucher Scanning
            • Proximity-Based Search
            • Voucher-Based Registration and Distribution
            • Tracking Beneficiary Referrals
            • Tracking Side-Effects for Beneficiaries
            • Tracking Adverse Events
            • Health Facility Referral
            • Raising Complaints
            • Resolving Complaints
            • Inventory Management
              • User Manual
                • Stock Management
                • Stock Reconciliation
                • View Reports
                • Bale Scanning
            • Attendance Management
          • Support Functions
            • Language Selection
            • Login
            • Forgot Password
            • Project Selection
            • Hamburger Menu
            • Help
            • Sync
            • Checklist
      • Campaign Management Dashboard
        • User Manual
        • Configurations
          • MDMS Configurations and s3 assets
          • IRS Dashboard Chart Configurations
        • Kibana Dashboard Integration With DSS Module
          • Auth Proxy Setup and Configuration for Kibana
      • Microplanning
      • HCM Console
  • 🚀REFERENCE IMPLEMENTATIONs
    • Mozambique
      • LLIN Overview
      • Customisation
      • Rollout
  • 🧰TECHNOLOGY
    • Architecture
      • High Level Design
        • Health Campaign System High Level Design
        • Design Decision Log
      • Low Level Design
        • Registries
          • Individual
          • Household
          • Product
          • Facility
          • Attendance
        • Services
          • Project
          • Stock
          • Referral
      • Field App Architecture
        • UI Packages
          • Closed HouseHold package
          • Registration & Delivery Package
          • Referral Reconciliation Package
          • Inventory Management Package
          • Attendance Management Package
          • DIGIT Scanner Package
          • Digit Showcase Package
          • Digit Data Model Package
          • DIGIT DSS Package
    • Standards
    • Security
    • Interoperability
  • 🪝SETUP
    • Planning an HCM Implementation
    • Establish Project & Team
    • Gathering Requirements
    • Installation
      • Install Using GitHub Actions in AWS
      • System Data Setup
      • Project Data Setup
      • Setup Mobile App
      • Setup Kibana Dashboard
        • Create or Edit Existing Dashboards
      • Server Cleanup
    • Configuration
      • Configuring HCM to Campaign and Country Needs
      • Service Configuration
        • Individual Registry
        • Household Registry
        • Product Registry
        • Facility Registry
        • Stock & Inventory
        • Project Services
        • Referral Management
        • Attendance
        • Complaints
          • QA Sign-Off
            • Test Cases
        • User Management
          • QA Sign-Off
      • UI Configuration
        • Stock Management
        • Language Selection
        • Login
        • Forgot Password
        • Project Selection
        • Dashboard Configuration
          • Dashboard UI Enhancements
          • HCM Dashboard Master Promotion Guide
        • Attendance Management
          • Attendance Package Extraction and Interaction with HCM Application
    • Quality Assurance Testing
      • Regression Test cases
  • 🔵COMMUNITY
    • Source Code
    • Committee
      • Digital Product Advisory Committee Charter
      • Idea Management Process
      • Sessions
        • November 2023 Session
        • August 2024 Session
          • Minutes of the Meeting
Powered by GitBook

https://creativecommons.org/licenses/by/4.0/

On this page

Was this helpful?

Export as PDF
  1. TECHNOLOGY
  2. Architecture
  3. Field App Architecture
  4. UI Packages

DIGIT Scanner Package

A scanner package used for scanning QR codes and GS1 barcodes.

PreviousAttendance Management PackageNextDigit Showcase Package

Was this helpful?

Link to the Pub Package:

How to Use the Scanner Package

To use the digit_scanner package, add the following dependency to your pubspec.yaml file:

dependencies:
  digit_scanner: ^latest

Initialise DigitScannerBloc Provider

To initialise the DigitScannerBloc provider in your application, add the following code:

BlocProvider(
                create: (_) {
                  return DigitScannerBloc(
                    const DigitScannerState(),
                  );
                },
              ),

Clear the Scanner State

To clear the scanner state, use the following code:

context.read<DigitScannerBloc>().add(
    const DigitScannerEvent.handleScanner(),
);

Navigate to the DIGIT Scanner Page

To navigate to the Digit Scanner page, use this code snippet:

context.router.push(DigitScannerRoute(
                              quantity: 1, // Max no. of codes to be scanned
                              isGS1code: false, // Set Flag to true for scanning GS1 barcode
                              singleValue: true, // Set Flag to false for scanning multiple codes
                            ));

Wrap the DigitScannerListener or DigitScannerBuilder

Wrap the DigitScannerListener or DigitScannerBuilder in your widget tree wherever you need to read the scanned codes from the scanner state:

BlocListener<DigitScannerBloc, DigitScannerState>(
                  listener: (context, scannerState) {
                  if (scannerState.qrCodes.isNotEmpty) {
                  //
                  }
                  },
                  child: BlocBuilder<DigitScannerBloc, DigitScannerState>(
                  builder: (context, scannerState) {
                  if(scannerState.qrCodes.isNotEmpty){
                  return Text(scannerState.qrCodes.last); ///Get the scanned codes after scanning from the scanner State
                  }
                  else {
                  return Container();}
                  }
                  ));

Find out about usage at the example implementation.

🧰
digit_scanner | Flutter packageDart packages
Logo