Category "dart"

Enforce providing <T> in Dart generic method

How can I enforce providing the generic type of a generic method in dart. By default, dart allows us to not provide a generic type at all. And this should be a

Flutter Mailer isn't working due to these errors

I am trying to send a form from flutter app to my email automatically when the user submit the form. here's the code : import 'package:flutter/material.dart';

How to extract Left or Right easily from Either type in Dart (Dartz)

I am looking to extract a value easily from a method that return a type Either<Exception, Object>. I am doing some tests but unable to test easily the r

Flutter Converting network image into byteData

Is there any better way to convert network image to byteData? I am trying to convert network image from firebase url to byteData and here is my code: Future<

package facebook_app_events version 0.16.0 E/MethodChannel#flutter.oddbit.id/facebook_app_events(16052)

I install the package facebook_app_events version 0.16.0 that includes the latest facebook sdk. The problem is that when I try to log an event or get an anonymo

Can't convert Map to List in Dart, facing "Unhandled Exception: type 'List<dynamic>' is not a subtype of type 'Map<String, dynamic>" error

I know this question has been asked, but I'll explain my problem and show you what I've tried. So, I receive a response from an API, that looks exactly like thi

Error: The instance member ... can't be accessed in an initializer

Why does this code: class _SequentialTextPageState { String jsonTextPref = 'seqtext'; int jsonTextSuff = 10; String jsonText = jsonTextPref + jsonTextSuff

Method not found: 'guard'. return internals.guard(

i am new to flutter.when i run this code on flutter web this error occurs. .pub-cache/hosted/pub.dartlang.org/cloud_firestore_web-1.0.7/lib/src/internals.dart:1

How to load events from firebase for a specific user for tablecalendar

I am currently building a project where a list of trainers is displayed for a user. When tapped on a listtile showing the trainer a modalBottomSheet opens up sh

how to solve "Target of URI doesn't exist package:flutter_facebook_login/flutter_facebook_login.dart" in flutter?

i am a noob and trying to run an app that i cloned from github but i am getting this error i tried everything i could find on various sites but couldn't get rid

How to map data if the key is numeric in flutter

I am getting a response as key as numeric. How to map data for the following response { "1": [ { "id": 6, "name": "test 1" }, {

Firebase Storage REST API

I need very simple static image server for my flutter app. I am thinking about Cloud Storage, because I don't want to worry about own server administrating. I a

there is no bin folder, when I create a Dart project in Intellij IDEA

When I create a Dart project in Intellij IDEA, I can't find a bin folder? that's why huh? Previously I chose "Simple console Application - a simple command-line

How to filter JSON response by list

I'm trying to filter JSON response by list. Basically I'm passing a list of product ID's in the contains method and fetch the result accordingly but unable to d

In Flutter, how do I pass data into a Stateless Widget?

I'm trying to build my first Flutter app, and have run into difficulty with passing data into Stateless Widgets. I have the following classes: class MyApp ext

"not found" when reload page on flutter web

On flutter web when I reload a page on Chrome I get the text "not found". How can I fix it? this is my code of the main.dart. I also noticed that to get directl

ChromeProxyService: Failed to evaluate expression 'handlePrimaryPointer':InternalError: No frame with index 45

Code that I have written: import 'package:cloud_firestore/cloud_firestore.dart'; import 'package:flutter/material.dart'; class FirebaseServices { static Futu

How to convert all string in Dart list to lowercase?

I want check if Dart list contain string with list.contains so must convert string in array to lowercase first. How to convert all string in list to lowercase?

"TargetPlatform.windows is not yet supported by the maps plugin" - How to solve this

Im just trying to get google maps displayed on my emulator and i also used google_maps_flutter package but TargetPlatform.windows is not yet supported by the ma

Flutter give container rounded border

I'm making a Container(), I gave it a border, but it would be nice to have rounded borders. This is what I have now: Container( width: screenWidth / 7,