Here I did not typecast like we do in java, but I am getting correct output Why is that so? void main() { print(10/3); } output: 3.3333333333333335 What I have tried: I tried searching in google ..................................
I am receiving notification on all state(foreground, background(on-Paused), terminated(on-Detached)) but it's redirecting me to the intended url only in(foreground and terminated state). Surprisingly, on receiving notification during foreground...
I am working with an expansion tile in a flutter that shows user information in an irregular hierarchical order. I am optimizing the code to increase the performance of the expansion tile widget. Unit-III hierarchy differs from the rest and I am...
On this code, i try to create Delete features, which is can delete history/data that already added. Here's the code : menuOption(String value, History history) async { if (value == 'update') { Get.to(() => UpdateHistoryPage( ...
Looks like you have set the color for navigation bar and button to the same color - color: Color.fromARGB(255, 55, 126, 185), buttonBackgroundColor: Color.fromARGB(255, 55, 126, 185),
Quote: Thanks for your response. I asked this question in more detail on stackoverflow. Unfortunately I will not be visiting StackOverflow to view your question, I doubt i if anyone else would. Please give full detail here by using the Improve...
I am writing a federated plugin in Flutter but acc to url_launcher . I have to create app_facing_package, platform_package and platform_interface_package but I don't know what to write in these packages What I have tried: in docs, there is a...
Db db = new Db("mongodb://localhost:27017/whatever"); In C# I can connect using mongodb+srv://:@cluster0.k6lme.mongodb.net/myFirstDatabase?retryWrites=true&w=majority But in flutter mongo_dart package. Connection string ...
So I've already had a problem with this code before and got some help to fix my error, but I have a new one. So basically I'm waiting for a variable and this variable is not null because when I print it, I can see the value of this variable. The...
i have saved bunch of emojis as images locally, i want replace a specific text on the message as this emoji image. What I have tried: var replaced = text.replaceAll(regExp, '*'); Instead of the asterisk mark can we replace this with actual...
I have this StatefulWidget that supposed to retrieve data from MySQL database based on condition and add those retrieved values into an array so I can use the array values to be display on ListView. My Problem is that sometimes when the array...
This problem is driving me crazy and I don't know what to do anymore I'm completely lost and it's ruining my life. I'm trying to insert a list values which I retrieved from MySQL database into listView when the user pressed a button but the...
I have a function that will retrieve username from database and that username value will be stored in global string variable, everything works, and my goal is to display that username variable on the AppBar text but I keeps getting "Null is not a...
I have base64 encoded string version of docx file stored in my database and I have to embed into my Flutter app to view the content of the file and I come up with this solution using webview_flutter which apparently I got from ChatGPT ...
Look at your main function. All you're doing is defining variables. That's it, nothing else. You're not calling any of your other functions in the code.
The error is pretty explicit. You're calling a function is is expecting an array or list of OrderItem objects and you're passing in a single OrderItem object. Pass in an array of OrderItem objects, even if that array has only a single OrderItem...
Hi all, I'm trying to implement a slider that add a certain value to the initial value when checking out. But I'm not able to pass that extra value to my checkout API Call. Here an example: https://imgur.com/a/mp5ytzW Structure: PaymentWidget...
Hi all, I'm trying to implement a slider that add a certain value to the initial value when checking out. But I'm not able to pass that extra value to my checkout API Call, that is in the initSate. Any idea how to update the value inside...
Hi all, Can someone please tell me how to make my bottom navigation bar persistent in my app with auto_route ? I tried to find something in the official documentation, but unfortunately nothing. Thank you in advance for any help! Here is my...
i have three types of user in my application (nurse,substitute, patient), every type will have access to specific home page. every type of user have his homepage and his specific features. so i want to implement some logic in my code to resolve...
i want to know what should i learn to be a real programmer. not just some one who made bad apps with mess code . what i need to learn before coding do i need to learn algorithms first or i need to learn coding with algorithms in the same time. ...
Hello, how to impenting detail layout in Flutter? I have build code which looks like this: import 'package:flutter/material.dart'; import 'package:flutter_slidable/flutter_slidable.dart'; void main() => runApp(MyApp()); class MyApp extends...
I want to use if condition in the icon widget, but Dart gives an error. How should it be used correctly? Thanks. class Cell extends StatelessWidget { const Cell({super.key, this.caseTrend = false}); final bool caseTrend; @override ...
Hello, I'm new to Flutter/Dart. When I take an instance of a class and try to use a method in it, I getting below error.How can i use method from instance class with new class name? Thanks. "The instance member 'newData' can't be accessed in an...
I found solution on flutter/dart discord channel. I should have marked the method of the new class as "late". I marked late then working now. class Data { String read() { return ""; } } class Data2 { var newData= Data(); //...
Hello, I want set a value of extended class. How can i do it? Thanks. class A { String? value1A; A({ this.value1A, }); } class B extends A { String value1B = ""; value1A= ""; //
I want use a google fonts icon. I have Code point (e88e, info icon). But i cannot get right icon. How can i get icon from google icons by Code point? Thanks. This is icon link: Material Symbols and Icons - Google Fonts[^] import...
I have firebase realtime database. When I manually change data on the Firebase console, vscode stops responding and throws the following error. Error: TypeError: Instance of '_Exception': type '_Exception' is not a subtype of type...
I'm making an movie lister app. I made my app like that: 1. The main.dart who run the project and contain all Tmdb (The Movie DataBase) process 2. The root_page.dart who contain all the "immovable" elements (app bar, bottom navigation bar, page...
I want to get the data like username and password from realtime database (firebase) and use it to login the user What I have tried: I tried getting the values but it didnt work
Trying to sort my list of cards by the latitude and longitude I have set as fields in Firestore to the user's location in Flutter (by their latitude and longitude). Does anyone know how to do this? My code below in the sort function only reversed...
In this, I think I am getting errors at the navigators. If I comment both of them out the app runs fine(except the page change). The first navigator is giving this error when I comment it out .The second navigator is working but not as it is...
I am unable to assign my one class to another even though I have imported the lib for them. I am following a course . In this I will fetch the orders from firebase and showing the orderscreen. Orderscreen(where i am getting the error): import...
I built an image picker after learning in a course. I am not getting any errors in the debug console or in the build. I am trying to click it but it is not working. I made another image picker in a similar manner in same app but that did not gave...
I am trying to upload videos to firebase before that I am trying to display them in the app in listview but they are not getting displayed on the screen, there is'nt any error messages in debug console either so I am unable to figure out what is...
I have built a streambuilder that has two-page builders. I realized it is not iterating over the last if statement, does anyone knows a function so that I can get it to iterate over the last if statement too? The condition of all if statements...
I am using a navigation bar with two buttons for both of them I have set the color as white but for one of them, the button is not changing and appears to be the same color as the navigation bar. The icons.newspaper widget is causing the issue. ...
I was following a tutorial for Firebase push notifications. I followed all the steps: Connecting app to Firebase, and importing packages (Firebase messaging and Firebase push notifications). I tried sending several notifications, but it did not...
I made a listview builder following a course in which I kept an elevated button(which adds video through image picker) to be index 0 and then videos shall be showed at index 0. My elevated button is not showing. I made same code for image picker...
I am trying to display the video after selecting it with the help of an image picker. videoscreen: List _video = []; @override Widget build(BuildContext context) { return Scaffold( body: Column(children: [ ...
I am using a video player to play the videos I get from my streambuilder. I am unable to place my dispose function in such a way that I don't get this error. Error is causing the emulator to crash after certain point. My screen where I am...
Before every video I am getting a black screen which I am not sure why is it appearing. At first I thought it is due to the internet connection or something but that does not seem to be affecting it at all. I am getting video urls from the...
My flutter share button is running extremely slow. Reason I think is that it has to screenshot the image after getting from firebase for each specific news.(My Assumption) Share button: IconButton( onPressed: () async { ...
I am trying to make a reels app. I am getting this error, I checked other answers for this question all of them said there is a problem with the video but I am using cloud-firestore URL, the same URL is working for the listview Widget but not for...
I after a long time was working on one of my projects so I updated my flutter code and packages too. I started receiving error: A problem occurred configuring project for "package name". At first, it was for cloud firestore and firebase ones but...
I am receiving this error: Error: ADB exited with exit code 1 Performing Streamed Install adb: failed to install /Users/XXX/FlutterDev/XXX_app/build/app/outputs/flutter-apk/app-debug.apk: Failure [INSTALL_FAILED_CONTAINER_ERROR: Failed to...