Questions tagged [dart]

Dart is a class-based, statically(& strongly)-typed programming language for building web and mobile applications. Dart compiles to modern JavaScript to run in the browser and compiles to native code to run on mobile platforms like Android and iOS. Dart also runs on the command-line for scripting and server-side apps.

Dart is an open-source, class-based, statically(& strongly)-typed (with inference) programming language for building web and mobile applications created by Google. Although Dart is statically-typed it supports dynamic-typing through the 'dynamic' type.

Dart’s design goals are:

  • Create a structured yet flexible language.
  • Make Dart feel familiar and natural to programmers and thus easy to learn.
  • Ensure that Dart delivers high performance on modern web browsers, mobile, and environments ranging from small handheld devices to server-side execution.

Dart targets a wide range of development scenarios, from a one-person project without much structure to a large-scale project needing formal types in the code to state programmer intent.

To support this wide range of projects, Dart provides the following features and tools:

  • Sound type system: A type system which feels lightweight thanks to inference and gives good safety
  • Mobile and Web frameworks: Dart developers can use Flutter on mobile and AngularDart on the web
  • IDE Integration: official plugins for Jetbrains' IDEs (IntelliJ IDEA / WebStorm etc) and Visual Studio Code. Community plugins also exist for many other editors backed by the Dart Analysis Server

Links

Documentation

FAQ

Chat Room

90488 questions
25
votes
5 answers

Pagination with ListView in flutter

I'm new at flutter and I have been searching for proper result of pagination for 2 days. I followed this code Flutter ListView lazy loading But didn't achieve what I want. Look at below code. import 'package:flutter/material.dart'; import…
Govaadiyo
  • 5,644
  • 9
  • 43
  • 72
25
votes
4 answers

Flutter - Iterate through object keys and values

I have and object and I wondering if there is a simple way to iterate through it keys and values? class Post { String id; String title; String article; Post( { this.id, this.title, this.article } …
Zuhair Ali
  • 597
  • 1
  • 5
  • 18
25
votes
5 answers

Python and Dart Integration in Flutter Mobile Application

Can i do these two things: Is there any library in dart for Sentiment Analysis? Can I use Python (for Sentiment Analysis) in dart? My main motive for these questions is that I'm working on an application in a flutter and I use sentiment analysis…
Hamza Tanveer
  • 323
  • 1
  • 3
  • 7
25
votes
11 answers

Type 'String' is not a subtype of type 'int' of 'index'

My App can authenticate successfully when debugging against the Android emulator, but if I try to authenticate using debugging against the physical device (with same OS version), an error message appears after more than one minute…
Sami-L
  • 5,553
  • 18
  • 59
  • 87
25
votes
3 answers

Show running clock on flutter

I wanted to know if there is any way to show a real time clock in dart? Date and time (e.g 11/14/2018 19:34) and the time will continue to run. Time can be taken from the device itself.
OrrGorenn
  • 347
  • 1
  • 5
  • 15
25
votes
5 answers

Dart is Single Threaded but why it uses Future Objects and perform asynchronous operations

In Documentation, Dart is Single Threaded but to perform two operations at a time we use future objects which work same as thread. Use Future objects (futures) to perform asynchronous operations. If Dart is single threaded then why it allows to…
M.ArslanKhan
  • 3,640
  • 8
  • 34
  • 56
25
votes
6 answers

Flutter: How to use RefreshIndicator with SliverAppBar

I'm trying to add RefreshIndicator to CustomScrollView. Is it possible to do? Here is the code sample: CustomScrollView( slivers: [ SliverAppBar( title: Text('POSTAPP'), centerTitle: true, floating: true, …
Robert Apikyan
  • 1,972
  • 1
  • 20
  • 23
25
votes
6 answers

Flutter custom animated dialog

I'm trying to animate a custom dialog box in dart so that when it pops up it create some animations. There is a library in Android that is having animated dialog boxes, is there any similar library in Flutter Sweet Alert Dialog how can we achieve…
Ammy Kang
  • 11,283
  • 21
  • 46
  • 68
25
votes
8 answers

How to hide android's bottom navigation bar in flutter

I'm really new in flutter and also in Android dev, but is it possible to hide the bottom navigation bar (see which item do i mean below) programmatically?
BenSabo
  • 471
  • 1
  • 6
  • 11
25
votes
3 answers

Use JS library in Flutter

I am trying to use Ether JS in my Flutter application. I know that it is not directly supported and even the existing implementations are not really well documented. Is there any way I can use this library in my Flutter application for Android and…
Ajil O.
  • 6,562
  • 5
  • 40
  • 72
25
votes
2 answers

Flutter how to convert String to List

I have this String. var String a = '["one", "two", "three", "four"]'; var ab = (a.split(',')); print(ab[0]); // return ["one" I want to convert this to List. The problem is it returns square bracket too. I want to List looks this…
Daibaku
  • 11,416
  • 22
  • 71
  • 108
25
votes
3 answers

Prepend list view items while maintaining scroll view offset in Flutter

I'm looking for a way to insert new items into a list view, while maintaining the scroll offset of the user. Basically like a twitter feed after pulling to refresh: the new items get added on top, while the scroll position is maintained. The user…
florisvdg
  • 251
  • 3
  • 3
25
votes
3 answers

I want to add header with access_token for flutter upload image

My API requirement is URL: /user/upload-profile-image method= POST header-- Accesstoken: "access_token" content-type = multipart/form-data This is my code: Future getUploadImg(File _image) async { String apiUrl =…
Rahul Mishra
  • 4,263
  • 7
  • 32
  • 53
25
votes
4 answers

Flutter BLoC pattern - How can I navigate to another screen after a stream event?

My question is about navigation used with the BLoC pattern. In my LoginScreen widget I have a button that adds an event into the EventSink of the bloc. The bloc calls the API and authenticates the user. Where in the LoginScreen Widget do I have to…
Sebastian
  • 3,666
  • 2
  • 19
  • 32
25
votes
4 answers

How to create a transparent full screen dialog on top of activity - Flutter

I am trying to create a transparent full screen dialog on top of activity. I have tried following this thread but solution doesn't work. In short , what I need is: full screen dialog. transparent background except for the widget I use for the…
Rafiqul Hasan
  • 3,324
  • 4
  • 20
  • 28