finap_serialization_helper 0.0.3 icon indicating copy to clipboard operation
finap_serialization_helper: ^0.0.3 copied to clipboard

Finap Serialization Helper

Finap Serialization Helper

Features #

Utility classes for Serialization Helper

Getting started #

Run this command to install

flutter pub add finap_serialization_helper

Usage #

Bool Converter #

Bool to Int

static int? boolToInt(bool? value) {
    try {
      return value != null && value == true ? 1 : 0;
    } on Exception catch (e) {
      return 0;
    }
  }

Bool from Int

static bool? boolFromInt(int? value) {
    try {
      return value != null && value == 1 ? true : false;
    } on Exception catch (e) {
      return false;
    }
  }

Bool from Bool

static bool? boolFromBool(bool? value) {
    return value;
  }
0
likes
90
pub points
46%
popularity

Publisher

unverified uploader

Finap Serialization Helper

Homepage (missing)

Documentation

API reference

License

Icon for licenses.MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on finap_serialization_helper