问:
JavaFX ScrollPane - Detect when scrollbar is visible?
I have a ScrollPane as below:

```<code>    ScrollPane scroller = new ScrollPane();
    scroller.getStyleClass().add("scroller");
    scroller.setPrefWidth(width);
    scroller.setFocusTraversable(Boolean.FALSE);
    scroller.setPannable(Boolean.TRUE);
    scroller.setFitToWidth(Boolean.TRUE);
    scroller.setHbarPolicy(ScrollPane.ScrollBarPolicy.NEVER);
    scroller.setVbarPolicy(ScrollPane.ScrollBarPolicy.AS_NEEDED);
    this.setCenter(scroller);

    scroller.contentProperty().addListener((observableValue, last, now) ->
    {
        ScrollBar scrollBar = (ScrollBar) scroller.lookup(".scroll-bar:vertical");

        if (scrollBar != null)
        {
            if (scrollBar.isVisible())
            {
                log.info("Scrollbar visible, setting lower card width..");
            }
            else
            {
                log.info("Scrollbar not visible, setting default card width..");
            }
        }
    });
</code>```

As you can see I've attached a listener to the content property to know when the content is set. I am trying to see if the scrollbar is visible when the content is updated. Even though I can see the scroll bar on the UI, it always goes to else part - "Scrollbar not visible".

Not sure if there is any other way to do this? Checked a lot on StackOverflow and Oracle docs - nothing solid found to suggest otherwise.

-- Adding context to the problem to better understand:

Just trying to explain what the problem is not sure if I should put it as a reply comment or edit the question, please advise and will change it:

So I have this view that brings up records from Firebase that need to be loaded on the TilePane that is hosted in ScrollPane which goes into the Center of the BorderPane.

The time by which I get the response from the Firebase is unpredictable as its async. So the UI gets loaded up with the empty TilePane and then the async call goes to fetch data. When the data is available, I need to prepare Cards (which is HBox) but the number of columns is fixed. So have to adjust the width of the cards to keep the gap (16px) and padding (16px) consistent on the TilePane at the same time maintain 5 columns. The width of each card needs to be recalculated based on the fact that whether or not there is a scrollbar on the display. Because if the scrollbar is displayed it takes some space and the TilePane will down it to 4 columns leaving a lot of empty space. Happy to explain further if this is not clear.

答:
I strongly suggest to follow the suggestions given in the comments. It is all about choosing the correct layout.

The purpose of me answering this question is, in future, if someone comes across this question for dealing with scroll bar visibility, they will atleast know a way to get that (in JavaFX 8).

One way to check for the scrollbar visiblity is to register the appropriate scrollbar on layoutChildren and add a listener to its visilble property. Something like...

```<code>ScrollPane scrollPane = new ScrollPane() {
    ScrollBar vertical;

    @Override
    protected void layoutChildren() {
        super.layoutChildren();
        if (vertical == null) {
            vertical = (ScrollBar) lookup(".scroll-bar:vertical");
            vertical.visibleProperty().addListener((obs, old, val) -> updateContent(val));
            updateContent(vertical.isVisible());
        }
    }
};
</code>```

The updateContent(visible) method is stuff you want to do when the visibility gets updated.

A complete working demo is as below.

```<code>import javafx.application.Application;
import javafx.geometry.Insets;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.Label;
import javafx.scene.control.ScrollBar;
import javafx.scene.control.ScrollPane;
import javafx.scene.layout.BorderPane;
import javafx.scene.layout.HBox;
import javafx.scene.layout.VBox;
import javafx.stage.Stage;

public class ScrollPaneScrollBarVisibility_Demo extends Application {
    @Override
    public void start(Stage stage) throws Exception {
        BorderPane borderPane = new BorderPane();
        Scene sc = new Scene(borderPane, 300, 300);
        stage.setScene(sc);
        stage.setTitle("ScrollBar visibility");
        stage.show();

        ScrollPane scrollPane = new ScrollPane() {
            ScrollBar vertical;

            @Override
            protected void layoutChildren() {
                super.layoutChildren();
                if (vertical == null) {
                    vertical = (ScrollBar) lookup(".scroll-bar:vertical");
                    vertical.visibleProperty().addListener((obs, old, val) -> updateContent(val));
                    updateContent(vertical.isVisible());
                }
            }
        };
        scrollPane.setContent(getContent());
        borderPane.setCenter(scrollPane);
    }

    private void updateContent(boolean scrollBarVisible) {
        System.out.println("Vertical scroll bar visible :: " + scrollBarVisible);
    }

    private VBox getContent() {
        VBox labels = new VBox();
        labels.setSpacing(5);
        for (int i = 0; i < 10; i++) {
            labels.getChildren().add(new Label("X " + i));
        }
        Button add = new Button("Add");
        add.setOnAction(e -> labels.getChildren().add(new Label("Text")));
        Button remove = new Button("Remove");
        remove.setOnAction(e -> {
            if (!labels.getChildren().isEmpty()) {
                labels.getChildren().remove(labels.getChildren().size() - 1);
            }
        });
        HBox buttons = new HBox(add, remove);
        buttons.setSpacing(15);

        VBox content = new VBox(buttons, labels);
        content.setPadding(new Insets(15));
        content.setSpacing(15);
        return content;
    }

    public static void main(String[] args) {
        Application.launch(args);
    }
}
</code>```

Body:
I have a ScrollPane as below:

    ScrollPane scroller = new ScrollPane();
    scroller.getStyleClass().add("scroller");
    scroller.setPrefWidth(width);
    scroller.setFocusTraversable(Boolean.FALSE);
    scroller.setPannable(Boolean.TRUE);
    scroller.setFitToWidth(Boolean.TRUE);
    scroller.setHbarPolicy(ScrollPane.ScrollBarPolicy.NEVER);
    scroller.setVbarPolicy(ScrollPane.ScrollBarPolicy.AS_NEEDED);
    this.setCenter(scroller);

    scroller.contentProperty().addListener((observableValue, last, now) ->
    {
        ScrollBar scrollBar = (ScrollBar) scroller.lookup(".scroll-bar:vertical");

        if (scrollBar != null)
        {
            if (scrollBar.isVisible())
            {
                log.info("Scrollbar visible, setting lower card width..");
            }
            else
            {
                log.info("Scrollbar not visible, setting default card width..");
            }
        }
    });

As you can see I've attached a listener to the content property to know when the content is set. I am trying to see if the scrollbar is visible when the content is updated. Even though I can see the scroll bar on the UI, it always goes to else part - "Scrollbar not visible".

Not sure if there is any other way to do this? Checked a lot on StackOverflow and Oracle docs - nothing solid found to suggest otherwise.

-- Adding context to the problem to better understand:

Just trying to explain what the problem is not sure if I should put it as a reply comment or edit the question, please advise and will change it:

So I have this view that brings up records from Firebase that need to be loaded on the TilePane that is hosted in ScrollPane which goes into the Center of the BorderPane.

The time by which I get the response from the Firebase is unpredictable as its async. So the UI gets loaded up with the empty TilePane and then the async call goes to fetch data. When the data is available, I need to prepare Cards (which is HBox) but the number of columns is fixed. So have to adjust the width of the cards to keep the gap (16px) and padding (16px) consistent on the TilePane at the same time maintain 5 columns. The width of each card needs to be recalculated based on the fact that whether or not there is a scrollbar on the display. Because if the scrollbar is displayed it takes some space and the TilePane will down it to 4 columns leaving a lot of empty space. Happy to explain further if this is not clear.

Body:
I strongly suggest to follow the suggestions given in the comments. It is all about choosing the correct layout.

The purpose of me answering this question is, in future, if someone comes across this question for dealing with scroll bar visibility, they will atleast know a way to get that (in JavaFX 8).

One way to check for the scrollbar visiblity is to register the appropriate scrollbar on layoutChildren and add a listener to its visilble property. Something like...

ScrollPane scrollPane = new ScrollPane() {
    ScrollBar vertical;

    @Override
    protected void layoutChildren() {
        super.layoutChildren();
        if (vertical == null) {
            vertical = (ScrollBar) lookup(".scroll-bar:vertical");
            vertical.visibleProperty().addListener((obs, old, val) -> updateContent(val));
            updateContent(vertical.isVisible());
        }
    }
};

The updateContent(visible) method is stuff you want to do when the visibility gets updated.

A complete working demo is as below.

import javafx.application.Application;
import javafx.geometry.Insets;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.Label;
import javafx.scene.control.ScrollBar;
import javafx.scene.control.ScrollPane;
import javafx.scene.layout.BorderPane;
import javafx.scene.layout.HBox;
import javafx.scene.layout.VBox;
import javafx.stage.Stage;

public class ScrollPaneScrollBarVisibility_Demo extends Application {
    @Override
    public void start(Stage stage) throws Exception {
        BorderPane borderPane = new BorderPane();
        Scene sc = new Scene(borderPane, 300, 300);
        stage.setScene(sc);
        stage.setTitle("ScrollBar visibility");
        stage.show();

        ScrollPane scrollPane = new ScrollPane() {
            ScrollBar vertical;

            @Override
            protected void layoutChildren() {
                super.layoutChildren();
                if (vertical == null) {
                    vertical = (ScrollBar) lookup(".scroll-bar:vertical");
                    vertical.visibleProperty().addListener((obs, old, val) -> updateContent(val));
                    updateContent(vertical.isVisible());
                }
            }
        };
        scrollPane.setContent(getContent());
        borderPane.setCenter(scrollPane);
    }

    private void updateContent(boolean scrollBarVisible) {
        System.out.println("Vertical scroll bar visible :: " + scrollBarVisible);
    }

    private VBox getContent() {
        VBox labels = new VBox();
        labels.setSpacing(5);
        for (int i = 0; i < 10; i++) {
            labels.getChildren().add(new Label("X " + i));
        }
        Button add = new Button("Add");
        add.setOnAction(e -> labels.getChildren().add(new Label("Text")));
        Button remove = new Button("Remove");
        remove.setOnAction(e -> {
            if (!labels.getChildren().isEmpty()) {
                labels.getChildren().remove(labels.getChildren().size() - 1);
            }
        });
        HBox buttons = new HBox(add, remove);
        buttons.setSpacing(15);

        VBox content = new VBox(buttons, labels);
        content.setPadding(new Insets(15));
        content.setSpacing(15);
        return content;
    }

    public static void main(String[] args) {
        Application.launch(args);
    }
}


来源: stackexchange

问:
Scrollable tkinter matplotlib subplots
I have created a set of plots with matplotlib embedded in a GUI using tkinter, but I would like to make this "figure" scrollable so that the plots can fill a larger space. The scrollbar would allow for different plots to be viewed by scrolling in the vertical direction. So far I have tried the following

```<code>from matplotlib.backends.backend_tkagg import (
    FigureCanvasTkAgg, NavigationToolbar2Tk)
matplotlib.use("TkAgg")
import matplotlib.pyplot as plt
import tkinter as tk
from tkinter import ttk

x=[0,1,2,3,4,5]
y=[0,2,4,8,16,32]

window = tk.Tk()
window.geometry('1600x880')
tab_collection = ttk.Notebook(window)
first_tab = ttk.Frame(tab_collection)
tab_collection.add(first_tab, text='First Tab')
tab_collection.pack(expand=1, fill='both')

first_tab_left=tk.Frame(first_tab)
first_tab_left.pack(side=tk.LEFT)
first_tab_right=tk.Frame(first_tab)
first_tab_right.pack(side=tk.RIGHT)

my_fig = plt.Figure(figsize=(13,10))

my_canvas = FigureCanvasTkAgg(my_fig, first_tab_right)
my_canvas.get_tk_widget().pack(padx=20,side=tk.BOTTOM, fill=tk.BOTH, expand=False)
toolbar = NavigationToolbar2Tk(my_canvas, first_tab_right)
toolbar.update()
my_canvas._tkcanvas.pack(side=tk.TOP, fill=tk.BOTH, expand=False)

#scrollbar for plots
scrollbar = tk.Scrollbar(master = first_tab_right, orient= tk.VERTICAL)
scrollbar.pack(side= tk.RIGHT, fill= tk.Y)

scrollbar["command"] = my_canvas.get_tk_widget().yview
my_canvas.get_tk_widget()["yscrollcommand"] = scrollbar.set

#plot data and draw canvas
my_ax= my_fig.add_subplot(2,1,1)
my_ax.plot(x,y)
my_ax= my_fig.add_subplot(2,1,2)
my_ax.plot(x,y)

my_fig.tight_layout()
my_canvas.draw()

window.mainloop()
</code>```

The scrollbar is not appearing with this code and I cannot scroll downwards. Is subplots the wrong way to go?

I tried to minimalise the code as much as possible. Let me know if it needs more explanation.

Thanks for your help!

答: I can't seem to find a way to attach a scrollbar to the TkAgg canvas created through the matplotlib library. I guess it must be a different kind of canvas. The only answer I have been able to come up with follows this similar question. Basically you have to create a new canvas and add a scrollbar to it. The link has a thoroughly explained answer with easily understandable code so I won't add code to this answer, but what I did was create a new canvas and embed my frame (with the matplotlib canvas) to that canvas to which I can attach a scrollbar.</p>

ContentLicense: CC BY-SA 4.0

Title: Scrollable tkinter matplotlib subplots

Body:
I have created a set of plots with matplotlib embedded in a GUI using tkinter, but I would like to make this "figure" scrollable so that the plots can fill a larger space. The scrollbar would allow for different plots to be viewed by scrolling in the vertical direction. So far I have tried the following

from matplotlib.backends.backend_tkagg import (
    FigureCanvasTkAgg, NavigationToolbar2Tk)
matplotlib.use("TkAgg")
import matplotlib.pyplot as plt
import tkinter as tk
from tkinter import ttk

x=[0,1,2,3,4,5]
y=[0,2,4,8,16,32]

window = tk.Tk()
window.geometry('1600x880')
tab_collection = ttk.Notebook(window)
first_tab = ttk.Frame(tab_collection)
tab_collection.add(first_tab, text='First Tab')
tab_collection.pack(expand=1, fill='both')

first_tab_left=tk.Frame(first_tab)
first_tab_left.pack(side=tk.LEFT)
first_tab_right=tk.Frame(first_tab)
first_tab_right.pack(side=tk.RIGHT)

my_fig = plt.Figure(figsize=(13,10))

my_canvas = FigureCanvasTkAgg(my_fig, first_tab_right)
my_canvas.get_tk_widget().pack(padx=20,side=tk.BOTTOM, fill=tk.BOTH, expand=False)
toolbar = NavigationToolbar2Tk(my_canvas, first_tab_right)
toolbar.update()
my_canvas._tkcanvas.pack(side=tk.TOP, fill=tk.BOTH, expand=False)

#scrollbar for plots
scrollbar = tk.Scrollbar(master = first_tab_right, orient= tk.VERTICAL)
scrollbar.pack(side= tk.RIGHT, fill= tk.Y)

scrollbar["command"] = my_canvas.get_tk_widget().yview
my_canvas.get_tk_widget()["yscrollcommand"] = scrollbar.set

#plot data and draw canvas
my_ax= my_fig.add_subplot(2,1,1)
my_ax.plot(x,y)
my_ax= my_fig.add_subplot(2,1,2)
my_ax.plot(x,y)

my_fig.tight_layout()
my_canvas.draw()

window.mainloop()

The scrollbar is not appearing with this code and I cannot scroll downwards. Is subplots the wrong way to go?

I tried to minimalise the code as much as possible. Let me know if it needs more explanation.

Thanks for your help!


问:
How to looping trough an array of object when array name is not consistent?
Consider below example:

```<code>const obj ={
price:[{multiple items},{multiple items}],
name:"",
id:"",
}
</code>```

i want to apply foreach on price property but the issue is the property name is changing wrt cases like saleprice , taxprice etc.

if i am using obj.keys() method it doesn't work because it returns key as a string.

答:
```<code>const key = Object.keys(obj).find((key) => key.indexOf('price') > -1)
obj[key].forEach(price => console.log(price))
</code>```

Body:
Consider below example:

const obj ={
price:[{multiple items},{multiple items}],
name:"",
id:"",
}

i want to apply foreach on price property but the issue is the property name is changing wrt cases like saleprice , taxprice etc.

if i am using obj.keys() method it doesn't work because it returns key as a string.


问:
Error when install package dplyr in R. Error in install.packages : missing value where TRUE/FALSE needed
I tried to install package dplyr but it always show the error:

```<code>Error in install.packages : missing value where TRUE/FALSE needed
</code>```

Here is the console history:

```<code>> install.packages("dplyr")
also installing the dependency ‘BH’

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.3/BH_1.60.0-2.zip'
Content type 'application/zip' length 15529281 bytes (14.8 MB)
downloaded 14.8 MB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.3/dplyr_0.5.0.zip'
Content type 'application/zip' length 2409178 bytes (2.3 MB)
downloaded 2.3 MB

Error in install.packages : missing value where TRUE/FALSE needed
</code>```

Anyone have any ideas? Thanks in advance

答: Like @minette-van-zyl, this issue disappear when I disabled Avast (don't know why, though).</p>

ContentLicense: CC BY-SA 3.0

Body:
I tried to install package dplyr but it always show the error:

Error in install.packages : missing value where TRUE/FALSE needed

Here is the console history:

> install.packages("dplyr")
also installing the dependency ‘BH’

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.3/BH_1.60.0-2.zip'
Content type 'application/zip' length 15529281 bytes (14.8 MB)
downloaded 14.8 MB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.3/dplyr_0.5.0.zip'
Content type 'application/zip' length 2409178 bytes (2.3 MB)
downloaded 2.3 MB

Error in install.packages : missing value where TRUE/FALSE needed

Anyone have any ideas? Thanks in advance


问:
How do I shorten this CSS which has CSS Pseudo-elements using SCSS?
How do I shorten this CSS which has CSS Pseudo-elements using SCSS?

```<code>.bar-color1 {
  background: #28A745;
  position: absolute;
  top: 0; bottom: 0; left: 0;

  &::after {
    color: #28A745;
    content: url("../../assets/images/arrow.png");;
    display: inline-block !important;
    width: 0;
    height: 0;
    position: absolute;
    right: 6px;
    top: -6px;
  }
}
.bar-color2 {
  background: #28A745;
  position: absolute;
  top: 0; bottom: 0; left: 0;

  &::after {
    content: "" !important;
  }
}
</code>```

As you can see both has these common styles

```<code>  background: #28A745;
  position: absolute;
  top: 0; bottom: 0; left: 0;
</code>```

答:
Use mixins:

```<code>@mixin customStyle {
  background: #28A745;
  position: absolute;
  top: 0; bottom: 0; left: 0;
}
</code>```

Then use it like so:

```<code>.bar-color1 {
  @include customStyle();
}
.bar-color2 {
  @include customStyle();
}
</code>```

More on mixins here.

Body:
How do I shorten this CSS which has CSS Pseudo-elements using SCSS?

.bar-color1 {
  background: #28A745;
  position: absolute;
  top: 0; bottom: 0; left: 0;

  &::after {
    color: #28A745;
    content: url("../../assets/images/arrow.png");;
    display: inline-block !important;
    width: 0;
    height: 0;
    position: absolute;
    right: 6px;
    top: -6px;
  }
}
.bar-color2 {
  background: #28A745;
  position: absolute;
  top: 0; bottom: 0; left: 0;

  &::after {
    content: "" !important;
  }
}

As you can see both has these common styles

  background: #28A745;
  position: absolute;
  top: 0; bottom: 0; left: 0;

Body:
Use mixins:

@mixin customStyle {
  background: #28A745;
  position: absolute;
  top: 0; bottom: 0; left: 0;
}

Then use it like so:

.bar-color1 {
  @include customStyle();
}
.bar-color2 {
  @include customStyle();
}

More on mixins here.


问:
Python uppercase the entire string except letters which are within quotes but after colon
I have string in python like

```<code>INS_hdr:"To:abc.micky.com|From:xyz.micky.com",TRANSFERTARGET:"B_london"
</code>```

need to convert to like this

```<code>INS_HDR:"TO:abc.micky.com|FROM:xyz.micky.com",TRANSFERTARGET:"B_LONDON"
</code>```

I dont want to convert string to uppercase based on colon, as i use multiple colon in string, need to convert uppercase based on colon which appear inside quotes

答:
Given your particular example, you could re.split on : with a non quoted word, then loop over the groups to determine which ones to make upper case based on the leading colon:

```<code>import re

s = 'INS_hdr:"To:abc.micky.com|From:xyz.micky.com",TRANSFERTARGET:"B_london"'

''.join(x.upper() if not x.startswith(':') else x
        for x in re.split('(:[^"|]+)', s))
</code>```

output:

```<code>INS_HDR:"TO:abc.micky.com|FROM:xyz.micky.com",TRANSFERTARGET:"B_LONDON"
</code>```

Body:
I have string in python like

INS_hdr:"To:abc.micky.com|From:xyz.micky.com",TRANSFERTARGET:"B_london"

need to convert to like this

INS_HDR:"TO:abc.micky.com|FROM:xyz.micky.com",TRANSFERTARGET:"B_LONDON"

I dont want to convert string to uppercase based on colon, as i use multiple colon in string, need to convert uppercase based on colon which appear inside quotes

Body:
Given your particular example, you could re.split on : with a non quoted word, then loop over the groups to determine which ones to make upper case based on the leading colon:

import re

s = 'INS_hdr:"To:abc.micky.com|From:xyz.micky.com",TRANSFERTARGET:"B_london"'

''.join(x.upper() if not x.startswith(':') else x
        for x in re.split('(:[^"|]+)', s))

output:

INS_HDR:"TO:abc.micky.com|FROM:xyz.micky.com",TRANSFERTARGET:"B_LONDON"


问:
How do I pass the value of Select from Child to Parent Component?
The user can choose the category in which another select will appear depending on what was selected. I create the 2nd component in another .js. I can already view the data but how can I pass the value of my 2nd component to the parent component?

I wanted to pass the value of the select from the size1,js to the demo.js

Link: https://codesandbox.io/s/category-selection-oiu7d

demo.js

```<code>import * as React from "react";
import Box from "@mui/material/Box";
import InputLabel from "@mui/material/InputLabel";
import MenuItem from "@mui/material/MenuItem";
import FormControl from "@mui/material/FormControl";
import Select from "@mui/material/Select";
import Size1 from "./size1";

export default function BasicSelect() {
  const [age, setAge] = React.useState("");

  const handleChange = (event) => {
    setAge(event.target.value);
  };

  return (
    <Box sx={{ minWidth: 120 }}>
      selected: {age}
      <br /> <br />
      <FormControl fullWidth>
        <InputLabel id="demo-simple-select-label">Category</InputLabel>
        <Select
          labelId="demo-simple-select-label"
          id="demo-simple-select"
          value={age}
          label="Age"
          onChange={handleChange}
        >
          <MenuItem value="S-XL">S-XL</MenuItem>
          <MenuItem value="Size2">Size2</MenuItem>
        </Select>
      </FormControl>
      {age === "S-XL" && (
        <>
          <Size1 />{" "}
        </>
      )}
    </Box>
  );
}
</code>```

size1.js

```<code>import * as React from "react";
import Box from "@mui/material/Box";
import InputLabel from "@mui/material/InputLabel";
import MenuItem from "@mui/material/MenuItem";
import FormControl from "@mui/material/FormControl";
import Select from "@mui/material/Select";

export const Size1 = ["XS", "S", "M", "L", "XL"];

export default function BasicSelect() {
  const [size1, setSize1] = React.useState("");

  const handleChange = (event) => {
    setSize1(event.target.value);
  };

  return (
    <Box sx={{ minWidth: 120 }}>
      chosen size: {size1}
      <br /> <br />
      <FormControl fullWidth>
        <InputLabel id="demo-simple-select-label">Choose Size</InputLabel>
        <Select
          labelId="demo-simple-select-label"
          id="demo-simple-select"
          value={size1}
          label="size1"
          onChange={handleChange}
        >
          <MenuItem value="XS">XS</MenuItem>
          <MenuItem value="S">S</MenuItem>
          <MenuItem value="M">M</MenuItem>
          <MenuItem value="L">L</MenuItem>
          <MenuItem value="XL">XL</MenuItem>
        </Select>
      </FormControl>
    </Box>
  );
}
</code>```

答:
Just add a listener in the parent component on the child and handle changes emitted from the child

parent.js

```<code>import * as React from "react";
import Box from "@mui/material/Box";
import InputLabel from "@mui/material/InputLabel";
import MenuItem from "@mui/material/MenuItem";
import FormControl from "@mui/material/FormControl";
import Select from "@mui/material/Select";
import Size1 from "./size1";

export default function BasicSelect() {
  const [age, setAge] = React.useState("");

  const handleChange = (event) => {
    setAge(event.target.value);
  };

function handleSelectionUpdate(data){
//Whatever you want to do with the data passed
}
  return (
    <Box sx={{ minWidth: 120 }}>
      selected: {age}
      <br /> <br />
      <FormControl fullWidth>
        <InputLabel id="demo-simple-select-label">Category</InputLabel>
        <Select
          labelId="demo-simple-select-label"
          id="demo-simple-select"
          value={age}
          label="Age"
          onChange={handleChange}
        >
          <MenuItem value="S-XL">S-XL</MenuItem>
          <MenuItem value="Size2">Size2</MenuItem>
        </Select>
      </FormControl>
      {age === "S-XL" && (
        <>
          <Size1 onSelectionUpdate={handleSelectionUpdate} />{" "} //Change here
        </>
      )}
    </Box>
  );
}
</code>```

child.js

```<code>import * as React from "react";
import Box from "@mui/material/Box";
import InputLabel from "@mui/material/InputLabel";
import MenuItem from "@mui/material/MenuItem";
import FormControl from "@mui/material/FormControl";
import Select from "@mui/material/Select";

export const Size1 = ["XS", "S", "M", "L", "XL"];

export default function BasicSelect(props) {
  const [size1, setSize1] = React.useState("");

  const handleChange = (event) => {
    setSize1(event.target.value);
    props.onSelectionUpdate(event.target.value)  //emit an event here
  };

  return (
    <Box sx={{ minWidth: 120 }} {...props}>
      chosen size: {size1}
      <br /> <br />
      <FormControl fullWidth>
        <InputLabel id="demo-simple-select-label">Choose Size</InputLabel>
        <Select
          labelId="demo-simple-select-label"
          id="demo-simple-select"
          value={size1}
          label="size1"
          onChange={handleChange}
        >
          <MenuItem value="XS">XS</MenuItem>
          <MenuItem value="S">S</MenuItem>
          <MenuItem value="M">M</MenuItem>
          <MenuItem value="L">L</MenuItem>
          <MenuItem value="XL">XL</MenuItem>
        </Select>
      </FormControl>
    </Box>
  );
}
</code>```

Body:
The user can choose the category in which another select will appear depending on what was selected. I create the 2nd component in another .js. I can already view the data but how can I pass the value of my 2nd component to the parent component?

I wanted to pass the value of the select from the size1,js to the demo.js

Link: https://codesandbox.io/s/category-selection-oiu7d

demo.js

import * as React from "react";
import Box from "@mui/material/Box";
import InputLabel from "@mui/material/InputLabel";
import MenuItem from "@mui/material/MenuItem";
import FormControl from "@mui/material/FormControl";
import Select from "@mui/material/Select";
import Size1 from "./size1";

export default function BasicSelect() {
  const [age, setAge] = React.useState("");

  const handleChange = (event) => {
    setAge(event.target.value);
  };

  return (
    <Box sx={{ minWidth: 120 }}>
      selected: {age}

      <FormControl fullWidth>
        <InputLabel id="demo-simple-select-label">Category</InputLabel>
        <Select
          labelId="demo-simple-select-label"
          id="demo-simple-select"
          value={age}
          label="Age"
          onChange={handleChange}
        >
          <MenuItem value="S-XL">S-XL</MenuItem>
          <MenuItem value="Size2">Size2</MenuItem>
        </Select>
      </FormControl>
      {age === "S-XL" && (
        <>
          <Size1 />{" "}
        </>
      )}
    </Box>
  );
}

size1.js

import * as React from "react";
import Box from "@mui/material/Box";
import InputLabel from "@mui/material/InputLabel";
import MenuItem from "@mui/material/MenuItem";
import FormControl from "@mui/material/FormControl";
import Select from "@mui/material/Select";

export const Size1 = ["XS", "S", "M", "L", "XL"];

export default function BasicSelect() {
  const [size1, setSize1] = React.useState("");

  const handleChange = (event) => {
    setSize1(event.target.value);
  };

  return (
    <Box sx={{ minWidth: 120 }}>
      chosen size: {size1}

      <FormControl fullWidth>
        <InputLabel id="demo-simple-select-label">Choose Size</InputLabel>
        <Select
          labelId="demo-simple-select-label"
          id="demo-simple-select"
          value={size1}
          label="size1"
          onChange={handleChange}
        >
          <MenuItem value="XS">XS</MenuItem>
          <MenuItem value="S">S</MenuItem>
          <MenuItem value="M">M</MenuItem>
          <MenuItem value="L">L</MenuItem>
          <MenuItem value="XL">XL</MenuItem>
        </Select>
      </FormControl>
    </Box>
  );
}

Body:
Just add a listener in the parent component on the child and handle changes emitted from the child

parent.js

import * as React from "react";
import Box from "@mui/material/Box";
import InputLabel from "@mui/material/InputLabel";
import MenuItem from "@mui/material/MenuItem";
import FormControl from "@mui/material/FormControl";
import Select from "@mui/material/Select";
import Size1 from "./size1";

export default function BasicSelect() {
  const [age, setAge] = React.useState("");

  const handleChange = (event) => {
    setAge(event.target.value);
  };

function handleSelectionUpdate(data){
//Whatever you want to do with the data passed
}
  return (
    <Box sx={{ minWidth: 120 }}>
      selected: {age}
      <br /> <br />
      <FormControl fullWidth>
        <InputLabel id="demo-simple-select-label">Category</InputLabel>
        <Select
          labelId="demo-simple-select-label"
          id="demo-simple-select"
          value={age}
          label="Age"
          onChange={handleChange}
        >
          <MenuItem value="S-XL">S-XL</MenuItem>
          <MenuItem value="Size2">Size2</MenuItem>
        </Select>
      </FormControl>
      {age === "S-XL" && (
        <>
          <Size1 onSelectionUpdate={handleSelectionUpdate} />{" "} //Change here
        </>
      )}
    </Box>
  );
}

child.js

import * as React from "react";
import Box from "@mui/material/Box";
import InputLabel from "@mui/material/InputLabel";
import MenuItem from "@mui/material/MenuItem";
import FormControl from "@mui/material/FormControl";
import Select from "@mui/material/Select";

export const Size1 = ["XS", "S", "M", "L", "XL"];

export default function BasicSelect(props) {
  const [size1, setSize1] = React.useState("");

  const handleChange = (event) => {
    setSize1(event.target.value);
    props.onSelectionUpdate(event.target.value)  //emit an event here
  };

  return (
    <Box sx={{ minWidth: 120 }} {...props}>
      chosen size: {size1}
      <br /> <br />
      <FormControl fullWidth>
        <InputLabel id="demo-simple-select-label">Choose Size</InputLabel>
        <Select
          labelId="demo-simple-select-label"
          id="demo-simple-select"
          value={size1}
          label="size1"
          onChange={handleChange}
        >
          <MenuItem value="XS">XS</MenuItem>
          <MenuItem value="S">S</MenuItem>
          <MenuItem value="M">M</MenuItem>
          <MenuItem value="L">L</MenuItem>
          <MenuItem value="XL">XL</MenuItem>
        </Select>
      </FormControl>
    </Box>
  );
}


问:
How to preserve Expand/Collapse Setting in Visual Studio 2015
This is how I collapse the desired sections of designer code (aspx).

But once I close and re-open the project then everything gets expanded in outline view like this.

How to preserve my collapsed sections setting?

答:
Enclose these codes using #region and #endregion:

```<code>#region
<head> ...
...
#endregion
</code>```

And tick the Collapse #region when collapsing to definitions

Body:
Enclose these codes using #region and #endregion:

#region
<head> ...
...
#endregion

And tick the Collapse #region when collapsing to definitions


问:
terraform convert list to string dynamically
I need to extract strings from tuple/list generated by for_each.

How to pass "account1" then "account2" in member with each role ?

```<code>variable "binding" {
    type = map
    default = {
        "roles/viewer" = [
            "account1",
            "account2",
        ],
        "roles/logging.viewer" = [
            "account1",
            "account2",
        ],
    }
}

resource "google_project_iam_member" "test-sa-binding" {
  project = var.PROJECT_ID

  for_each = var.binding
  role    = each.key
  member  = ???
}
</code>```

Thanks,

答:
You have to flatten your variable first:

```<code>locals {
  flat_binding = merge([
      for role, accounts in var.binding:
         {
           for idx, account in accounts:
             "${role}-${idx}" => {
               account = account
               role = role
             }
         }
    ]...) # pls, do NOT remove the dots
}
</code>```

then

```<code>resource "google_project_iam_member" "test-sa-binding" {
  project = var.PROJECT_ID

  for_each = local.flat_binding
  role    = each.value["role"]
  member  = each.value["account"]
}
</code>```

Body:
I need to extract strings from tuple/list generated by for_each.

How to pass "account1" then "account2" in member with each role ?

variable "binding" {
    type = map
    default = {
        "roles/viewer" = [
            "account1",
            "account2",
        ],
        "roles/logging.viewer" = [
            "account1",
            "account2",
        ],
    }
}

resource "google_project_iam_member" "test-sa-binding" {
  project = var.PROJECT_ID

  for_each = var.binding
  role    = each.key
  member  = ???
}

Thanks,

Body:
You have to flatten your variable first:

locals {
  flat_binding = merge([
      for role, accounts in var.binding:
         {
           for idx, account in accounts:
             "${role}-${idx}" => {
               account = account
               role = role
             }
         }
    ]...) # pls, do NOT remove the dots
}

then

resource "google_project_iam_member" "test-sa-binding" {
  project = var.PROJECT_ID

  for_each = local.flat_binding
  role    = each.value["role"]
  member  = each.value["account"]
}


问:
Adding whitespace to Matplotlib heatmap using imshow
I'm using Matplotlib's imshow to plot data as a function of two variables, one of which is time. There were significant interruptions in data collection in many cases, and I want to note that on the graph using whitespace (or something similar) separating data that has a lapse in between them. I'm having difficulty putting this into practice, however. I inserted a dummy line of data consisting of NaN values, which plot as white on a color map. The issue is in the visual appearance. I'm using the catrom interpolation to create the heatmap, which causes a wider whitespace than I'd prefer. Using another interpolation scheme doesn't produce plots I'm happy with.

I can't provide a MWE because my data is sufficiently large that I can't supply it, and I don't have the time to create a dummy data set that would show this well enough. However, I can provide the code I use to create the plots themselves and their output. Here is the code to produce something similar to what I'd like to see:

```<code># Plot the time and phase difference as a color map showing variation over both domains.
img = ax2D.imshow(variance_array, extent=[-0.5, 0.5, float(period_numbers[-1]), 0.0], aspect="auto",
                  interpolation="nearest")
plt.colorbar(img, ax=ax2D, label="Variance", spacing="proportional")
ax2D.minorticks_on()
ax2D.invert_yaxis()
</code>```

This results in:

However, it's so pixelated! That's not the quality of something I'd like to publish in a paper, to say nothing of my dissertation. The code I have been using to produce these images previously is:

```<code># Plot the time and phase difference as a color map showing variation over both domains.
img = ax2D.imshow(variance_array, extent=[-0.5, 0.5, float(period_numbers[-1]), 0.0], aspect="auto",
                  interpolation="catrom")
plt.colorbar(img, ax=ax2D, label="Variance", spacing="proportional")
ax2D.minorticks_on()
ax2D.invert_yaxis()
</code>```

This results in:

It's much smoother, but look at how wide the whitespace is! It makes it harder to tell any trends that occurred over the lapsed data, and it actually removes some useful data.

What's the best way to indicate this sort of break in the data? Am I going about it the best way, or is there something better I haven't considered? If this is the best method, how do I fix how wide the whitespace is?

答:
For matplotlib >= 3.5.0

If you have matplotlib 3.5.0 or higher, you can use the imshow parameter interpolation_stage and set it to "rgba" instead of "data" in order to achieve what you want.

import matplotlib
import matplotlib.pyplot as plt

# Plot the time and phase difference as a color map showing variation over both domains.
fig, (ax2D, ax2D2) = plt.subplots(figsize=plt.figaspect(1.5), ncols=2)
variance_array = np.random.rand(180, 20)

## Mask broken timepoints
# (generate random broken_timepoints)
broken_timepoints = [40, 50, 51, 100, *list(range(160, 163))]
mask = np.full_like(variance_array, 0)
mask[broken_timepoints, :] = 1

variance_array_masked = np.ma.masked_where(mask == 1, variance_array)

img = ax2D.imshow(
    variance_array_masked,
    extent=[-0.5, 0.5, 200, 0.0],
    aspect="auto",
    interpolation="catrom",
    interpolation_stage="data",
)

img2 = ax2D2.imshow(
    variance_array_masked,
    extent=[-0.5, 0.5, 200, 0.0],
    aspect="auto",
    interpolation="catrom",
    interpolation_stage="rgba",
)

ax2D.minorticks_on()
ax2D.axis("off")
ax2D.invert_yaxis()
ax2D2.minorticks_on()
ax2D2.invert_yaxis()
ax2D2.axis("off")
fig.suptitle("DATA vs RGBA")

```
<p><img src="https://i.stack.imgur.com/BzaMn.png" alt="new matplotlib" /></p>
<h1>For matplotlib < 3.5.0</h1>
<p>One hack that you could try is to apply a fake mask over your data after the interpolation by using 1. a second call to imshow and 2. a colormap of only white values.</p>
<p>Here's an example:</p>
<pre class="lang-py prettyprint-override"><code>import matplotlib
import matplotlib.pyplot as plt

# Plot the time and phase difference as a color map showing variation over both domains.
fig, ax2D = plt.subplots(figsize=plt.figaspect(1.3))
variance_array = np.random.rand(180, 20)

img = ax2D.imshow(variance_array, extent=[-0.5, 0.5, 200, 0.0], aspect="auto",
                  interpolation="catrom", alpha=1)

## Mask broken timepoints
# (generate random broken_timepoints)
broken_timepoints = [40, 50, 51, 100, *list(range(160, 163))]
mask = np.full_like(variance_array, np.nan)
mask[broken_timepoints, :] = 0

# (apply white mask)
white_only_cmap = matplotlib.colors.ListedColormap(["white"])
_ = ax2D.imshow(mask, extent=[-0.5, 0.5, 200, 0.0], aspect="auto",
                interpolation="nearest", alpha=1, cmap=white_only_cmap)

plt.colorbar(img, ax=ax2D, label="Variance", spacing="proportional")
ax2D.minorticks_on()
ax2D.invert_yaxis()
</code>```

Body:
I'm using Matplotlib's imshow to plot data as a function of two variables, one of which is time. There were significant interruptions in data collection in many cases, and I want to note that on the graph using whitespace (or something similar) separating data that has a lapse in between them. I'm having difficulty putting this into practice, however. I inserted a dummy line of data consisting of NaN values, which plot as white on a color map. The issue is in the visual appearance. I'm using the catrom interpolation to create the heatmap, which causes a wider whitespace than I'd prefer. Using another interpolation scheme doesn't produce plots I'm happy with.

I can't provide a MWE because my data is sufficiently large that I can't supply it, and I don't have the time to create a dummy data set that would show this well enough. However, I can provide the code I use to create the plots themselves and their output. Here is the code to produce something similar to what I'd like to see:

# Plot the time and phase difference as a color map showing variation over both domains.
img = ax2D.imshow(variance_array, extent=[-0.5, 0.5, float(period_numbers[-1]), 0.0], aspect="auto",
                  interpolation="nearest")
plt.colorbar(img, ax=ax2D, label="Variance", spacing="proportional")
ax2D.minorticks_on()
ax2D.invert_yaxis()

This results in:

However, it's so pixelated! That's not the quality of something I'd like to publish in a paper, to say nothing of my dissertation. The code I have been using to produce these images previously is:

# Plot the time and phase difference as a color map showing variation over both domains.
img = ax2D.imshow(variance_array, extent=[-0.5, 0.5, float(period_numbers[-1]), 0.0], aspect="auto",
                  interpolation="catrom")
plt.colorbar(img, ax=ax2D, label="Variance", spacing="proportional")
ax2D.minorticks_on()
ax2D.invert_yaxis()

This results in:

It's much smoother, but look at how wide the whitespace is! It makes it harder to tell any trends that occurred over the lapsed data, and it actually removes some useful data.

What's the best way to indicate this sort of break in the data? Am I going about it the best way, or is there something better I haven't considered? If this is the best method, how do I fix how wide the whitespace is?

Body:
For matplotlib >= 3.5.0

If you have matplotlib 3.5.0 or higher, you can use the imshow parameter interpolation_stage and set it to "rgba" instead of "data" in order to achieve what you want.

import matplotlib
import matplotlib.pyplot as plt

# Plot the time and phase difference as a color map showing variation over both domains.
fig, (ax2D, ax2D2) = plt.subplots(figsize=plt.figaspect(1.5), ncols=2)
variance_array = np.random.rand(180, 20)

## Mask broken timepoints
# (generate random broken_timepoints)
broken_timepoints = [40, 50, 51, 100, *list(range(160, 163))]
mask = np.full_like(variance_array, 0)
mask[broken_timepoints, :] = 1

variance_array_masked = np.ma.masked_where(mask == 1, variance_array)

img = ax2D.imshow(
    variance_array_masked,
    extent=[-0.5, 0.5, 200, 0.0],
    aspect="auto",
    interpolation="catrom",
    interpolation_stage="data",
)

img2 = ax2D2.imshow(
    variance_array_masked,
    extent=[-0.5, 0.5, 200, 0.0],
    aspect="auto",
    interpolation="catrom",
    interpolation_stage="rgba",
)

ax2D.minorticks_on()
ax2D.axis("off")
ax2D.invert_yaxis()
ax2D2.minorticks_on()
ax2D2.invert_yaxis()
ax2D2.axis("off")
fig.suptitle("DATA vs RGBA")

For matplotlib < 3.5.0

One hack that you could try is to apply a fake mask over your data after the interpolation by using 1. a second call to imshow and 2. a colormap of only white values.

Here's an example:

import matplotlib
import matplotlib.pyplot as plt

# Plot the time and phase difference as a color map showing variation over both domains.
fig, ax2D = plt.subplots(figsize=plt.figaspect(1.3))
variance_array = np.random.rand(180, 20)

img = ax2D.imshow(variance_array, extent=[-0.5, 0.5, 200, 0.0], aspect="auto",
                  interpolation="catrom", alpha=1)

## Mask broken timepoints
# (generate random broken_timepoints)
broken_timepoints = [40, 50, 51, 100, *list(range(160, 163))]
mask = np.full_like(variance_array, np.nan)
mask[broken_timepoints, :] = 0

# (apply white mask)
white_only_cmap = matplotlib.colors.ListedColormap(["white"])
_ = ax2D.imshow(mask, extent=[-0.5, 0.5, 200, 0.0], aspect="auto",
                interpolation="nearest", alpha=1, cmap=white_only_cmap)

plt.colorbar(img, ax=ax2D, label="Variance", spacing="proportional")
ax2D.minorticks_on()
ax2D.invert_yaxis()


答:
I think it's better to have a parent class like bar like bellow:

```<code>.bar {
  background: #28A745;
  position: absolute;
  top: 0; bottom: 0; left: 0;

  &-color1::after {
    color: #28A745;
    content: url("../../assets/images/arrow.png");;
    display: inline-block !important;
    width: 0;
    height: 0;
    position: absolute;
    right: 6px;
    top: -6px;
  }

  &-color2::after {
    content: "" !important;
  }
}
</code>```

Title: How do I shorten this CSS which has CSS Pseudo-elements using SCSS?

Body:
I think it's better to have a parent class like bar like bellow:

.bar {
  background: #28A745;
  position: absolute;
  top: 0; bottom: 0; left: 0;

  &-color1::after {
    color: #28A745;
    content: url("../../assets/images/arrow.png");;
    display: inline-block !important;
    width: 0;
    height: 0;
    position: absolute;
    right: 6px;
    top: -6px;
  }

  &-color2::after {
    content: "" !important;
  }
}


问:
How to draw a bmp/icon on a TListView subitem in Delphi?
I would like to draw an icon/bmp into a subitem of a TListView using delphi. But I don't know how to accomplish that. It works fine for the first item on the list, but having problems with the subitems.</p>

答: Use a TImageList component to hold your images, assign it to the listviews's SmallImages property and set subitem's ImageIndex.</p>

OwnerDisplayName: tecnotalk

ContentLicense: CC BY-SA 2.5

OwnerDisplayName: TOndrej


问:
Flutter Layout/Sizing/Render Issue
I'm trying to dynamically render a list of DailyWeatherForecast, a Flutter StatelessWidget. The DailyWeatherForecast widget has some variables such as final String month and final double low, which intend to act as a single summarized forecast for a day as a narrow card. It has a constructor, and it works if I pass in hard-coded values to it from my main.dart. It looks and works great.

Information is pulled from an API though. So, I can't have this information hard-coded. See the code below for my approach:

```<code>import 'package:flutter/material.dart';
import 'package:todo/classes/daily_weather_forecast.dart';
import 'package:http/http.dart' as http;
import 'dart:convert';
import 'package:intl/intl.dart';

// `flutter run --no-sound-null-safety`

void main() {
  runApp(const MyApp());
}

class MyApp extends StatefulWidget {
  const MyApp({Key? key}) : super(key: key);

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  var lat = "35";
  var lon = "139";
  var exclude = "minutely,hourly";
  var appid = "<HIDDEN>";
  var url = "https://api.openweathermap.org/data/2.5/onecall";
  Map? weatherData;
  //List<Map>? dailyWeather;
  Iterable<int>? dailyWeather;
  var now = DateTime.now();
  List months = [
    'Jan',
    'Feb',
    'Mar',
    'Apr',
    'May',
    'Jun',
    'Jul',
    'Aug',
    'Sep',
    'Oct',
    'Nov',
    'Dec'
  ];

  void callApis() {
    debugPrint('test???');

    var endpoint = url +
        "?lat=" +
        lat +
        "&lon=" +
        lon +
        "&exclude=" +
        exclude +
        "&appid=" +
        appid;

    debugPrint(endpoint);

    http.get(endpoint, headers: {"Accept": "application/json"}).then((result) {
      setState(() {
        debugPrint(result.headers.toString());
        weatherData = json.decode(result.body);
        if (weatherData != null) {
          //dailyWeather = weatherData!['daily'];
          dailyWeather =
              Iterable<int>.generate(weatherData!['daily'].length).toList();
        }
      });
    });
  }

  @override
  void initState() {
    debugPrint('test???');
    //fetchWeatherData();
    callApis();
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      home: Scaffold(
        appBar: AppBar(
          backgroundColor: Colors.white,
          actions: const <Widget>[
            Icon(
              Icons.cloud_circle,
              size: 36,
              //color: Colors.black54,
              color: Color.fromRGBO(7, 101, 162, 1),
            ),
            //spacing to the right
            SizedBox(width: 12)
          ],
          title: Text(
              weatherData != null
                  ? weatherData!["timezone"]
                      .toString() //weatherData![0]['name'].toString()
                  : "Weather App",
              style: const TextStyle(color: Color.fromRGBO(7, 101, 162, 1))),
        ),
        /* NOTE: ListView is RecycleView equivalent in Flutter */
        body: ListView(
          scrollDirection: Axis.vertical,
          children: <Widget>[
            FractionallySizedBox(
              widthFactor: 0.8,
              child: Column(
                children: dailyWeather?.map(
                      (index) {
                        int i = index.round();
                        Map dayData = weatherData?["daily"][i];
                        debugPrint("DAY DATA: " + dayData.toString());
                        if (dayData["temp"] == null) {
                          return const Text("nil");
                        }
                        if (dayData["weather"] == null ||
                            dayData["weather"] == []) {
                          return const Text("nil");
                        }

                        return Row(
                          children: [
                            // spacer
                            Container(
                              height: 24,
                            ),
                            DailyWeatherForecast(
                                month: months[now.month - 1].toString(),
                                day: (now.day + i).round(),
                                high: dayData["temp"]["max"],
                                low: dayData["temp"]["min"],
                                probability: dayData["rain"],
                                excerpt: dayData["weather"][0]["main"],
                                description: dayData["weather"][0]
                                    ["description"]),
                            // spacer
                            Container(
                              height: 64,
                            )
                          ],
                        );
                      },
                    ).toList() ??
                    [
                      Image.network(
                          "https://upload.wikimedia.org/wikipedia/commons/b/b9/Youtube_loading_symbol_1_(wobbly).gif")
                    ],
              ),
            ),
          ],
        ),
      ),
    );
  }
}
</code>```

Below you can see the daily_weather_forecast.dart file, and the errors (in that order):

```<code>import 'package:flutter/material.dart';

class DailyWeatherForecast extends StatelessWidget {
  /* Numeric day of the month */
  final String month;
  final int day;
  final double high;
  final double low;
  final double probability;
  /* Shorter description; "Sunny and Warm" */
  final String excerpt;
  /* Longer description; "Cloudless and generally warm, with a high of 75F and a low of 57F. Some high clouds late in the day." */
  final String description;

  /* constructors */
  const DailyWeatherForecast(
      {Key? key,
      required this.month,
      required this.day,
      required this.high,
      required this.low,
      required this.probability,
      required this.excerpt,
      required this.description})
      : super(key: key);

  @override
  Widget build(BuildContext context) {
    return TextButton(
        onPressed: () {
          final snackBar = SnackBar(content: Text(description));
          ScaffoldMessenger.of(context).showSnackBar(snackBar);
        },
        child: Container(
            decoration: const BoxDecoration(
                color: Color.fromRGBO(7, 101, 162, 1),
                borderRadius: BorderRadius.all(Radius.circular(8))),
            child: Row(
              children: <Widget>[
                const SizedBox(width: 20, height: 64),
                Column(
                  children: [
                    Text(month,
                        style:
                            const TextStyle(color: Colors.white, fontSize: 12)),
                    Text(day.toString(),
                        style:
                            const TextStyle(color: Colors.white, fontSize: 18))
                  ],
                ),
                const SizedBox(width: 20),
                Text(low.toString() + "F",
                    style: const TextStyle(color: Colors.white, fontSize: 20)),
                const Spacer(),
                Column(
                  children: [
                    Text(excerpt,
                        style: const TextStyle(
                            color: Colors.white, fontWeight: FontWeight.w600)),
                    Text(probability.toString() + "%  precipation",
                        style: const TextStyle(color: Colors.white70)),
                  ],
                ),
                const Spacer(),
                Text(high.toString() + "F",
                    style: const TextStyle(color: Colors.white, fontSize: 20)),
                const SizedBox(width: 20),
              ],
            )));
  }
}
</code>```

Here's the FULL terminal output (removing the DAY DATA logs, to stay under character limits):

```<code>√  Built build\app\outputs\flutter-apk\app-debug.apk.
I/flutter (13021): test???
I/flutter (13021): test???
I/flutter (13021): ENDPOINT: https://api.openweathermap.org/data/2.5/onecall?lat=44.5630283&lon=-123.3185558&exclude=minutely,hourly&units=imperial&appid=1402ba071d730e537b18335ee1dcbdb2
Syncing files to device Android SDK built for x86...
   149ms

Flutter run key commands.
r Hot reload.
R Hot restart.
h List all available interactive commands.
d Detach (terminate "flutter run" but leave application running).
c Clear the screen
q Quit (terminate the application on the device).

Running with unsound null safety
For more information see
https://dart.dev/null-safety/unsound-null-safety

An Observatory debugger and profiler on Android SDK built for x86 isavailable at: http://127.0.0.1:57917/zOC4HZuw9FM=/

══╡ EXCEPTION CAUGHT BY RENDERING LIBRARY
╞═════════════════════════════════════════════════════════
The following assertion was thrown during performLayout():
RenderFlex children have non-zero flex but incoming height
constraints are unbounded.
When a column is in a parent that does not provide a finite height
constraint, for example if it is
in a vertical scrollable, it will try to shrink-wrap its children
along the vertical axis. Setting a
flex on a child (e.g. using Expanded) indicates that the child is toexpand to fill the remaining
space in the vertical direction.
These two directives are mutually exclusive. If a parent is to
shrink-wrap its child, the child
cannot simultaneously expand to fit its parent.
Consider setting mainAxisSize to MainAxisSize.min and using
FlexFit.loose fits for the flexible
children (using Flexible rather than Expanded). This will allow the
flexible children to size
themselves to less than the infinite remaining space they would
otherwise be forced to take, and
then will cause the RenderFlex to shrink-wrap the children rather
than expanding to fit the maximum
constraints provided by the parent.
If this message did not help you determine the problem, consider
using debugDumpRenderTree():
  https://flutter.dev/debugging/#rendering-layer
  http://api.flutter.dev/flutter/rendering/debugDumpRenderTree.html
The affected RenderFlex is:
  RenderFlex#7ff70 relayoutBoundary=up7 NEEDS-LAYOUT NEEDS-PAINT
  NEEDS-COMPOSITING-BITS-UPDATE(creator: Column ← Column ←
  FractionallySizedBox ← RepaintBoundary ← IndexedSemantics ←
  NotificationListener<KeepAliveNotification> ← KeepAlive ←
  AutomaticKeepAlive ← KeyedSubtree ← SliverList ← MediaQuery ←
  SliverPadding ← ⋯, parentData: offset=Offset(0.0, 0.0); flex=null;  fit=null (can use size), constraints:
  BoxConstraints(0.0<=w<=314.2, 0.0<=h<=Infinity), size: MISSING,
  direction: vertical, mainAxisAlignment: start, mainAxisSize: max,
  crossAxisAlignment: center, verticalDirection: down)
The creator information is set to:
  Column ← Column ← FractionallySizedBox ← RepaintBoundary ←
  IndexedSemantics ←
  NotificationListener<KeepAliveNotification> ← KeepAlive ←
  AutomaticKeepAlive ← KeyedSubtree ←
  SliverList ← MediaQuery ← SliverPadding ← ⋯
See also: https://flutter.dev/layout/
If none of the above helps enough to fix this problem, please don't
hesitate to file a bug:
  https://github.com/flutter/flutter/issues/new?template=2_bug.md

The relevant error-causing widget was:
  Column
  Column:file:///C:/Users/Lucas%20Pichette/Desktop/School/W22/CS492_  Mobile_Software_Dev/assignment2-api/todo/lib/main.dart:162:29

When the exception was thrown, this was the stack:
#0      RenderFlex.performLayout.<anonymous closure>
(package:flutter/src/rendering/flex.dart:926:9)
#1      RenderFlex.performLayout
(package:flutter/src/rendering/flex.dart:929:6)
#2      RenderObject.layout
(package:flutter/src/rendering/object.dart:1852:7)
#3      ChildLayoutHelper.layoutChild
(package:flutter/src/rendering/layout_helper.dart:56:11)
#4      RenderFlex._computeSizes
(package:flutter/src/rendering/flex.dart:829:43)
#5      RenderFlex.performLayout
(package:flutter/src/rendering/flex.dart:931:32)
#6      RenderObject.layout
(package:flutter/src/rendering/object.dart:1852:7)
#7      RenderFractionallySizedOverflowBox.performLayout
(package:flutter/src/rendering/shifted_box.dart:1165:14)
#8      RenderObject.layout
(package:flutter/src/rendering/object.dart:1852:7)
#9      RenderProxyBoxMixin.performLayout
(package:flutter/src/rendering/proxy_box.dart:116:14)
#10     RenderObject.layout
(package:flutter/src/rendering/object.dart:1852:7)
#11     RenderProxyBoxMixin.performLayout
(package:flutter/src/rendering/proxy_box.dart:116:14)
#12     RenderObject.layout
(package:flutter/src/rendering/object.dart:1852:7)
#13     RenderSliverList.performLayout
(package:flutter/src/rendering/sliver_list.dart:213:28)
#14     RenderObject.layout
(package:flutter/src/rendering/object.dart:1852:7)
#15     RenderSliverEdgeInsetsPadding.performLayout
(package:flutter/src/rendering/sliver_padding.dart:137:12)
#16     RenderSliverPadding.performLayout
(package:flutter/src/rendering/sliver_padding.dart:371:11)
#17     RenderObject.layout
(package:flutter/src/rendering/object.dart:1852:7)
#18     RenderViewportBase.layoutChildSequence
(package:flutter/src/rendering/viewport.dart:510:13)
#19     RenderViewport._attemptLayout
(package:flutter/src/rendering/viewport.dart:1580:12)
#20     RenderViewport.performLayout
(package:flutter/src/rendering/viewport.dart:1489:20)
#21     RenderObject.layout
(package:flutter/src/rendering/object.dart:1852:7)
#22     RenderProxyBoxMixin.performLayout
(package:flutter/src/rendering/proxy_box.dart:116:14)
#23     RenderObject.layout
(package:flutter/src/rendering/object.dart:1852:7)
#24     RenderProxyBoxMixin.performLayout
(package:flutter/src/rendering/proxy_box.dart:116:14)
#25     RenderObject.layout
(package:flutter/src/rendering/object.dart:1852:7)
#26     RenderProxyBoxMixin.performLayout
(package:flutter/src/rendering/proxy_box.dart:116:14)
#27     RenderObject.layout
(package:flutter/src/rendering/object.dart:1852:7)
#28     RenderProxyBoxMixin.performLayout
(package:flutter/src/rendering/proxy_box.dart:116:14)
#29     RenderObject.layout
(package:flutter/src/rendering/object.dart:1852:7)
#30     RenderProxyBoxMixin.performLayout
(package:flutter/src/rendering/proxy_box.dart:116:14)
#31     RenderObject.layout
(package:flutter/src/rendering/object.dart:1852:7)
#32     RenderProxyBoxMixin.performLayout
(package:flutter/src/rendering/proxy_box.dart:116:14)
#33     RenderObject.layout
(package:flutter/src/rendering/object.dart:1852:7)
#34     RenderProxyBoxMixin.performLayout
(package:flutter/src/rendering/proxy_box.dart:116:14)
#35     RenderObject.layout
(package:flutter/src/rendering/object.dart:1852:7)
#36     RenderProxyBoxMixin.performLayout
(package:flutter/src/rendering/proxy_box.dart:116:14)
#37     RenderCustomPaint.performLayout
(package:flutter/src/rendering/custom_paint.dart:545:11)
#38     RenderObject.layout
(package:flutter/src/rendering/object.dart:1852:7)
#39     RenderProxyBoxMixin.performLayout
(package:flutter/src/rendering/proxy_box.dart:116:14)
#40     RenderObject.layout
(package:flutter/src/rendering/object.dart:1852:7)
#41     MultiChildLayoutDelegate.layoutChild
(package:flutter/src/rendering/custom_layout.dart:171:12)
#42     _ScaffoldLayout.performLayout
(package:flutter/src/material/scaffold.dart:1005:7)
#43     MultiChildLayoutDelegate._callPerformLayout
(package:flutter/src/rendering/custom_layout.dart:240:7)
#44     RenderCustomMultiChildLayoutBox.performLayout
(package:flutter/src/rendering/custom_layout.dart:403:14)
#45     RenderObject.layout
(package:flutter/src/rendering/object.dart:1852:7)
#46     RenderProxyBoxMixin.performLayout
(package:flutter/src/rendering/proxy_box.dart:116:14)
#47     RenderObject.layout
(package:flutter/src/rendering/object.dart:1852:7)
#48     RenderProxyBoxMixin.performLayout
(package:flutter/src/rendering/proxy_box.dart:116:14)
#49     _RenderCustomClip.performLayout
(package:flutter/src/rendering/proxy_box.dart:1376:11)
#50     RenderObject.layout
(package:flutter/src/rendering/object.dart:1852:7)
#51     RenderProxyBoxMixin.performLayout
(package:flutter/src/rendering/proxy_box.dart:116:14)
#52     RenderObject.layout
(package:flutter/src/rendering/object.dart:1852:7)
#53     RenderProxyBoxMixin.performLayout
(package:flutter/src/rendering/proxy_box.dart:116:14)
#54     RenderObject.layout
(package:flutter/src/rendering/object.dart:1852:7)
#55     RenderProxyBoxMixin.performLayout
(package:flutter/src/rendering/proxy_box.dart:116:14)
#56     RenderObject.layout
(package:flutter/src/rendering/object.dart:1852:7)
#57     RenderProxyBoxMixin.performLayout
(package:flutter/src/rendering/proxy_box.dart:116:14)
#58     RenderObject.layout
(package:flutter/src/rendering/object.dart:1852:7)
#59     RenderProxyBoxMixin.performLayout
(package:flutter/src/rendering/proxy_box.dart:116:14)
#60     RenderObject.layout
(package:flutter/src/rendering/object.dart:1852:7)
#61     RenderProxyBoxMixin.performLayout
(package:flutter/src/rendering/proxy_box.dart:116:14)
#62     RenderObject.layout
(package:flutter/src/rendering/object.dart:1852:7)
#63     RenderProxyBoxMixin.performLayout
(package:flutter/src/rendering/proxy_box.dart:116:14)
#64     RenderObject.layout
(package:flutter/src/rendering/object.dart:1852:7)
#65     RenderProxyBoxMixin.performLayout
(package:flutter/src/rendering/proxy_box.dart:116:14)
#66     RenderObject.layout
(package:flutter/src/rendering/object.dart:1852:7)
#67     RenderProxyBoxMixin.performLayout
(package:flutter/src/rendering/proxy_box.dart:116:14)
#68     RenderOffstage.performLayout
(package:flutter/src/rendering/proxy_box.dart:3428:13)
#69     RenderObject.layout
(package:flutter/src/rendering/object.dart:1852:7)
#70     RenderProxyBoxMixin.performLayout
(package:flutter/src/rendering/proxy_box.dart:116:14)
#71     RenderObject.layout
(package:flutter/src/rendering/object.dart:1852:7)
#72     _RenderTheatre.performLayout
(package:flutter/src/widgets/overlay.dart:751:15)
#73     RenderObject.layout
(package:flutter/src/rendering/object.dart:1852:7)
#74     RenderProxyBoxMixin.performLayout
(package:flutter/src/rendering/proxy_box.dart:116:14)
#75     RenderObject.layout
(package:flutter/src/rendering/object.dart:1852:7)
#76     RenderProxyBoxMixin.performLayout
(package:flutter/src/rendering/proxy_box.dart:116:14)
#77     RenderObject.layout
(package:flutter/src/rendering/object.dart:1852:7)
#78     RenderProxyBoxMixin.performLayout
(package:flutter/src/rendering/proxy_box.dart:116:14)
#79     RenderObject.layout
(package:flutter/src/rendering/object.dart:1852:7)
#80     RenderProxyBoxMixin.performLayout
(package:flutter/src/rendering/proxy_box.dart:116:14)
#81     RenderObject.layout
(package:flutter/src/rendering/object.dart:1852:7)
#82     RenderProxyBoxMixin.performLayout
(package:flutter/src/rendering/proxy_box.dart:116:14)
#83     RenderObject.layout
(package:flutter/src/rendering/object.dart:1852:7)
#84     RenderProxyBoxMixin.performLayout
(package:flutter/src/rendering/proxy_box.dart:116:14)
#85     RenderObject.layout
(package:flutter/src/rendering/object.dart:1852:7)
#86     RenderProxyBoxMixin.performLayout
(package:flutter/src/rendering/proxy_box.dart:116:14)
#87     RenderObject.layout
(package:flutter/src/rendering/object.dart:1852:7)
#88     RenderView.performLayout
(package:flutter/src/rendering/view.dart:165:14)
#89     RenderObject._layoutWithoutResize
(package:flutter/src/rendering/object.dart:1707:7)
#90     PipelineOwner.flushLayout
(package:flutter/src/rendering/object.dart:879:18)
#91     RendererBinding.drawFrame
(package:flutter/src/rendering/binding.dart:497:19)
#92     WidgetsBinding.drawFrame
(package:flutter/src/widgets/binding.dart:883:13)
#93     RendererBinding._handlePersistentFrameCallback
(package:flutter/src/rendering/binding.dart:363:5)
#94     SchedulerBinding._invokeFrameCallback
(package:flutter/src/scheduler/binding.dart:1145:15)
#95     SchedulerBinding.handleDrawFrame
(package:flutter/src/scheduler/binding.dart:1082:9)
#96     SchedulerBinding.scheduleWarmUpFrame.<anonymous closure>
(package:flutter/src/scheduler/binding.dart:863:7)
(elided 11 frames from class _RawReceivePortImpl, class _Timer,
dart:async, and dart:async-patch)

The following RenderObject was being processed when the exception
was fired: RenderFlex#7ff70 relayoutBoundary=up7 NEEDS-LAYOUT
NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE:
  creator: Column ← Column ← FractionallySizedBox ← RepaintBoundary
  ← IndexedSemantics ←
    NotificationListener<KeepAliveNotification> ← KeepAlive ←
    AutomaticKeepAlive ← KeyedSubtree ←
    SliverList ← MediaQuery ← SliverPadding ← ⋯
  parentData: offset=Offset(0.0, 0.0); flex=null; fit=null (can use
  size)
  constraints: BoxConstraints(0.0<=w<=314.2, 0.0<=h<=Infinity)
  size: MISSING
  direction: vertical
  mainAxisAlignment: start
  mainAxisSize: max
  crossAxisAlignment: center
  verticalDirection: down
This RenderObject had the following descendants (showing up to depth5):
    child 1: RenderConstrainedBox#d0d25 NEEDS-LAYOUT NEEDS-PAINT
    NEEDS-COMPOSITING-BITS-UPDATE
      child: RenderLimitedBox#45966 NEEDS-LAYOUT NEEDS-PAINT
      NEEDS-COMPOSITING-BITS-UPDATE
        child: RenderConstrainedBox#fa9ce NEEDS-LAYOUT NEEDS-PAINT
    child 2: RenderSemanticsAnnotations#a3bc2 NEEDS-LAYOUT
    NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
      child: RenderConstrainedBox#57bca NEEDS-LAYOUT NEEDS-PAINT
      NEEDS-COMPOSITING-BITS-UPDATE
        child: RenderCustomPaint#92487 NEEDS-LAYOUT NEEDS-PAINT
════════════════════════════════════════════════════════════════════════════════════════════════════

Another exception was thrown: RenderBox was not laid out:
RenderFlex#7ff70 relayoutBoundary=up7 NEEDS-PAINT
NEEDS-COMPOSITING-BITS-UPDATE

Another exception was thrown: RenderBox was not laid out:
RenderFlex#60417 relayoutBoundary=up6 NEEDS-PAINT
NEEDS-COMPOSITING-BITS-UPDATE

Another exception was thrown: RenderBox was not laid out:
RenderFractionallySizedOverflowBox#f5dd4 relayoutBoundary=up5
NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE

Another exception was thrown: RenderBox was not laid out:
RenderRepaintBoundary#ec457 relayoutBoundary=up4 NEEDS-PAINT
NEEDS-COMPOSITING-BITS-UPDATE

Another exception was thrown:
'package:flutter/src/rendering/sliver_multi_box_adaptor.dart':
Failed assertion: line 544 pos 12: 'child.hasSize': is not true.

Another exception was thrown: Null check operator used on a null
value

Another exception was thrown: Null check operator used on a null
value

Another exception was thrown: Null check operator used on a null
value
The Flutter DevTools debugger and profiler on Android SDK built for
x86 is available at:
http://127.0.0.1:9101?uri=http://127.0.0.1:57917/zOC4HZuw9FM=/
I/flutter (13021): {access-control-allow-credentials: true, connection: keep-alive, x-cache-key: /data/2.5/onecall?exclude=minutely,hourly&lat=44.56&lon=-123.32&units=imperial, date: Tue, 08 Feb 2022 05:38:40 GMT, access-control-allow-origin: *, access-control-allow-methods: GET, POST, content-length: 4734, content-type: application/json; charset=utf-8, server: openresty}

Another exception was thrown: RenderFlex children have non-zero flexbut incoming width constraints are unbounded.

Another exception was thrown: RenderBox was not laid out:
RenderFlex#50be3 relayoutBoundary=up21 NEEDS-PAINT
NEEDS-COMPOSITING-BITS-UPDATE

Another exception was thrown: RenderBox was not laid out:
RenderDecoratedBox#d59df relayoutBoundary=up20 NEEDS-PAINT
NEEDS-COMPOSITING-BITS-UPDATE

Another exception was thrown: RenderBox was not laid out:
RenderPositionedBox#a36e5 relayoutBoundary=up19 NEEDS-PAINT
NEEDS-COMPOSITING-BITS-UPDATE

Another exception was thrown: RenderBox was not laid out:
RenderPadding#0e4cc relayoutBoundary=up18 NEEDS-PAINT
NEEDS-COMPOSITING-BITS-UPDATE

Another exception was thrown: RenderBox was not laid out:
RenderPointerListener#c57e4 relayoutBoundary=up17 NEEDS-PAINT
NEEDS-COMPOSITING-BITS-UPDATE

Another exception was thrown: RenderBox was not laid out:
RenderSemanticsAnnotations#3b2b0 relayoutBoundary=up16 NEEDS-PAINT
NEEDS-COMPOSITING-BITS-UPDATE

Another exception was thrown: RenderBox was not laid out:
RenderMouseRegion#e8883 relayoutBoundary=up15 NEEDS-PAINT
NEEDS-COMPOSITING-BITS-UPDATE

Another exception was thrown: RenderBox was not laid out:
RenderSemanticsAnnotations#3a4ae relayoutBoundary=up14 NEEDS-PAINT
NEEDS-COMPOSITING-BITS-UPDATE

Another exception was thrown: RenderBox was not laid out:
_RenderInkFeatures#fe5e0 relayoutBoundary=up13 NEEDS-PAINT
NEEDS-COMPOSITING-BITS-UPDATE

Another exception was thrown: RenderBox was not laid out:
RenderCustomPaint#bffd3 relayoutBoundary=up12 NEEDS-PAINT
NEEDS-COMPOSITING-BITS-UPDATE

Another exception was thrown: RenderBox was not laid out:
RenderPhysicalShape#13804 relayoutBoundary=up11 NEEDS-PAINT
NEEDS-COMPOSITING-BITS-UPDATE

Another exception was thrown: RenderBox was not laid out:
RenderConstrainedBox#a37f2 relayoutBoundary=up10 NEEDS-PAINT
NEEDS-COMPOSITING-BITS-UPDATE

Another exception was thrown: RenderBox was not laid out:
_RenderInputPadding#15d4c relayoutBoundary=up9 NEEDS-PAINT
NEEDS-COMPOSITING-BITS-UPDATE

Another exception was thrown: RenderBox was not laid out:
RenderSemanticsAnnotations#8401d relayoutBoundary=up8 NEEDS-PAINT
NEEDS-COMPOSITING-BITS-UPDATE

Another exception was thrown: RenderBox was not laid out:
RenderFlex#a6855 relayoutBoundary=up7 NEEDS-PAINT
NEEDS-COMPOSITING-BITS-UPDATE

Another exception was thrown: RenderBox was not laid out:
RenderFlex#60417 relayoutBoundary=up6 NEEDS-PAINT
NEEDS-COMPOSITING-BITS-UPDATE

Another exception was thrown: RenderBox was not laid out:
RenderFractionallySizedOverflowBox#f5dd4 relayoutBoundary=up5
NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE

Another exception was thrown: RenderBox was not laid out:
RenderRepaintBoundary#ec457 relayoutBoundary=up4 NEEDS-PAINT

Another exception was thrown:
'package:flutter/src/rendering/sliver_multi_box_adaptor.dart':
Failed assertion: line 544 pos 12: 'child.hasSize': is not true.
</code>```

答: I found the issue. The DailyWeatherForecast had to have a set width. I just wrapped the TextButton in a SizedBox with a set width and it works.</p>

Title: Flutter Layout/Sizing/Render Issue

Body:
I'm trying to dynamically render a list of DailyWeatherForecast, a Flutter StatelessWidget. The DailyWeatherForecast widget has some variables such as final String month and final double low, which intend to act as a single summarized forecast for a day as a narrow card. It has a constructor, and it works if I pass in hard-coded values to it from my main.dart. It looks and works great.

Information is pulled from an API though. So, I can't have this information hard-coded. See the code below for my approach:

import 'package:flutter/material.dart';
import 'package:todo/classes/daily_weather_forecast.dart';
import 'package:http/http.dart' as http;
import 'dart:convert';
import 'package:intl/intl.dart';

// `flutter run --no-sound-null-safety`

void main() {
  runApp(const MyApp());
}

class MyApp extends StatefulWidget {
  const MyApp({Key? key}) : super(key: key);

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  var lat = "35";
  var lon = "139";
  var exclude = "minutely,hourly";
  var appid = "<HIDDEN>";
  var url = "https://api.openweathermap.org/data/2.5/onecall";
  Map? weatherData;
  //List<Map>? dailyWeather;
  Iterable<int>? dailyWeather;
  var now = DateTime.now();
  List months = [
    'Jan',
    'Feb',
    'Mar',
    'Apr',
    'May',
    'Jun',
    'Jul',
    'Aug',
    'Sep',
    'Oct',
    'Nov',
    'Dec'
  ];

  void callApis() {
    debugPrint('test???');

    var endpoint = url +
        "?lat=" +
        lat +
        "&lon=" +
        lon +
        "&exclude=" +
        exclude +
        "&appid=" +
        appid;

    debugPrint(endpoint);

    http.get(endpoint, headers: {"Accept": "application/json"}).then((result) {
      setState(() {
        debugPrint(result.headers.toString());
        weatherData = json.decode(result.body);
        if (weatherData != null) {
          //dailyWeather = weatherData!['daily'];
          dailyWeather =
              Iterable<int>.generate(weatherData!['daily'].length).toList();
        }
      });
    });
  }

  @override
  void initState() {
    debugPrint('test???');
    //fetchWeatherData();
    callApis();
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      home: Scaffold(
        appBar: AppBar(
          backgroundColor: Colors.white,
          actions: const <Widget>[
            Icon(
              Icons.cloud_circle,
              size: 36,
              //color: Colors.black54,
              color: Color.fromRGBO(7, 101, 162, 1),
            ),
            //spacing to the right
            SizedBox(width: 12)
          ],
          title: Text(
              weatherData != null
                  ? weatherData!["timezone"]
                      .toString() //weatherData![0]['name'].toString()
                  : "Weather App",
              style: const TextStyle(color: Color.fromRGBO(7, 101, 162, 1))),
        ),
        /* NOTE: ListView is RecycleView equivalent in Flutter */
        body: ListView(
          scrollDirection: Axis.vertical,
          children: <Widget>[
            FractionallySizedBox(
              widthFactor: 0.8,
              child: Column(
                children: dailyWeather?.map(
                      (index) {
                        int i = index.round();
                        Map dayData = weatherData?["daily"][i];
                        debugPrint("DAY DATA: " + dayData.toString());
                        if (dayData["temp"] == null) {
                          return const Text("nil");
                        }
                        if (dayData["weather"] == null ||
                            dayData["weather"] == []) {
                          return const Text("nil");
                        }

                        return Row(
                          children: [
                            // spacer
                            Container(
                              height: 24,
                            ),
                            DailyWeatherForecast(
                                month: months[now.month - 1].toString(),
                                day: (now.day + i).round(),
                                high: dayData["temp"]["max"],
                                low: dayData["temp"]["min"],
                                probability: dayData["rain"],
                                excerpt: dayData["weather"][0]["main"],
                                description: dayData["weather"][0]
                                    ["description"]),
                            // spacer
                            Container(
                              height: 64,
                            )
                          ],
                        );
                      },
                    ).toList() ??
                    [
                      Image.network(
                          "https://upload.wikimedia.org/wikipedia/commons/b/b9/Youtube_loading_symbol_1_(wobbly).gif")
                    ],
              ),
            ),
          ],
        ),
      ),
    );
  }
}

Below you can see the daily_weather_forecast.dart file, and the errors (in that order):

import 'package:flutter/material.dart';

class DailyWeatherForecast extends StatelessWidget {
  /* Numeric day of the month */
  final String month;
  final int day;
  final double high;
  final double low;
  final double probability;
  /* Shorter description; "Sunny and Warm" */
  final String excerpt;
  /* Longer description; "Cloudless and generally warm, with a high of 75F and a low of 57F. Some high clouds late in the day." */
  final String description;

  /* constructors */
  const DailyWeatherForecast(
      {Key? key,
      required this.month,
      required this.day,
      required this.high,
      required this.low,
      required this.probability,
      required this.excerpt,
      required this.description})
      : super(key: key);

  @override
  Widget build(BuildContext context) {
    return TextButton(
        onPressed: () {
          final snackBar = SnackBar(content: Text(description));
          ScaffoldMessenger.of(context).showSnackBar(snackBar);
        },
        child: Container(
            decoration: const BoxDecoration(
                color: Color.fromRGBO(7, 101, 162, 1),
                borderRadius: BorderRadius.all(Radius.circular(8))),
            child: Row(
              children: <Widget>[
                const SizedBox(width: 20, height: 64),
                Column(
                  children: [
                    Text(month,
                        style:
                            const TextStyle(color: Colors.white, fontSize: 12)),
                    Text(day.toString(),
                        style:
                            const TextStyle(color: Colors.white, fontSize: 18))
                  ],
                ),
                const SizedBox(width: 20),
                Text(low.toString() + "F",
                    style: const TextStyle(color: Colors.white, fontSize: 20)),
                const Spacer(),
                Column(
                  children: [
                    Text(excerpt,
                        style: const TextStyle(
                            color: Colors.white, fontWeight: FontWeight.w600)),
                    Text(probability.toString() + "%  precipation",
                        style: const TextStyle(color: Colors.white70)),
                  ],
                ),
                const Spacer(),
                Text(high.toString() + "F",
                    style: const TextStyle(color: Colors.white, fontSize: 20)),
                const SizedBox(width: 20),
              ],
            )));
  }
}

Here's the FULL terminal output (removing the DAY DATA logs, to stay under character limits):

√  Built build\app\outputs\flutter-apk\app-debug.apk.
I/flutter (13021): test???
I/flutter (13021): test???
I/flutter (13021): ENDPOINT: https://api.openweathermap.org/data/2.5/onecall?lat=44.5630283&lon=-123.3185558&exclude=minutely,hourly&units=imperial&appid=1402ba071d730e537b18335ee1dcbdb2
Syncing files to device Android SDK built for x86...
   149ms

Flutter run key commands.
r Hot reload.
R Hot restart.
h List all available interactive commands.
d Detach (terminate "flutter run" but leave application running).
c Clear the screen
q Quit (terminate the application on the device).

Running with unsound null safety
For more information see
https://dart.dev/null-safety/unsound-null-safety

An Observatory debugger and profiler on Android SDK built for x86 isavailable at: http://127.0.0.1:57917/zOC4HZuw9FM=/

══╡ EXCEPTION CAUGHT BY RENDERING LIBRARY
╞═════════════════════════════════════════════════════════
The following assertion was thrown during performLayout():
RenderFlex children have non-zero flex but incoming height
constraints are unbounded.
When a column is in a parent that does not provide a finite height
constraint, for example if it is
in a vertical scrollable, it will try to shrink-wrap its children
along the vertical axis. Setting a
flex on a child (e.g. using Expanded) indicates that the child is toexpand to fill the remaining
space in the vertical direction.
These two directives are mutually exclusive. If a parent is to
shrink-wrap its child, the child
cannot simultaneously expand to fit its parent.
Consider setting mainAxisSize to MainAxisSize.min and using
FlexFit.loose fits for the flexible
children (using Flexible rather than Expanded). This will allow the
flexible children to size
themselves to less than the infinite remaining space they would
otherwise be forced to take, and
then will cause the RenderFlex to shrink-wrap the children rather
than expanding to fit the maximum
constraints provided by the parent.
If this message did not help you determine the problem, consider
using debugDumpRenderTree():
  https://flutter.dev/debugging/#rendering-layer
  http://api.flutter.dev/flutter/rendering/debugDumpRenderTree.html
The affected RenderFlex is:
  RenderFlex#7ff70 relayoutBoundary=up7 NEEDS-LAYOUT NEEDS-PAINT
  NEEDS-COMPOSITING-BITS-UPDATE(creator: Column ← Column ←
  FractionallySizedBox ← RepaintBoundary ← IndexedSemantics ←
  NotificationListener<KeepAliveNotification> ← KeepAlive ←
  AutomaticKeepAlive ← KeyedSubtree ← SliverList ← MediaQuery ←
  SliverPadding ← ⋯, parentData: offset=Offset(0.0, 0.0); flex=null;  fit=null (can use size), constraints:
  BoxConstraints(0.0<=w<=314.2, 0.0<=h<=Infinity), size: MISSING,
  direction: vertical, mainAxisAlignment: start, mainAxisSize: max,
  crossAxisAlignment: center, verticalDirection: down)
The creator information is set to:
  Column ← Column ← FractionallySizedBox ← RepaintBoundary ←
  IndexedSemantics ←
  NotificationListener<KeepAliveNotification> ← KeepAlive ←
  AutomaticKeepAlive ← KeyedSubtree ←
  SliverList ← MediaQuery ← SliverPadding ← ⋯
See also: https://flutter.dev/layout/
If none of the above helps enough to fix this problem, please don't
hesitate to file a bug:
  https://github.com/flutter/flutter/issues/new?template=2_bug.md

The relevant error-causing widget was:
  Column
  Column:file:///C:/Users/Lucas%20Pichette/Desktop/School/W22/CS492_  Mobile_Software_Dev/assignment2-api/todo/lib/main.dart:162:29

When the exception was thrown, this was the stack:
#0      RenderFlex.performLayout.<anonymous closure>
(package:flutter/src/rendering/flex.dart:926:9)
#1      RenderFlex.performLayout
(package:flutter/src/rendering/flex.dart:929:6)
#2      RenderObject.layout
(package:flutter/src/rendering/object.dart:1852:7)
#3      ChildLayoutHelper.layoutChild
(package:flutter/src/rendering/layout_helper.dart:56:11)
#4      RenderFlex._computeSizes
(package:flutter/src/rendering/flex.dart:829:43)
#5      RenderFlex.performLayout
(package:flutter/src/rendering/flex.dart:931:32)
#6      RenderObject.layout
(package:flutter/src/rendering/object.dart:1852:7)
#7      RenderFractionallySizedOverflowBox.performLayout
(package:flutter/src/rendering/shifted_box.dart:1165:14)
#8      RenderObject.layout
(package:flutter/src/rendering/object.dart:1852:7)
#9      RenderProxyBoxMixin.performLayout
(package:flutter/src/rendering/proxy_box.dart:116:14)
#10     RenderObject.layout
(package:flutter/src/rendering/object.dart:1852:7)
#11     RenderProxyBoxMixin.performLayout
(package:flutter/src/rendering/proxy_box.dart:116:14)
#12     RenderObject.layout
(package:flutter/src/rendering/object.dart:1852:7)
#13     RenderSliverList.performLayout
(package:flutter/src/rendering/sliver_list.dart:213:28)
#14     RenderObject.layout
(package:flutter/src/rendering/object.dart:1852:7)
#15     RenderSliverEdgeInsetsPadding.performLayout
(package:flutter/src/rendering/sliver_padding.dart:137:12)
#16     RenderSliverPadding.performLayout
(package:flutter/src/rendering/sliver_padding.dart:371:11)
#17     RenderObject.layout
(package:flutter/src/rendering/object.dart:1852:7)
#18     RenderViewportBase.layoutChildSequence
(package:flutter/src/rendering/viewport.dart:510:13)
#19     RenderViewport._attemptLayout
(package:flutter/src/rendering/viewport.dart:1580:12)
#20     RenderViewport.performLayout
(package:flutter/src/rendering/viewport.dart:1489:20)
#21     RenderObject.layout
(package:flutter/src/rendering/object.dart:1852:7)
#22     RenderProxyBoxMixin.performLayout
(package:flutter/src/rendering/proxy_box.dart:116:14)
#23     RenderObject.layout
(package:flutter/src/rendering/object.dart:1852:7)
#24     RenderProxyBoxMixin.performLayout
(package:flutter/src/rendering/proxy_box.dart:116:14)
#25     RenderObject.layout
(package:flutter/src/rendering/object.dart:1852:7)
#26     RenderProxyBoxMixin.performLayout
(package:flutter/src/rendering/proxy_box.dart:116:14)
#27     RenderObject.layout
(package:flutter/src/rendering/object.dart:1852:7)
#28     RenderProxyBoxMixin.performLayout
(package:flutter/src/rendering/proxy_box.dart:116:14)
#29     RenderObject.layout
(package:flutter/src/rendering/object.dart:1852:7)
#30     RenderProxyBoxMixin.performLayout
(package:flutter/src/rendering/proxy_box.dart:116:14)
#31     RenderObject.layout
(package:flutter/src/rendering/object.dart:1852:7)
#32     RenderProxyBoxMixin.performLayout
(package:flutter/src/rendering/proxy_box.dart:116:14)
#33     RenderObject.layout
(package:flutter/src/rendering/object.dart:1852:7)
#34     RenderProxyBoxMixin.performLayout
(package:flutter/src/rendering/proxy_box.dart:116:14)
#35     RenderObject.layout
(package:flutter/src/rendering/object.dart:1852:7)
#36     RenderProxyBoxMixin.performLayout
(package:flutter/src/rendering/proxy_box.dart:116:14)
#37     RenderCustomPaint.performLayout
(package:flutter/src/rendering/custom_paint.dart:545:11)
#38     RenderObject.layout
(package:flutter/src/rendering/object.dart:1852:7)
#39     RenderProxyBoxMixin.performLayout
(package:flutter/src/rendering/proxy_box.dart:116:14)
#40     RenderObject.layout
(package:flutter/src/rendering/object.dart:1852:7)
#41     MultiChildLayoutDelegate.layoutChild
(package:flutter/src/rendering/custom_layout.dart:171:12)
#42     _ScaffoldLayout.performLayout
(package:flutter/src/material/scaffold.dart:1005:7)
#43     MultiChildLayoutDelegate._callPerformLayout
(package:flutter/src/rendering/custom_layout.dart:240:7)
#44     RenderCustomMultiChildLayoutBox.performLayout
(package:flutter/src/rendering/custom_layout.dart:403:14)
#45     RenderObject.layout
(package:flutter/src/rendering/object.dart:1852:7)
#46     RenderProxyBoxMixin.performLayout
(package:flutter/src/rendering/proxy_box.dart:116:14)
#47     RenderObject.layout
(package:flutter/src/rendering/object.dart:1852:7)
#48     RenderProxyBoxMixin.performLayout
(package:flutter/src/rendering/proxy_box.dart:116:14)
#49     _RenderCustomClip.performLayout
(package:flutter/src/rendering/proxy_box.dart:1376:11)
#50     RenderObject.layout
(package:flutter/src/rendering/object.dart:1852:7)
#51     RenderProxyBoxMixin.performLayout
(package:flutter/src/rendering/proxy_box.dart:116:14)
#52     RenderObject.layout
(package:flutter/src/rendering/object.dart:1852:7)
#53     RenderProxyBoxMixin.performLayout
(package:flutter/src/rendering/proxy_box.dart:116:14)
#54     RenderObject.layout
(package:flutter/src/rendering/object.dart:1852:7)
#55     RenderProxyBoxMixin.performLayout
(package:flutter/src/rendering/proxy_box.dart:116:14)
#56     RenderObject.layout
(package:flutter/src/rendering/object.dart:1852:7)
#57     RenderProxyBoxMixin.performLayout
(package:flutter/src/rendering/proxy_box.dart:116:14)
#58     RenderObject.layout
(package:flutter/src/rendering/object.dart:1852:7)
#59     RenderProxyBoxMixin.performLayout
(package:flutter/src/rendering/proxy_box.dart:116:14)
#60     RenderObject.layout
(package:flutter/src/rendering/object.dart:1852:7)
#61     RenderProxyBoxMixin.performLayout
(package:flutter/src/rendering/proxy_box.dart:116:14)
#62     RenderObject.layout
(package:flutter/src/rendering/object.dart:1852:7)
#63     RenderProxyBoxMixin.performLayout
(package:flutter/src/rendering/proxy_box.dart:116:14)
#64     RenderObject.layout
(package:flutter/src/rendering/object.dart:1852:7)
#65     RenderProxyBoxMixin.performLayout
(package:flutter/src/rendering/proxy_box.dart:116:14)
#66     RenderObject.layout
(package:flutter/src/rendering/object.dart:1852:7)
#67     RenderProxyBoxMixin.performLayout
(package:flutter/src/rendering/proxy_box.dart:116:14)
#68     RenderOffstage.performLayout
(package:flutter/src/rendering/proxy_box.dart:3428:13)
#69     RenderObject.layout
(package:flutter/src/rendering/object.dart:1852:7)
#70     RenderProxyBoxMixin.performLayout
(package:flutter/src/rendering/proxy_box.dart:116:14)
#71     RenderObject.layout
(package:flutter/src/rendering/object.dart:1852:7)
#72     _RenderTheatre.performLayout
(package:flutter/src/widgets/overlay.dart:751:15)
#73     RenderObject.layout
(package:flutter/src/rendering/object.dart:1852:7)
#74     RenderProxyBoxMixin.performLayout
(package:flutter/src/rendering/proxy_box.dart:116:14)
#75     RenderObject.layout
(package:flutter/src/rendering/object.dart:1852:7)
#76     RenderProxyBoxMixin.performLayout
(package:flutter/src/rendering/proxy_box.dart:116:14)
#77     RenderObject.layout
(package:flutter/src/rendering/object.dart:1852:7)
#78     RenderProxyBoxMixin.performLayout
(package:flutter/src/rendering/proxy_box.dart:116:14)
#79     RenderObject.layout
(package:flutter/src/rendering/object.dart:1852:7)
#80     RenderProxyBoxMixin.performLayout
(package:flutter/src/rendering/proxy_box.dart:116:14)
#81     RenderObject.layout
(package:flutter/src/rendering/object.dart:1852:7)
#82     RenderProxyBoxMixin.performLayout
(package:flutter/src/rendering/proxy_box.dart:116:14)
#83     RenderObject.layout
(package:flutter/src/rendering/object.dart:1852:7)
#84     RenderProxyBoxMixin.performLayout
(package:flutter/src/rendering/proxy_box.dart:116:14)
#85     RenderObject.layout
(package:flutter/src/rendering/object.dart:1852:7)
#86     RenderProxyBoxMixin.performLayout
(package:flutter/src/rendering/proxy_box.dart:116:14)
#87     RenderObject.layout
(package:flutter/src/rendering/object.dart:1852:7)
#88     RenderView.performLayout
(package:flutter/src/rendering/view.dart:165:14)
#89     RenderObject._layoutWithoutResize
(package:flutter/src/rendering/object.dart:1707:7)
#90     PipelineOwner.flushLayout
(package:flutter/src/rendering/object.dart:879:18)
#91     RendererBinding.drawFrame
(package:flutter/src/rendering/binding.dart:497:19)
#92     WidgetsBinding.drawFrame
(package:flutter/src/widgets/binding.dart:883:13)
#93     RendererBinding._handlePersistentFrameCallback
(package:flutter/src/rendering/binding.dart:363:5)
#94     SchedulerBinding._invokeFrameCallback
(package:flutter/src/scheduler/binding.dart:1145:15)
#95     SchedulerBinding.handleDrawFrame
(package:flutter/src/scheduler/binding.dart:1082:9)
#96     SchedulerBinding.scheduleWarmUpFrame.<anonymous closure>
(package:flutter/src/scheduler/binding.dart:863:7)
(elided 11 frames from class _RawReceivePortImpl, class _Timer,
dart:async, and dart:async-patch)

The following RenderObject was being processed when the exception
was fired: RenderFlex#7ff70 relayoutBoundary=up7 NEEDS-LAYOUT
NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE:
  creator: Column ← Column ← FractionallySizedBox ← RepaintBoundary
  ← IndexedSemantics ←
    NotificationListener<KeepAliveNotification> ← KeepAlive ←
    AutomaticKeepAlive ← KeyedSubtree ←
    SliverList ← MediaQuery ← SliverPadding ← ⋯
  parentData: offset=Offset(0.0, 0.0); flex=null; fit=null (can use
  size)
  constraints: BoxConstraints(0.0<=w<=314.2, 0.0<=h<=Infinity)
  size: MISSING
  direction: vertical
  mainAxisAlignment: start
  mainAxisSize: max
  crossAxisAlignment: center
  verticalDirection: down
This RenderObject had the following descendants (showing up to depth5):
    child 1: RenderConstrainedBox#d0d25 NEEDS-LAYOUT NEEDS-PAINT
    NEEDS-COMPOSITING-BITS-UPDATE
      child: RenderLimitedBox#45966 NEEDS-LAYOUT NEEDS-PAINT
      NEEDS-COMPOSITING-BITS-UPDATE
        child: RenderConstrainedBox#fa9ce NEEDS-LAYOUT NEEDS-PAINT
    child 2: RenderSemanticsAnnotations#a3bc2 NEEDS-LAYOUT
    NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
      child: RenderConstrainedBox#57bca NEEDS-LAYOUT NEEDS-PAINT
      NEEDS-COMPOSITING-BITS-UPDATE
        child: RenderCustomPaint#92487 NEEDS-LAYOUT NEEDS-PAINT
════════════════════════════════════════════════════════════════════════════════════════════════════

Another exception was thrown: RenderBox was not laid out:
RenderFlex#7ff70 relayoutBoundary=up7 NEEDS-PAINT
NEEDS-COMPOSITING-BITS-UPDATE

Another exception was thrown: RenderBox was not laid out:
RenderFlex#60417 relayoutBoundary=up6 NEEDS-PAINT
NEEDS-COMPOSITING-BITS-UPDATE

Another exception was thrown: RenderBox was not laid out:
RenderFractionallySizedOverflowBox#f5dd4 relayoutBoundary=up5
NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE

Another exception was thrown: RenderBox was not laid out:
RenderRepaintBoundary#ec457 relayoutBoundary=up4 NEEDS-PAINT
NEEDS-COMPOSITING-BITS-UPDATE

Another exception was thrown:
'package:flutter/src/rendering/sliver_multi_box_adaptor.dart':
Failed assertion: line 544 pos 12: 'child.hasSize': is not true.

Another exception was thrown: Null check operator used on a null
value

Another exception was thrown: Null check operator used on a null
value

Another exception was thrown: Null check operator used on a null
value
The Flutter DevTools debugger and profiler on Android SDK built for
x86 is available at:
http://127.0.0.1:9101?uri=http://127.0.0.1:57917/zOC4HZuw9FM=/
I/flutter (13021): {access-control-allow-credentials: true, connection: keep-alive, x-cache-key: /data/2.5/onecall?exclude=minutely,hourly&lat=44.56&lon=-123.32&units=imperial, date: Tue, 08 Feb 2022 05:38:40 GMT, access-control-allow-origin: *, access-control-allow-methods: GET, POST, content-length: 4734, content-type: application/json; charset=utf-8, server: openresty}

Another exception was thrown: RenderFlex children have non-zero flexbut incoming width constraints are unbounded.

Another exception was thrown: RenderBox was not laid out:
RenderFlex#50be3 relayoutBoundary=up21 NEEDS-PAINT
NEEDS-COMPOSITING-BITS-UPDATE

Another exception was thrown: RenderBox was not laid out:
RenderDecoratedBox#d59df relayoutBoundary=up20 NEEDS-PAINT
NEEDS-COMPOSITING-BITS-UPDATE

Another exception was thrown: RenderBox was not laid out:
RenderPositionedBox#a36e5 relayoutBoundary=up19 NEEDS-PAINT
NEEDS-COMPOSITING-BITS-UPDATE

Another exception was thrown: RenderBox was not laid out:
RenderPadding#0e4cc relayoutBoundary=up18 NEEDS-PAINT
NEEDS-COMPOSITING-BITS-UPDATE

Another exception was thrown: RenderBox was not laid out:
RenderPointerListener#c57e4 relayoutBoundary=up17 NEEDS-PAINT
NEEDS-COMPOSITING-BITS-UPDATE

Another exception was thrown: RenderBox was not laid out:
RenderSemanticsAnnotations#3b2b0 relayoutBoundary=up16 NEEDS-PAINT
NEEDS-COMPOSITING-BITS-UPDATE

Another exception was thrown: RenderBox was not laid out:
RenderMouseRegion#e8883 relayoutBoundary=up15 NEEDS-PAINT
NEEDS-COMPOSITING-BITS-UPDATE

Another exception was thrown: RenderBox was not laid out:
RenderSemanticsAnnotations#3a4ae relayoutBoundary=up14 NEEDS-PAINT
NEEDS-COMPOSITING-BITS-UPDATE

Another exception was thrown: RenderBox was not laid out:
_RenderInkFeatures#fe5e0 relayoutBoundary=up13 NEEDS-PAINT
NEEDS-COMPOSITING-BITS-UPDATE

Another exception was thrown: RenderBox was not laid out:
RenderCustomPaint#bffd3 relayoutBoundary=up12 NEEDS-PAINT
NEEDS-COMPOSITING-BITS-UPDATE

Another exception was thrown: RenderBox was not laid out:
RenderPhysicalShape#13804 relayoutBoundary=up11 NEEDS-PAINT
NEEDS-COMPOSITING-BITS-UPDATE

Another exception was thrown: RenderBox was not laid out:
RenderConstrainedBox#a37f2 relayoutBoundary=up10 NEEDS-PAINT
NEEDS-COMPOSITING-BITS-UPDATE

Another exception was thrown: RenderBox was not laid out:
_RenderInputPadding#15d4c relayoutBoundary=up9 NEEDS-PAINT
NEEDS-COMPOSITING-BITS-UPDATE

Another exception was thrown: RenderBox was not laid out:
RenderSemanticsAnnotations#8401d relayoutBoundary=up8 NEEDS-PAINT
NEEDS-COMPOSITING-BITS-UPDATE

Another exception was thrown: RenderBox was not laid out:
RenderFlex#a6855 relayoutBoundary=up7 NEEDS-PAINT
NEEDS-COMPOSITING-BITS-UPDATE

Another exception was thrown: RenderBox was not laid out:
RenderFlex#60417 relayoutBoundary=up6 NEEDS-PAINT
NEEDS-COMPOSITING-BITS-UPDATE

Another exception was thrown: RenderBox was not laid out:
RenderFractionallySizedOverflowBox#f5dd4 relayoutBoundary=up5
NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE

Another exception was thrown: RenderBox was not laid out:
RenderRepaintBoundary#ec457 relayoutBoundary=up4 NEEDS-PAINT

Another exception was thrown:
'package:flutter/src/rendering/sliver_multi_box_adaptor.dart':
Failed assertion: line 544 pos 12: 'child.hasSize': is not true.