Results for dart
In my Flutter-Dart project, I have a map (myMap) that contains nested lists and maps, and these nested structures can further contain lists or maps. T...
void main() { var a=10; var b=2; var toplam=a+=b; var fark=a-=b; var carpim=a*=b; var bolme=a/=b; print("$toplam"); print("$fark"); ...
I dont know what is happening in this portion of code: Future fnct() { print("inside fnct()"); return Future.delayed(Duration(seconds:4),()=>"hell...
I am trying to implement a search function where I search through all values in a JSON object without knowing the keys beforehand. It goes something l...
List myProducts = []; I have made a list builder so that with every product clicked it is added to the list myProducts.add(Product( ...
here below code of main screen class that contains bottom Navigation Bar items , my issue is except this bottom nav bar labels all other strings trans...
In the code below, I am expecting an error at await postApi(payload, api); because payload should be an instance of Foo not String but Dart does not ...
I have the following little dart 3 example, which has the error at the comment. I would like to understand the rationale behind this. Why is this not ...
The following Dart code produces ({"date_required":null}) which looks to me like the outside bracket pair is incorrect and my go API rejects it with a...
I have a flutter app in which I normally use http request post from a model to a go API like this. if (dateRequired != null) { data['date_required']...
Given the following dart 3 snippet, is it possible to match against A being nullable in the switch clause, and to find out which kind of nullable A is...
RSAKeyValue>Modulus>D4ZblrI8NsZgnZOQbHJuEv7Lg0pCOuhwmGIS10rwlJ9Z/hGbes=Modulus>Exponent>ABCDExponent>P>86TWhp553PrrlQ/xdOpGDbGy8/h3/5vg+P==P>Q>D33zQmG...
When I try to build my flutter project: flutter build apk --debug --> I get the following error: lib/screens/ListPage.dart:1:8: Error: Dart library 'd...
I want to add a null value to a stream, but it will show an error. When I do: final StreamController?> streamController = StreamController?>.broadcast...
I am trying the following code: String user() { return ""; } class Foo { String user; Foo() : user = user(); // } void main() {} But it doesn...
Can i write the following code differently, without using "double-dots" for calling a method: @override Widget build(BuildContext context) { ret...
Intro I have new project. I have pub.spec generated by Android studio official flutter plugin. Nothing manually added / changed in config. Problem Whe...
What I am doing is I want to display the elevated button as either red or blue depending on the boolean value. The boolean value will get its value fr...
I'm trying to make a book app and am trying to make a search bar that will append what I typed into a URL and perform a get. I am struggling to get th...
I'm working with APIs on an App to get the User information and in another tab to get the conversation of that particular user and the messages thread...
I am learning Flutter/Dart, and in the video series I am following, there is only one parameter per line, as follows: body: Container( width: ...
I'm creating an Iterable extension in dart to mimick most of the methods of List. However, when trying to remove an item from an iterable, I sometimes...
I was trying to code widgets, that I could use at any time again. So I created a template for a textbutton and of course I am working with variables f...
To publish to GitHub pages, documentation must be in either the repository's root directory (/) or in docs. The standard directory location for dart d...
I am designing an API and would like to handle a situation when a user marks a void function async by mistake. The simplified code is listed below: vo...
How do I undo the most recent local commits in Git?
How can I remove a specific item from an array in JavaScript?
How do I delete a Git branch locally and remotely?
How can I find all files containing a specific text (string) on Linux?
How to find all files containing specific text (string) on Linux?
How do I revert a Git repository to a previous commit?
How do I create an HTML button that acts like a link?
How do I check out a remote Git branch?