map_fields

Last updated:

0 purchases

map_fields Image
map_fields Images
Add to Cart

Description:

map fields

MapFields #
A package for handling fields in maps for dart in a simple and fast way.
Features #

MapFields.load()
getString
getInt
getDouble
getBool
getDateTime
getList<T>
getStringNullable
getIntNullable
getDoubleNullable
getBoolNullable
getDateTimeNullable
getListNullable<T>

Installation #
dependencies:
map_fields: any
copied to clipboard
Usage #
import 'package:map_fields/map_fields.dart';

final map = <String, dynamic>{
'name': 'Isac Dev',
'is_dev': true
};

final mapFields = MapFields.load(map);
print(mapFields.getString('name')); // 'Isac Dev'
print(mapFields.getBool('is_dev')); // true
print(mapFields.getDateTime('birth', DateTime(1900))); // 1900-01-01 00:00:00.000
print(mapFields.getDateTime('birth')); // throw MapFieldsError
copied to clipboard

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.