Questions tagged [flutter]
Flutter is Google’s UI toolkit for building beautiful, natively compiled applications for mobile, web, and desktop from a single codebase.
16
questions
1
vote
1
answer
233
views
Flutter input widget with multiple options (monthly/annual/currency/percentage)
I currently have the following code to build this widget:
...
3
votes
3
answers
198
views
Remove else-if statement from multi-conditional logic
INTRODUCTION
I am studying the book Five Lines of Code (2021) by Christian Clause. The book covers several techniques regarding refactoring legacy code. I am learning much and applying several of its ...
1
vote
1
answer
99
views
Dart Non-Reentrant Async Lock
This class synchronizes access to an async resource. If retainFutureErrors is false, it will keep retrying until there is a success. Otherwise, the ...
2
votes
0
answers
31
views
Library for managing flutter rebuilds based on state changes
This is my new library for managing flutter rebuilds based on state changes. It is very similar to AnimatedBuilder but takes a factory to create the notifier instead of an instance of the notifier. It ...
1
vote
1
answer
382
views
Am I writing Flutter code in the correct style? [closed]
I'm cleaning up my Flutter code and I'm not sure if I'm writing my Flutter code in the correct style.
First, here's my code to import the file:
...
2
votes
1
answer
342
views
Dart Ioc Container
This package is on pub dev here
It's on Github here
...
3
votes
1
answer
2k
views
Adding multiple items to a list in flutter
I'm new to coding in general and I am working in flutter right now. I've successfully been able to add single string objects into a list but I'm having issues adding an object with multiple strings ...
-1
votes
2
answers
372
views
Should I add optional parameter to my function for test cases? [closed]
I have the function below, I want to access the context globally and I don't know if it's a good idea, I'm getting the context from the Application, I have TestAppliction in the test environment and I ...
6
votes
0
answers
953
views
Make Flutter app on Windows a drop target to accept files
My aim was to provide functionality for a Flutter app on Windows to accept drag-and-dropped files.
Flutter apps are written in Dart and compiled to native code, but since this is a cross-platform ...
3
votes
1
answer
65
views
I have a input grid with more than 40 input-fields hardcoded
I am new to flutter and i managed to build a working Grid which does what i want it to do but the code is a duplicated hell and i didn't manage to create it dynamically while still keeping track of ...
4
votes
1
answer
141
views
Search filter for words in dart
I need to add search filters for firebase So that I can get search result easily and precisely
I was altering the code from hereThis Medium Post
I would like to optimize this code.
...
1
vote
1
answer
5k
views
Flutter - Implementing a simple ListView with MVVM
I've implemented a simple ListView in MVVM that displays a few PrepSteps (short form of PreparationSteps). While implementing I wasn't sure about if my approach is "...
3
votes
0
answers
2k
views
Custom permission Dialog in Dart
I'm using the flutter_simple_permissions plugin to request permission to read contacts on my flutter application. I want the app to quit when a user denies the permission, and need to show them a ...
2
votes
0
answers
1k
views
Flutter - Set the state of the dynamically created child widgets
This is what I wan't to do:
In my app I've 2 custom widgets called SelectItems. If the user clicks on item, it changes the background color. Everything is working ...
3
votes
0
answers
141
views
Flutter: ToggledButtons using FlatButton
I'm new to Dart and Flutter and I would like to know what do you think about this code and if it's any way that I could improve it :).
...
2
votes
0
answers
102
views
Building an app in Flutter [closed]
I am just starting to code by myself in Flutter. I've built this so far and here is the image. Can you show me what would be better or cleaner code? I used Row widget for it, but I guess I should ...