Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Manually set Expansion Tile height and width #2

Open
ninest opened this issue Feb 28, 2020 · 1 comment
Open

Manually set Expansion Tile height and width #2

ninest opened this issue Feb 28, 2020 · 1 comment
Assignees

Comments

@ninest
Copy link
Owner

ninest commented Feb 28, 2020

I do not know the default vertical and horizontal padding for the ExpansionPanel widget, so I had to "eyeball" it to make the placeholder loading widget (LoadingBusStopTile). The values provided for padding look fine when the default font size is 19, but may look weird for different sizes.

@ninest ninest self-assigned this Feb 28, 2020
@ninest
Copy link
Owner Author

ninest commented Feb 29, 2020

Temporary fix found, not perfect. Still involves some hardcoding to get the MRT stations to display in the bus arrival bus stop tiles.

ListTileTheme(
  // setting padding value if mrt is there
  // THESE VALUES ARE HARDOCDED because
  contentPadding: EdgeInsets.only(
    left: Values.busStopTileHorizontalPadding,
    right: Values.busStopTileHorizontalPadding,
    top: widget.mrtStations.isNotEmpty ? Values.busStopTileVerticalPadding /2 : 0,
    bottom: widget.mrtStations.isNotEmpty ? Values.busStopTileVerticalPadding /2 : 0,
  ),
  child: ExpansionTile(
    ...

Reference: https://stackoverflow.com/questions/54714836/how-to-remove-default-padding-from-expansiontiles-header

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant