Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 18 additions & 3 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,14 @@ plugins {
id "dev.flutter.flutter-gradle-plugin"
}

def keystoreProperties = new Properties()
def keystorePropertiesFile = rootProject.file('key.properties')
if (keystorePropertiesFile.exists()) {
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
}

android {
namespace = "com.example.shopping_list"
namespace = "com.loiclabas.shopping_list"
compileSdk = flutter.compileSdkVersion
ndkVersion = flutter.ndkVersion

Expand All @@ -21,7 +27,7 @@ android {

defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId = "com.example.shopping_list"
applicationId = "com.loiclabas.shopping_list"
// You can update the following values to match your application needs.
// For more information, see: https://flutter.dev/to/review-gradle-config.
minSdk = flutter.minSdkVersion
Expand All @@ -30,11 +36,20 @@ android {
versionName = flutter.versionName
}

signingConfigs {
release {
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
storePassword keystoreProperties['storePassword']
}
}

buildTypes {
release {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig = signingConfigs.debug
signingConfig = signingConfigs.release
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.example.shopping_list
package com.loiclabas.shopping_list

import io.flutter.embedding.android.FlutterActivity

Expand Down
1 change: 1 addition & 0 deletions lib/providers/items_provider.dart
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ class ItemsProvider with ChangeNotifier {
///Get items by list id
Future<void> getItemsByListId({required int listId}) async {
List<Item> newItems = await ListRepository().getItemsByListId(listId: listId);
_sortItemsByStatus(newItems);
//For add new item or items list is empty, refresh the list
if(newItems.length > _items.length || newItems.isEmpty){
_filteredItems = newItems;
Expand Down
2 changes: 2 additions & 0 deletions lib/screens/list_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ class ListScreen extends StatelessWidget {
actions: <Widget> [
ElevatedButton(
onPressed: () {
FocusScope.of(context).requestFocus(FocusNode());
itemsProvider.resetSearch();
itemsProvider.emptyList(listId: listId);
Navigator.of(context).pop();
},
Expand Down
Loading