How to reverse strings that contain surrogate pairs in Dart?

I was playing with algorithms using Dart and as I actually followed TDD, I realized that my code has some limitations. I was trying to reverse strings as part...

How to replace only one character in a string in Dart?

I am trying to replace only one character in a string dart but can not find any efficient way of doing that. As string is not array in Dart I can't access the characte...

Using Flutter and Dart, why String variables value is changing over screen transfer?

At my first screen this is the code and result: <pre><code>appController.mydate=DateTime.parse(info.timestamp).toLocal().toString().substring(0, DateTime.parse(inf...

Get Future as a String for use in Text Widget?

I've got the following future method which fetches a string from a PHP/Mysql database. <pre><code>Future&lt;String&gt; getCount({ String audioid,}) async { final...

How to compare 2 hours from dateTime flutter

Im getting an error saying i have wrong hour format when my hour format is 17:30:00 when comparing it to another hour, both my hour here is the code: <pre><code>...

How to add substring range in Flutter if the word is less than the range | Flutter

<pre><code>Text('simply dummy text for printing '.substring(0, 12),), </code></pre> i want to print a text from a range 0 to 12 characters. From the above code it work...

How to compare if a string is of less value than other string flutter

I need help to compare 2 strings that i have and i want to check if one of them has less value than the other so i can throw an alert message. My code is as followed <...

how to break a string and insert it into list(array) in flutter dart

am new to flutter and dart, I want to break a string and make some calculations from the middle value of the string which comes from scanning a QR code, somebody pleas...

Dart: Make a calculation from a user input String including math operators

i am new in Dart and Flutter. Is there an easy way to calculate an user input as a String like '3+5/8? Of course the result should be double-type. Thanks for your answ...

How to add each line of string in a List string in flutter?

I have this string in input <pre><code> 01/05/2020 12/02/2020 13/03/2020 24/05/2020 25/06/2020 </code></pre> I search to add this string in a List...

Remove \n from a given strings in dart

Given a string <pre><code>String item = 'Hello\nWorld' </code></pre> I want a function that removes <code>\n</code> from the given string<br /> Something like t...

Get text from .txt file and save it in String variable dart

I have a ".txt" file called "bio.txt" inside the Document folder of my application. I want to read its content and store it inside a String variable. My problem is tha...

How to read/write a file in project directroy?

I'm trying to write some string in a basic txt file and read with a button press. I tried to do it like <pre><code>Future&lt;String&gt; _getStudents() async { St...

Flutter | How to check if String does not contain a substring or a character

I'm learning Flutter/Dart and there is this check that i want to perform - to validate that a user who has entered an email should contain @ in it <pre class="lang...

Is there a way to transform String to Mapdynamic, dynamic in Flutter

Is there a way to transform String to Map&lt;dynamic, dynamic&gt; in Flutter? <pre><code>String myString = mytexthere; Map&lt;dynamic, dynamic&gt; fie...