Golang Tutorial
Learn Golang tutorials with examples

February 28, 2022 · 1 min read
The post is about how to get the name of the file in dart programming. Dart gets filename and extension There are multiple ways to get the name of the file using path package basename Import path/path.dart package into your code. Path package provides basename and basenameWithoutExtension properties to get name and extension. First, Create a file object. Pass file.path to those methods. Here is an example import 'dart:io'; import 'package:path/path....
February 28, 2022 · 2 min read
This tutorial explains about below program How to get the MIME type of a file How to find the extension of a given file How to get the MIME type of file? This program explains about to get mime types of a file. The mime package provides a lookupMimeType function, that returns the MIME type. It parses the path of a file, returns extension, extension is checked against MIME types, and returns the MIME-type...
February 28, 2022 · 1 min read
Sometimes, need to send the string data in base64, So we need to know how to send encode a string and decode a string. There are multiple ways we can do it. Dart provides an inbuilt dart:convert library to encode and decode various objects in UTF8 formats. How to encode a string in base64 format in dart dart:convert library provides a base64 class. This example converts the string into an encoded base64 string....
February 28, 2022 · 1 min read
This tutorial shows how to check if element exists in an array or list Dart or Flutter List In dart, Array, and List store the same type of collections, Arrays are fixed, and List is dynamic. Let’s see how to check if an element exists in an array or list. How do Check values exist in an Array or List of dart/flutters? dart list provides multiple ways to check the sub-list contains in the list of elements....
February 28, 2022 · 2 min read
Functions in Dart return only a single value. There are multiple ways to return multiple values wrapped with the below types Array or List Create an object of a Class Set Tuple class How to return multiple values from a Function in Dart Following are multiple ways to pass multiple data from a function create a class and pass the object with values from a function In this example, the function wants to return multiples of different types, So Wrap those values in the object of a class and return from a function....
Recent posts
Puppeteer Login Test example How to convert Double to Integer or Integer to double in Dart| Flutter By Example Best ways to fix 504 gateway time out in nodejs Applications Fix for Error No configuration provided for scss Multiple ways to List containers in a Docker with examples