From c9b8d143d109b0c3e004931a3f559a84d3c7d6d8 Mon Sep 17 00:00:00 2001 From: Polyanka1 Date: Mon, 27 Jul 2026 11:06:04 +0300 Subject: [PATCH] fixing the app launch bug --- android/app/build.gradle.kts | 2 +- android/gradle.properties | 1 + lib/presentation/navigation/app_router.dart | 20 +++++++++++++------- pubspec.lock | 20 ++++++++++---------- pubspec.yaml | 2 +- 5 files changed, 26 insertions(+), 19 deletions(-) diff --git a/android/app/build.gradle.kts b/android/app/build.gradle.kts index bf4af12..cd86a00 100644 --- a/android/app/build.gradle.kts +++ b/android/app/build.gradle.kts @@ -15,7 +15,7 @@ plugins { } android { - namespace = "com.sparkit.be_happy" + namespace = "com.behappybel.behappy" compileSdk = flutter.compileSdkVersion ndkVersion = "27.0.12077973" diff --git a/android/gradle.properties b/android/gradle.properties index e754925..710ee18 100644 --- a/android/gradle.properties +++ b/android/gradle.properties @@ -4,5 +4,6 @@ android.enableJetifier=true yandexMapkit.variant=full # This builtInKotlin flag was added automatically by Flutter migrator android.builtInKotlin=false +kotlin.incremental=false # This newDsl flag was added automatically by Flutter migrator android.newDsl=false diff --git a/lib/presentation/navigation/app_router.dart b/lib/presentation/navigation/app_router.dart index 1ef67a1..83ecbc2 100644 --- a/lib/presentation/navigation/app_router.dart +++ b/lib/presentation/navigation/app_router.dart @@ -296,13 +296,19 @@ class AppRouter { //Sub screens GoRoute( path: 'profile', - builder: (context, state) => - BlocProvider( - create: (context) => - getIt() - ..add(ProfileStarted()), - child: ProfileScreen(), - ), + builder: (context, state) { + final bloc = getIt(); + + if (!bloc.isClosed) { + bloc.add(ProfileStarted()); + } + + return BlocProvider.value( + value: bloc, + child: const ProfileScreen(), + ); + }, + routes: [ GoRoute( path: 'edit', diff --git a/pubspec.lock b/pubspec.lock index 3ec3d1f..fd1da4a 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -69,10 +69,10 @@ packages: dependency: transitive description: name: characters - sha256: f71061c654a3380576a52b451dd5532377954cf9dbd272a78fc8479606670803 + sha256: faf38497bda5ead2a8c7615f4f7939df04333478bf32e4173fcb06d428b5716b url: "https://pub.dev" source: hosted - version: "1.4.0" + version: "1.4.1" checked_yaml: dependency: transitive description: @@ -612,26 +612,26 @@ packages: dependency: transitive description: name: matcher - sha256: dc58c723c3c24bf8d3e2d3ad3f2f9d7bd9cf43ec6feaa64181775e60190153f2 + sha256: dc0b7dc7651697ea4ff3e69ef44b0407ea32c487a39fff6a4004fa585e901861 url: "https://pub.dev" source: hosted - version: "0.12.17" + version: "0.12.19" material_color_utilities: dependency: transitive description: name: material_color_utilities - sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec + sha256: "9c337007e82b1889149c82ed242ed1cb24a66044e30979c44912381e9be4c48b" url: "https://pub.dev" source: hosted - version: "0.11.1" + version: "0.13.0" meta: dependency: transitive description: name: meta - sha256: "23f08335362185a5ea2ad3a4e597f1375e78bce8a040df5c600c8d3552ef2394" + sha256: "1741988757a65eb6b36abe716829688cf01910bbf91c34354ff7ec1c3de2b349" url: "https://pub.dev" source: hosted - version: "1.17.0" + version: "1.18.0" mime: dependency: "direct main" description: @@ -889,10 +889,10 @@ packages: dependency: transitive description: name: test_api - sha256: ab2726c1a94d3176a45960b6234466ec367179b87dd74f1611adb1f3b5fb9d55 + sha256: "949a932224383300f01be9221c39180316445ecb8e7547f70a41a35bf421fb9e" url: "https://pub.dev" source: hosted - version: "0.7.7" + version: "0.7.11" typed_data: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index ffacd10..5fa8998 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -2,7 +2,7 @@ name: be_happy description: "" publish_to: 'none' -version: 1.0.0+16 +version: 1.0.0+17 environment: sdk: ^3.8.1