I am making a calculator that keeps all the different sums on the screen using flutter. Not sure how to approach this - flutter

I have been trying not to have ask but I need some help. I am building my first flutter app. It's a calculator and I can get a basic one working without problems I am even getting it to evaluate with each key press, whether it be from my numbers widgets or by typing directly into the textfield.
I want to make it a bit different. I have tried to come up with the best way to do this but am not sure how. I want multiple sums to stay shown in the textfield(I presume if it needs editing I need to use a textfield) with the result attached. (i.e 2+6+4=12 then on a new line have another 6*6=36 etc.) At any time updating the textfield with the keypad must update all the sums on screen.
I have tried to do this using just one textfield (splitting the text and adding the sums to a list then calculating each and adding them back), however seems very cumbersome and I don't think this is the best approach. I have also made a Dynamic list of textfields , but found it difficult to index each textfield widget (dont think this is the correct approach) Im not asking for code but ideas as to which route to take. Your help would be appreciated.

Related

How to have suggestions come up when filling in TextField?

I am new to IOS development. I am trying to add simple TextField for entering Occupation. I would like to show the user some matching suggestions as they user type (from a set of occupations that I already have). This is a very common usecase. Is there a idiomatic ways of doing this? In Android there is an AutoCompleteTextView in the standard view library which takes in an array of suggestions during initalization. I could not find anything similar in IOS.
You can use some 3rd party libraries available for Auto complete text field
but
the best and easy approach from my perspective is to use UITextField and at bottom add UITableview. So the concept is when you type any character in textfield you need to filter some data from tableview and reload tableview
Check the below link you can get the suitable answer from here...
Getting autocomplete to work in swift

How to create a scrollable list for Watch OS that has a fixed size?

I'm a beginner to Watch OS programming (I'm using Storyboard) and would like some help with scrollable lists.
I need to create a scrollable list of numbers (e.g. from 1 to 20) that changes when user uses scrolls with the crown. I know how to create it using a Table, but the problem is, I don't know how to contain it to a single area.
I have added a screenshot of the "Sleep Cycle" app that has a similar feature. I would like to do the exact same thing, but instead of time, I need to show a list of numbers.
Edit: Another example would be "Zero" where the hours field is scrollable:
Please check out this library and try to customize it as per your use case:
https://github.com/calda/WatchKitTimePicker

Hide filter depending on sheet in dashboard

Hope you can help.
I have attached my workbook. Basically, I have made swapping sheets. The sheets have different filters, and I need the filters to disappear depending on the sheet showing.
I have no problem with the sheet swapping. I been going through the internet for hours, without finding a good solution. I did look into this: New series of videos on swapping and popping on a dashboard(https://vimeo.com/294170859), but did not find it that helpful since it is not very flexible and too difficult to use if you have many filters, that need to change.
I have some kind of an Idea, of putting my filters in each of their container, and then have the container showing depending the sheet but do not how either.
But in the end, the filters needs to appear in the same spots too.
But I really need your help - Simply can't find a good solution!
Thank you!
Without putting your filters in containers and swapping those I can't think of any alternative way to alter which filters appear on your dashboard.
I don't know the exact specifics of your task, however, having perhaps faced similar issues almost always the best solution is to simplify. If possible instead of swapping sheets consider a new dashboard and just "show sheets as tabs". Altering a parameter is a click, just as clicking a dashboard tab - so no difference to the user. Also changing filters may be confusing to a user - they generally get used to seeing things in a certain place.
Of course none of this may apply to your specific situation.

Microsoft-Word: hide overflow in a table-cell

I have a Word-File in which I'm going to add content programmatically.
The content is going to be added into table-cells and thats where the problem starts:
The Word-File looks like this
The cell where it now says "000000873588" is the one being filled by my application. This is working fine until someone enters a string thats too large like so:
The text is being broken down onto the next line which leads to my document actually adding a second page at the end because the whole content doesn't fit anymore.
Now I know the easiest way would be to already truncate the string in the application itself, but this would require me to know the exact cell-size of each cell in the document, which I don't as I have 12 different document-templates that are all being filled programmatically.
Is Word able to set a table-cell to a fixed size and then just cut off the overflow? I can't really imagine it not being able to. I did quite some research but the only thing I found was keeping cells together over page-breaks which is not what I need.

Combobox show text properly

I have a combo box that when I open it should show text like
However I get something like
with the scrollbar set to middle. Thing is sometimes for the same values it shows properly
and sometimes it shows from middle(for same value).
I want it to show properly like in the first image and I've tried a couple of things but with no succes.
itemSection.setHoverAlign(Alignment.LEFT);
itemSection.setTextAlign(Alignment.LEFT);
itemSection.setAlign(Alignment.LEFT);
... and other irelevand stuff ...
Any help is highly appreciated. Thanks alot!
If I am not getting wrong, You want to set your scrollbar at particular position. FOr that you need to ovverride the css of that and try to set scrollbar position to 0. So that your problem will get solved.
The problem with any kind of selections box is, that the boxes display and behave completely different across browsers. The older the browser the worse it handles long texts in selection boxes (some just truncate the text). I suggest to keep the displayed text as short as possible. That way you can avoid this problem.
If you really need long description, you can try to add a tooltip to every entry. Or use a different widget to make the select from, e.g. some custom widget in a separate dialog...