Posts by Julio Henrique Bitencourt • 1,813 points
53 posts
-
3
votes1
answer24
viewsA: Does Intl-Dart numberformat parse wrong of a dot number in pt_BR?
Well, it may sound strange but that’s how lib was developed. For locale pt_BR the character . (point) is considered a group separation character (GROUP_SEP). Source: filing cabinet…
dartanswered Julio Henrique Bitencourt 1,813 -
0
votes2
answers57
viewsA: Can I run two flutter projects with different versions on the same machine?
Yes, you can. The Flutter SDK is nothing more than a bunch of files that you download and put in any folder of the OS. And the path of this folder is set in PATH just to make your life easier and be…
-
0
votes1
answer62
viewsA: How to remove Textfield edge?
You should post a full code that’s easy to pick up and run by other people, so they can test and help you with the problem. Because of that, I haven’t tested your solution. But to remove the edges…
-
2
votes1
answer39
viewsA: Method into classless files. Flutter
There is no problem with this function and it is something common to exist. Functions need not be associated with classes, in fact, if a 'function' is within a class as you mentioned, it is actually…
-
1
votes1
answer223
viewsA: Pass body in GET request
Endpoints GET originally should not contain body in the request, which is precisely why the method http.get() has not a parameter body. For he is simply ignored. Future<Response> get(Uri…
-
0
votes1
answer82
viewsA: Creation of the layout in Flutter
A simple way to make this widget 'bigger' than the available screen size is the Transform.scale. And to make him accountable, just use the LayoutBuilder. As apparently in your image is not a perfect…
-
2
votes2
answers82
viewsA: Error in word "context" flutter
The error in this case is self-explanatory. The variable context does not exist in the method you created. The IDE itself must be acknowledging this error. Note that the context is received per…
-
0
votes1
answer63
viewsA: Flutter Dart: return value for a class
You are not working correctly with asynchronous codes in Dart. The asynchronous function callReadTotal() returns a Future<void>: Future<void> callReadTotal() async { await…
-
2
votes1
answer58
viewsA: How I add a hyperlink in the flutter Checkbox
You can create a hyperlink in a text using RichText and TextSpan, for example: @override Widget build(BuildContext context) { return RichText( text: TextSpan( text: 'Concordo com os ', children:…
-
1
votes1
answer20
viewsA: This function has a 'Widget' return type, but does not end with a return statement
I believe that error itself makes explicit what is wrong. And it should even be indicating which line is the problem, but you did not put stacktrace in the question.. So based on the code provided,…
-
1
votes1
answer177
viewsA: Flutter Exception Error in firebase_auth
The firebase_auth spear a FirebaseAuthException, as explicit in the documentation: A Firebaseuthexception Maybe thrown with the following error code: So you need to capture a FirebaseAuthException…
-
0
votes1
answer32
viewsA: Multiline string problem for twitter API in Dart
I don’t know about that package then because I never used it. But, as you are creating the String in Dart, it is necessary to escape the character \, then for each \ add one more \\: final String…
-
0
votes1
answer591
viewsA: Filter in list with flutter
The problem is you’re comparing a int with String here: _dadosBanco.where((element) => element['id'] == 1); Since the element is a Map<String, String>. Example comparing correctly with…
-
3
votes1
answer112
viewsA: How to condition the display of a Widget list?
You cannot open a new context within a list, in case, open {} in a if or for. But this can be done through operator of spread, or ...: void main() { final insert = true; final list = [ 'a', if…
-
1
votes2
answers116
viewsA: Recover value if null in Flutter Sharedpreferences
The error is not in this method you are showing. Therefore, complete code is required for analysis. Like _recuperar() is asynchronous, most likely the _textoSalvo is null when running build and…
-
3
votes1
answer1467
viewsA: Flutter: Container with two Expanded and a background image
You can achieve the desired using the widget Intrinsicheight. He will always try to define the best height similar to children, in other words, if one of the children increases in size, the others…
-
1
votes1
answer417
viewsA: How to place an online symbol inside a flutter image
It’s simple, you can use the widget Stack for this. And with the Positioned control the position of the online. return Stack( children: <Widget>[ Container( width: 100, height: 100,…
-
0
votes1
answer1701
viewsA: Flutter: Row Alignment
From what I understand, you want the line with the titles 'Suspects' and 'Investigated' to be aligned according to their respective cards. For this you can involve creating the cards in one Column…
-
3
votes2
answers73
viewsA: Use of a _dolarChanged(String text) void function generating an error message in onChanged
The parameter onChanged of TextField expects an object of the type ValueChanged<String>. Being this one typedef defined as: typedef ValueChanged<T> = void Function(T value); Then change…
-
2
votes2
answers455
viewsA: Error executing a Flutter command
By error message you are using the zsh and not the bash. Then edit your environment variables in the file .zshrc at the root of your user, if it does not exist, create with: export…
-
0
votes1
answer151
viewsA: How do I display a notification badge when I receive a notification?
Well, your example is not testable, which means that no one here will be able to run your code and see what is working or not working. But taking into account that you want to present a badge of new…
-
1
votes1
answer124
viewsA: I cannot validate the current computer time with IF ELSE, on Dart
You are using the method .toIso8601String() which will return the date and time at String, and soon after you are using that String to perform numerical operations with operators >=, <=, which…
-
0
votes1
answer278
viewsA: Problem when returning from a Custonalertdialog - Flutter
Are you using the await therefore, your method will be blocked waiting until the Future returned by controller.enviarConfirmacao() be completed. Only then to execute the next instruction, which is…
-
0
votes2
answers157
viewsA: Pre-inserted text from the database
You didn’t put in the full code, so it’s hard to guess where things come from, like yours controllerComent for example. The error is in it, you have to create it by passing parameter the text you…
-
2
votes1
answer222
viewsA: Header in an http.send request
The class Request owns the headers as attribute, just create it and add these parameters in the Map. final request = http.Request('get', Uri.parse('url')); request.headers['nome'] = 'parâmetro';…
-
0
votes2
answers3211
viewsA: Conversion of values into flutter
That question is more related to Dart than Flutter. But you can use the methods parse and tryParse, present in the num, int and double. That convert a String at a numerical value. Example: void…
-
2
votes2
answers785
viewsA: How to compare Map and Json values in flutter?
I think the problem is here: if(json["nome"] == searchController){ print(json["nome"]); } You’re comparing an object String (map value) with an object of type TextEditingController, that will never…
-
4
votes1
answer1150
viewsA: How to display async sqlite query inside a Widget in Flutter
The value value is null because you are not working properly asynchronously in your code. His method _query() is asynchronous. You’re calling him on build(), to be executed and reach exactly on this…
-
1
votes1
answer272
viewsA: Efficiency of Firebase
Firebase has several services, if you are referring to the Realtime Database, real-time database service, according to such plan information. Spark Plan (Free): Up to 100 simultaneous connections…
-
2
votes1
answer2045
viewsA: How can I resolve error "The argument type 'String' can’t be Assigned to the Parameter type 'List<int>' " - Flutter
I believe you’re using the lib crypto. You are passing a string to the sha256: var base64ToSha256 = sha256.convert(verificador); But actually it accepts a list of bytes, which are represented in…
-
3
votes1
answer83
viewsA: Flow of change notification
Well, as visually it is always better to understand, let’s see how would look in a simplified way this code Widgets tree you passed example: Note that the Counter is the widget that is keeping the…
-
1
votes2
answers4738
viewsA: Flutter, how to compile the project to run native on android
The SDK Flutter alone has its build modes, in which we could do something different depending on the mode in which our app is running, are they: Debug: It’s the only mode we can run on emulators,…
-
1
votes3
answers860
viewsA: Deserializar json vector in Dart/Flutter
Paraphrasing this my article (if you want to read integer contains a full example of json deserialization): If we stop to analyze, any Json structure is basically a Key/value map, so this is exactly…
-
2
votes1
answer1687
viewsA: Bottom Overflowed
Is giving Bottom Overflowed by clicking on TextField and open the keyboard, right? This is because by clicking on TextField the widgets tree is updated with the keyboard appearing at the top, with…
-
0
votes1
answer601
viewsA: Flutter: Error when adding more than 3 items to a Listview
I took a look at the project you put on Github. Your code is confused, disorganized and in some out-of-format locations. When rotating already occurs the error: E/flutter (21316): Receiver: null…
-
6
votes1
answer805
viewsA: How can the use of 'const' constructors improve performance in Flutter?
In fact when browsing the source code of the Flutter SDK we will see several Stateless Widgets with a constructor const. That’s because in theory all StatelessWidgets are immutable and must contain…
-
1
votes2
answers165
viewsA: How does a const constructor differ from a standard constructor?
Without going into details and wild theories that few will read, you are directing the question to Dart, and I will direct it specifically to Flutter (which is Dart’s main use today). When we access…
-
3
votes3
answers2619
viewsA: Vscode + GIT + Flutter Configuration
You do not seem to have properly configured the environment variables in the installation. Show how you set them up, but when in doubt, forget about VS Code for a moment, and try running on CMD: git…
-
8
votes2
answers7739
viewsA: Flutter - Change internationalization of date names
It is possible yes. In the pubspec.yaml add the flutter_localizations as: dependencies: flutter: sdk: flutter flutter_localizations: sdk: flutter So in your MaterialApp initial define the supported…
-
1
votes1
answer524
viewsA: Datepicker problem in Flutter
While running your code, the error is in: @override bool shouldReclip(CustomClipper<Path> oldClipper) { return null; } Return false or true instead of null. That’s why the message Failed…
-
2
votes1
answer410
viewsA: Is it possible to list the name of the Assets in a Flutter app?
It is not necessary to generate a new file with the names of the others assets then carry it via AssetBundle, That’s because Flutter himself already does it :) When building your application,…
flutteranswered Julio Henrique Bitencourt 1,813 -
1
votes2
answers843
viewsA: Serialize JSON List in Flutter
Note that you are trying to have Dart serialize/deserialize a list with a custom object ZLoginResultSchema, without the language having the slightest idea of how to do this, after all this is a…
-
4
votes1
answer1848
viewsA: Convert String to MD5 with Flutter
You can use the lib Crypto. It has support for hash algorithms: SHA-1 SHA-256 MD5 HMAC (i.e. HMAC-MD5, HMAC-SHA1, HMAC-SHA256) Just add in your pubspec.yaml: crypto: ^2.0.6 Import the packages:…
-
7
votes1
answer6065
viewsA: How to emulate iOS? To test apps
It is not something of Flutter itself, but Apple’s own requirement, to compile for iOS is necessary the Xcode, which only has in its products, not at all 'Developer friendly'. Regardless of the…
-
1
votes1
answer166
viewsA: concatenate a link in a Map
Well, some questions to be cleared up first. You have a variable of the type Map _FilmeData (it is not ideal to name variables starting with uppercase letter) and a variable of type List link. All…
-
4
votes1
answer4714
viewsA: How do I calculate Widgets size for different resolutions?
You can use a helper to help you scale a fixed size according to the screen resolution on which you are running your application. In Flutter we can identify the size of the current screen through…
flutteranswered Julio Henrique Bitencourt 1,813 -
0
votes1
answer1014
viewsA: Format Duration - Timer
By using inMinutes and inSeconds methods you are only returning the total value of that time period in minutes and seconds respectively. var d = Duration(hours: 1, minutes: 2, seconds: 65);…
-
5
votes1
answer1197
viewsA: How to understand this structure?
First let us clarify a few points about this question: Construtores Privados In Dart we can define private builders through the modifier _ as prefix. There is a natural convension of naming this…
-
3
votes1
answer624
viewsA: API request returns empty in mapped class
I made some modifications to your example, follow them: main.Dart void main() => runApp(MyApp()); class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { return…
-
2
votes1
answer1836
viewsA: How to change the color of an Icon through Boolean Return in Flutter?
Well, as already commented, apparently you are not controlling the state of your application correctly, so after the execution of your method updateFavorite() you are not warning Flutter that it…