ReorderableMap<T extends OrdereableModel> extension

Adds functions to GenericModelMap specifically for OrdereableModel

This is to make it more convenient to work with OrdereableModels

on

Properties

defaultOrderedKeyList List<String>
Returns a List of keys sorted based on the ordinal value of the OrdereableModels in map
no setter
defaultOrderedList List<T>
Returns a List of T sorted based on the ordinal value of the OrdereableModels in map
no setter

Methods

reorder(T model, int newOrdinal, {String? databaseName}) Future<Iterable<T>>
Reorders the model to have the newOrdinal value for ordinal
setOrdinalOfNewEntry(T model) → T
Automatically sets the ordinal of the given model based on the existing models in map