finap_serialization_helper 0.0.3 copy "finap_serialization_helper: ^0.0.3" to clipboard
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
21%
popularity

Publisher

unverified uploader

Finap Serialization Helper

Homepage

Documentation

API reference

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on finap_serialization_helper