ApiParserFastor class

api parse status, or boolean, or double as string format

Constructors

ApiParserFastor()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

convertBooleanToZeroAndOne(bool? b) int
convert Boolean To ZeroAndOne
isFailed(int? n) bool
is isFailed
isFalse(int? n) bool
is isFalse
isPaginateLaravelEnd(int? currentPage, int? last_page) bool
1- example totalBar record is 100, while pagiantor is 10 current page is 9 "to" is 10
isSuccess(int? n) bool
  • example success: { "status": "success", "code": 1,

  • example faild: { "status": "error", "code": 0, "message": "Unauthorized" }

  • isTrue(int? n) bool
    is True
    parseBoolean(String? n) bool
    "block": "0", >> means false
    parseBoolean_int(int? n) bool
    parseBoolean, parameter int
    parseDoubleOrInt(dynamic data) double
    fix when api return value someTime in "Int" and sometimes in "Double" like: { "data": 15 } or some times return { "data": 13.5 } remove command "," if found in at big numbers come from backend
    parseIntDynamic(dynamic data) int
    parse IntDynamic
    verseBooleanZeroToOneAndViseVersa(int? i) int
    used to change status from "favorite" to "unfavorite" and vise versa