Posts

Showing posts with the label #flutter

Continuation: Enhancing Push Notifications in Flutter Using Firebase

Image
Enhancing Push Notifications in Flutter  In the previous blog post , we covered the fundamental steps to integrate push notifications into a Flutter app using Firebase Cloud Messaging (FCM). In this continuation, we'll explore how to open a specific page when the user clicks on a notification, thereby enhancing the user experience and providing contextual information. Let's dive into the code changes required to handle notifications effectively: Updating firebase_api.dart import 'package:firebase_messaging/firebase_messaging.dart'; import 'package:pushnotification/Page/notification_screen.dart'; import 'package:pushnotification/main.dart'; class FirebaseApi { final _firebaseMessaging = FirebaseMessaging.instance; void handleMessage(RemoteMessage? message) { if (message == null) return; navigatorKey.currentState?.pushNamed(NotificationScreen.route, arguments: message); } Future<void> handleBackgroundMessage(RemoteMessage mes

Implementing Push Notifications in Flutter Using Firebase

Image
Please, support my blog by clicking on our sponsors ad! Unlocking the Power of Push Notifications in Flutter with Firebase Cloud Push notifications are an essential aspect of modern mobile applications, allowing developers to engage users even when they are not actively using the app. In Flutter, integrating push notifications can be efficiently done through Firebase Cloud Messaging (FCM). In this tutorial, we'll walk through the steps to set up push notifications in a Flutter app using Firebase and also open specific page when user tap on notification . Follow steps to create push notification in both project. Create Project in  https://console.firebase.google.com/ Create Project for push notification After Creating Project add app for both IOS and Android Project. Create app in project For Both IOS and Android project add Package name. Package name should be same as your package name in Android and Project. Click on Register App Download Google Service json. If you

Mastering Flutter Localization Building

Image
  Create Multilingual Flutter App In today's globalized world, building apps that cater to users from diverse linguistic backgrounds is no longer just an option; it's a necessity. Whether you're developing a simple utility app or a complex enterprise solution, ensuring that your app speaks the language of your users can significantly enhance user experience and engagement. One of the most popular frameworks for building cross-platform mobile applications is Flutter. Flutter provides a rich set of tools and libraries for developing beautiful and performant apps, and it also offers robust support for localization and internationalization out of the box. In this comprehensive guide, we'll dive deep into Flutter localization, exploring everything from setting up your project for multilingual support to implementing dynamic language switching within your app. By the end of this guide, you'll be equipped with the knowledge and skills to create multilingual Flutter apps th

Master Flutter MVVM: Easy Guide for Efficient App Development

Image
  Introduction to MVVM Architecture MVVM (Model-View-ViewModel) is a software architectural pattern widely used in building user interfaces, particularly in frameworks like WPF, Xamarin, and Flutter. It's an evolution of the MVC (Model-View-Controller) pattern, aiming to improve separation of concerns and facilitate testability and maintainability of code. In MVVM, the UI is divided into three components: Model: Represents the data and business logic of the application. It encapsulates the data and operations that manipulate that data. The model notifies the ViewModel of any changes, but it's unaware of the UI. View: Represents the user interface. It's responsible for displaying data and capturing user input. Unlike MVC, the view in MVVM is passive and doesn't directly interact with the model. Instead, it binds to properties and commands exposed by the ViewModel. ViewModel: Acts as an intermediary between the view and the model. It exposes properties and commands tha

A Taxi Booking App Built with Flutter: All you should know

Image
  A Taxi Booking App Built with Flutter Introduction: In our fast-paced world, getting from point A to point B has never been easier, all thanks to the wonders of technology. Taxi booking apps have made the once-daunting task of hailing a cab as easy as pie, with just a few taps on your smartphone. In this comprehensive guide, we'll take a deep dive into the world of taxi booking apps, exploring what they are, how they work, and how you can create your very own using Flutter, a user-friendly toolkit developed by Google. What Exactly is a Taxi Booking App? Convenience at Your Fingertips: Taxi booking apps act as your personal transportation assistant, making it incredibly convenient to find and book rides wherever you are.     Effortless Navigation: Say goodbye to the hassle of flagging down taxis on the street. With a taxi booking app, navigation becomes a breeze, with intuitive interfaces guiding you every step of the way.     Time-Saving Solutions: No more wasting time waiting fo

Taxi Booking Project - AppDelegate.Swift

Image
Please, support my blog by clicking on our sponsors ad!   import UIKit import Flutter import GoogleMaps @UIApplicationMain @objc class AppDelegate: FlutterAppDelegate { override func application( _ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? ) -> Bool { GMSServices.provideAPIKey( "Your Key" ) GeneratedPluginRegistrant.register(with: self) return super.application(application, didFinishLaunchingWithOptions: launchOptions) } } Go to Main project

Taxi booking Project - AndroidManifest.xml

Image
Please, support my blog by clicking on our sponsors ad!   < manifest xmlns: android ="http://schemas.android.com/apk/res/android" > < application android :label ="myfirstproject" android :name ="${applicationName}" android :icon ="@mipmap/ic_launcher" > < activity android :name =".MainActivity" android :exported ="true" android :launchMode ="singleTop" android :theme ="@style/LaunchTheme" android :configChanges ="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode" android :hardwareAccelerated ="true" android :windowSoftInputMode ="adjustResize" > <!-- Specifies an Android theme to apply to this Activity as soon as the Android process

Taxi booking in flutter - pubspec.yaml

Image
Please, support my blog by clicking on our sponsors ad!   dependencies : font_awesome_flutter : ^10.6.0 provider : ^6.1.1 flutter : sdk : flutter # The following adds the Cupertino Icons font to your application. # Use with the CupertinoIcons class for iOS style icons. cupertino_icons : ^1.0.2 google_maps_flutter : ^2.5.3 cached_network_image : ^3.3.1 Go to Main project

Taxi Booking in Flutter - vehicle.dart

Image
  import 'package:cached_network_image/cached_network_image.dart' ; import 'package:flutter/material.dart' ; import 'package:font_awesome_flutter/font_awesome_flutter.dart' ; import 'package:google_maps_flutter/google_maps_flutter.dart' ; import 'package:myfirstproject/Dashboard.dart' ; import 'package:myfirstproject/ViewModels/vehicleviewmodel.dart' ; import 'package:myfirstproject/cards/areaspot_card.dart' ; import 'package:myfirstproject/cards/location_card.dart' ; import 'package:myfirstproject/common/bottomnavigationbar.dart' ; import 'package:myfirstproject/common/constants.dart' ; import 'package:myfirstproject/ViewModels/locationviewmodel.dart' ; import 'package:provider/provider.dart' ; class Vehicle extends StatefulWidget { const Vehicle({Key? key}) : super (key: key); @override VehicleState createState() => VehicleState (); } class VehicleState extends State<Vehicle>