tips 💡

Get the filename of a File

use the  basename  function from the dart  path library : import 'package:path/path.dart' ; File file = new File(…

How to get current route path in Flutter?

This should give you the exact route name ModalRoute.of(context).settings.name if you use Navigator.popuntil.. check

Converting string to map in dart

If you can change the string to valid JSON, you can use import 'dart:convert' ; ... Map valueMap = json.decode(v…

Find the number of days between two dates

Instead of rounding the computed number of days, you can ignore Daylight Saving Time in   DateTime   calculations by using…

Dart Multiple Constructors

You can only have one   unnamed   constructor , but you can have any number of additional   named  constructors class Pla…

Load More
That is All