Skip to content

Commit

Permalink
containerHeight added
Browse files Browse the repository at this point in the history
  • Loading branch information
coskuncay committed May 25, 2022
1 parent 60d59fa commit d838c87
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 3 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,9 @@

## [1.1.1] - 2022-05-13

* Documentation edited.
* Documentation edited.


## [1.1.2] - 2022-05-25

* Container height property added.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ class _MyHomePageState extends State<MyHomePage> {
| timeFontSize | double | 13 |
| refreshIconSize | double | 20 |
| imageScale | double | .8 |
| containerHeight | double | ScreenHeight * .15 |
| borderColor | Color | Color(0XFFACAEBA) |
| keyColor | Color | Color(0XFFACAEBA) |
| valueColor | Color | Colors.black |
Expand Down
7 changes: 6 additions & 1 deletion lib/flutter_weather_forecast.dart
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ class WeatherForecast extends StatefulWidget {
this.backgroundColor = Colors.white,
this.verticalPadding = 8.0,
this.horizontalPadding = 8.0,
this.containerHeight,
}) : super(key: key);

/// City code. Default is 06
Expand All @@ -56,6 +57,9 @@ class WeatherForecast extends StatefulWidget {
/// Scale of Image. Default .8
final double imageScale;

/// Height of container. Default ScreenHeight * .15
final double? containerHeight;

/// [Color] of selected dot. Default is Color(0XFFACAEBA)
final Color borderColor;

Expand Down Expand Up @@ -177,7 +181,8 @@ class _WeatherForecastState extends State<WeatherForecast> {
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Container(
height: MediaQuery.of(context).size.height * .15,
height: widget.containerHeight ??
MediaQuery.of(context).size.height * .15,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(5),
color: widget.backgroundColor,
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: flutter_weather_forecast
description: A custom weather forecast widget for Turkey.Weather data provided by the General Directorate of Meteorology.
version: 1.1.1
version: 1.1.2
homepage: https://github.com/coskuncay/flutter_weather_forecast
repository: https://github.com/coskuncay/flutter_weather_forecast

Expand Down

0 comments on commit d838c87

Please sign in to comment.