flutter dart sorting method does not work

<pre><code>var dataJson = response.body; dataJson = dataJson.replaceAll('[', ''); dataJson = dataJson.replaceAll(']', ''); dataJson = dataJson.rep...

Sort a dart list based on constructor parameter

I have defined a class like this, <pre><code>class Person { final int id, final String name, final String email, final int age, Person({ this.id,...

Flutter Grouped ListView: How to sort by Date?

I have a recipe app. Users can save recipes in a weekly planner (using Hive). The date is saved in this format: 2022-09-08 00:00:00.000 (= user wants to cook a recipe...

How to sort a list that could contain null values with dart null-safety

I have a list of strings that may contain null values, how do I sort this list? I'm using <strong>Flutter beta channel</strong> so <strong>null-safety</strong>...

Flutter; Sort List of Widgets

I currently have a list of widgets <pre><code>List&lt;LessonItem&gt; _lessons = []; </code></pre> One Widget inside this list, added by the user should look lik...

How to a sort a big list lazily (to escape Stack Overflow)?

I have a big list of 50k lines. Now when I try to sort it with <code>list.sort</code> it throws <code>Stack Overflow</code> error.<br /> How to make the sorting work l...

Sort a List in Dart based on how another List was sorted

I am trying to sort a list with reference to another list. Consider this example, <pre><code>List&lt;String&gt; a = ["a", "b", "c"]; List&lt;int&gt; b = [2, 3, 1]...

How to visually represent lists in Flutter?

I've been trying to build a sorting visualizer in Flutter but how do I represent the list of integers to be sorted as 'bars' on screen. Do you guys know any widgets/cl...

Flutter sort map by two values

I have a map (mapone) that I want to sort by 'number'. But some items in the map have the same 'number', so if the items have the same 'number', they should be sorted...

Was unable to sort a list of objects in flutter

I was working on a project where I need to sort a list that has objects in it, but it's giving an error. <pre><code>The expression here has a type of 'void', and...

How to sort String List by newest in dart

i have <code>String List</code>, per element contains <strong>userId+DateTime</strong> <pre><code> List&lt;String&gt; = [ '9DWXpF6V4vN8oxqvsHKnOBg2Rz2022-09-...

How to sort a list of integers in dart based on their face values?

I have tried this <pre><code>void main() { final List&lt;String&gt; values= [1,1000,10,100,200,...

Flutter project Firestore data sorting

I have some data on my project firestore. It seems like this: <img src="https://i.stack.imgur.com/H1frG.jpg" alt="" /> I am trying to sort this data by S...

Whats the best way to sort MAPString, Object by value in Dart programming?

I'm new to dart programming, I came from a Javascript environment everything is fresh to me and I really have no Idea how this sorting works in dart. Here's an...

custom sort a string list in flutter

I have a list (in flutter): <pre><code>loadedSummaryList = [ 'BILD', 'DRIT', 'VIMN', 'WELT', 'FLUTTER', 'ALL'...