Skip to content

Commit

Permalink
improve app startup performance
Browse files Browse the repository at this point in the history
  • Loading branch information
mixin27 committed Mar 6, 2025
1 parent 68ed2d2 commit cf7cd3d
Show file tree
Hide file tree
Showing 12 changed files with 49 additions and 23 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
runs-on: ubuntu-latest
env:
JAVA_VERSION: "17"
FLUTTER_VERSION: "3.24.3"
FLUTTER_VERSION: "3.29.0"

steps:
- uses: actions/checkout@v4
Expand Down
1 change: 1 addition & 0 deletions android/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ gradle-wrapper.jar
/gradlew.bat
/local.properties
GeneratedPluginRegistrant.java
.cxx/

# Remember to never publicly share your keystore.
# See https://flutter.dev/to/reference-keystore
Expand Down
11 changes: 7 additions & 4 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,16 @@ if (keystorePropertiesFile.exists()) {
android {
namespace = "dev.mixin27.mmcalendar"
compileSdk = flutter.compileSdkVersion
ndkVersion = flutter.ndkVersion
ndkVersion = "27.0.12077973"
// ndkVersion = flutter.ndkVersion

compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}

kotlinOptions {
jvmTarget = JavaVersion.VERSION_1_8
jvmTarget = JavaVersion.VERSION_11
}

defaultConfig {
Expand Down Expand Up @@ -60,6 +61,7 @@ android {
buildTypes {
release {
signingConfig signingConfigs.release
debuggable false
// Enables code shrinking, obfuscation, and optimization for only
// your project's release build type. Make sure to use a build
// variant with `debuggable false`.
Expand All @@ -71,6 +73,7 @@ android {
}
debug {
signingConfig signingConfigs.debug
debuggable true
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-all.zip
6 changes: 3 additions & 3 deletions android/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ pluginManagement {

plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
id "com.android.application" version "7.3.0" apply false
id "com.android.application" version "8.7.0" apply false
// START: FlutterFire Configuration
id "com.google.gms.google-services" version "4.3.15" apply false
id "com.google.firebase.firebase-perf" version "1.4.1" apply false
id "com.google.gms.google-services" version "4.4.2" apply false
id "com.google.firebase.firebase-perf" version "1.4.2" apply false
id "com.google.firebase.crashlytics" version "2.8.1" apply false
// END: FlutterFire Configuration
id "org.jetbrains.kotlin.android" version "1.9.10" apply false
Expand Down
2 changes: 1 addition & 1 deletion lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ Future<void> main() async {
options: DefaultFirebaseOptions.currentPlatform,
);

unawaited(AdsHelper.initAds());
unawaited(AppRemoteConfig.initConfig());
unawaited(AdsHelper.initAds());

// turn off the # in the URLs on the web
usePathUrlStrategy();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,26 @@ class _MmCalendarHomePageState extends ConsumerState<MmCalendarHomePage> {
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text(LocaleKeys.myanmar_calendar).tr(),
// title: const Text().tr(),
title: Text(
LocaleKeys.myanmar_calendar,
style: TextStyle(
color: Theme.of(context).colorScheme.primary,
fontWeight: FontWeight.bold,
fontSize: 30,
letterSpacing: 1.5,
shadows: [
BoxShadow(
blurRadius: 10,
color: Theme.of(context)
.colorScheme
.primary
.withValues(alpha: 0.4),
offset: const Offset(2, 2),
),
],
),
).tr(),
actions: [
IconButton(
onPressed: () => context.router.push(const AppSettingsRoute()),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,14 @@ class _LanscapeCalendarViewState extends ConsumerState<LanscapeCalendarView> {
: null,
border: Border.all(
color: isWeekend
? Theme.of(context).colorScheme.error.withOpacity(0.2)
? Theme.of(context)
.colorScheme
.error
.withValues(alpha: 0.2)
: Theme.of(context)
.colorScheme
.onSurface
.withOpacity(0.2),
.withValues(alpha: 0.2),
),
borderRadius: const BorderRadius.all(Radius.circular(8)),
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,11 +143,11 @@ class _PortraitCalendarViewState extends ConsumerState<PortraitCalendarView> {
? Theme.of(context)
.colorScheme
.error
.withOpacity(0.2)
.withValues(alpha: 0.2)
: Theme.of(context)
.colorScheme
.onSurface
.withOpacity(0.2),
.withValues(alpha: 0.2),
),
borderRadius: const BorderRadius.all(Radius.circular(8)),
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ class AppSettingsPage extends StatelessWidget {
children: [
const NotificationSwitchListTile(),
const ThemeModeSwitchTile(),
const CalendarLanguageListTile(),
const AppLanguageListTile(),
// const CalendarLanguageListTile(),
// const AppLanguageListTile(),
const RateMeListTile(),
const PrivacyPolicyListTile(),
AboutListTile(
icon: const Icon(IconlyLight.document),
applicationName: LocaleKeys.myanmar_calendar.tr(),
applicationVersion: 'v1.0.1',
applicationVersion: 'v1.0.4',
applicationIcon: const Icon(IconlyBroken.calendar),
applicationLegalese: 'Copyright (c) 2024 Kyaw Zayar Tun',
child: Text(LocaleKeys.license.tr()),
Expand Down
8 changes: 4 additions & 4 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -841,10 +841,10 @@ packages:
dependency: transitive
description:
name: shared_preferences_android
sha256: a768fc8ede5f0c8e6150476e14f38e2417c0864ca36bb4582be8e21925a03c22
sha256: "9f9f3d372d4304723e6136663bb291c0b93f5e4c8a4a6314347f481a33bda2b1"
url: "https://pub.dev"
source: hosted
version: "2.4.6"
version: "2.4.7"
shared_preferences_foundation:
dependency: transitive
description:
Expand Down Expand Up @@ -1166,10 +1166,10 @@ packages:
dependency: transitive
description:
name: webview_flutter_wkwebview
sha256: d183aa3d0fbc1f4d0715ce06c5a44cad636598c3340ae8d359fbc61b4016fb60
sha256: c49a98510080378b1525132f407a92c3dcd3b7145bef04fb8137724aadcf1cf0
url: "https://pub.dev"
source: hosted
version: "3.18.3"
version: "3.18.4"
xdg_directories:
dependency: transitive
description:
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: mmcalendar
description: "Simple myanmar calendar."
publish_to: "none"
version: 1.0.3+103
version: 1.0.4+104

environment:
sdk: ^3.5.0
Expand Down

0 comments on commit cf7cd3d

Please sign in to comment.