-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
351 additions
and
252 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
//строковые константы приложения | ||
abstract class AppStrings { | ||
AppStrings._(); | ||
|
||
static const errorConnection = 'Ошибка. Проверьте доступ к сети интернет.'; | ||
static const errorNoCityName = 'Необходимо ввести название города'; | ||
static const errorShortName = 'Слишком короткое название'; | ||
static const errorUnexpected = 'Неожиданная ошибка'; | ||
|
||
static const backButtonText = 'Назад'; | ||
static const refreshButtonText = 'Обновить'; | ||
|
||
static const labelTemperature = 'Температура:'; | ||
static const labelHumidity = 'Влажность:'; | ||
static const labelWindSpeed = 'Скорость ветра:'; | ||
static const labelActualForecast = 'Прогноз актуален на:'; | ||
static const labelGetWeather = 'Узнать погоду в городе:'; | ||
static const labelConfirmButton = 'Подтвердить'; | ||
static const labelChooseAnother = 'Выбрать другой'; | ||
static const labelCurrentWeather = 'Текущая погода'; | ||
static const labelCity = 'Город'; | ||
static const labelForecastFull = 'Прогноз погоды'; | ||
static const labelForecastShort = 'Прогноз'; | ||
|
||
static const labelWindUnits = 'м/с'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import 'package:flutter/material.dart'; | ||
|
||
//класс для управления темой приложения | ||
abstract class AppTheme { | ||
AppTheme._(); | ||
|
||
static final lightTheme = ThemeData( | ||
primarySwatch: Colors.purple, | ||
snackBarTheme: const SnackBarThemeData( | ||
shape: StadiumBorder(), | ||
backgroundColor: Colors.purple, | ||
behavior: SnackBarBehavior.floating, | ||
actionTextColor: Colors.white, | ||
), | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import 'package:intl/intl.dart'; | ||
|
||
//утилиты для использования на всех страницах | ||
String formatDateTime(DateTime? dateTime) { | ||
if (dateTime != null) { | ||
return DateFormat("dd-MM-yyyy HH:mm").format(dateTime); | ||
} else { | ||
return '-'; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.