Questions tagged [dart]

1

votes
0

answer
7

Views

How to receive One signal notifications in flutter

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...
Code Land
2

votes
0

answer
13

Views

Flutter keeps importing old version of Plugin for iOS

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...
Nudge
0

votes
0

answer
3

Views

Build errors on Flutter dependencies

When I add dependencies to Flutter, I occasionally get the error: Xcode build done. 0.7s Failed to build iOS app Error output from Xcode build: ↳ ** BUILD FAILED ** Xcode's output: ↳ === BUILD TARGET shared_preferences OF PROJECT Pods WITH CONFIGURATION Debug === The “Swift Language Version”...
iRyanBell
1

votes
1

answer
84

Views

Obtain Inner JSON Array Values

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...
user3757992
0

votes
0

answer
4

Views

Update assets files content at runtime with Flutter

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...
Shady Boshra
1

votes
1

answer
230

Views

How to check if InputElement is a checkbox in Dart

I'm serializing some forms to JSON in dart:html Map jsonifyForm(String formQuery){ FormElement form = querySelector(formQuery); Map data = {}; List inputs = form.querySelectorAll('input.json'); for (InputElement input in inputs) { if (input is CheckboxInputElement){ print('checkbox: ' + input.name +...
0

votes
0

answer
5

Views

If the inner swipe leads to nowhere in TabBarView, have it translate to an outer swipe in PageView

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...
Jason Xu
0

votes
0

answer
5

Views

Flutter: Execute a function on Startup - wait for HTTP response parser to extract image URL

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...
Mehdi Satei
1

votes
2

answer
414

Views

Dart angular2 with @canActivate

The tutorials about Dart and angular2 not enough to explain, how to protect and authorize my application. How can implement CanActivate and Routers in dart in angular2?
rana
3

votes
0

answer
90

Views

How to get text when I drag on a paragraph and highlight the text area as well. ? - Flutter

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...
satish
0

votes
0

answer
13

Views

Flutter Fullscreen Video in Webview is not working

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?
dheeraj reddy
0

votes
0

answer
12

Views

How to create nullable variable in Dart

This is c# code create a nullable variable, I want to do this using Dart. How to do it? Nullable hotel_effect_open_date
Bhanuka Isuru
0

votes
0

answer
6

Views

Flutter issue, ios app won't open and no icon

enter image description here There's zero error, zero warning in Xcode. doctor: Doctor summary (to see all details, run flutter doctor -v): [✓] Flutter (Channel master, v1.3.12, on Mac OS X 10.13.6 17G65, locale en-US) [✓] Android toolchain - develop for Android devices (Android SDK version 28.0...
Sarthak Solanki
1

votes
0

answer
7

Views

Flutter is not rebuilding same widget with different parameters

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...
Gypsy Rider
0

votes
0

answer
17

Views

How to store list of object data in sqlite on Flutter?

How to store a list of object data in SQLite on Flutter? Json data coming with API. { 'images': [ { 'id': 10, 'name': 'img1' }, { 'id': 11, 'name': 'img2' } ] }
Bhanuka Isuru
1

votes
1

answer
4.7k

Views

Flutter - Always execute a function when the page appears

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...
rafaelcb21
1

votes
1

answer
918

Views

http url parameter Invalid Character Error

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...
kite_n_code
4

votes
2

answer
106

Views

Offsets are different onTap and OnDrag - Flutter

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...
axel blaze
0

votes
0

answer
2

Views

Could not find com.android.tools.build:gradle:3.2.1

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...
a lovely person
1

votes
1

answer
545

Views

How do I perform a transaction in firebase_database in Flutter?

How do I perform an atomic read/write transaction in firebase_database in Flutter?
Luke Pighetti
1

votes
1

answer
220

Views

Disable swipe gesture when using BottomNavigationBar

How do we disable swipe on BottomNavigationBar attached to a scaffold? I could not find a way in the official docs to do so.
kaustavj
1

votes
1

answer
133

Views

What is the '._' convention in flutter/dart? [duplicate]

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...
Sam Drescher
0

votes
0

answer
4

Views

Firebase Password Reset - dose not force RegExp

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...
Jake Anderson
1

votes
2

answer
778

Views

Flutter DataTable - Tap on row

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() {...
Zain SMJ
1

votes
1

answer
96

Views

What is the fancy way to use SnackBar in StreamBuilder?

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?...
baeharam
1

votes
5

answer
44

Views
1

votes
4

answer
70

Views

How to remove trailing zeros using Dart

I would like the optimal solution for removing trailing zeros using Dart. If I have a double that is 12.0 it should output 12. If I have a double that is 12.5 it should output 12.5
John
0

votes
0

answer
4

Views

Flutter how to update text on dropdownbutton when using Sqflite to populate the list

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...
Matt Staley
0

votes
3

answer
32

Views

Unable to use setState

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...
Yoav Genish
0

votes
1

answer
14

Views

How to return from then of a Future in dart

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');...
Krishnakumar CN
0

votes
0

answer
6

Views

How to make XSL transforms in Dart

The XsltProcessor class from the dart:html library is deprecated. What library should I use to make XSL transforms in Dart?
Patrick
-1

votes
2

answer
15

Views

(Dart) (Flutter) How to Round numbers at 0.6, 1,6, 2,6 ,..etc instead of 0.5, 1.5, 2.5… etc for a class of doubles?

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....
Aman Kataria
1

votes
0

answer
70

Views

Writing BLE to Cycling Control Point - Adding Resistance

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...
Yonkee
1

votes
1

answer
481

Views

Get path of a Cloud Firestore document in Flutter

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,...
dshukertjr
1

votes
2

answer
690

Views

Flutter - How can I generate a private/public key pair to encrypt messages

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...
Shamshun
1

votes
1

answer
973

Views

How to query nested objects in firestore

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...
Niklas Raab
1

votes
1

answer
159

Views

How can I make a button's corner only rounded on the top?

I'm trying to make a button which has rounded corners on the top and a normal corner on the bottom. How can I make it like this?
Extra
0

votes
1

answer
11

Views

Flutter/Dart Basic Understanding

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...
MojoFojo
0

votes
0

answer
5

Views

flutter Webview file choser and javascript injection

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...
kat N
0

votes
0

answer
5

Views

Flutter issue: type 'Timestamp' is not a subtype of type 'DateTime'

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...
Barracud Apps

View additional questions