Posts by rubStackOverflow • 7,372 points
226 posts
-
2
votes1
answer101
viewsQ: How to enable Null-Safety on Flutter without breaking the project?
How to enable Null-Safety in Flutter without running the risk of breaking the project? I saw many reports of people that when enabling appear compatibility problems in certain libraries.…
-
0
votes1
answer21
viewsA: Tabbarview inside a Slivertoboxadapter
According to the documentation Now that you have tabs, display content when a tab is Selected. For this purpose, use the Tabbarview widget. Now that you have tabs, display the content when a tab is…
-
0
votes1
answer1128
viewsQ: Error posting to Play Store (At the moment, the desired level of your app’s API is 28.)
I’m getting the following error while trying to publish my App At the moment, the desired level of your app’s API is 28. However, this level must be at least 29 How to change the API level to 29?…
flutterasked rubStackOverflow 7,372 -
1
votes1
answer181
viewsQ: What are the differences between BLOC x Cubit?
BLOC and Cubit are part of the same package (Bloc) and use the same standard (Bloc - Design Pattern Business Logic Component) which helps to separate the presentation layer from the business rule.…
-
1
votes1
answer112
viewsQ: How to condition the display of a Widget list?
I tried to use a if to condition the display of a list of Widgets: children: <Widget>[ if (condicao == true) { Widget(), Widget(), } ], The element type Set < Widget > can’t be Assigned…
-
0
votes2
answers670
viewsA: Flutter Dart -> Capturing data from a class that receives json
Following are examples: void main() { String catJson = '{"cod": "1", "nome": "Sneakers","thumb":"assets/shoe_thumb_2.png"}'; final catMap = jsonDecode(catJson); var cat = Category.fromJson(catMap);…
-
0
votes2
answers84
viewsA: Conflict in installing the latest version of Hive
EDIT In accordance with : https://github.com/hivedb/hive/issues/337 This issue is fixed with v1.4.2 update. 1.4.2 - Fixed dependency issues and minor improvements An alternative is to fork…
-
1
votes2
answers84
viewsQ: Conflict in installing the latest version of Hive
EDIT Has been corrected as per : https://github.com/hivedb/hive/issues/337 This issue is fixed with v1.4.2 update. 1.4.2 - Fixed dependency issues and minor improvements dependencies: hive: ^1.4.1+1…
-
1
votes1
answer41
viewsA: Subtraction result with double many decimal places appear
String toStringAsFixed(int fractionDigits) Returns a decimal-point string-representation of this. Return a decimal representation of the string type, where fractionDigits is the number of decimal…
-
0
votes0
answers24
viewsQ: How to discover possible Exceptions?
Example, in http requests we can have SocketException, TimeoutException,etc. In I/O operations we also have other possible Exceptions. Not to have to treat in a generic way, ex: catch (e), how to…
-
3
votes2
answers264
viewsA: Interface or instance of a Generic
I was looking for something like this and I found another way, in this method the instance is created via Funcion and called via callback. In the tests I noticed that the Intellisense (autocomplete)…
-
2
votes1
answer73
viewsA: How to run counter without click event?
How to run the click counter without having to click the button? Type starts the app already starts 1, 2, 3... One way would be: @override void initState() { _incrementCounter(); super.initState();…
-
1
votes2
answers52
viewsA: I cannot insert in sqlServer table float data when they are greater than 1000
Try it this way: preco.Valor.ToString(CultureInfo.CurrentCulture).Replace(",",".") Remembering that you may have a problem if the currency format is different from PT-BR, and yet SQL Server itself…
-
0
votes1
answer232
viewsQ: How Dart interprets a ()=>{x,y,z} Arrow in lambda/anonymous functions
Have a similar question here (referring to javascript) but I believe that there are different characteristics in the implementation with Dart. Example in Dart: void main() { printName(() => {…
-
0
votes2
answers70
viewsA: Do codes in the console debug have any meaning?
In the above example, "I/D" are the log levels. May be: V: Verbose (lowest priority) D: Debug I: Info W: Warning E: Error F: Fatal S: Silent (high priority, print nothing) Flutter : Tag(title)…
-
0
votes2
answers70
viewsQ: Do codes in the console debug have any meaning?
I would like to know if there is any documentation that explains in more detail what that means I/flutter,etc, and the code in parentheses. Sometimes it goes unnoticed in debug exception and on the…
-
1
votes1
answer204
viewsA: How to define Dart parameter
Taking into account that you want to pass the value of the parameter via constructor would be: void main() => runApp(Checkbox('meu parametro')); class Checkbox extends StatelessWidget {…
-
3
votes1
answer1251
viewsQ: How to use the Assert statement?
To Documenting informs that: During development, use a statement assert for interrupt normal execution if a condition is false. The instruction assert ensures, for example, the manipulation of…
-
3
votes1
answer326
viewsQ: Best Practices for Creating Widgets
I know two ways to create widgets, extending StatelessWidget class MeuWidget extends StatelessWidget { const MeuWidget({Key key}) : super(key: key); @override Widget build(BuildContext context) {…
-
0
votes3
answers331
viewsQ: Iterate in Map<List, String>
How to iterate on a Mapof the kind Map<List, String>? List all values, pay key value: [1, 'A']. void main() { print(_mapList.map); //?? // _mapList.map((i, s) =>{ // }); } Map<List,…
-
2
votes3
answers97
viewsA: How do I know if a package is dev_dependencies or dependencies?
Another safe source is package documentation (https://pub.dev/), it is very likely that in the documentation you have instructions on installing the package. If you don’t happen to have it, just…
-
0
votes1
answer165
viewsA: How to use linter in flutter/Dart to improve code quality?
There are some packages with stricter rules that guarantee better quality and standardization of the code, follow some of them: pedantic effective Dart lint Like any other package you need to add it…
-
2
votes3
answers97
viewsQ: How do I know if a package is dev_dependencies or dependencies?
Taking as the example of this two packages: freezed and freezed_annotation, the installation instruction on the site pub dev. is the same for both packages: However, on video showing how to use this…
-
1
votes1
answer155
viewsQ: What does the * of the reserved words Sync*, async*, Yield* mean?
What does the * of reserved words Sync*, async*, Yield*mean? What’s the difference between them and their similar Sync, async and Yield?
-
0
votes1
answer23
viewsA: Problem with Sqlite.Net.Interop
I had the same problem a while back, I managed to solve using sqlite-net-Pcl The update was relatively quiet. Pa get the way I use: var documentsPath =…
-
0
votes1
answer165
viewsQ: How to use linter in flutter/Dart to improve code quality?
In flutter/Dart Lint (process that parses the code to identify possible errors.) comes by default with some 'flexible' rules that allows an error code to compile and execute. Such rules can pass up…
-
0
votes2
answers235
viewsA: How to run all my tests at once?
An alternative for those who prefer to view in the visual studio test tab Edit the file launch.json and add: { "name": "All Tests", "type": "dart", "request": "launch", "program": "test/", } Select…
-
3
votes2
answers235
viewsQ: How to run all my tests at once?
How to run all unit tests at once on the flutter? Each test has only the option Run as in the image: So I’d like to know how to run all my tests at once without having to click each one.…
-
1
votes1
answer38
viewsA: call a file by Listtile
Here are some examples how to navigate between pages, note that there are several ways depending on your use. I can not know for sure how is the implementation of your navigation, but a possible…
-
2
votes2
answers244
viewsA: Which package should the "@required" annotation be imported from?
Really very strange Intellisense suggest these imports. If you leave the cursor over the @required you’ll see when in fact, the right thing would be: import 'package:meta/meta.dart';…
-
1
votes2
answers213
viewsA: Concatenate Listview into Flutter
This question is practically the same as yours, basically you should use the { key so that the compiler can identify what you really want. In your case I’d be: Text('cód :…
-
0
votes2
answers221
viewsA: Statelesswidget Only State Management (no Statefulwidget or external libs)
There really is no way StatelessWidget pure alter your state. Is there any way for a Statelesswidget to have or simulate a control stately? "To simulate" is not quite the correct word, let’s say…
-
8
votes2
answers2392
viewsQ: What is the meaning of the term "Hard Coded"?
What the term means Hard Coded? It is considered a bad programming practice? How to exemplify a code Hard Coded and its consequences from development to end-user use?…
-
1
votes1
answer62
viewsA: How to take off Floatingactionbutton from Bottomnavigationbar items?
So far there is no such property, see source code widget (line 846): Widget _createContainer(List<Widget> tiles) { return DefaultTextStyle.merge( overflow: TextOverflow.ellipsis, child: Row(…
-
2
votes1
answer134
viewsQ: What is the Function and Utility of "context" in "Widget build(Buildcontext)"
I see in many examples that context is used only with parameters for other functions. In other cases to get some property from widget father. After all, what role and best example illustrates good…
flutterasked rubStackOverflow 7,372 -
2
votes2
answers221
viewsQ: Statelesswidget Only State Management (no Statefulwidget or external libs)
Is there any way of a StatelessWidget have or simulate a state control? To not be without context, let’s take as a basis the standard example of flutter: import 'package:flutter/material.dart'; void…
-
2
votes1
answer274
viewsA: Flutter Desktop change title, position and size of main window
Using the version 1.15.3-pre.37 Edit the file: window_configuration.h in the briefcase windows and change as per the example: const wchar_t *kFlutterWindowTitle = L"Titulo Minha Aplicacao"; const…
flutteranswered rubStackOverflow 7,372 -
7
votes2
answers102
viewsQ: Do partial imports bring advantages to the application?
Some languages have as a resource the import of parts of the library used. Using Dart as an example we have two types of partial Imports showand hide . import 'package:google_maps/google_maps.dart'…
-
2
votes1
answer274
viewsQ: Flutter Desktop change title, position and size of main window
Currently when running a desktop application the window size and title come predefined, how to change this information? As an example, we used the standard test project provided in git: flutter…
flutterasked rubStackOverflow 7,372 -
0
votes1
answer38
viewsQ: Get User Directories (Windows)
Is there any way to get the system directories? In my case I am trying to get the folder Download of user logged The most I could get was the briefcase temp of the user. import 'dart:io'; main() {…
dartasked rubStackOverflow 7,372 -
0
votes2
answers488
viewsQ: Voidcallback x Function what’s the difference?
In the documentation it states that part of dart.ui; /// Signature of callbacks that have no arguments and return no data. typedef VoidCallback = void Function(); From what I understand VoidCallback…
-
1
votes1
answer280
viewsQ: Asynchronous function with Futurebuilder returning a list of Widgets
My function was to obtain data from a system and mount the widgets. It was synchronous and works perfectly. children: _confere .obterDados(data) .map( (d) => Conferencia( dados: d, ), ) .toList()…
-
3
votes2
answers546
viewsQ: Difference between ways to import with and without 'package:'
When we import a class/library two options are suggested, I wonder if there is any difference/advantage between importing classes/libs directly informing the path and with the 'command' package: Ex:…
-
1
votes1
answer1051
viewsQ: Dart Check if a date is valid
How to check if a date is valid in Dart? Even though stating an invalid date does not return any kind of exception import 'package:intl/intl.dart'; void main() { print ('dart');…
dartasked rubStackOverflow 7,372 -
0
votes1
answer83
viewsQ: Flow of change notification
I have already understood how the process of changing the state of a widget where it is 'updated' to show its new value. However, the documentation speaks of the flow, that is, the path that is…
-
2
votes1
answer141
viewsQ: What are the differences between the implementations of the Set class on Dart?
The documentation says that Set is A collection of objects in which each object can occur only once. In the documentation of this class there is a small summary of the different classes that…
dartasked rubStackOverflow 7,372 -
1
votes2
answers450
viewsQ: How does the Flutter (Framework, SDK, Dart) architecture work?
In Flutter studies I often get confused, when creating an UI, after all I am using Dart/Flutter (framework) or both? Ex: children: widget.products.map((Product product) { return ShoppingListItem(…
-
4
votes1
answer805
viewsQ: How can the use of 'const' constructors improve performance in Flutter?
In the documentation one of the recommendations to improve the performance of applications in Flutter says: Use constant widgets whenever possible and provide a const constructor... How to…
-
1
votes2
answers165
viewsQ: How does a const constructor differ from a standard constructor?
In the documentation it says that the builder const Creates an object that will never change. All vars has to be final. So it means that I will have the same result in creating the following…
-
0
votes1
answer1183
viewsQ: When to use "map()" or "toList()" methods?
In the example below, the two methods basically do the same job, go through the list of objects getting each item from the list. A difference is noted in the iteration using map(), in the last…