Last updated:
0 purchases
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;
}
}
copied to clipboard
Bool from Int
static bool? boolFromInt(int? value) {
try {
return value != null && value == 1 ? true : false;
} on Exception catch (e) {
return false;
}
}
copied to clipboard
Bool from Bool
static bool? boolFromBool(bool? value) {
return value;
}
copied to clipboard
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.