fixed crashes on android 13

This commit is contained in:
Pranshul committed 2025-07-20 19:42:18 +05:30
1 parent 028721a2b9
commit a502a44766
3 files changed
+31 -18

No files matched your search

+2 -2
View File
@@ -100,7 +100,7 @@ class AboutPage extends StatelessWidget {
showLicensePage(
context: context,
applicationName: 'WeatherMaster',
applicationVersion: 'v2.2.0 (F)',
applicationVersion: 'v2.2.1 (F)',
applicationIcon: Container(
clipBehavior: Clip.hardEdge,
margin: EdgeInsets.only(bottom: 16, top: 16),
@@ -333,7 +333,7 @@ class CheckUpdateButton extends StatefulWidget {
}
class _CheckUpdateButtonState extends State<CheckUpdateButton> {
final String currentVersion = 'v2.2.0';
final String currentVersion = 'v2.2.1';
final String githubRepo = 'PranshulGG/WeatherMaster';
bool isChecking = false;
+28 -15
View File
@@ -868,9 +868,6 @@ void maybeUpdateWeatherAnimation(Map<String, dynamic> current) {
if (lastWeatherCode != weatherCode || lastIsDay != isDay) {
lastWeatherCode = weatherCode;
lastIsDay = isDay;
WidgetsBinding.instance.addPostFrameCallback((_) {
if (mounted) {
// setState(() {
@@ -883,10 +880,14 @@ if (lastWeatherCode != weatherCode || lastIsDay != isDay) {
showInsightsRandomly = Random().nextInt(100) < 40;
PreferencesHelper.setColor("weatherThemeColor", weatherConditionColors[newIndex]);
maybeUpdateWeatherAnimation(current);
_loadWeatherIconFroggy(weatherCodeFroggy, isDayFroggy, newIndex);
_loadWeatherIconFroggy(weatherCodeFroggy, isDayFroggy, newIndex);
}
});
lastWeatherCode = weatherCode;
lastIsDay = isDay;
} else{
_isLoadingFroggy == true;
@@ -1092,14 +1093,24 @@ Widget buildLayoutBlock(LayoutBlockType type) {
return _isAppFullyLoaded ? Column(
children: [
Stack(
clipBehavior: Clip.none,
children: [
if (weatherAnimationWidget != null)
useFullMaterialScheme ? const SizedBox.shrink() : usAnimations ? weatherAnimationWidget! : const SizedBox.shrink()
else
const SizedBox.shrink(),
if (weatherAnimationWidget != null)
useFullMaterialScheme
? const SizedBox.shrink()
: usAnimations
? ValueListenableBuilder<bool>(
valueListenable: _showHeaderNotifier,
builder: (context, show, child) {
return !show ? weatherAnimationWidget! : const SizedBox.shrink();
},
)
: const SizedBox.shrink()
else
const SizedBox.shrink(),
GestureDetector(
onTap: () async {
@@ -1266,13 +1277,17 @@ Widget buildLayoutBlock(LayoutBlockType type) {
Column(
children: () {
final visibleBlocks = layoutConfig.where((block) => block.isVisible).toList();
final List<Widget> children = [];
for (int i = 0; i < visibleBlocks.length; i++) {
final currentBlock = visibleBlocks[i];
children.add(buildLayoutBlock(currentBlock.type));
final isRainThenInsights = currentBlock.type == LayoutBlockType.rain &&
children.add(RepaintBoundary(
child: buildLayoutBlock(currentBlock.type),
));
final isRainThenInsights =
currentBlock.type == LayoutBlockType.rain &&
i + 1 < visibleBlocks.length &&
visibleBlocks[i + 1].type == LayoutBlockType.insights;
@@ -1280,13 +1295,11 @@ Widget buildLayoutBlock(LayoutBlockType type) {
children.add(const SizedBox(height: 8.5));
}
}
return children;
}(),
),
Container(
width: double.infinity,
padding: EdgeInsets.only(bottom: MediaQuery.of(context).padding.bottom + 5, top: 16),
+1 -1
View File
@@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
# In Windows, build-name is used as the major, minor, and patch parts
# of the product and file versions while build-number is used as the build suffix.
version: 2.2.0+9
version: 2.2.1+10
environment:
sdk: '>=3.0.6 <4.0.0'