Error when loading an image with svg extension (Flutter-Dart): Failed to detect image file format using the file header – Invalid image data.

Error when loading an image with svg extension (Flutter-Dart): Failed to detect image file format using the file header – Invalid image data.

Tiempo de lectura: 2 minutos Reading time: 2 minutes When trying to display an image with the svg extension, I encountered the following error: @override Widget build(BuildContext context) { return Scaffold( body: Center( child: Column( mainAxisAlignment: MainAxisAlignment.center, children: [ Text(“WELCOME to DevCodeLight”), Container( width: 200.0, height: 200.0, child: Image.asset(‘lib/images/android/splahs_android.svg’)), ], ), ), ); } I solved it by adding the … Read more

Adding color to a BodyComponent element using Flame in Flutter

Adding color to a BodyComponent element using Flame in Flutter

Tiempo de lectura: 2 minutos Reading time: 2 minutes In this tutorial, I’m going to explain how you can add colors to BodyComponent elements in Flame Engine (https://examples.flame-engine.org). In this example, I’m going to add a BodyComponent representing a blue bar. class BlueBar extends BodyComponent { // Passed parameters final double positionX; final double positionY; final double angularVelocity; // Constructor … Read more

Flutter Project in VSCode

Flutter Project in VSCode

Tiempo de lectura: 3 minutos Reading Time: 4 minutes Today I’m going to show you how to open a Flutter project in VSCode to work in this environment. First, let’s install the Flutter SDK on our PC: Go to the official website https://docs.flutter.dev/get-started/install/windows Choose the corresponding installation: Next, extract the flutter folder to the directory where you want to install … Read more

Recovering Forgotten Password with Flutter and Firebase.

Recovering Forgotten Password with Flutter and Firebase.

Tiempo de lectura: < 1 minuto Reading time: < 1 minute To easily reset the password, follow these simple steps. First, we will create the design of the password recovery screen where we will add a text box to enter the email to which the password reset email will be sent. Additionally, we will add a button to perform the sending ... Read more

Creating an Information Popup, Alert with Flutter.

Creating an Information Popup, Alert with Flutter.

Tiempo de lectura: 2 minutos Reading time: 2 minutes To create a popup window, alerts, or information in Flutter, it is very simple by following the following steps: First, we will create the design of the popup window: The code for the widget is as follows: class Alert extends StatelessWidget { Alert({Key? key}) : super(key: key); @override Widget build(BuildContext context) … Read more