

How is this stuff handled? There would still be space for a 4x4 building, but how will be the slack space occupied? Will it still be efficien (i.e. When upgrading roads, since roads are bigger, the block will be reduced to a 6圆 block. When you're building roads you can see gridlines for a 8x8 block, that can lead to have four 4x4 building (assuming that's the maximum).

I hope you can understand what I'm talking about, even if I'm not able to explain it in a very straight forward way :DĪnyway, I really appreciate the fact that in CS you can upgrade the size of roads without having to demolish them, but this leads me to some question. A skyscraper could be built, but other building on the same block didn't have enough space. If you need to review how we built the app from the ground up, check out the first part of this tutorial with the link below. In this tutorial, we are going to add new features that will make the app more usable. I found it pretty hard in Simcity to build cities with high density: the problem was that assuming that a skyscraper occupied a 4x4 slot, since I added parks and stuff to a 8x8 block I couldn't have a "full skyscrapers" block. Welcome to the second part of how to make a radio app in Flutter tutorial series. Now, I have a question about block size (when building "square" cities) and road upgrades. Here is the implementation of the stations repository.Ĭlass RadioBrowserRepository extends StationRepository else if (index = stations.length & !state.I just bought Cities Skyline, since I played a little bit the last simcity and kinda enjoyed it. Now that we know which URL we get the stations from, we can now write the code for this.

The Stations Repository fetches the radio stations from the internet. We are doing pagination because we don’t want to fetch thousands of radio stations at once, especially for countries with many stations. If we want to get the 16th to 30th station, then we want these parameters to be offset=15 and limit=15. The limit query parameter is the number of stations to get at a time, while the offset is the index of the stations. However, if you want to get the stations from other countries, use the codes from the official country code list. In this example, I used the country code au to get the top stations from Australia. According to the radio browser api, we can get the top radio stations sorted by popularity while hiding broken stations by using the url:

We will get the list of radio stations from Community Radio Browser. Let’s start defining the repository to fetch the list of radio stations. With MultiBlocProvider, both BLoCs can be in the same widget level. We are using MultiBlocProvider instead of BlocProvider because BlocProvider can only have one child widget.
