Skip to content

Use Map<int, T> instead of List<T> for json patching efficiency, an extension for maps to use list methods on them when the key is an int (index)

License

Notifications You must be signed in to change notification settings

cyberpwnn/dart_mapped_list

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Use Map<int, T> instead of List for json patching efficiency, an extension for maps to use list methods on them when the key is an int (index)

Usage

import 'package:mapped_list/mapped_list.dart';  

Map<int, String> mappedList = {};
mappedList.ladd('a');
mappedList.ladd('b');
mappedList.ladd('c');
mappedList.lremove('b');
mappedList.lremoveAt(0);
mappedList.linsert(0, 'd');

print(mappedList); // {0: d, 1: c}
print(mappedList.llist()); // [d,c]

About

Use Map<int, T> instead of List<T> for json patching efficiency, an extension for maps to use list methods on them when the key is an int (index)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages