Yes, you can add a Custom Header to every request with the http package in Flutter. Here’s an example of how you can achieve this: import ‘package:http/http.dart’ as http; class AuthHttpClient { final http.Client client; AuthHttpClient({ required this.client, }); //plain request path through. All details are in the hands of the user of this method…
Author: Toma Velev
How to Accomplish Speed of Application Development with Flutter
Flutter is a powerful and efficient framework to accomplish high Speed of Development of mobile web and desktop applications. Here are some tips to help you achieve speed in your Flutter application development: 0. Follow a guideline, single approach on doing things and enforce it endlessly When things are done in specific way in every…
In Flutter – insert code with mixin
In Flutter, you can insert various types of code in a mixin and add it with the with keyword. Here are some examples: Functions You can define functions in a mixin that can be used by classes that inherit from it. mixin MyMixin on Object { void myFunction() { print(‘Hello from mixin!’); } } class…
How to check every request in spring boot & if it is invalid – return 401
How to check for presence of specific header in every request with spring boot and if it is not – return 401? You can achieve this by implementing a custom HandlerInterceptor in Spring Boot. Here’s an example: import org.springframework.stereotype.Component; import org.springframework.web.servlet.HandlerInterceptor; import org.springframework.web.servlet.ModelAndView; import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletResponse; //import javax.servlet.http.HttpServletRequest; //import javax.servlet.http.HttpServletResponse; import java.util.Arrays; @Component public…
Top use cases to choose Flutter for Development in 2025
As of 2025, Flutter has solidified its position as a leading framework for cross-platform application development. Here are the top use cases where choosing Flutter offers significant advantages: Cross-Platform Applications Flutter enables developers to write a single codebase that runs seamlessly on both iOS and Android platforms. Well – this was just hte start. Web…
How to Allow Network Requests in a Flutter Web App while coding?
If you are coding or debugging Flutter Web App and you get a ClientException: XMLHttpRequest error, uri=https:/ you may need to allow Network Requests. 1. Allow network requests in the browser When running your Flutter Web app, you need to allow network requests in the browser. Here are the steps for different browsers: Google Chrome:…
Big O Notation vs Real World Examples
Your search for super efficient big O notation in interviews is less important and it is demonstrated by the Real World Examples. Big O Notation in Interviews Traditionally, big O notation has been a staple in coding interviews to assess a candidate’s ability to understand and optimize algorithms. However, in my personal opinion – there’s…
LLMs vs Search Engines
The large language models (LLMs) modify the human behaviour – Instead of the search engines – autocompleting their untyped words, now the LLMs need specific details so the result to be the desired result. GPT-4, Llama, DeepSeek etc, are changing how humans interact with technology, particularly in terms of how we formulate queries and requests….
How to add some Check on Resume (return to your App) in Flutter
To add a Check in Flutter when an App executes Resume from a background or terminated state, you can use the WidgetsBinding class’s addObserver method to listen for the LifecycleState changes. Here are some steps you can follow: Create a class that extends WidgetsBindingObserver: This is where you’ll put your resume logic. You can add…
Example of how to use the permission_handler package in Flutter
Here’s an example of how to use the permission_handler package in Flutter to check if the user has granted to the app the permissions it needs to function. Install permission_handler First, add the permission_handler package to your pubspec.yaml file: dependencies: flutter: sdk: flutter permission_handler: ^12.0.2 Then, run flutter pub get to install the package. Use…