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

Tiempo de lectura: < 1 minuto 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: Then implement the following code, which will request location permissions, get … Read more

Create a Release-Ready APK/AAB Package with Flutter in Visual Studio Code

Create a Release-Ready APK/AAB Package with Flutter in Visual Studio Code

Tiempo de lectura: 2 minutos Today we are going to learn how we can generate an APK or AAB to distribute or publish our application to the app store using Flutter and VS Code. We have to create an application signing file with the following command: keytool -genkey -v -keystore ~/upload-keystore.jks -keyalg RSA -keysize 2048 -validity 10000 -alias upload Indicate … Read more

Transform Android XML Vector to SVG Using the Command Line

Transform Android XML Vector to SVG Using the Command Line

Tiempo de lectura: < 1 minuto We will learn today how to transform an Android XML vector into a vector in SVG format using the command line. With the vector in SVG, we can use it both in React, Flutter or Web. First, we will install this library (if we want to use the web version): npm install -g vector-drawable-to-svg Once … Read more

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

Add Google Sign Auth in Flutter

Add Google Sign Auth in Flutter

Tiempo de lectura: 4 minutos Today we are going to learn how we can implement Google authentication in our Flutter app. Let’s go to Google Cloud Platform (https://cloud.google.com/) and click on Console Now select our project (if we already have it created by Firebase) or create a new one. Now search for: oauth clients Choose External: Fill in the application … Read more

Crear un widget que pueda contener a otros widgets (ejemplo de custom card) con Flutter

Crear un widget que pueda contener a otros widgets (ejemplo de custom card) con Flutter

Tiempo de lectura: 1 minuto Today we are going to learn how to create a Widget that can contain other Widgets and be used as a background in Flutter. The first thing we are going to do is create our Widget which we will call CustomCard.dart It contains this code: import ‘package:flutter/material.dart’; class CustomCard extends StatelessWidget { final Widget? child; … Read more