diff --git a/lib/app/data/weather.dart b/lib/app/data/weather.dart
index bca9f94..e05e473 100644
--- a/lib/app/data/weather.dart
+++ b/lib/app/data/weather.dart
@@ -12,6 +12,7 @@ class Settings {
bool materialColor = false;
bool amoledTheme = false;
bool roundDegree = false;
+ bool largeElement = false;
String? widgetBackgroundColor;
String? widgetTextColor;
String measurements = 'metric';
diff --git a/lib/app/data/weather.g.dart b/lib/app/data/weather.g.dart
index 1103612..7d7102e 100644
--- a/lib/app/data/weather.g.dart
+++ b/lib/app/data/weather.g.dart
@@ -32,68 +32,73 @@ const SettingsSchema = CollectionSchema(
name: r'language',
type: IsarType.string,
),
- r'location': PropertySchema(
+ r'largeElement': PropertySchema(
id: 3,
+ name: r'largeElement',
+ type: IsarType.bool,
+ ),
+ r'location': PropertySchema(
+ id: 4,
name: r'location',
type: IsarType.bool,
),
r'materialColor': PropertySchema(
- id: 4,
+ id: 5,
name: r'materialColor',
type: IsarType.bool,
),
r'measurements': PropertySchema(
- id: 5,
+ id: 6,
name: r'measurements',
type: IsarType.string,
),
r'notifications': PropertySchema(
- id: 6,
+ id: 7,
name: r'notifications',
type: IsarType.bool,
),
r'onboard': PropertySchema(
- id: 7,
+ id: 8,
name: r'onboard',
type: IsarType.bool,
),
r'roundDegree': PropertySchema(
- id: 8,
+ id: 9,
name: r'roundDegree',
type: IsarType.bool,
),
r'theme': PropertySchema(
- id: 9,
+ id: 10,
name: r'theme',
type: IsarType.string,
),
r'timeEnd': PropertySchema(
- id: 10,
+ id: 11,
name: r'timeEnd',
type: IsarType.string,
),
r'timeRange': PropertySchema(
- id: 11,
+ id: 12,
name: r'timeRange',
type: IsarType.long,
),
r'timeStart': PropertySchema(
- id: 12,
+ id: 13,
name: r'timeStart',
type: IsarType.string,
),
r'timeformat': PropertySchema(
- id: 13,
+ id: 14,
name: r'timeformat',
type: IsarType.string,
),
r'widgetBackgroundColor': PropertySchema(
- id: 14,
+ id: 15,
name: r'widgetBackgroundColor',
type: IsarType.string,
),
r'widgetTextColor': PropertySchema(
- id: 15,
+ id: 16,
name: r'widgetTextColor',
type: IsarType.string,
)
@@ -169,19 +174,20 @@ void _settingsSerialize(
writer.writeBool(offsets[0], object.amoledTheme);
writer.writeString(offsets[1], object.degrees);
writer.writeString(offsets[2], object.language);
- writer.writeBool(offsets[3], object.location);
- writer.writeBool(offsets[4], object.materialColor);
- writer.writeString(offsets[5], object.measurements);
- writer.writeBool(offsets[6], object.notifications);
- writer.writeBool(offsets[7], object.onboard);
- writer.writeBool(offsets[8], object.roundDegree);
- writer.writeString(offsets[9], object.theme);
- writer.writeString(offsets[10], object.timeEnd);
- writer.writeLong(offsets[11], object.timeRange);
- writer.writeString(offsets[12], object.timeStart);
- writer.writeString(offsets[13], object.timeformat);
- writer.writeString(offsets[14], object.widgetBackgroundColor);
- writer.writeString(offsets[15], object.widgetTextColor);
+ writer.writeBool(offsets[3], object.largeElement);
+ writer.writeBool(offsets[4], object.location);
+ writer.writeBool(offsets[5], object.materialColor);
+ writer.writeString(offsets[6], object.measurements);
+ writer.writeBool(offsets[7], object.notifications);
+ writer.writeBool(offsets[8], object.onboard);
+ writer.writeBool(offsets[9], object.roundDegree);
+ writer.writeString(offsets[10], object.theme);
+ writer.writeString(offsets[11], object.timeEnd);
+ writer.writeLong(offsets[12], object.timeRange);
+ writer.writeString(offsets[13], object.timeStart);
+ writer.writeString(offsets[14], object.timeformat);
+ writer.writeString(offsets[15], object.widgetBackgroundColor);
+ writer.writeString(offsets[16], object.widgetTextColor);
}
Settings _settingsDeserialize(
@@ -195,19 +201,20 @@ Settings _settingsDeserialize(
object.degrees = reader.readString(offsets[1]);
object.id = id;
object.language = reader.readStringOrNull(offsets[2]);
- object.location = reader.readBool(offsets[3]);
- object.materialColor = reader.readBool(offsets[4]);
- object.measurements = reader.readString(offsets[5]);
- object.notifications = reader.readBool(offsets[6]);
- object.onboard = reader.readBool(offsets[7]);
- object.roundDegree = reader.readBool(offsets[8]);
- object.theme = reader.readStringOrNull(offsets[9]);
- object.timeEnd = reader.readStringOrNull(offsets[10]);
- object.timeRange = reader.readLongOrNull(offsets[11]);
- object.timeStart = reader.readStringOrNull(offsets[12]);
- object.timeformat = reader.readString(offsets[13]);
- object.widgetBackgroundColor = reader.readStringOrNull(offsets[14]);
- object.widgetTextColor = reader.readStringOrNull(offsets[15]);
+ object.largeElement = reader.readBool(offsets[3]);
+ object.location = reader.readBool(offsets[4]);
+ object.materialColor = reader.readBool(offsets[5]);
+ object.measurements = reader.readString(offsets[6]);
+ object.notifications = reader.readBool(offsets[7]);
+ object.onboard = reader.readBool(offsets[8]);
+ object.roundDegree = reader.readBool(offsets[9]);
+ object.theme = reader.readStringOrNull(offsets[10]);
+ object.timeEnd = reader.readStringOrNull(offsets[11]);
+ object.timeRange = reader.readLongOrNull(offsets[12]);
+ object.timeStart = reader.readStringOrNull(offsets[13]);
+ object.timeformat = reader.readString(offsets[14]);
+ object.widgetBackgroundColor = reader.readStringOrNull(offsets[15]);
+ object.widgetTextColor = reader.readStringOrNull(offsets[16]);
return object;
}
@@ -229,27 +236,29 @@ P _settingsDeserializeProp
(
case 4:
return (reader.readBool(offset)) as P;
case 5:
- return (reader.readString(offset)) as P;
- case 6:
return (reader.readBool(offset)) as P;
+ case 6:
+ return (reader.readString(offset)) as P;
case 7:
return (reader.readBool(offset)) as P;
case 8:
return (reader.readBool(offset)) as P;
case 9:
- return (reader.readStringOrNull(offset)) as P;
+ return (reader.readBool(offset)) as P;
case 10:
return (reader.readStringOrNull(offset)) as P;
case 11:
- return (reader.readLongOrNull(offset)) as P;
- case 12:
return (reader.readStringOrNull(offset)) as P;
+ case 12:
+ return (reader.readLongOrNull(offset)) as P;
case 13:
- return (reader.readString(offset)) as P;
- case 14:
return (reader.readStringOrNull(offset)) as P;
+ case 14:
+ return (reader.readString(offset)) as P;
case 15:
return (reader.readStringOrNull(offset)) as P;
+ case 16:
+ return (reader.readStringOrNull(offset)) as P;
default:
throw IsarError('Unknown property with id $propertyId');
}
@@ -682,6 +691,16 @@ extension SettingsQueryFilter
});
}
+ QueryBuilder largeElementEqualTo(
+ bool value) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(FilterCondition.equalTo(
+ property: r'largeElement',
+ value: value,
+ ));
+ });
+ }
+
QueryBuilder locationEqualTo(
bool value) {
return QueryBuilder.apply(this, (query) {
@@ -1858,6 +1877,18 @@ extension SettingsQuerySortBy on QueryBuilder {
});
}
+ QueryBuilder sortByLargeElement() {
+ return QueryBuilder.apply(this, (query) {
+ return query.addSortBy(r'largeElement', Sort.asc);
+ });
+ }
+
+ QueryBuilder sortByLargeElementDesc() {
+ return QueryBuilder.apply(this, (query) {
+ return query.addSortBy(r'largeElement', Sort.desc);
+ });
+ }
+
QueryBuilder sortByLocation() {
return QueryBuilder.apply(this, (query) {
return query.addSortBy(r'location', Sort.asc);
@@ -2066,6 +2097,18 @@ extension SettingsQuerySortThenBy
});
}
+ QueryBuilder thenByLargeElement() {
+ return QueryBuilder.apply(this, (query) {
+ return query.addSortBy(r'largeElement', Sort.asc);
+ });
+ }
+
+ QueryBuilder thenByLargeElementDesc() {
+ return QueryBuilder.apply(this, (query) {
+ return query.addSortBy(r'largeElement', Sort.desc);
+ });
+ }
+
QueryBuilder thenByLocation() {
return QueryBuilder.apply(this, (query) {
return query.addSortBy(r'location', Sort.asc);
@@ -2246,6 +2289,12 @@ extension SettingsQueryWhereDistinct
});
}
+ QueryBuilder distinctByLargeElement() {
+ return QueryBuilder.apply(this, (query) {
+ return query.addDistinctBy(r'largeElement');
+ });
+ }
+
QueryBuilder distinctByLocation() {
return QueryBuilder.apply(this, (query) {
return query.addDistinctBy(r'location');
@@ -2360,6 +2409,12 @@ extension SettingsQueryProperty
});
}
+ QueryBuilder largeElementProperty() {
+ return QueryBuilder.apply(this, (query) {
+ return query.addPropertyName(r'largeElement');
+ });
+ }
+
QueryBuilder locationProperty() {
return QueryBuilder.apply(this, (query) {
return query.addPropertyName(r'location');
diff --git a/lib/app/modules/settings/view/settings.dart b/lib/app/modules/settings/view/settings.dart
index d97259c..b017543 100644
--- a/lib/app/modules/settings/view/settings.dart
+++ b/lib/app/modules/settings/view/settings.dart
@@ -70,7 +70,8 @@ class _SettingsPageState extends State {
context: context,
builder: (BuildContext context) {
return Padding(
- padding: EdgeInsets.only(bottom: MediaQuery.of(context).padding.bottom),
+ padding: EdgeInsets.only(
+ bottom: MediaQuery.of(context).padding.bottom),
child: StatefulBuilder(
builder: (BuildContext context, setState) {
return SingleChildScrollView(
@@ -79,7 +80,8 @@ class _SettingsPageState extends State {
mainAxisSize: MainAxisSize.min,
children: [
Padding(
- padding: const EdgeInsets.symmetric(vertical: 15),
+ padding:
+ const EdgeInsets.symmetric(vertical: 15),
child: Text(
'appearance'.tr,
style: context.textTheme.titleLarge?.copyWith(
@@ -142,6 +144,24 @@ class _SettingsPageState extends State {
newMaterialColor: value);
},
),
+ SettingCard(
+ elevation: 4,
+ icon: const Icon(Iconsax.additem),
+ text: 'largeElement'.tr,
+ switcher: true,
+ value: settings.largeElement,
+ onChange: (value) {
+ settings.largeElement = value;
+ isar.writeTxnSync(
+ () => isar.settings.putSync(settings),
+ );
+ MyApp.updateAppState(
+ context,
+ newLargeElement: value,
+ );
+ setState(() {});
+ },
+ ),
const SizedBox(height: 10),
],
),
@@ -161,7 +181,8 @@ class _SettingsPageState extends State {
context: context,
builder: (BuildContext context) {
return Padding(
- padding: EdgeInsets.only(bottom: MediaQuery.of(context).padding.bottom),
+ padding: EdgeInsets.only(
+ bottom: MediaQuery.of(context).padding.bottom),
child: StatefulBuilder(
builder: (BuildContext context, setState) {
return SingleChildScrollView(
@@ -170,7 +191,8 @@ class _SettingsPageState extends State {
mainAxisSize: MainAxisSize.min,
children: [
Padding(
- padding: const EdgeInsets.symmetric(vertical: 15),
+ padding:
+ const EdgeInsets.symmetric(vertical: 15),
child: Text(
'functions'.tr,
style: context.textTheme.titleLarge?.copyWith(
@@ -196,7 +218,8 @@ class _SettingsPageState extends State {
return AlertDialog.adaptive(
title: Text(
'location'.tr,
- style: context.textTheme.titleLarge,
+ style:
+ context.textTheme.titleLarge,
),
content: Text('no_location'.tr,
style: context
@@ -210,8 +233,8 @@ class _SettingsPageState extends State {
style: context
.textTheme.titleMedium
?.copyWith(
- color:
- Colors.blueAccent),
+ color: Colors
+ .blueAccent),
),
),
TextButton(
@@ -232,7 +255,7 @@ class _SettingsPageState extends State {
);
},
);
-
+
return;
}
weatherController.getCurrentLocation();
@@ -274,7 +297,8 @@ class _SettingsPageState extends State {
weatherController.notification(
weatherController.mainWeather);
} else {
- flutterLocalNotificationsPlugin.cancelAll();
+ flutterLocalNotificationsPlugin
+ .cancelAll();
}
setState(() {});
}
@@ -315,25 +339,28 @@ class _SettingsPageState extends State {
infoSettings: true,
infoWidget: _TextInfo(
info: settings.timeformat == '12'
- ? DateFormat.jm(locale.languageCode).format(
- DateFormat.Hm(locale.languageCode)
- .parse(weatherController
- .timeConvert(timeStart)
- .format(context)))
- : DateFormat.Hm(locale.languageCode).format(
- DateFormat.Hm(locale.languageCode)
- .parse(weatherController
- .timeConvert(timeStart)
- .format(context))),
+ ? DateFormat.jm(locale.languageCode)
+ .format(
+ DateFormat.Hm(locale.languageCode)
+ .parse(weatherController
+ .timeConvert(timeStart)
+ .format(context)))
+ : DateFormat.Hm(locale.languageCode)
+ .format(
+ DateFormat.Hm(locale.languageCode)
+ .parse(weatherController
+ .timeConvert(timeStart)
+ .format(context))),
),
onPressed: () async {
final TimeOfDay? timeStartPicker =
await showTimePicker(
context: context,
- initialTime:
- weatherController.timeConvert(timeStart),
+ initialTime: weatherController
+ .timeConvert(timeStart),
builder: (context, child) {
- final Widget mediaQueryWrapper = MediaQuery(
+ final Widget mediaQueryWrapper =
+ MediaQuery(
data: MediaQuery.of(context).copyWith(
alwaysUse24HourFormat:
settings.timeformat == '12'
@@ -356,7 +383,8 @@ class _SettingsPageState extends State {
newTimeStart:
timeStartPicker.format(context));
if (settings.notifications) {
- flutterLocalNotificationsPlugin.cancelAll();
+ flutterLocalNotificationsPlugin
+ .cancelAll();
weatherController.notification(
weatherController.mainWeather);
}
@@ -371,16 +399,18 @@ class _SettingsPageState extends State {
infoSettings: true,
infoWidget: _TextInfo(
info: settings.timeformat == '12'
- ? DateFormat.jm(locale.languageCode).format(
- DateFormat.Hm(locale.languageCode)
- .parse(weatherController
- .timeConvert(timeEnd)
- .format(context)))
- : DateFormat.Hm(locale.languageCode).format(
- DateFormat.Hm(locale.languageCode)
- .parse(weatherController
- .timeConvert(timeEnd)
- .format(context))),
+ ? DateFormat.jm(locale.languageCode)
+ .format(
+ DateFormat.Hm(locale.languageCode)
+ .parse(weatherController
+ .timeConvert(timeEnd)
+ .format(context)))
+ : DateFormat.Hm(locale.languageCode)
+ .format(
+ DateFormat.Hm(locale.languageCode)
+ .parse(weatherController
+ .timeConvert(timeEnd)
+ .format(context))),
),
onPressed: () async {
final TimeOfDay? timeEndPicker =
@@ -389,7 +419,8 @@ class _SettingsPageState extends State {
initialTime:
weatherController.timeConvert(timeEnd),
builder: (context, child) {
- final Widget mediaQueryWrapper = MediaQuery(
+ final Widget mediaQueryWrapper =
+ MediaQuery(
data: MediaQuery.of(context).copyWith(
alwaysUse24HourFormat:
settings.timeformat == '12'
@@ -412,7 +443,8 @@ class _SettingsPageState extends State {
newTimeEnd:
timeEndPicker.format(context));
if (settings.notifications) {
- flutterLocalNotificationsPlugin.cancelAll();
+ flutterLocalNotificationsPlugin
+ .cancelAll();
weatherController.notification(
weatherController.mainWeather);
}
@@ -438,7 +470,8 @@ class _SettingsPageState extends State {
context: context,
builder: (BuildContext context) {
return Padding(
- padding: EdgeInsets.only(bottom: MediaQuery.of(context).padding.bottom),
+ padding: EdgeInsets.only(
+ bottom: MediaQuery.of(context).padding.bottom),
child: StatefulBuilder(
builder: (BuildContext context, setState) {
return SingleChildScrollView(
@@ -447,7 +480,8 @@ class _SettingsPageState extends State {
mainAxisSize: MainAxisSize.min,
children: [
Padding(
- padding: const EdgeInsets.symmetric(vertical: 15),
+ padding:
+ const EdgeInsets.symmetric(vertical: 15),
child: Text(
'data'.tr,
style: context.textTheme.titleLarge?.copyWith(
@@ -555,7 +589,8 @@ class _SettingsPageState extends State {
context: context,
builder: (BuildContext context) {
return Padding(
- padding: EdgeInsets.only(bottom: MediaQuery.of(context).padding.bottom),
+ padding: EdgeInsets.only(
+ bottom: MediaQuery.of(context).padding.bottom),
child: StatefulBuilder(
builder: (BuildContext context, setState) {
return SingleChildScrollView(
@@ -564,7 +599,8 @@ class _SettingsPageState extends State {
mainAxisSize: MainAxisSize.min,
children: [
Padding(
- padding: const EdgeInsets.symmetric(vertical: 15),
+ padding:
+ const EdgeInsets.symmetric(vertical: 15),
child: Text(
'widget'.tr,
style: context.textTheme.titleLarge?.copyWith(
@@ -581,9 +617,11 @@ class _SettingsPageState extends State {
backgroundColor: context.theme.indicatorColor,
radius: 11,
child: CircleAvatar(
- backgroundColor: widgetBackgroundColor.isEmpty
- ? context.theme.primaryColor
- : HexColor.fromHex(widgetBackgroundColor),
+ backgroundColor:
+ widgetBackgroundColor.isEmpty
+ ? context.theme.primaryColor
+ : HexColor.fromHex(
+ widgetBackgroundColor),
radius: 10,
),
),
@@ -599,8 +637,9 @@ class _SettingsPageState extends State {
CrossAxisAlignment.center,
children: [
Padding(
- padding: const EdgeInsets.symmetric(
- vertical: 15),
+ padding:
+ const EdgeInsets.symmetric(
+ vertical: 15),
child: Text(
'widgetBackground'.tr,
style: context
@@ -609,8 +648,9 @@ class _SettingsPageState extends State {
),
),
Padding(
- padding: const EdgeInsets.symmetric(
- horizontal: 15),
+ padding:
+ const EdgeInsets.symmetric(
+ horizontal: 15),
child: Theme(
data: context.theme.copyWith(
inputDecorationTheme:
@@ -625,7 +665,8 @@ class _SettingsPageState extends State {
child: ColorPicker(
color: widgetBackgroundColor
.isEmpty
- ? context.theme.primaryColor
+ ? context
+ .theme.primaryColor
: HexColor.fromHex(
widgetBackgroundColor),
onChanged: (pickedColor) {
@@ -686,8 +727,9 @@ class _SettingsPageState extends State {
CrossAxisAlignment.center,
children: [
Padding(
- padding: const EdgeInsets.symmetric(
- vertical: 15),
+ padding:
+ const EdgeInsets.symmetric(
+ vertical: 15),
child: Text(
'widgetText'.tr,
style: context
@@ -696,8 +738,9 @@ class _SettingsPageState extends State {
),
),
Padding(
- padding: const EdgeInsets.symmetric(
- horizontal: 15),
+ padding:
+ const EdgeInsets.symmetric(
+ horizontal: 15),
child: Theme(
data: context.theme.copyWith(
inputDecorationTheme:
@@ -711,7 +754,8 @@ class _SettingsPageState extends State {
),
child: ColorPicker(
color: widgetTextColor.isEmpty
- ? context.theme.primaryColor
+ ? context
+ .theme.primaryColor
: HexColor.fromHex(
widgetTextColor),
onChanged: (pickedColor) {
@@ -769,7 +813,8 @@ class _SettingsPageState extends State {
context: context,
builder: (BuildContext context) {
return Padding(
- padding: EdgeInsets.only(bottom: MediaQuery.of(context).padding.bottom),
+ padding: EdgeInsets.only(
+ bottom: MediaQuery.of(context).padding.bottom),
child: StatefulBuilder(
builder: (BuildContext context, setState) {
return ListView(
@@ -828,7 +873,8 @@ class _SettingsPageState extends State {
context: context,
builder: (BuildContext context) {
return Padding(
- padding: EdgeInsets.only(bottom: MediaQuery.of(context).padding.bottom),
+ padding: EdgeInsets.only(
+ bottom: MediaQuery.of(context).padding.bottom),
child: StatefulBuilder(
builder: (BuildContext context, setState) {
return SingleChildScrollView(
@@ -837,7 +883,8 @@ class _SettingsPageState extends State {
mainAxisSize: MainAxisSize.min,
children: [
Padding(
- padding: const EdgeInsets.symmetric(vertical: 15),
+ padding:
+ const EdgeInsets.symmetric(vertical: 15),
child: Text(
'support'.tr,
style: context.textTheme.titleLarge?.copyWith(
@@ -878,7 +925,8 @@ class _SettingsPageState extends State {
context: context,
builder: (BuildContext context) {
return Padding(
- padding: EdgeInsets.only(bottom: MediaQuery.of(context).padding.bottom),
+ padding: EdgeInsets.only(
+ bottom: MediaQuery.of(context).padding.bottom),
child: StatefulBuilder(
builder: (BuildContext context, setState) {
return SingleChildScrollView(
@@ -901,8 +949,8 @@ class _SettingsPageState extends State {
icon: const Icon(Iconsax.voice_square),
text: 'Discord',
onPressed: () async {
- final Uri url =
- Uri.parse('https://discord.gg/JMMa9aHh8f');
+ final Uri url = Uri.parse(
+ 'https://discord.gg/JMMa9aHh8f');
if (!await launchUrl(url,
mode: LaunchMode.externalApplication)) {
throw Exception('Could not launch $url');
diff --git a/lib/app/widgets/now/weather_now.dart b/lib/app/widgets/now/weather_now.dart
index ed38289..8d97f11 100644
--- a/lib/app/widgets/now/weather_now.dart
+++ b/lib/app/widgets/now/weather_now.dart
@@ -1,4 +1,5 @@
import 'package:flutter/material.dart';
+import 'package:flutter_glow/flutter_glow.dart';
import 'package:get/get.dart';
import 'package:intl/intl.dart';
import 'package:rain/app/widgets/status/status_data.dart';
@@ -34,64 +35,102 @@ class _WeatherNowState extends State {
@override
Widget build(BuildContext context) {
- return Card(
- margin: const EdgeInsets.only(bottom: 15),
- child: Padding(
- padding:
- const EdgeInsets.only(top: 18, bottom: 18, left: 25, right: 15),
- child: Row(
- crossAxisAlignment: CrossAxisAlignment.center,
- children: [
- Expanded(
- child: Column(
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- Text(
- DateFormat.MMMMEEEEd(locale.languageCode).format(
- DateTime.parse(widget.time),
- ),
- style: context.textTheme.labelLarge?.copyWith(
- color: Colors.grey,
- ),
+ return largeElement
+ ? Padding(
+ padding: const EdgeInsets.only(bottom: 15),
+ child: Column(
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ const SizedBox(height: 15),
+ Image(
+ image: AssetImage(statusWeather.getImageNow(widget.weather,
+ widget.time, widget.timeDay, widget.timeNight)),
+ fit: BoxFit.fill,
+ height: 200,
+ ),
+ GlowText(
+ '${roundDegree ? widget.degree.round() : widget.degree}',
+ style: context.textTheme.displayLarge?.copyWith(
+ fontSize: 90,
+ fontWeight: FontWeight.w800,
+ ),
+ ),
+ Text(
+ statusWeather.getText(widget.weather),
+ style: context.textTheme.titleLarge,
+ ),
+ const SizedBox(height: 5),
+ Text(
+ DateFormat.MMMMEEEEd(locale.languageCode).format(
+ DateTime.parse(widget.time),
),
- const SizedBox(height: 5),
- Text(
- statusWeather.getText(widget.weather),
- style: context.textTheme.titleLarge?.copyWith(fontSize: 20),
+ style: context.textTheme.labelLarge?.copyWith(
+ color: Colors.grey,
),
- const SizedBox(height: 30),
- Text(
- statusData.getDegree(
- roundDegree ? widget.degree.round() : widget.degree),
- style: context.textTheme.displayMedium?.copyWith(
- fontWeight: FontWeight.w800,
+ ),
+ ],
+ ),
+ )
+ : Card(
+ margin: const EdgeInsets.only(bottom: 15),
+ child: Padding(
+ padding: const EdgeInsets.only(
+ top: 18, bottom: 18, left: 25, right: 15),
+ child: Row(
+ crossAxisAlignment: CrossAxisAlignment.center,
+ children: [
+ Expanded(
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Text(
+ DateFormat.MMMMEEEEd(locale.languageCode).format(
+ DateTime.parse(widget.time),
+ ),
+ style: context.textTheme.labelLarge?.copyWith(
+ color: Colors.grey,
+ ),
+ ),
+ const SizedBox(height: 5),
+ Text(
+ statusWeather.getText(widget.weather),
+ style: context.textTheme.titleLarge
+ ?.copyWith(fontSize: 20),
+ ),
+ const SizedBox(height: 30),
+ Text(
+ statusData.getDegree(roundDegree
+ ? widget.degree.round()
+ : widget.degree),
+ style: context.textTheme.displayMedium?.copyWith(
+ fontWeight: FontWeight.w800,
+ ),
+ ),
+ const SizedBox(height: 5),
+ Row(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Text(statusData.getDegree((widget.tempMin.round())),
+ style: context.textTheme.labelLarge),
+ Text(' / ',
+ style: context.textTheme.labelLarge
+ ?.copyWith(color: Colors.grey)),
+ Text(statusData.getDegree((widget.tempMax.round())),
+ style: context.textTheme.labelLarge),
+ ],
+ ),
+ ],
),
),
- const SizedBox(height: 5),
- Row(
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- Text(statusData.getDegree((widget.tempMin.round())),
- style: context.textTheme.labelLarge),
- Text(' / ',
- style: context.textTheme.labelLarge
- ?.copyWith(color: Colors.grey)),
- Text(statusData.getDegree((widget.tempMax.round())),
- style: context.textTheme.labelLarge),
- ],
+ Image(
+ image: AssetImage(statusWeather.getImageNow(widget.weather,
+ widget.time, widget.timeDay, widget.timeNight)),
+ fit: BoxFit.fill,
+ height: 140,
),
],
),
),
- Image(
- image: AssetImage(statusWeather.getImageNow(widget.weather,
- widget.time, widget.timeDay, widget.timeNight)),
- fit: BoxFit.fill,
- height: 140,
- ),
- ],
- ),
- ),
- );
+ );
}
}
diff --git a/lib/app/widgets/sun_moon/sunset_sunrise.dart b/lib/app/widgets/sun_moon/sunset_sunrise.dart
index e6f1909..f5a2112 100644
--- a/lib/app/widgets/sun_moon/sunset_sunrise.dart
+++ b/lib/app/widgets/sun_moon/sunset_sunrise.dart
@@ -21,7 +21,6 @@ class _SunsetSunriseState extends State {
@override
Widget build(BuildContext context) {
- const crossAxisCenterAlignment = CrossAxisAlignment.center;
final textTheme = context.textTheme;
final titleSmall = textTheme.titleSmall;
final titleLarge = textTheme.titleLarge;
@@ -34,17 +33,16 @@ class _SunsetSunriseState extends State {
children: [
Expanded(
child: Row(
- crossAxisAlignment: crossAxisCenterAlignment,
+ mainAxisAlignment: MainAxisAlignment.center,
children: [
Expanded(
child: Column(
- crossAxisAlignment: crossAxisCenterAlignment,
+ crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
'sunrise'.tr,
style: titleSmall,
overflow: TextOverflow.ellipsis,
- textAlign: TextAlign.center,
),
const SizedBox(height: 2),
Text(
@@ -66,17 +64,16 @@ class _SunsetSunriseState extends State {
),
Expanded(
child: Row(
- crossAxisAlignment: crossAxisCenterAlignment,
+ mainAxisAlignment: MainAxisAlignment.center,
children: [
Expanded(
child: Column(
- crossAxisAlignment: crossAxisCenterAlignment,
+ crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
'sunset'.tr,
style: titleSmall,
overflow: TextOverflow.ellipsis,
- textAlign: TextAlign.center,
),
const SizedBox(height: 2),
Text(
diff --git a/lib/main.dart b/lib/main.dart
index 2f91b26..ea9a567 100644
--- a/lib/main.dart
+++ b/lib/main.dart
@@ -39,6 +39,7 @@ FlutterLocalNotificationsPlugin flutterLocalNotificationsPlugin =
bool amoledTheme = false;
bool materialColor = false;
bool roundDegree = false;
+bool largeElement = false;
Locale locale = const Locale('en', 'US');
int timeRange = 1;
String timeStart = '09:00';
@@ -165,6 +166,7 @@ class MyApp extends StatefulWidget {
bool? newAmoledTheme,
bool? newMaterialColor,
bool? newRoundDegree,
+ bool? newLargeElement,
Locale? newLocale,
int? newTimeRange,
String? newTimeStart,
@@ -183,6 +185,9 @@ class MyApp extends StatefulWidget {
if (newRoundDegree != null) {
state.changeRoundDegree(newRoundDegree);
}
+ if (newLargeElement != null) {
+ state.changeLargeElement(newLargeElement);
+ }
if (newLocale != null) {
state.changeLocale(newLocale);
}
@@ -228,6 +233,12 @@ class _MyAppState extends State {
});
}
+ void changeLargeElement(bool newLargeElement) {
+ setState(() {
+ largeElement = newLargeElement;
+ });
+ }
+
void changeTimeRange(int newTimeRange) {
setState(() {
timeRange = newTimeRange;
@@ -269,6 +280,7 @@ class _MyAppState extends State {
amoledTheme = settings.amoledTheme;
materialColor = settings.materialColor;
roundDegree = settings.roundDegree;
+ largeElement = settings.largeElement;
locale = Locale(
settings.language!.substring(0, 2), settings.language!.substring(3));
timeRange = settings.timeRange ?? 1;
diff --git a/lib/translation/bn_in.dart b/lib/translation/bn_in.dart
index f4ef479..10ffbcb 100644
--- a/lib/translation/bn_in.dart
+++ b/lib/translation/bn_in.dart
@@ -128,5 +128,6 @@ class BnIn {
'openMeteo': 'Open-Meteo থেকে ডেটা (CC-BY 4.0)',
'hourlyVariables': 'ঘণ্টায় আবহাওয়ার পরিবর্তনশীল',
'dailyVariables': 'দৈনিক আবহাওয়ার পরিবর্তনশীল',
+ 'largeElement': 'বড় আবহাওয়া ডিসপ্লে',
};
}
diff --git a/lib/translation/cs_cz.dart b/lib/translation/cs_cz.dart
index 1c853cd..ec7bf4d 100644
--- a/lib/translation/cs_cz.dart
+++ b/lib/translation/cs_cz.dart
@@ -128,5 +128,6 @@ class CsCz {
'openMeteo': 'Data z Open-Meteo (CC-BY 4.0)',
'hourlyVariables': 'Hodinové meteorologické proměnné',
'dailyVariables': 'Denní meteorologické proměnné',
+ 'largeElement': 'Velké zobrazení počasí',
};
}
diff --git a/lib/translation/da_dk.dart b/lib/translation/da_dk.dart
index 5247ea8..288caa5 100644
--- a/lib/translation/da_dk.dart
+++ b/lib/translation/da_dk.dart
@@ -129,5 +129,6 @@ class DaDk {
'openMeteo': 'Data fra Open-Meteo (CC-BY 4.0)',
'hourlyVariables': 'Timevise vejrfaktorer',
'dailyVariables': 'Daglige vejrfaktorer',
+ 'largeElement': 'Stort vejrdisplay',
};
}
diff --git a/lib/translation/de_de.dart b/lib/translation/de_de.dart
index 9336a62..5f61e64 100644
--- a/lib/translation/de_de.dart
+++ b/lib/translation/de_de.dart
@@ -130,5 +130,6 @@ class DeDe {
'openMeteo': 'Daten von Open-Meteo (CC-BY 4.0)',
'hourlyVariables': 'Stündliche Wettervariablen',
'dailyVariables': 'Tägliche Wettervariablen',
+ 'largeElement': 'Große Wetteranzeige',
};
}
diff --git a/lib/translation/en_us.dart b/lib/translation/en_us.dart
index 6b4b494..f850f69 100644
--- a/lib/translation/en_us.dart
+++ b/lib/translation/en_us.dart
@@ -129,5 +129,6 @@ class EnUs {
'openMeteo': 'Data by Open-Meteo (CC-BY 4.0)',
'hourlyVariables': 'Hourly weather variables',
'dailyVariables': 'Daily weather variables',
+ 'largeElement': 'Large weather display',
};
}
diff --git a/lib/translation/es_es.dart b/lib/translation/es_es.dart
index c4ee344..219038b 100644
--- a/lib/translation/es_es.dart
+++ b/lib/translation/es_es.dart
@@ -130,5 +130,6 @@ class EsEs {
'openMeteo': 'Datos de Open-Meteo (CC-BY 4.0)',
'hourlyVariables': 'Variables meteorológicas horarias',
'dailyVariables': 'Variables meteorológicas diarias',
+ 'largeElement': 'Visualización grande del clima',
};
}
diff --git a/lib/translation/fa_ir.dart b/lib/translation/fa_ir.dart
index 8dd4d58..423c223 100644
--- a/lib/translation/fa_ir.dart
+++ b/lib/translation/fa_ir.dart
@@ -129,5 +129,6 @@ class FaIr {
'openMeteo': 'دادهها از Open-Meteo (CC-BY 4.0)',
'hourlyVariables': 'متغیرهای ساعتی هواشناسی',
'dailyVariables': 'متغیرهای روزانه هواشناسی',
+ 'largeElement': 'نمایش هواشناسی بزرگ',
};
}
diff --git a/lib/translation/fr_fr.dart b/lib/translation/fr_fr.dart
index fab6bd4..ff5aea0 100644
--- a/lib/translation/fr_fr.dart
+++ b/lib/translation/fr_fr.dart
@@ -130,5 +130,6 @@ class FrFr {
'openMeteo': 'Données de Open-Meteo (CC-BY 4.0)',
'hourlyVariables': 'Variables météorologiques horaires',
'dailyVariables': 'Variables météorologiques quotidiennes',
+ 'largeElement': 'Affichage météo grand format',
};
}
diff --git a/lib/translation/ga_ie.dart b/lib/translation/ga_ie.dart
index 708bc9b..89c8bcd 100644
--- a/lib/translation/ga_ie.dart
+++ b/lib/translation/ga_ie.dart
@@ -130,5 +130,6 @@ class GaIe {
'openMeteo': 'Sonraí ó Open-Meteo (CC-BY 4.0)',
'hourlyVariables': 'Athrógacha aimsire uaireanta',
'dailyVariables': 'Athrógacha aimsire laethúla',
+ 'largeElement': 'Taispeáint mór na haimsire',
};
}
diff --git a/lib/translation/hi_in.dart b/lib/translation/hi_in.dart
index e546d63..97e0037 100644
--- a/lib/translation/hi_in.dart
+++ b/lib/translation/hi_in.dart
@@ -127,5 +127,6 @@ class HiIn {
'openMeteo': 'Open-Meteo से डेटा (CC-BY 4.0)',
'hourlyVariables': 'घंटेवार मौसम चर',
'dailyVariables': 'दैनिक मौसम चर',
+ 'largeElement': 'बड़े मौसम का प्रदर्शन',
};
}
diff --git a/lib/translation/hu_hu.dart b/lib/translation/hu_hu.dart
index 628e565..7b616f3 100644
--- a/lib/translation/hu_hu.dart
+++ b/lib/translation/hu_hu.dart
@@ -130,5 +130,6 @@ class HuHu {
'openMeteo': 'Adatok az Open-Meteo-tól (CC-BY 4.0)',
'hourlyVariables': 'Óránkénti időjárási változók',
'dailyVariables': 'Napi időjárási változók',
+ 'largeElement': 'Nagy méretű időjárás megjelenítése',
};
}
diff --git a/lib/translation/it_it.dart b/lib/translation/it_it.dart
index b79ca68..04f4651 100644
--- a/lib/translation/it_it.dart
+++ b/lib/translation/it_it.dart
@@ -130,5 +130,6 @@ class ItIt {
'openMeteo': 'Dati da Open-Meteo (CC-BY 4.0)',
'hourlyVariables': 'Variabili meteorologiche orarie',
'dailyVariables': 'Variabili meteorologiche giornaliere',
+ 'largeElement': 'Visualizzazione grande elemento meteo',
};
}
diff --git a/lib/translation/ka_ge.dart b/lib/translation/ka_ge.dart
index 8f72162..2a92248 100644
--- a/lib/translation/ka_ge.dart
+++ b/lib/translation/ka_ge.dart
@@ -129,5 +129,6 @@ class KaGe {
'openMeteo': 'მონაცემები Open-Meteo-დან (CC-BY 4.0)',
'hourlyVariables': 'საათობრივი ამინდის ცვლადები',
'dailyVariables': 'ყოველდღიური ამინდის ცვლადები',
+ 'largeElement': 'გადიდი ამინდის გამოჩენა',
};
}
diff --git a/lib/translation/ko_kr.dart b/lib/translation/ko_kr.dart
index 29a5b25..b47dea5 100644
--- a/lib/translation/ko_kr.dart
+++ b/lib/translation/ko_kr.dart
@@ -125,5 +125,6 @@ class KoKr {
'openMeteo': 'Open-Meteo의 데이터 (CC-BY 4.0)',
'hourlyVariables': '시간별 날씨 변수',
'dailyVariables': '일별 날씨 변수',
+ 'largeElement': '큰 날씨 표시',
};
}
diff --git a/lib/translation/nl_nl.dart b/lib/translation/nl_nl.dart
index 05b0d46..9956b05 100644
--- a/lib/translation/nl_nl.dart
+++ b/lib/translation/nl_nl.dart
@@ -130,5 +130,6 @@ class NlNl {
'openMeteo': 'Gegevens van Open-Meteo (CC-BY 4.0)',
'hourlyVariables': 'Uurlijkse weervariabelen',
'dailyVariables': 'Dagelijkse weervariabelen',
+ 'largeElement': 'Groot weerbericht weergeven',
};
}
diff --git a/lib/translation/pl_pl.dart b/lib/translation/pl_pl.dart
index 3502ec4..e89f868 100644
--- a/lib/translation/pl_pl.dart
+++ b/lib/translation/pl_pl.dart
@@ -128,5 +128,6 @@ class PlPl {
'openMeteo': 'Dane z Open-Meteo (CC-BY 4.0)',
'hourlyVariables': 'Godzinowe zmienne pogodowe',
'dailyVariables': 'Dzienne zmienne pogodowe',
+ 'largeElement': 'Duże wyświetlanie pogody',
};
}
diff --git a/lib/translation/pt_br.dart b/lib/translation/pt_br.dart
index fc741aa..f4c4898 100644
--- a/lib/translation/pt_br.dart
+++ b/lib/translation/pt_br.dart
@@ -129,5 +129,6 @@ class PtBr {
'openMeteo': 'Dados do Open-Meteo (CC-BY 4.0)',
'hourlyVariables': 'Variáveis meteorológicas horárias',
'dailyVariables': 'Variáveis meteorológicas diárias',
+ 'largeElement': 'Exibição grande do clima',
};
}
diff --git a/lib/translation/ro_ro.dart b/lib/translation/ro_ro.dart
index d249307..3fbf2d8 100644
--- a/lib/translation/ro_ro.dart
+++ b/lib/translation/ro_ro.dart
@@ -128,5 +128,6 @@ class RoRo {
'openMeteo': 'Date de la Open-Meteo (CC-BY 4.0)',
'hourlyVariables': 'Variabile meteorologice orare',
'dailyVariables': 'Variabile meteorologice zilnice',
+ 'largeElement': 'Afișare mare a vremii',
};
}
diff --git a/lib/translation/ru_ru.dart b/lib/translation/ru_ru.dart
index facdc1c..8f5915c 100644
--- a/lib/translation/ru_ru.dart
+++ b/lib/translation/ru_ru.dart
@@ -129,5 +129,6 @@ class RuRu {
'openMeteo': 'Данные от Open-Meteo (CC-BY 4.0)',
'hourlyVariables': 'Почасовые погодные условия',
'dailyVariables': 'Ежедневные погодные условия',
+ 'largeElement': 'Отображение погоды большим элементом',
};
}
diff --git a/lib/translation/sk_sk.dart b/lib/translation/sk_sk.dart
index 6b52942..3a09a15 100644
--- a/lib/translation/sk_sk.dart
+++ b/lib/translation/sk_sk.dart
@@ -128,5 +128,6 @@ class SkSk {
'openMeteo': 'Údaje od Open-Meteo (CC-BY 4.0)',
'hourlyVariables': 'Hodinové meteorologické premenné',
'dailyVariables': 'Denné meteorologické premenné',
+ 'largeElement': 'Veľké zobrazenie počasia',
};
}
diff --git a/lib/translation/tr_tr.dart b/lib/translation/tr_tr.dart
index 7c2f3ba..47f17d5 100644
--- a/lib/translation/tr_tr.dart
+++ b/lib/translation/tr_tr.dart
@@ -128,5 +128,6 @@ class TrTr {
'openMeteo': 'Open-Meteo\'dan veriler (CC-BY 4.0)',
'hourlyVariables': 'Saatlik hava değişkenleri',
'dailyVariables': 'Günlük hava değişkenleri',
+ 'largeElement': 'Büyük hava durumu gösterimi',
};
}
diff --git a/lib/translation/ur_pk.dart b/lib/translation/ur_pk.dart
index d7fae52..bc9e8a6 100644
--- a/lib/translation/ur_pk.dart
+++ b/lib/translation/ur_pk.dart
@@ -129,5 +129,6 @@ class UrPk {
'openMeteo': 'Open-Meteo سے ڈیٹا (CC-BY 4.0)',
'hourlyVariables': 'ہر گھنٹے کے موسمی متغیرات',
'dailyVariables': 'روزانہ کے موسمی متغیرات',
+ 'largeElement': 'بڑے موسم کا ڈسپلے',
};
}
diff --git a/lib/translation/zh_ch.dart b/lib/translation/zh_ch.dart
index 4959aea..b897c28 100644
--- a/lib/translation/zh_ch.dart
+++ b/lib/translation/zh_ch.dart
@@ -124,5 +124,6 @@ class ZhCh {
'openMeteo': '来自Open-Meteo的数据 (CC-BY 4.0)',
'hourlyVariables': '每小时天气变量',
'dailyVariables': '每日天气变量',
+ 'largeElement': '大天气显示',
};
}
diff --git a/lib/translation/zh_tw.dart b/lib/translation/zh_tw.dart
index 82f2bb5..9b1d448 100644
--- a/lib/translation/zh_tw.dart
+++ b/lib/translation/zh_tw.dart
@@ -125,5 +125,6 @@ class ZhTw {
'openMeteo': '來自Open-Meteo的數據 (CC-BY 4.0)',
'hourlyVariables': '每小時天氣變量',
'dailyVariables': '每日天氣變量',
+ 'largeElement': '大型天氣顯示',
};
}