Generating UUIDs in Flutter | Dart

Ammar Javed
2 min readMay 17, 2021

--

UUIDs can be used to differentiate data. Today we will learn how to generate random UUIDs in Flutter using Dart.

Step 1: First we will add a library as shown below

Step 2: After that, we will import the library

Step 3: Then we will create an object of Uuid() Class, with the help of this object we will be able to generate random UUIDs.

Step 4: In body property will first use Column Widget (no restrictions you can use any widget) and in Column widget, we will use children property because it allows us that we can use the list of widgets, and then we will use Card widget and in Card widget, we will use child argument/property and in child property, we will use ListTile widget. Then in ListTile widget, we will use two properties, the first title then subtitle and in these both properties we will use Text widget as shown below

Step 5: After writing the code we will run the application and will get the following response.

Video Tutorial:

Source Code:

https://github.com/ammarjavedofficial/uuids-flutter-dart

--

--

Ammar Javed
Ammar Javed

Written by Ammar Javed

I possess a unique combination of skills in web, desktop, and mobile apps. I am a strategic thinker and have problem-solving abilities. #FlutterDeveloper

No responses yet