Skip to content

Commit

Permalink
fix: title overflow
Browse files Browse the repository at this point in the history
  • Loading branch information
barboraplasovska committed Jul 11, 2023
1 parent b78c5c2 commit b2ec1f7
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
13 changes: 8 additions & 5 deletions lib/pages/location_list/location_list_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,14 @@ class _LocationListPageState extends State<LocationListPage> {
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
currentLocation ? "My location" : model.location.name,
style: const TextStyle(
fontSize: 22,
fontWeight: FontWeight.w700,
SizedBox(
width: 200,
child: Text(
currentLocation ? "My location" : model.location.name,
style: TextStyle(
fontSize: model.location.name.length >= 20 ? 16 : 22,
fontWeight: FontWeight.w700,
),
),
),
currentLocation
Expand Down
11 changes: 8 additions & 3 deletions lib/pages/weather_detail/weather_detail_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -96,17 +96,22 @@ class _WeatherDetailState extends State<WeatherDetail> {
body: CustomScrollView(
slivers: [
SliverAppBar(
expandedHeight: 250.0,
expandedHeight: 280.0,
backgroundColor: Theme.of(context).colorScheme.background,
flexibleSpace: FlexibleSpaceBar(
background: Column(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Padding(
padding: const EdgeInsets.only(top: 90),
padding:
const EdgeInsets.only(top: 90, left: 10, right: 10),
child: Text(
location.name,
style: const TextStyle(fontSize: 30),
style: TextStyle(
fontSize: location.name.length >= 20 ? 25 : 30,
),
textAlign: TextAlign.center,
),
),
Text(
Expand Down

0 comments on commit b2ec1f7

Please sign in to comment.