How is it possible to add a trading chart widget on my website with delayed price data? - charts

For example, add the trading view chart widget or use its chart library to draw a trading widget with data delayed by 5 minutes.

Related

I would like to create a scrollable date buttons with widget shown on toggle in flutter

Please how do I create an app that has days of the month at the top and each of the month will have a separate page but the pages are conditionally shown. The days of the months will be used as buttons and when a button is clicked the widget corresponding to the button will be shown.
I have added a picture of an app describing what I would like to achieve.
The buttons will be inside a scrollable widget and are numbered from 1-31/30 depending on the month we are in.
Each day will be created as button so that onclick, it should display a corresponding widget accordingly.
What I want to achieve is that the day buttons should be all together in horizontal view while the widgets will be below but only the widget corresponding to the day will show.
Currenty I have been able to create a column of day button and it corresponding widget showing below it and other buttons are scattered but what I want to achieve is a scrollable separate buttons at the top and widgets changing below.
I would be glad if there is good approach to achieving this.
Here is the an example of what I want to achieve

Is there a way to show a single instance of the flutter google maps widget on multiple screen?

I am working on a flutter project that requires me to show a maps widget on separate screens. Currently, on every single screen, a separate maps widget is loaded and this is costly as google pricing is based on map loads.

iOS 14 widget onAppear / didAppear event?

Is there any technique to re-render iOS 14 widget content when I scroll to my home screen (contain my widget)?
To clarify, this is Home screen of iOS 14 where you can place any
widget on. It's not the today extension that appeared in the very left
Home screen.
I haven't found any document about this technique! All I know is using Timeline to schedule the rendering, and refreshWidget(widgetKindHere)
Currently, I'm using IntentTimelineProvider to make updating schedule, keep my stock widget up to date frequently for every 30 minutes
But as I can see the TradingView's widget:
When I scrolled to my home screen contain its widget, the last updated info on the widget changed from 12:00pm to 2:55pm (current)
-> That mean they did not update their widget from 12pm to 2:30pm, until I scrolled to the Home screen contain the widget, a few seconds later, it get updated at 2:55pm
How can TradingView did that?
This is not about detecting onAppear/onDisappear events. What you observe is the smart behaviour of Smart Stacks. Usually related with the use of TimelineEntryRelevance.
Every TimelineEntry has a TimelineEntryRelevance. The relevance is required, however, the default implementation is provided.
struct SimpleEntry: TimelineEntry {
var date: Date
var relevance: TimelineEntryRelevance?
}
let entry = SimpleEntry(date: Date(), relevance: 0.1)
Why relevance is important? It is used by Smart Stacks to display the most relevant widget, i.e., the one with the most relevant information.
From Welcome to Design Great Widgets:
Another feature we've created is Smart Stacks. These let you add
several different widgets into a single location and quickly flick
between the different widgets inside. But what is really powerful is
that smart stacks dynamically change and adapt to how you use them.
Based on your behavior and context, a smart stack will automatically
rotate to show you the most relevant widget at a given time. [emphasis added]
From Add configuration and intelligence to your widgets:
You want your widget to be surfaced when you have timely information
relevant to the people using your app, like when you know there is a
thunderstorm coming, but not when you're just updating the temperature
regularly.
For example, if someone frequently launches your weather app to check
on the weather, the system can instead surface your widget with that
information to provide quicker access to what they're looking for.
The second is based on relevant information from your app. So, for
example, if a thunderstorm is happening, your widget can inform the
system that it has a highly relevant update, and the system will
consider surfacing your widget to the top of the stack.
Useful links:
Welcome to Design Great Widgets
Add configuration and intelligence to your widgets
Widgets Code-along, part 2: Alternate timelines

Make a App wide progress bar (Across the pages of whole app) and manage its state as required in Flutter using provider

Im trying to make a Custom Progress Indicator widget which i can show or hide in any of the pages(Anywhere across the app). My approach is to bind a provider value for the progress widget and toggle the value as required. But I just don't get where exactly i should place the Progress/loader widget to make it work in whole App.
Or should i resort to using progress widget in each of the required pages and toggle it?
I'm coming from a web development background, so is there a equivalent of rootPage/ rootscreen where we can place app wide components (as in React, Ionic).

Updating widget value on render?

I have a Flutter app, and I want to display a color depending on the current system time in milliseconds since epoch. Of course, I cant refresh the state of the widget several times a second to change the color. But how can I achieve this effect? Is there some kind of render-method I can override?
P.S.: I am using a Material widget to display the color.
Flutter updates the view only when a new frame is due, no matter how often you called setState() since the last frame.