diff --git a/lib/app/modules/cards/widgets/weather_card_container.dart b/lib/app/modules/cards/widgets/weather_card_container.dart index 921cabd..7c977b4 100644 --- a/lib/app/modules/cards/widgets/weather_card_container.dart +++ b/lib/app/modules/cards/widgets/weather_card_container.dart @@ -1,4 +1,5 @@ import 'package:flutter/material.dart'; +import 'package:gap/gap.dart'; import 'package:get/get.dart'; import 'package:rain/app/controller/controller.dart'; import 'package:rain/app/widgets/status/status_weather.dart'; @@ -62,7 +63,7 @@ class _WeatherCardContainerState extends State { fontWeight: FontWeight.w600, ), ), - const SizedBox(width: 7), + const Gap(7), Text( statusWeather.getText(widget.weather[weatherController .getTime(widget.time, widget.timezone)]), @@ -73,7 +74,7 @@ class _WeatherCardContainerState extends State { ), ], ), - const SizedBox(height: 10), + const Gap(10), Text( widget.district.isEmpty ? widget.city @@ -87,7 +88,7 @@ class _WeatherCardContainerState extends State { fontWeight: FontWeight.w500, ), ), - const SizedBox(height: 5), + const Gap(5), StreamBuilder( stream: Stream.periodic(const Duration(seconds: 1)), builder: (context, snapshot) { @@ -103,7 +104,7 @@ class _WeatherCardContainerState extends State { ], ), ), - const SizedBox(width: 5), + const Gap(5), Image.asset( statusWeather.getImageNow( widget.weather[ diff --git a/lib/app/modules/geolocation.dart b/lib/app/modules/geolocation.dart index 8f84fd9..faa20bd 100644 --- a/lib/app/modules/geolocation.dart +++ b/lib/app/modules/geolocation.dart @@ -1,5 +1,6 @@ import 'dart:ui'; import 'package:flutter/material.dart'; +import 'package:gap/gap.dart'; import 'package:geolocator/geolocator.dart'; import 'package:get/get.dart'; import 'package:iconsax/iconsax.dart'; @@ -360,7 +361,7 @@ class _SelectGeolocationState extends State { margin: const EdgeInsets.only( left: 10, right: 10, top: 10), ), - const SizedBox(height: 20), + const Gap(20), ], ), ), diff --git a/lib/app/modules/onboarding.dart b/lib/app/modules/onboarding.dart index 4cf694b..07a2999 100644 --- a/lib/app/modules/onboarding.dart +++ b/lib/app/modules/onboarding.dart @@ -1,3 +1,4 @@ +import 'package:gap/gap.dart'; import 'package:rain/app/data/weather.dart'; import 'package:rain/app/modules/geolocation.dart'; import 'package:rain/app/widgets/button.dart'; @@ -166,7 +167,7 @@ class OnboardContent extends StatelessWidget { style: context.textTheme.titleLarge ?.copyWith(fontWeight: FontWeight.w600), ), - const SizedBox(height: 10), + const Gap(10), SizedBox( width: 300, child: Text( diff --git a/lib/app/modules/settings/view/settings.dart b/lib/app/modules/settings/view/settings.dart index e2a0d25..97641c8 100644 --- a/lib/app/modules/settings/view/settings.dart +++ b/lib/app/modules/settings/view/settings.dart @@ -2,6 +2,7 @@ import 'dart:io'; import 'package:flutter/material.dart'; import 'package:flutter_hsvcolor_picker/flutter_hsvcolor_picker.dart'; import 'package:flutter_local_notifications/flutter_local_notifications.dart'; +import 'package:gap/gap.dart'; import 'package:geolocator/geolocator.dart'; import 'package:get/get.dart'; import 'package:iconsax/iconsax.dart'; @@ -162,7 +163,7 @@ class _SettingsPageState extends State { setState(() {}); }, ), - const SizedBox(height: 10), + const Gap(10), ], ), ); @@ -451,7 +452,7 @@ class _SettingsPageState extends State { } }, ), - const SizedBox(height: 10), + const Gap(10), ], ), ); @@ -602,7 +603,7 @@ class _SettingsPageState extends State { setState(() {}); }, ), - const SizedBox(height: 10), + const Gap(10), ], ), ); @@ -819,7 +820,7 @@ class _SettingsPageState extends State { ); }, ), - const SizedBox(height: 10), + const Gap(10), ], ), ); @@ -887,7 +888,7 @@ class _SettingsPageState extends State { ); }, ), - const SizedBox(height: 10), + const Gap(10), ], ); }, @@ -938,7 +939,7 @@ class _SettingsPageState extends State { onPressed: () => urlLauncher( 'https://yoomoney.ru/to/4100117672775961'), ), - const SizedBox(height: 10), + const Gap(10), ], ), ); @@ -1002,7 +1003,7 @@ class _SettingsPageState extends State { } }, ), - const SizedBox(height: 10), + const Gap(10), ], ), ); @@ -1064,7 +1065,7 @@ class _SettingsPageState extends State { onTap: () => urlLauncher('https://open-meteo.com/'), ), ), - const SizedBox(height: 10), + const Gap(10), ], ), ); diff --git a/lib/app/widgets/daily/list_daily_card.dart b/lib/app/widgets/daily/list_daily_card.dart index 4b9ecd4..e8c8ef3 100644 --- a/lib/app/widgets/daily/list_daily_card.dart +++ b/lib/app/widgets/daily/list_daily_card.dart @@ -1,4 +1,5 @@ import 'package:flutter/material.dart'; +import 'package:gap/gap.dart'; import 'package:get/get.dart'; import 'package:intl/intl.dart'; import 'package:rain/app/widgets/status/status_weather.dart'; @@ -47,7 +48,7 @@ class _ListDailyCardState extends State { fontWeight: FontWeight.w600, ), ), - const SizedBox(height: 5), + const Gap(5), Text( DateFormat.MMMMEEEEd(locale.languageCode) .format(widget.timeDaily), @@ -56,7 +57,7 @@ class _ListDailyCardState extends State { fontWeight: FontWeight.w400, ), ), - const SizedBox(height: 5), + const Gap(5), Text( statusWeather.getText(widget.weathercodeDaily), style: context.textTheme.titleMedium?.copyWith( @@ -67,7 +68,7 @@ class _ListDailyCardState extends State { ], ), ), - const SizedBox(width: 5), + const Gap(5), Image.asset( statusWeather.getImageNowDaily(widget.weathercodeDaily), scale: 6.5, diff --git a/lib/app/widgets/daily/weather_daily.dart b/lib/app/widgets/daily/weather_daily.dart index e809c4b..ed427db 100644 --- a/lib/app/widgets/daily/weather_daily.dart +++ b/lib/app/widgets/daily/weather_daily.dart @@ -1,4 +1,5 @@ import 'package:flutter/material.dart'; +import 'package:gap/gap.dart'; import 'package:get/get.dart'; import 'package:intl/intl.dart'; import 'package:rain/app/data/weather.dart'; @@ -80,7 +81,7 @@ class _WeatherDailyState extends State { .getImage7Day(weatherCodeDaily[index]), scale: 3, ), - const SizedBox(width: 5), + const Gap(5), Expanded( child: Text( statusWeather diff --git a/lib/app/widgets/desc/desc.dart b/lib/app/widgets/desc/desc.dart index 5e42975..a2191df 100644 --- a/lib/app/widgets/desc/desc.dart +++ b/lib/app/widgets/desc/desc.dart @@ -1,4 +1,5 @@ import 'package:flutter/material.dart'; +import 'package:gap/gap.dart'; import 'package:get/get.dart'; class DescWeather extends StatefulWidget { @@ -38,7 +39,7 @@ class _DescWeatherState extends State { widget.imageName, scale: 20, ), - const SizedBox(height: 5), + const Gap(5), Text( widget.value, style: textTheme.labelLarge, diff --git a/lib/app/widgets/now/weather_now.dart b/lib/app/widgets/now/weather_now.dart index 2f4e039..be9626c 100644 --- a/lib/app/widgets/now/weather_now.dart +++ b/lib/app/widgets/now/weather_now.dart @@ -1,5 +1,6 @@ import 'package:flutter/material.dart'; import 'package:flutter_glow/flutter_glow.dart'; +import 'package:gap/gap.dart'; import 'package:get/get.dart'; import 'package:intl/intl.dart'; import 'package:rain/app/widgets/status/status_data.dart'; @@ -43,7 +44,7 @@ class _WeatherNowState extends State { child: Column( mainAxisAlignment: MainAxisAlignment.center, children: [ - const SizedBox(height: 15), + const Gap(15), Image( image: AssetImage(statusWeather.getImageNow(widget.weather, widget.time, widget.timeDay, widget.timeNight)), @@ -61,7 +62,7 @@ class _WeatherNowState extends State { statusWeather.getText(widget.weather), style: context.textTheme.titleLarge, ), - const SizedBox(height: 5), + const Gap(5), Text( DateFormat.MMMMEEEEd(locale.languageCode).format( DateTime.parse(widget.time), @@ -93,7 +94,7 @@ class _WeatherNowState extends State { color: Colors.grey, ), ), - const SizedBox(height: 5), + const Gap(5), Text( statusWeather.getText(widget.weather), style: context.textTheme.titleLarge @@ -109,7 +110,7 @@ class _WeatherNowState extends State { style: context.textTheme.bodyMedium), ], ), - const SizedBox(height: 30), + const Gap(30), Text( statusData.getDegree(roundDegree ? widget.degree.round() @@ -118,7 +119,7 @@ class _WeatherNowState extends State { fontWeight: FontWeight.w800, ), ), - const SizedBox(height: 5), + const Gap(5), Row( crossAxisAlignment: CrossAxisAlignment.start, children: [ diff --git a/lib/app/widgets/sun_moon/sunset_sunrise.dart b/lib/app/widgets/sun_moon/sunset_sunrise.dart index f5a2112..a8f1ed7 100644 --- a/lib/app/widgets/sun_moon/sunset_sunrise.dart +++ b/lib/app/widgets/sun_moon/sunset_sunrise.dart @@ -1,5 +1,6 @@ import 'package:flutter/material.dart'; import 'package:get/get.dart'; +import 'package:gap/gap.dart'; import 'package:rain/app/widgets/status/status_data.dart'; class SunsetSunrise extends StatefulWidget { @@ -44,7 +45,7 @@ class _SunsetSunriseState extends State { style: titleSmall, overflow: TextOverflow.ellipsis, ), - const SizedBox(height: 2), + const Gap(2), Text( statusData.getTimeFormat(widget.timeSunrise), style: titleLarge, @@ -52,7 +53,7 @@ class _SunsetSunriseState extends State { ], ), ), - const SizedBox(width: 5), + const Gap(5), Flexible( child: Image.asset( 'assets/images/sunrise.png', @@ -75,7 +76,7 @@ class _SunsetSunriseState extends State { style: titleSmall, overflow: TextOverflow.ellipsis, ), - const SizedBox(height: 2), + const Gap(2), Text( statusData.getTimeFormat(widget.timeSunset), style: titleLarge, @@ -83,7 +84,7 @@ class _SunsetSunriseState extends State { ], ), ), - const SizedBox(width: 5), + const Gap(5), Flexible( child: Image.asset( 'assets/images/sunset.png', diff --git a/pubspec.lock b/pubspec.lock index 3184876..074cfcd 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -430,6 +430,14 @@ packages: url: "https://pub.dev" source: hosted version: "4.0.0" + gap: + dependency: "direct main" + description: + name: gap + sha256: f19387d4e32f849394758b91377f9153a1b41d79513ef7668c088c77dbc6955d + url: "https://pub.dev" + source: hosted + version: "3.0.1" geocoding: dependency: "direct main" description: diff --git a/pubspec.yaml b/pubspec.yaml index b709a74..91e31cd 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -14,6 +14,7 @@ dependencies: flutter_localizations: sdk: flutter get: ^4.6.6 + gap: ^3.0.1 dio: ^5.5.0+1 intl: ^0.19.0 isar: