Skip to content
pubscout

lexo_rank_generator

1.0.1, released 4 years ago by rebaz.xyz

Generate lexicographical sort strings for efficient list item reordering.

WASM-ready
$ flutter pub add lexo_rank_generator
Source repository

What it does

Easily generates lexicographical ranks between two existing ranks for reordering list items. It also provides methods to generate a list of initial ranks and check if ranks exceed a threshold.

AI-written summary of version 1.0.1, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to implement drag-and-drop list reordering without updating indices of all items.
  • You want to generate initial lists of lexicographical ranks.

Skip it when

  • You do not need lexicographical sorting for your lists.

Strengths

  • Provides helper methods for generating ranks between two values.
  • Can generate initial ranks for bulk items.
  • Includes a threshold check for re-balancing.

Weaknesses

  • Limited documentation on edge cases beyond basic examples.

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
0
const lexoRank = LexoRank();
final rank = lexoRank.getRankBetween(firstRank: 'aaaa', secondRank: 'cccc');
print(rank);

Alternatives

Packages that do the same job and could replace lexo_rank_generator.

Works with

Packages commonly used together with lexo_rank_generator: ones it builds on, ones built on it, and its own family.