dart-2 Questions

8

Solved

For some reason, I cannot focus on a TextField after on the next page after navigating. The keyboard would automatically dismiss when the TextField is selected. If I set autofocus: true on the Text...
Confined asked 25/5, 2018 at 19:9

12

I was trying to install dart2 recently, but when I try to install pub global activate stagehand, it comes with a warning. Warning: Pub installs executables into $HOME/.pub-cache/bin, which is n...
Catboat asked 13/10, 2018 at 15:0

9

Solved

In my app I am creating signup page where I need to add DOB. I want to add date picker in that but I am not getting correct way to do this.
Doorknob asked 9/10, 2018 at 18:49

8

I just updated to Dart2 and Flutter sdk: '>=2.12.0 <3.0.0' and now this if statement breaks: decoration: new BoxDecoration( shape: BoxShape.circle, color: Colors.blueAccent, border: Borde...
Maplemaples asked 10/3, 2021 at 8:42

3

In my Flutter mobile app while loading profile image of users through NetworkImage(), I am getting 403 status code in response. How can I handle this by displaying an Image from my assets folder i...
Lining asked 6/8, 2018 at 7:23

2

Solved

List foo -> List bar I can use three method 1.List<MyClass> bar = foo.cast<MyClass>() 2.List<MyClass> bar = List.castFrom(foo) 3.List<MyClass> bar = List.from(foo) What i...
Willed asked 3/2, 2020 at 6:9

4

My flutter app is using firebase as a backend but I need to store media files (photos & videos) in my s3 bucket. The mission is to upload the media retrieved from the image picker into s3 &...
Prochoras asked 17/12, 2018 at 8:39

2

Solved

For an app, I need a 64bit unsigned int. Looking at dart documentation I did not see how to exactly go about declaring one. Can anyone tell me how this is done? I will use this "64bit unsigned int...
Glede asked 3/12, 2018 at 7:35

3

I have been working with the online gallery of Flutter charts (https://google.github.io/charts/flutter/gallery.html) but I'm struggling to add a title for x & y axis values. Can somebody help ...
Artificiality asked 20/6, 2018 at 18:55

2

Solved

I have initially empty list of Widget in Column. Now on Other widget click I am adding new Custom Widget in _contactItems Column( children: _contactItems, ) List<Widget> _contactItems ...
Cly asked 22/1, 2019 at 14:38

5

Solved

I am getting exception when I trying to navigate from one view to another in flutter app. I/flutter ( 2199): ══╡ EXCEPTION CAUGHT BY GESTURE ╞═════════════════════════════════════════════════════...
Fuse asked 19/9, 2018 at 12:7

2

Solved

I'm trying to define a callback function that needs to accept a generic parameter and return a value of the same type. Keep in mind that the following example is an oversimplified version of what I...
Drumfish asked 25/4, 2019 at 11:17

0

main() async { print('Hello World'); await getAsyncString().then((hello) => print(hello)); } Future<String> getAsyncString() async { return 'Hello Async World'; } This is my code exa...
Trojan asked 5/4, 2019 at 21:45

1

Solved

Dart has some null-aware operators, i.e. it is possible to do var obj; obj?.foo(); // foo is only called if obj != null. Is this also possible for functions that are stored or passed to va...
Hills asked 28/2, 2019 at 19:43

2

Solved

In Dart Object() constructor is declared as const so: identical(const Object(), const Object()); //true I know that in Dart 2 the keyword const is optional and I thought that the previous statem...
Hardening asked 30/9, 2018 at 19:0

2

Solved

I'm trying isolates and I'm wondering how could I spawn some of them doing heavy computations that, when the root Isolate ask them for their current computing value they respond it, "on demand". A...
Chapin asked 10/9, 2018 at 14:20

1

Solved

I am using banklist in stateful widget. passing list to pageState using List<Bank> bankLists = this.widget.bankLists; Que 1. Why I am getting error at gradientcolor: gradientBankCard("FFB74...
Amylopsin asked 16/8, 2018 at 8:42

1

Solved

I have a generic static method that looks like this: static build<K>() { return (GenericClass<K> param) => MyClass<K>(param); } So far I have tried: typedef F = MyClass&lt...
Captious asked 28/6, 2018 at 22:33
1

© 2022 - 2024 — McMap. All rights reserved.