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

Use your own Android device to run apps in development with Android Studio.

Tiempo de lectura: < 1 minuto Reading Time: < 1 minute Use your own Android device to run apps in development with Android Studio. Photo by Noah Erickson on Pexels Did you know that you can use your own mobile device to debug and run apps developed in Android directly with Android Studio? This is very useful if you want to ... 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

Unable to determine application id: com.android.tools.idea.run.ApkProvisionException: Error loading build artifacts from:

Unable to determine application id: com.android.tools.idea.run.ApkProvisionException: Error loading build artifacts from:

Tiempo de lectura: < 1 minuto Reading time: < 1 minute To solve this error, follow these steps: Go to Android Studio –> File –> Invalidate Caches A window will open. Click on Invalidate and Restart The project will close and reopen. The error will be resolved. I hope this helps. Have a great day! DevCodeLightdevcodelight.com

Customize a Loader in Flutter – Dart

Customize a Loader in Flutter – Dart

Tiempo de lectura: 2 minutos Reading time: 2 minutes I’m going to show you an example of how to customize a loader to appear when we need to load data in our application. The loader element is as follows: class Loader extends StatelessWidget { @override Widget build(BuildContext context) { return Center( child: Container( padding: EdgeInsets.all(16.0), decoration: BoxDecoration( color: Colors.white, borderRadius: … Read more

Change Flutter App Theme from Light to Dark

Tiempo de lectura: < 1 minuto Reading time: < 1 minute First, we need to add the provider dependency inside the pubspec.yaml file. dependencies: flutter: sdk: flutter provider: ^5.0.0 To modify the theme of an application, I’ll show an example below: import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; void main() { runApp( ChangeNotifierProvider( create: (context) => ThemeProvider(), child: MyApp(), ), ); } class ThemeProvider … Read more

Search Bar and Filter in Flutter Dart

Tiempo de lectura: < 1 minuto Reading Time: < 1 minute To create a search bar and filter a list, follow these simple steps: The list of elements we will display and filter is as follows: List<dynamic> tutorsData = [ { “name”: “Maria”, “email”: “example1_devcodelight@email.com”, “phone”: “1234567890” }, { “name”: “Laura”, “email”: “example2_devcodelight@email.com”, “phone”: “1234567890” }, { “name”: “Isma”, “email”: “example3_devcodelight@email.com”, … Read more

UTF-8 Encoding Solution when Receiving Data by Making a GET Request Using Flutter – Dart

UTF-8 Encoding Solution when Receiving Data by Making a GET Request Using Flutter – Dart

Tiempo de lectura: < 1 minuto Reading time: < 1 minute When making a GET request using Flutter and the Dart programming language, I encountered an error while trying to display certain data. The encoding error occurs when receiving information with some characters, and when displaying them in the user interface, they are not shown correctly. To fix the error shown ... Read more

Creating a Simple List in Flutter – Dart

Creating a Simple List in Flutter – Dart

Tiempo de lectura: 3 minutos Reading time: 3 minutes To create an example list where we can add an element, update the list, and also remove elements, follow these steps: First, we create the main Widget that we call from main, where we display the .dart class with the designed view. void main() => runApp(MyApp()); class MyApp extends StatelessWidget { … Read more

Flutter – Structure of an API POST Call

Flutter – Structure of an API POST Call

Tiempo de lectura: < 1 minuto Reading time: < 1 minutes The structure for making a call from Flutter to an API and sending parameters to receive data is as follows: First, we declare and initialize a variable with the API route, in this case, I call it uri: final uri = 'https://name/api/route'; Then, I declare the headers, content-type: final headers ... Read more