Questions tagged [dart]

I am developing an application with flutter.
There is a feature in my application(Receiving latest news) through One signal notification.
When I add the dependency in my flutter project. It gives me the Error
(The Android Gradle plugin supports only Kotlin Gradle plugin version
1.2.51 and higher. Pr...

I have create a plugin which can be found at following url https://pub.dartlang.org/packages/upetch_paysquare_service#-versions-tab-
I imported the plugin in separate flutter project's pubspec as follows
upetch_paysquare_service: ^0.0.7
The Android part works fine. when I open the project in Xcode t...

I'm attempting to get the values for the 'filterInputParameters' array within the serviceResponseValue map. Right now I have attempted to iterate through the map but could only obtain the first level of data such as the displayName and I need to go one-two levels deeper for the values in filterInpu...

I am fresh with Flutter, and I was able to load the content of XML file as String from Assets folder using this method
Future loadAsset() async {
return await rootBundle.loadString('assets/file.xml');
}
and yaml file
flutter:
assets:
- assets/
And it just works very well.
My question is: Can I updat...

Imagine an application with 3 horizontally swiping pages, with the rightmost page containing a TabBarView which contains two widgets (we'll call them tabs) titled Green (leftmost) and Red (rightmost). I'll be calling both tabs/pages views.
If I begin to swipe right (right swiping meaning the finger...

I am developing a Flutter app which I need to get almost everything from an API including images, colors, texts, and etc.
So what I should do is to build the main structure of the app and then fill-in everything with provided information from API. It is necessary for me to make the API call (HTTP GE...

I am trying to make highlighter on a storyboard, so I need to highlight with colour (Yellow etc). When I drag on paragraph it should return text one by one.
This is my code. Here as you can see I have created on the list _highlighterColor initially I am giving it to zero so, when I am dragging I am...

I am using https://github.com/pichillilorenzo/flutter_inappbrowser to display a webview in my app. The video on the website is playing but not displaying in fullscreen even when the fullscreen button is pressed.
Is there a way to display a video in fullscreen in a webview?

I was working with bottom navigation with similar child widgets in which only parameters are changed. The problem only happens when widgets are of StatefulWidget else there is no problem, indications in bottomnavbar is changing but not the body. child 1 child 2 result
class MyHomePage extends State...

How could I make the name() function run whenever the Page1 page appeared?
In the code below before going to Page2 I execute the dispose()
Already inside Page2 if I click the back button or the physical button of Android the function name() is not executed, but if I click the 'go to Page1' button th...

I have developed a REST API using feathers.js (https://feathersjs.com/).
When trying to do a HTTP 'read' request in Flutter using package:http/http.dart I have encountered an error. The http.dart library is unable to correctly parse the query params I pass to the URI.
The error I receive through...

I have an image in which certain items are there which have starting offsets and their height and width, corresponding to each item in images I have different text, I have to drag the text and drop it to the correct position on the image,I am getting different offset while tap to particular location...

To be honest i have zero experience in mobile devolopment and am trying to learn flutter as every body telling me it's the future .
but i had many errors on the ways in just installing it . what i did to install it with vs-code :
installed oracle jdk8
installed android studio
setup the avd and makin...

This question already has an answer here:
What are the semantics of _internal?
1 answer
I have the following code in a flutter tutorial that discusses global state:
static GlobalState instance = new GlobalState._();
GlobalState._();
What exactly is the ._ doing? Is this technically just a blank me...

I have an issue with Firebase's password reset. My app forces the user to type in a 'strong' password, which requires the following:
Minimum of 8 Characters
1 Uppercase
1 Lowercase
1 Digit
1 Special Character
I have this working fine, the issue is occurs when users reset their password through Fireb...

I am using Flutter DataTables to display list of items in cart. Now I want to edit the quantity of any selected row. Is there a way to get the information of the row user has tapped?
Following is complete code of my DataTable:
class _DataTableSampleState extends State {
void _getSelectedRowInfo() {...

I'm implementing Bloc pattern for my application and I have to show SnackBar which shows error message when login is unauthenticated.
But I cannot show SnackBar during building phase of widget. I looked for lots of solutions, but I couldn't found.
What is the most efficient way to use this function?...

I have no problem populating the list from Sqflite database on DropdownButton. My only problem is updating the text once it's selected. It kept showing 'Airport' and I'm still learning to work with Object instead of String. I just couldn't figure that out.
Here's the code:
children: [
FutureBuil...

in my project im using a ButtomNavigationBar to switch between two pages.
The code of the switch is a standard one, using the index and setState to switch around both pages, and using an array of Widget to acces each page.
(Taken from the Scaffold)
final List body = [
firstPage(),
secondPage(),
];
b...

I have a function which does some asynchronous operations and I want to return the status of the operation back to the caller. How can I achieve this?
Future setData() async {
Firestore.instance.collection('test').document('$id').setData({
'id': 'test'
}).then((onValue) {
print('Data set success');...

I want this to be true for all numbers. I don't want to type this for all numbers of course.
if (overs == 0.6) {
overs = 1.0;}
I want that if for example 1.6, is reached, it should be converted to 2. I want this to be true for all numbers.
Further Clarification: I don't want it to round at For eg 0....

I have bee working with BLE for a while now, but primarily for reading and notifying characteristics.
The devices specifically are Virtual cycle trainers that support GATTS Cycling Power Service - 0x1818 link
I know that it's possible to increase resistance on this trainer, but I have read the docum...

In a situation like this where I am iterating through documents inside a collection of Cloud Firestore, how can I get the path of the documents?
children: snapshot.data.documents.map((document) {
return new ListTile(
//want to get the document path here
title: new Text(document.path),
);
Apparently,...

I need to generate a keypair in my flutter App, but it seems that there aren't any libraries to do so. There is one library called RSA which does parse a pair of public/private keys and is able to encrypt and decrypt strings using them; but it doesn't have the ability to generate a new KeyPair (pref...

I want to store data in following format:
{
'chatName': 'Football',
'chatMembers':
[
{
'userId': 'nSWnbKwL6GW9fqIQKREZENTdVyq2',
'name': 'Niklas'
},
{
'userId': 'V3QONGrVegQBnnINYHzXtnG1kXu1',
'name': 'Timo'
},
]
}
My goal is to get all chats, where the signed in user with a userId is in the chatMe...

sorry to bother you with this question. But im trying to get back into
programming and i just cant get the following (a code example from flutter)
class MyAppBar extends StatelessWidget {
MyAppBar({this.title});
// Fields in a Widget subclass are always marked 'final'.
final Widget title;
@override...

Good day is there a way to inject javascript into the webview before or on page load of the website and also allow upload button in the website be able to open file chooser in android or IOS?
Please help time is not on my side so far there is nothing on the internet i have found about this. i\I rea...

I'm looking for some help for an app my team and I are working on. We are facing the following problem for weeks :
flutter type 'Timestamp' is not a subtype of type 'DateTime'
We want to get these user data from Cloud Firestore:
birth [DateTime]
gender [String]
license [DateTime]
name [String]
size...