theme
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 564 B |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 1 KiB |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 2.6 KiB |
After Width: | Height: | Size: 2.6 KiB |
After Width: | Height: | Size: 3.7 KiB |
After Width: | Height: | Size: 1.8 KiB |
After Width: | Height: | Size: 3.2 KiB |
After Width: | Height: | Size: 3.5 KiB |
|
@ -201,16 +201,10 @@ class _HomePageState extends State<HomePage> with TickerProviderStateMixin {
|
|||
splashColor: Colors.transparent,
|
||||
highlightColor: Colors.transparent,
|
||||
),
|
||||
child: Container(
|
||||
height: 60,
|
||||
decoration: BoxDecoration(
|
||||
color: context.theme.bottomNavigationBarTheme.backgroundColor,
|
||||
),
|
||||
child: TabBar(
|
||||
controller: tabController,
|
||||
dividerColor: Colors.transparent,
|
||||
indicator:
|
||||
const UnderlineTabIndicator(borderSide: BorderSide.none),
|
||||
indicator: const UnderlineTabIndicator(borderSide: BorderSide.none),
|
||||
labelColor: Colors.blueAccent,
|
||||
unselectedLabelColor: Colors.grey,
|
||||
onTap: (int index) => changeTabIndex(index),
|
||||
|
@ -221,7 +215,6 @@ class _HomePageState extends State<HomePage> with TickerProviderStateMixin {
|
|||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
floatingActionButton: tabIndex == 1
|
||||
? FloatingActionButton(
|
||||
onPressed: () => showModalBottomSheet(
|
||||
|
@ -233,7 +226,6 @@ class _HomePageState extends State<HomePage> with TickerProviderStateMixin {
|
|||
return const CreateWeatherCard();
|
||||
},
|
||||
),
|
||||
backgroundColor: context.theme.colorScheme.tertiaryContainer,
|
||||
child: const Icon(Iconsax.add),
|
||||
)
|
||||
: null,
|
||||
|
|
|
@ -62,15 +62,7 @@ class _SettingsPageState extends State<SettingsPage> {
|
|||
builder: (BuildContext context) {
|
||||
return StatefulBuilder(
|
||||
builder: (BuildContext context, setState) {
|
||||
return Container(
|
||||
decoration: BoxDecoration(
|
||||
color: context.theme.colorScheme.secondaryContainer,
|
||||
borderRadius: const BorderRadius.only(
|
||||
topLeft: Radius.circular(20),
|
||||
topRight: Radius.circular(20),
|
||||
),
|
||||
),
|
||||
child: Column(
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
|
@ -96,8 +88,7 @@ class _SettingsPageState extends State<SettingsPage> {
|
|||
.changeThemeMode(ThemeMode.light);
|
||||
themeController.saveTheme(false);
|
||||
} else {
|
||||
themeController
|
||||
.changeThemeMode(ThemeMode.dark);
|
||||
themeController.changeThemeMode(ThemeMode.dark);
|
||||
themeController.saveTheme(true);
|
||||
}
|
||||
},
|
||||
|
@ -116,25 +107,22 @@ class _SettingsPageState extends State<SettingsPage> {
|
|||
newAmoledTheme: value);
|
||||
},
|
||||
),
|
||||
// SettingLinks(
|
||||
// icon: Icon(
|
||||
// Iconsax.colorfilter,
|
||||
// color: context.theme.iconTheme.color,
|
||||
// ),
|
||||
// text: 'materialColor'.tr,
|
||||
// switcher: true,
|
||||
// value: settings.materialColor,
|
||||
// onChange: (value) {
|
||||
// isar.writeTxn(() async {
|
||||
// settings.materialColor = value;
|
||||
// isar.settings.put(settings);
|
||||
// });
|
||||
// setState(() {});
|
||||
// },
|
||||
// ),
|
||||
SettingLinks(
|
||||
icon: Icon(
|
||||
Iconsax.colorfilter,
|
||||
color: context.theme.iconTheme.color,
|
||||
),
|
||||
text: 'materialColor'.tr,
|
||||
switcher: true,
|
||||
value: settings.materialColor,
|
||||
onChange: (value) {
|
||||
themeController.saveMaterialTheme(value);
|
||||
MyApp.updateAppState(context,
|
||||
newMaterialColor: value);
|
||||
},
|
||||
),
|
||||
const SizedBox(height: 10),
|
||||
],
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
|
@ -155,15 +143,7 @@ class _SettingsPageState extends State<SettingsPage> {
|
|||
builder: (BuildContext context) {
|
||||
return StatefulBuilder(
|
||||
builder: (BuildContext context, setState) {
|
||||
return Container(
|
||||
decoration: BoxDecoration(
|
||||
color: context.theme.colorScheme.secondaryContainer,
|
||||
borderRadius: const BorderRadius.only(
|
||||
topLeft: Radius.circular(20),
|
||||
topRight: Radius.circular(20),
|
||||
),
|
||||
),
|
||||
child: Column(
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
|
@ -263,14 +243,12 @@ class _SettingsPageState extends State<SettingsPage> {
|
|||
infoSettings: true,
|
||||
textInfo: TimeOfDay.now().format(context),
|
||||
onPressed: () async {
|
||||
final TimeOfDay? timeStart =
|
||||
await showTimePicker(
|
||||
final TimeOfDay? timeStart = await showTimePicker(
|
||||
context: context,
|
||||
initialTime: TimeOfDay.now(),
|
||||
);
|
||||
isar.writeTxn(() async {
|
||||
settings.timeStart =
|
||||
timeStart?.format(context);
|
||||
settings.timeStart = timeStart?.format(context);
|
||||
isar.settings.put(settings);
|
||||
});
|
||||
},
|
||||
|
@ -297,7 +275,6 @@ class _SettingsPageState extends State<SettingsPage> {
|
|||
),
|
||||
const SizedBox(height: 10),
|
||||
],
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
|
@ -318,15 +295,7 @@ class _SettingsPageState extends State<SettingsPage> {
|
|||
builder: (BuildContext context) {
|
||||
return StatefulBuilder(
|
||||
builder: (BuildContext context, setState) {
|
||||
return Container(
|
||||
decoration: BoxDecoration(
|
||||
color: context.theme.colorScheme.secondaryContainer,
|
||||
borderRadius: const BorderRadius.only(
|
||||
topLeft: Radius.circular(20),
|
||||
topRight: Radius.circular(20),
|
||||
),
|
||||
),
|
||||
child: Column(
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
|
@ -368,14 +337,10 @@ class _SettingsPageState extends State<SettingsPage> {
|
|||
text: 'measurements'.tr,
|
||||
dropdown: true,
|
||||
dropdownName: settings.measurements.tr,
|
||||
dropdownList: <String>[
|
||||
'metric'.tr,
|
||||
'imperial'.tr
|
||||
],
|
||||
dropdownList: <String>['metric'.tr, 'imperial'.tr],
|
||||
dropdownCange: (String? newValue) {
|
||||
isar.writeTxn(() async {
|
||||
settings.measurements =
|
||||
newValue == 'metric'.tr
|
||||
settings.measurements = newValue == 'metric'.tr
|
||||
? 'metric'
|
||||
: 'imperial';
|
||||
isar.settings.put(settings);
|
||||
|
@ -403,7 +368,6 @@ class _SettingsPageState extends State<SettingsPage> {
|
|||
),
|
||||
const SizedBox(height: 10),
|
||||
],
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
|
@ -429,15 +393,7 @@ class _SettingsPageState extends State<SettingsPage> {
|
|||
builder: (BuildContext context) {
|
||||
return StatefulBuilder(
|
||||
builder: (BuildContext context, setState) {
|
||||
return Container(
|
||||
decoration: BoxDecoration(
|
||||
color: context.theme.colorScheme.secondaryContainer,
|
||||
borderRadius: const BorderRadius.only(
|
||||
topLeft: Radius.circular(20),
|
||||
topRight: Radius.circular(20),
|
||||
),
|
||||
),
|
||||
child: ListView(
|
||||
return ListView(
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
|
@ -453,17 +409,14 @@ class _SettingsPageState extends State<SettingsPage> {
|
|||
physics: const BouncingScrollPhysics(),
|
||||
itemCount: appLanguages.length,
|
||||
itemBuilder: (context, index) {
|
||||
return Container(
|
||||
height: 50,
|
||||
return Card(
|
||||
margin: const EdgeInsets.symmetric(
|
||||
horizontal: 15, vertical: 5),
|
||||
decoration: BoxDecoration(
|
||||
color: context
|
||||
.theme.colorScheme.primaryContainer,
|
||||
borderRadius: const BorderRadius.all(
|
||||
Radius.circular(15)),
|
||||
),
|
||||
child: TextButton(
|
||||
child: Text(
|
||||
appLanguages[index]['name'],
|
||||
style: context.textTheme.labelLarge,
|
||||
),
|
||||
onPressed: () {
|
||||
MyApp.updateAppState(context,
|
||||
newLocale: appLanguages[index]
|
||||
|
@ -471,17 +424,12 @@ class _SettingsPageState extends State<SettingsPage> {
|
|||
updateLanguage(
|
||||
appLanguages[index]['locale']);
|
||||
},
|
||||
child: Text(
|
||||
appLanguages[index]['name'],
|
||||
style: context.textTheme.labelLarge,
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
const SizedBox(height: 10),
|
||||
],
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
|
|
|
@ -53,23 +53,18 @@ class _WeatherPageState extends State<WeatherPage> {
|
|||
),
|
||||
Obx(
|
||||
() => locationController.isLoading.isFalse
|
||||
? Container(
|
||||
height: 135,
|
||||
? Card(
|
||||
margin: const EdgeInsets.symmetric(vertical: 15),
|
||||
child: SizedBox(
|
||||
height: 135,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 15,
|
||||
vertical: 5,
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
color: context.theme.colorScheme.primaryContainer,
|
||||
borderRadius: const BorderRadius.all(
|
||||
Radius.circular(20),
|
||||
),
|
||||
),
|
||||
horizontal: 15, vertical: 5),
|
||||
child: ScrollablePositionedList.separated(
|
||||
key: const PageStorageKey(0),
|
||||
physics: const AlwaysScrollableScrollPhysics(),
|
||||
separatorBuilder: (BuildContext context, int index) {
|
||||
separatorBuilder:
|
||||
(BuildContext context, int index) {
|
||||
return VerticalDivider(
|
||||
width: 10,
|
||||
color: context.theme.unselectedWidgetColor,
|
||||
|
@ -90,13 +85,15 @@ class _WeatherPageState extends State<WeatherPage> {
|
|||
setState(() {});
|
||||
},
|
||||
child: Container(
|
||||
margin: const EdgeInsets.symmetric(vertical: 5),
|
||||
margin:
|
||||
const EdgeInsets.symmetric(vertical: 5),
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 20,
|
||||
vertical: 5,
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
color: i == locationController.hourOfDay.value
|
||||
color:
|
||||
i == locationController.hourOfDay.value
|
||||
? Get.isDarkMode
|
||||
? Colors.indigo
|
||||
: Colors.amberAccent
|
||||
|
@ -106,7 +103,8 @@ class _WeatherPageState extends State<WeatherPage> {
|
|||
),
|
||||
),
|
||||
child: WeatherHourly(
|
||||
time: locationController.mainWeather.time![i],
|
||||
time:
|
||||
locationController.mainWeather.time![i],
|
||||
weather: locationController
|
||||
.mainWeather.weathercode![i],
|
||||
degree: locationController
|
||||
|
@ -119,6 +117,8 @@ class _WeatherPageState extends State<WeatherPage> {
|
|||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
: const MyShimmer(
|
||||
hight: 130,
|
||||
|
|
|
@ -93,19 +93,13 @@ class _WeatherCardPageState extends State<WeatherCardPage> {
|
|||
timeDay: widget.weatherCard.sunrise![dayNow],
|
||||
timeNight: widget.weatherCard.sunset![dayNow],
|
||||
),
|
||||
Container(
|
||||
height: 130,
|
||||
Card(
|
||||
margin: const EdgeInsets.symmetric(vertical: 15),
|
||||
child: SizedBox(
|
||||
height: 130,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 15,
|
||||
vertical: 5,
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
color: context.theme.colorScheme.primaryContainer,
|
||||
borderRadius: const BorderRadius.all(
|
||||
Radius.circular(20),
|
||||
),
|
||||
),
|
||||
horizontal: 15, vertical: 5),
|
||||
child: ScrollablePositionedList.separated(
|
||||
key: const PageStorageKey(1),
|
||||
physics: const AlwaysScrollableScrollPhysics(),
|
||||
|
@ -155,6 +149,8 @@ class _WeatherCardPageState extends State<WeatherCardPage> {
|
|||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
SunsetSunrise(
|
||||
timeSunrise: widget.weatherCard.sunrise![dayNow],
|
||||
timeSunset: widget.weatherCard.sunset![dayNow],
|
||||
|
|
|
@ -39,14 +39,10 @@ class _CardDescWeatherState extends State<CardDescWeather> {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
width: double.infinity,
|
||||
return Card(
|
||||
margin: const EdgeInsets.symmetric(horizontal: 10, vertical: 8),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 15, horizontal: 20),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(20),
|
||||
color: context.theme.colorScheme.primaryContainer,
|
||||
),
|
||||
child: Row(
|
||||
children: [
|
||||
Expanded(
|
||||
|
@ -68,8 +64,8 @@ class _CardDescWeatherState extends State<CardDescWeather> {
|
|||
),
|
||||
const SizedBox(width: 7),
|
||||
Text(
|
||||
status.getText(widget.weather[locationController.getTime(
|
||||
widget.time, widget.timezone)]),
|
||||
status.getText(widget.weather[locationController
|
||||
.getTime(widget.time, widget.timezone)]),
|
||||
style: context.textTheme.titleMedium?.copyWith(
|
||||
color: Colors.grey,
|
||||
fontWeight: FontWeight.w400,
|
||||
|
@ -122,6 +118,7 @@ class _CardDescWeatherState extends State<CardDescWeather> {
|
|||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -44,15 +44,7 @@ class _CreateWeatherCardState extends State<CreateWeatherCard> {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
decoration: BoxDecoration(
|
||||
color: context.theme.colorScheme.secondaryContainer,
|
||||
borderRadius: const BorderRadius.only(
|
||||
topLeft: Radius.circular(20),
|
||||
topRight: Radius.circular(20),
|
||||
),
|
||||
),
|
||||
child: Form(
|
||||
return Form(
|
||||
key: formKey,
|
||||
child: SingleChildScrollView(
|
||||
child: Stack(
|
||||
|
@ -66,8 +58,7 @@ class _CreateWeatherCardState extends State<CreateWeatherCard> {
|
|||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Padding(
|
||||
padding:
|
||||
const EdgeInsets.only(top: 10, left: 5, right: 10),
|
||||
padding: const EdgeInsets.only(top: 10, left: 5, right: 10),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
|
@ -129,8 +120,6 @@ class _CreateWeatherCardState extends State<CreateWeatherCard> {
|
|||
decoration: InputDecoration(
|
||||
prefixIcon: const Icon(Iconsax.global_search),
|
||||
filled: true,
|
||||
fillColor:
|
||||
context.theme.colorScheme.primaryContainer,
|
||||
border: OutlineInputBorder(
|
||||
borderSide: BorderSide.none,
|
||||
borderRadius: BorderRadius.circular(15),
|
||||
|
@ -164,8 +153,7 @@ class _CreateWeatherCardState extends State<CreateWeatherCard> {
|
|||
shrinkWrap: true,
|
||||
itemCount: options.length,
|
||||
itemBuilder: (BuildContext context, int index) {
|
||||
final Result option =
|
||||
options.elementAt(index);
|
||||
final Result option = options.elementAt(index);
|
||||
return InkWell(
|
||||
onTap: () => onSelected(option),
|
||||
child: ListTile(
|
||||
|
@ -257,7 +245,6 @@ class _CreateWeatherCardState extends State<CreateWeatherCard> {
|
|||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -154,15 +154,10 @@ class _DailyCardState extends State<DailyCard> {
|
|||
timeSunset: widget.sunset[index],
|
||||
),
|
||||
),
|
||||
Container(
|
||||
Card(
|
||||
margin: const EdgeInsets.only(bottom: 15),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(top: 20, bottom: 5),
|
||||
decoration: BoxDecoration(
|
||||
color: context.theme.colorScheme.primaryContainer,
|
||||
borderRadius: const BorderRadius.all(
|
||||
Radius.circular(20),
|
||||
),
|
||||
),
|
||||
child: Column(
|
||||
children: [
|
||||
Row(
|
||||
|
@ -170,22 +165,24 @@ class _DailyCardState extends State<DailyCard> {
|
|||
children: [
|
||||
DescWeather(
|
||||
imageName: 'assets/images/cold.png',
|
||||
value: statusImFa.getDegree(
|
||||
widget.apparentTemperatureMin[index].round()),
|
||||
value: statusImFa.getDegree(widget
|
||||
.apparentTemperatureMin[index]
|
||||
.round()),
|
||||
desc: 'apparentTemperatureMin'.tr,
|
||||
),
|
||||
DescWeather(
|
||||
imageName: 'assets/images/hot.png',
|
||||
value: statusImFa.getDegree(
|
||||
widget.apparentTemperatureMax[index].round()),
|
||||
value: statusImFa.getDegree(widget
|
||||
.apparentTemperatureMax[index]
|
||||
.round()),
|
||||
desc: 'apparentTemperatureMax'.tr,
|
||||
),
|
||||
DescWeather(
|
||||
imageName: 'assets/images/uv.png',
|
||||
value: '${widget.uvIndexMax[index].round()}',
|
||||
desc: 'uvIndex'.tr,
|
||||
message: message
|
||||
.getUvIndex(widget.uvIndexMax[index].round()),
|
||||
message: message.getUvIndex(
|
||||
widget.uvIndexMax[index].round()),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
@ -242,6 +239,7 @@ class _DailyCardState extends State<DailyCard> {
|
|||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
|
|
|
@ -37,15 +37,10 @@ class DescContainer extends StatelessWidget {
|
|||
Widget build(BuildContext context) {
|
||||
final statusImFa = StatusImFa();
|
||||
final message = Message();
|
||||
return Container(
|
||||
return Card(
|
||||
margin: const EdgeInsets.only(bottom: 15),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(top: 22, bottom: 5),
|
||||
decoration: BoxDecoration(
|
||||
color: context.theme.colorScheme.primaryContainer,
|
||||
borderRadius: const BorderRadius.all(
|
||||
Radius.circular(20),
|
||||
),
|
||||
),
|
||||
child: Column(
|
||||
children: [
|
||||
Row(
|
||||
|
@ -136,6 +131,7 @@ class DescContainer extends StatelessWidget {
|
|||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,14 +23,10 @@ class ListCardDaily extends StatelessWidget {
|
|||
final status = Status();
|
||||
final statusImFa = StatusImFa();
|
||||
|
||||
return Container(
|
||||
width: double.infinity,
|
||||
return Card(
|
||||
margin: const EdgeInsets.symmetric(horizontal: 10, vertical: 8),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 15, horizontal: 20),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(20),
|
||||
color: context.theme.colorScheme.primaryContainer,
|
||||
),
|
||||
child: Row(
|
||||
children: [
|
||||
Expanded(
|
||||
|
@ -46,7 +42,8 @@ class ListCardDaily extends StatelessWidget {
|
|||
),
|
||||
const SizedBox(height: 5),
|
||||
Text(
|
||||
DateFormat.MMMMEEEEd(locale?.languageCode).format(timeDaily),
|
||||
DateFormat.MMMMEEEEd(locale?.languageCode)
|
||||
.format(timeDaily),
|
||||
style: context.textTheme.titleMedium?.copyWith(
|
||||
color: Colors.grey,
|
||||
fontWeight: FontWeight.w400,
|
||||
|
@ -70,6 +67,7 @@ class ListCardDaily extends StatelessWidget {
|
|||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -35,34 +35,17 @@ class SettingLinks extends StatelessWidget {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
height: 60,
|
||||
return Card(
|
||||
margin: const EdgeInsets.symmetric(horizontal: 15, vertical: 5),
|
||||
decoration: BoxDecoration(
|
||||
color: context.theme.colorScheme.primaryContainer,
|
||||
borderRadius: const BorderRadius.all(Radius.circular(15)),
|
||||
),
|
||||
child: TextButton(
|
||||
onPressed: onPressed,
|
||||
child: Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: Row(
|
||||
children: [
|
||||
const SizedBox(width: 5),
|
||||
icon,
|
||||
const SizedBox(width: 15),
|
||||
Expanded(
|
||||
child: Text(
|
||||
child: ListTile(
|
||||
onTap: onPressed,
|
||||
leading: icon,
|
||||
title: Text(
|
||||
text,
|
||||
style: context.textTheme.titleMedium,
|
||||
overflow: TextOverflow.visible,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
switcher
|
||||
trailing: switcher
|
||||
? Transform.scale(
|
||||
scale: 0.8,
|
||||
child: Switch(
|
||||
|
@ -85,7 +68,7 @@ class SettingLinks extends StatelessWidget {
|
|||
)
|
||||
: info
|
||||
? infoSettings
|
||||
? Row(
|
||||
? Wrap(
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(right: 5),
|
||||
|
@ -115,8 +98,6 @@ class SettingLinks extends StatelessWidget {
|
|||
color: context.theme.iconTheme.color,
|
||||
size: 18,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
|
|
@ -16,12 +16,11 @@ class MyShimmer extends StatelessWidget {
|
|||
return Shimmer.fromColors(
|
||||
baseColor: context.theme.colorScheme.primaryContainer,
|
||||
highlightColor: context.theme.unselectedWidgetColor,
|
||||
child: Container(
|
||||
height: hight,
|
||||
child: Card(
|
||||
margin: edgeInsetsMargin,
|
||||
decoration: BoxDecoration(
|
||||
color: context.theme.colorScheme.primaryContainer,
|
||||
borderRadius: const BorderRadius.all(Radius.circular(20))),
|
||||
child: SizedBox(
|
||||
height: hight,
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
|
|
@ -22,15 +22,10 @@ class _SunsetSunriseState extends State<SunsetSunrise> {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
return Card(
|
||||
margin: const EdgeInsets.only(bottom: 15),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 5),
|
||||
decoration: BoxDecoration(
|
||||
color: context.theme.colorScheme.primaryContainer,
|
||||
borderRadius: const BorderRadius.all(
|
||||
Radius.circular(20),
|
||||
),
|
||||
),
|
||||
child: Row(
|
||||
children: [
|
||||
Expanded(
|
||||
|
@ -97,6 +92,7 @@ class _SunsetSunriseState extends State<SunsetSunrise> {
|
|||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -35,7 +35,6 @@ class MyTextForm extends StatelessWidget {
|
|||
prefixIcon: icon,
|
||||
suffixIcon: iconButton,
|
||||
filled: true,
|
||||
fillColor: context.theme.colorScheme.primaryContainer,
|
||||
border: OutlineInputBorder(
|
||||
borderSide: BorderSide.none,
|
||||
borderRadius: BorderRadius.circular(15),
|
||||
|
|
|
@ -28,19 +28,12 @@ class _WeatherDailyState extends State<WeatherDaily> {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
height: 455,
|
||||
return Card(
|
||||
margin: const EdgeInsets.only(bottom: 15),
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 15,
|
||||
vertical: 5,
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
color: context.theme.colorScheme.primaryContainer,
|
||||
borderRadius: const BorderRadius.all(
|
||||
Radius.circular(20),
|
||||
),
|
||||
),
|
||||
child: SizedBox(
|
||||
height: 455,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 15, vertical: 5),
|
||||
child: Column(
|
||||
children: [
|
||||
Expanded(
|
||||
|
@ -62,11 +55,11 @@ class _WeatherDailyState extends State<WeatherDaily> {
|
|||
temperature2MMin:
|
||||
widget.mainWeatherCache?.temperature2MMin ??
|
||||
widget.weatherCard!.temperature2MMin!,
|
||||
apparentTemperatureMax: widget
|
||||
.mainWeatherCache?.apparentTemperatureMax ??
|
||||
apparentTemperatureMax: widget.mainWeatherCache
|
||||
?.apparentTemperatureMax ??
|
||||
widget.weatherCard!.apparentTemperatureMax!,
|
||||
apparentTemperatureMin: widget
|
||||
.mainWeatherCache?.apparentTemperatureMin ??
|
||||
apparentTemperatureMin: widget.mainWeatherCache
|
||||
?.apparentTemperatureMin ??
|
||||
widget.weatherCard!.apparentTemperatureMin!,
|
||||
sunrise: widget.mainWeatherCache?.sunrise ??
|
||||
widget.weatherCard!.sunrise!,
|
||||
|
@ -75,23 +68,27 @@ class _WeatherDailyState extends State<WeatherDaily> {
|
|||
precipitationSum:
|
||||
widget.mainWeatherCache?.precipitationSum ??
|
||||
widget.weatherCard!.precipitationSum!,
|
||||
precipitationProbabilityMax: widget.mainWeatherCache
|
||||
precipitationProbabilityMax: widget
|
||||
.mainWeatherCache
|
||||
?.precipitationProbabilityMax ??
|
||||
widget
|
||||
.weatherCard!.precipitationProbabilityMax!,
|
||||
widget.weatherCard!
|
||||
.precipitationProbabilityMax!,
|
||||
windspeed10MMax:
|
||||
widget.mainWeatherCache?.windspeed10MMax ??
|
||||
widget.weatherCard!.windspeed10MMax!,
|
||||
windgusts10MMax:
|
||||
widget.mainWeatherCache?.windgusts10MMax ??
|
||||
widget.weatherCard!.windgusts10MMax!,
|
||||
uvIndexMax: widget.mainWeatherCache?.uvIndexMax ??
|
||||
uvIndexMax:
|
||||
widget.mainWeatherCache?.uvIndexMax ??
|
||||
widget.weatherCard!.uvIndexMax!,
|
||||
rainSum: widget.mainWeatherCache?.rainSum ??
|
||||
widget.weatherCard!.rainSum!,
|
||||
winddirection10MDominant: widget.mainWeatherCache
|
||||
winddirection10MDominant: widget
|
||||
.mainWeatherCache
|
||||
?.winddirection10MDominant ??
|
||||
widget.weatherCard!.winddirection10MDominant!,
|
||||
widget
|
||||
.weatherCard!.winddirection10MDominant!,
|
||||
index: index,
|
||||
),
|
||||
transition: Transition.downToUp),
|
||||
|
@ -103,7 +100,8 @@ class _WeatherDailyState extends State<WeatherDaily> {
|
|||
Expanded(
|
||||
child: Text(
|
||||
DateFormat.EEEE(locale?.languageCode).format(
|
||||
widget.mainWeatherCache?.timeDaily?[index] ??
|
||||
widget.mainWeatherCache
|
||||
?.timeDaily?[index] ??
|
||||
widget.weatherCard!.timeDaily![index]),
|
||||
style: context.textTheme.labelLarge,
|
||||
),
|
||||
|
@ -115,8 +113,8 @@ class _WeatherDailyState extends State<WeatherDaily> {
|
|||
Image.asset(
|
||||
status.getImage7Day(widget.mainWeatherCache
|
||||
?.weathercodeDaily?[index] ??
|
||||
widget
|
||||
.weatherCard!.weathercodeDaily![index]),
|
||||
widget.weatherCard!
|
||||
.weathercodeDaily![index]),
|
||||
scale: 3,
|
||||
),
|
||||
const SizedBox(width: 5),
|
||||
|
@ -141,13 +139,15 @@ class _WeatherDailyState extends State<WeatherDaily> {
|
|||
statusImFa.getDegree(widget.mainWeatherCache
|
||||
?.temperature2MMin?[index]
|
||||
.round() ??
|
||||
widget.weatherCard!.temperature2MMin![index]
|
||||
widget.weatherCard!
|
||||
.temperature2MMin![index]
|
||||
.round()),
|
||||
style: context.textTheme.labelLarge,
|
||||
),
|
||||
Text(
|
||||
' / ',
|
||||
style: context.textTheme.bodyMedium?.copyWith(
|
||||
style:
|
||||
context.textTheme.bodyMedium?.copyWith(
|
||||
color: Colors.grey,
|
||||
),
|
||||
),
|
||||
|
@ -155,9 +155,11 @@ class _WeatherDailyState extends State<WeatherDaily> {
|
|||
statusImFa.getDegree(widget.mainWeatherCache
|
||||
?.temperature2MMax?[index]
|
||||
.round() ??
|
||||
widget.weatherCard!.temperature2MMax![index]
|
||||
widget.weatherCard!
|
||||
.temperature2MMax![index]
|
||||
.round()),
|
||||
style: context.textTheme.bodyMedium?.copyWith(
|
||||
style:
|
||||
context.textTheme.bodyMedium?.copyWith(
|
||||
color: Colors.grey,
|
||||
),
|
||||
),
|
||||
|
@ -187,6 +189,8 @@ class _WeatherDailyState extends State<WeatherDaily> {
|
|||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,6 +15,11 @@ class ThemeController extends GetxController {
|
|||
isar.writeTxn(() async => isar.settings.put(settings));
|
||||
}
|
||||
|
||||
void saveMaterialTheme(bool isMaterial) async {
|
||||
settings.materialColor = isMaterial;
|
||||
isar.writeTxn(() async => isar.settings.put(settings));
|
||||
}
|
||||
|
||||
void saveTheme(bool isDarkMode) async {
|
||||
settings.theme = isDarkMode;
|
||||
isar.writeTxn(() async => isar.settings.put(settings));
|
||||
|
|