Posts by Matheus Ribeiro • 4,942 points
219 posts
-
2
votes1
answer88
viewsA: Filter and do not pick up repeated firestore data on flutter
As you will build a list, it is interesting that the records are filtered before mounting the list in question, this is an output: class BookList extends StatelessWidget { @override Widget…
-
0
votes1
answer93
viewsA: Error converting firebase to json with flutter Dart
The lack of attention is one of the biggest problems, let’s analyze your code... You call the following method in your FutureBuilder, that returns nothing... _getListaScreen(){…
-
0
votes1
answer43
viewsA: Why does Navbar persist even after the page change?
This is usually due to the fact that CupertinoTabScaffold control the routes called from it. To push a route above all tabs Instead of Inside the Currently Selected one (such as when Showing a…
-
1
votes1
answer645
viewsA: <<Flutter>> Doubt on return of Map - //Map <String, Dynamic>// - this returning: null
Pay more attention to the API you are using... It returns this JSON below and you are reading it wrong. { "cep": "01001-000", "logradouro": "Praça da Sé", "complemento": "lado ímpar", "bairro":…
-
0
votes1
answer227
viewsA: How to convert a string with special characters into utf8?
You can use the package dart:html to do what you want, I was able to play what you want by removing the &, see if my solution helps you. Another thing is that your String was with some wrong…
-
2
votes2
answers70
viewsA: Do codes in the console debug have any meaning?
This information is from Logcat. If you open your project in Android Studio and open the Logcat tab, you will see that every second thousands of messages will be generated, which are related to…
-
1
votes1
answer365
viewsA: Error retrieving URL from Firebase, Flutter
Your problem is the method _uploadImagem you are using the .then() of an async function, thus its setData will be executed before the return of your task.onComplete. In case you need to use the…
-
1
votes1
answer135
viewsA: How to return a registration layout based on a selected Dropdownmenuitem Flutter option
I’ll give you an example of implementation and you try to follow the thought. There are other ways to change a widget, but I’ll show you one that I think is cool. Create a variable in your class,…
-
0
votes1
answer31
viewsA: Problems with Splitting in Flutter
You’re playing all the pictures in one Column and that way only after the separator will be created, do it as follows: ListView.separated( itemBuilder: (context, index){ return Container( child:…
-
2
votes3
answers331
viewsA: Iterate in Map<List, String>
I already went through this problem a while ago and searching the inner classes I found the following: /** * Creates a Map instance with the default implementation, [LinkedHashMap]. * * This…
-
2
votes1
answer155
viewsA: What does the * of the reserved words Sync*, async*, Yield* mean?
These words are called "Star-Keywords" and are used in generator functions. Explaining better They are used in functions that will return data on-demand, that is, only when we actually make use of…
-
1
votes2
answers313
viewsA: how to make this variable have a double value #Dart
Just change the variables of the type dynamic for double How you will work with real values, everything will be double import 'dart:io'; void main(){ double saldo = 100.0; print(' ');…
-
8
votes1
answer1039
viewsA: async x await x Future
Dart, like other languages, works with synchronous and asynchronous functions. I’ll explain in a grosser way, but then you research more on: Synchronous Function bool tarefaFinalizada() =>…
-
2
votes2
answers511
viewsA: Could not Convert variant of type (Olestr) into type (Double)
Convert Integer to Text that will work: CadastraPessoa.InformarEmail('morador' + IntToStr(n1) + '@teste.com'); In Delphi to concatenate a String with another type it is necessary to perform…
delphianswered Matheus Ribeiro 4,942 -
0
votes2
answers146
viewsA: Firestore or Sqlite?
You can use both Firestore and Sqlite. The guys usually use the Firestore because it is a Nosql bank and just create the bank in your Firebase that everything is already worked, IE, use it because…
-
6
votes3
answers97
viewsA: How do I know if a package is dev_dependencies or dependencies?
According to the documentation, the rule is simple: The Rule for Deciding between a regular or dev dependency is simple: If the dependency is Imported from Something in your lib or bin Directories,…
-
2
votes2
answers352
viewsA: What mistake is this and what can I do to fix it?
Try to understand the error: [INSTALL_FAILED_UPDATE_INCOMPATIBLE: Package with.ample orders. Signatures do not match Previously installed version; ignoring!] Incompatibility failure when installing…
-
0
votes2
answers504
viewsA: Creating folder that does not erase when uninstall to save backup - Flutter
Have you tried using the command getLibraryDirectory()? According to what is described in the package source, this command returns a directory that serves to store persistent data and for backups,…
-
1
votes1
answer3453
viewsA: Flutter Container filling the full screen with rounded edges
Either you work with fixed height or make a calculation MediaQuery.of(context).size.height*0.8 this way your container will occupy 80% of the screen, this on any device. Change the shape you want...…
-
1
votes1
answer200
viewsA: How do I list data from a model that receives a JSON but an array in the structure?
To work with an array of your Model type, you will have to deserialize the data in a list and then throw each record inside your model. A necessary change is in your Model... Since she is a Model,…
-
1
votes1
answer317
viewsA: Problem updating a list after inserting a data from another page
Exchange the FutureBuilder used by a StreamBuilder Before FutureBuilder<QuerySnapshot>( future: Firestore.instance .collection("trabalhos") .document(widget.snapshot.documentID)…
-
2
votes2
answers225
viewsA: Difficulty writing in cloud firestore
You did everything right, but how are you accessing the Firestore before the runApp() you need to add that code WidgetsFlutterBinding.ensureInitialized(); void main(){…
-
0
votes1
answer290
viewsA: Widget Slider and flutter_staggered_grid_view Slider
Your code is a bit messy and complicated to understand, so I’ll give you an example of how to do and you apply for your case... 1º Create a Widget to be yours CustomSlider class MySlider extends…
-
0
votes1
answer54
viewsA: As I inform a condition for when the screen is changed the timer.Eriodic cancel
Try to change your variable Timer local to a global variable within its class and treat it on dispose of your class, below is an example: class YellowBird extends StatefulWidget { const YellowBird({…
-
0
votes1
answer1565
viewsA: Flutter - A Renderflex overflowed by 572 pixels on the bottom
I don’t know how you want to assemble the layout of your screen, but I tried to tweak your Widgets tree to take some redundancies. If I have changed the structure a lot, keep yours and use only the…
-
0
votes1
answer4227
viewsA: Create an array list in the flutter
I created an example of how you can do what you want, you can run it by Dartpad to test import 'package:flutter/material.dart'; final Color darkBlue = Color.fromARGB(255, 18, 32, 47); void main() {…
-
1
votes3
answers1630
viewsA: Update data on Setstate() Flutter page, enter Loop
How are you making use of a FutureBuilder you don’t need setState or workarounds, just modify your method as follows: Future<List> _getPromocoes() async { var response await…
-
2
votes2
answers244
viewsA: Which package should the "@required" annotation be imported from?
The @required is an annotation used by Dartanalyser which is provided through meta. As you will not use visual components, you can import it directly from foundation import…
-
1
votes2
answers213
viewsA: Concatenate Listview into Flutter
To concatenate a "simple" variable we do as follows: String nome = "Matheus"; String meuTexto = "Meu nome é $nome"; To concatenate properties of a class for example, we do it as follows class…
-
1
votes1
answer73
viewsA: Using value returned in function to create a listview flutter
If you are using a StatefulWidget modify your button click as follows: readdados() async { QuerySnapshot snapshot = await Firestore.instance.collection('cliente').getDocuments();…
flutteranswered Matheus Ribeiro 4,942 -
1
votes1
answer694
viewsA: List on the Query screen the REST API , JSON on Flutter
Your problem is you get one Jsonarray and tries to treat it as a simple Map<String, dynamic>... In case you first need to do your code JSON received, thus having in hand a…
-
0
votes1
answer906
viewsA: Update a Listview in a Statefulwidget Son Flutter
I created an example for you that can be tested on Dartpad.... Since you haven’t shown us how your complete code is, try applying my example to your case, which you should solve: import…
-
2
votes1
answer134
viewsA: What is the Function and Utility of "context" in "Widget build(Buildcontext)"
The Context is just a reference to identify your widget within the structure tree. Each Context belongs only to a Widget. We can also understand that if a particular Widget "A" has children, the…
flutteranswered Matheus Ribeiro 4,942 -
1
votes1
answer785
viewsA: How to use the value of a Future in flutter
You always get the Future because you are not returning the data correctly, in your method getPersonData() you did right the use of async, you just need to pack yours getPersonName() accordingly...…
-
0
votes2
answers1988
viewsA: Scrollview with a Fixed Container in the Footer - Flutter
I created this example here of layout, I believe is what you want: import 'package:flutter/material.dart'; final Color darkBlue = Color.fromARGB(255, 18, 32, 47); void main() { runApp(MyApp()); }…
-
1
votes1
answer327
viewsA: Check if table exists before entering value in the Sqflite -- Flutter database
Your problem is related to word ORDER. ORDER is a reserved word from the database, what you can do is modify the name of your table and field... CREATE TABLE IF NOT EXISTS Orders (id INT PRIMARY…
-
1
votes2
answers290
viewsA: How to search whether a string array contains in another string array. Using complete and incomplete words
As you will have two word lists, you should use one loop to compare your records, thus: void main() { List<String> array1 = ['Escola','Estadual','José','da','silva']; List<String> busca…
-
0
votes1
answer548
viewsA: Firebase data checkbox in Flutter
I created a quick example on dartpad for you to understand how your scheme should work, if you cannot understand, then I better implement my answer based on the example given in your question (What…
-
2
votes1
answer3464
viewsA: (Solved) ERROR: Flutter Unhandled Exception: type 'Future<Dynamic>' is not a subtype of type 'List<Oficioenviado>
Your method listPaginate() is asynchronous and does not have a typed return, the problem is this... Make the following modification: List<OficioEnviado> listPaginate(int page, int perPage)…
-
1
votes1
answer73
viewsA: Zeroing a slider’s default margin on flutter
You can create a custom theme for your Slider, follows an example: class _MyHomePageState extends State<MyHomePage> { double _value = 0; @override Widget build(BuildContext context) { return…
flutteranswered Matheus Ribeiro 4,942 -
0
votes1
answer317
viewsA: Problem to recover UID from firebase Authentication?
You are not loading the variable FirebaseUser firebaseUser, therefore the problem... Create the following method Future<Void> currentUserUID() async { firebaseUser = await…
-
1
votes1
answer101
viewsA: Object Orientation - Flutter
As your example is half raw and there is no way to know when you fill in the data, do so in the place where you feed the variable: setState((){ VarEspecialidade.VariavelEspecialidade =…
-
1
votes1
answer361
viewsA: Catch the return of a Alertdialog to treat willpopscope
You are having problems working with asynchronous processes, the changes below will probably solve your problem... Modify your method showAlertDialogSimNao() to make it asynchronous…
-
3
votes1
answer819
viewsA: How to get the uid of the currentUser in the firebase in flutter?
To get the current user’s UID do: FirebaseUser user = await _firebaseAuth.currentUser(); return user?.uid; I also leave here a class I created to implement firebase in my application import…
-
2
votes2
answers1700
viewsA: How to prevent the user from returning to the login screen after logging into the flutter?
Your structure doesn’t work because you’re working with a Future and you’re not doing the right thing... You can try two ways 1st form Add the setState() and see if it works as you wish…
-
0
votes2
answers1131
viewsA: Convert Map to String to fill Dropdown in Flutter
You need to work better upon your returned data... class Category{ Category({this.id, this.nome}); int id; String nome; factory Category.fromJson(Map<String, dynamic> json) => Category( id:…
-
4
votes1
answer509
viewsA: List of flutter images
How do you already get a list of Strings, there’s no reason to turn her into a map, work directly on her: Subistitua that final parsed = response.data.cast<Map<String, dynamic>>();…
-
2
votes1
answer595
viewsA: Touch effect (touch ripples) on long touches, with Inkwell
How can I "fix" this problem? To do what you want, you need to use the Widget Material and set the color directly on it instead of putting on the Container, do so: Material( color: Colors.blue,…
-
3
votes1
answer722
viewsA: Setstate Flutter
In the document of setState() we can find the following: Notify the framework that the Internal state of this Object has changed. Calling setState notifies the framework that the Internal state of…
-
1
votes1
answer280
viewsA: Asynchronous function with Futurebuilder returning a list of Widgets
I saw that you have already found a solution, but only to leave one more possibility of how it can be done: FutureBuilder( future: _conferencia.obterDados(data), builder: (_,…