From 1186e91892c830b3b73feee25c0acfc39f67f2ea Mon Sep 17 00:00:00 2001 From: Barad7987 Date: Sun, 8 Mar 2020 10:52:29 +0530 Subject: [PATCH] duplicate file UI --- lib/displays/duplicate_display.dart | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/lib/displays/duplicate_display.dart b/lib/displays/duplicate_display.dart index 9e14a33..0fc0a42 100644 --- a/lib/displays/duplicate_display.dart +++ b/lib/displays/duplicate_display.dart @@ -69,14 +69,14 @@ class _DuplicateFileDisplayScreenState extends State return true; else return false; - //return ret; + } List la; -var d = new List(); + Future convertToLists(List ls) async { - + var d = new List(); Future m; for (int k = 0; k < ls.length; k++) { if (ls[k] is MyFile && mime(ls[k].path) != null) { @@ -105,34 +105,33 @@ var d = new List(); if ((x == y) && (x1 == y1) && calculateMD5SumAsyncWithPlugin( - ls[k].path, ls[i].path)) // == snapshot.data[i].name) + ls[k].path, ls[i].path)) //) { - setState(() { + list.add(ls[i]); list2.add(ls[i].name); d.add(ls[i]); ls.removeAt(i); - }); + } } if (list.length >= 2) { - setState(() { + d.add(list[0]); - }); + } } } - // m= Future.forEach(d, (i)=>i); - //print(m); + return d; } void initState() { _scrollController = ScrollController(keepScrollOffset: true); - //convertToLists(); + super.initState(); }