Skip to content

Commit

Permalink
- duplicate key issue (#7)
Browse files Browse the repository at this point in the history
* - upgrade intl and slidable plugin

* - duplicate key issue

* - update lib version, flutter version and change log

* - updated android version and gradle, update test cases

---------

Co-authored-by: Jay Shah <shreejiapps@gmail.com>
  • Loading branch information
jayshah3893 and shreejiapps committed Jun 21, 2023
1 parent 23baf34 commit 35ba1b4
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 38 deletions.
6 changes: 3 additions & 3 deletions example/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
compileSdkVersion 30
compileSdkVersion flutter.compileSdkVersion

sourceSets {
main.java.srcDirs += 'src/main/kotlin'
Expand All @@ -35,8 +35,8 @@ android {
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.example.example"
minSdkVersion 16
targetSdkVersion 30
minSdkVersion flutter.minSdkVersion
targetSdkVersion flutter.targetSdkVersion
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}
Expand Down
1 change: 1 addition & 0 deletions example/android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
android:label="example"
android:icon="@mipmap/ic_launcher">
<activity
android:exported="true"
android:name=".MainActivity"
android:launchMode="singleTop"
android:theme="@style/LaunchTheme"
Expand Down
6 changes: 3 additions & 3 deletions example/android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
buildscript {
ext.kotlin_version = '1.3.50'
ext.kotlin_version = '1.7.10'
repositories {
google()
jcenter()
}

dependencies {
classpath 'com.android.tools.build:gradle:4.1.0'
classpath 'com.android.tools.build:gradle:7.3.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
Expand All @@ -24,6 +24,6 @@ subprojects {
project.evaluationDependsOn(':app')
}

task clean(type: Delete) {
tasks.register("clean", Delete) {
delete rootProject.buildDir
}
2 changes: 1 addition & 1 deletion example/android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.1-all.zip
2 changes: 1 addition & 1 deletion lib/stacked_notification_cards.dart
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ class StackedNotificationCards extends StatelessWidget {
Widget build(BuildContext context) {
if (notificationCards.length > 0) {
return BuildStackedNotification(
key: ValueKey('BuildStackedNotification'),
key: ValueKey(notificationCardTitle),
notificationCards: notificationCards,
tileColor: cardColor,
cornerRadius: cardCornerRadius,
Expand Down
31 changes: 1 addition & 30 deletions test/stacked_notification_card_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ void main() {
));

final Finder buildStackedNotification = find.byKey(
ValueKey('BuildStackedNotification'),
ValueKey('Message'),
);

expect(buildStackedNotification, findsOneWidget);
Expand All @@ -83,33 +83,4 @@ void main() {
expect(notificationTile, findsOneWidget);
});

// testWidgets('Show notification tile when there is one notification',
// (WidgetTester tester) async {
// await tester.pumpWidget(
// BaseStructure(
// list: dataList1,
// ),
// );

// final Finder notificationTile = find.byKey(
// ValueKey('NotificationTile'),
// );

// expect(notificationTile, findsOneWidget);
// });

// testWidgets('Show CollapsedCards when there are more than one notification',
// (WidgetTester tester) async {
// await tester.pumpWidget(
// BaseStructure(
// list: dataList2,
// ),
// );

// final Finder collapsedCards = find.byKey(
// ValueKey('CollapsedCards'),
// );

// expect(collapsedCards, findsOneWidget);
// });
}

0 comments on commit 35ba1b4

Please sign in to comment.