Button component using Flutter in Dart language

Button component using Flutter in Dart language

Tiempo de lectura: 2 minutos In this post, we will create a customizable button component in Flutter using the ElevatedButton widget. This component will allow us to create buttons with text, icon, and customize various aspects like color, text size, and button width. import ‘package:flutter/material.dart’; import ‘../util/constants/Colors.dart’; class Button extends StatelessWidget { final Color? color; // Now optional and can … Read more

Select Dropdown Options Widget or DropdownButton in Dart using Flutter

Select Dropdown Options Widget or DropdownButton in Dart using Flutter

Tiempo de lectura: 2 minutos Today we are going to create a custom widget called CustomDropdownButton, which is used to display a DropdownButton with selectable options. The widget accepts three parameters: import ‘package:flutter/material.dart’; import ‘../comun/Option.dart’; class CustomDropdownButton extends StatefulWidget { final Option selectedOption; final List options; final void Function(Option?) onChanged; CustomDropdownButton({ required this.selectedOption, required this.options, required this.onChanged, }); @override _CustomDropdownButtonState … Read more

How to Get Current Location (Latitude and Longitude) in Flutter

How to Get Current Location (Latitude and Longitude) in Flutter

Tiempo de lectura: 2 minutos   To quickly and easily get the current location, follow these steps: First, make sure you have added the geolocator dependency in the pubspec.yaml file: geolocator: ^7.0.3 Then, run flutter pub get to install the dependency. Next, add the necessary permissions in the AndroidManifest.xml file: <uses-permission android:name=”android.permission.ACCESS_FINE_LOCATION” /> <uses-permission android:name=”android.permission.ACCESS_COARSE_LOCATION” /> Then implement the following … Read more

Create Checkbox Options in Flutter with Dart

Create Checkbox Options in Flutter with Dart

Tiempo de lectura: < 1 minuto Photo by JÉSHOOTS In this example, I’m going to show you how to create a set of checkbox options in Flutter using the Dart programming language. To do this, we’ll create a component that we’ll call CheckboxGroup. This component will have its properties and events to handle the selection of options, allowing us to use … Read more

Create an option select in Flutter with Dart

Create an option select in Flutter with Dart

Tiempo de lectura: 2 minutos Photo by JÉSHOOTS In this example, I’m going to show you how to create a select dropdown in Flutter using the Dart programming language. To do this, we’ll create a component that we’ll call CustomSelect. This element or component will have its properties and events to handle option selection, allowing us to use it in … Read more

Generate Android, iOS, and Web Favicon Icons for Flutter – Dart

Generate Android, iOS, and Web Favicon Icons for Flutter – Dart

Tiempo de lectura: 2 minutos I have used flutter_launcher_icons to create the icons for my application. First, add it to your pubspec.yaml file under dev_dependencies and then run flutter pub get flutter_launcher_icons: “^0.13.1” In your pubspec.yaml file, add a flutter_launcher_icons section to configure the icons you want to generate. Specify paths to the image files that will be used as … Read more

Open PDF Blob Base64 (Sent from Server) on Web or Mobile Using Flutter

Open PDF Blob Base64 (Sent from Server) on Web or Mobile Using Flutter

Tiempo de lectura: 2 minutos Reading time: 2 minutes Hello, today we are going to learn how we can open a PDF file sent from a REST API in our Flutter app. The first thing we are going to do is to install the PDF library for mobile in the pubspec.yaml file: flutter_pdfview: ^1.0.0 To install the library, use: flutter … Read more

Execute Flutter platform or application using console commands.

Execute Flutter platform or application using console commands.

Tiempo de lectura: 5 minutos Reading time: < 1 minute Photo by pexels To run a Flutter application on the web, you can follow the steps below. First, open a terminal or command line in the root directory of your Flutter project. Then, execute the following command to enable Flutter’s web functionality: flutter config --enable-web Next, run the following command ... Read more