diff --git a/lib/ui/settings_screen.dart b/lib/ui/settings_screen.dart index c06be2f..ce0af2a 100644 --- a/lib/ui/settings_screen.dart +++ b/lib/ui/settings_screen.dart @@ -5,6 +5,7 @@ import 'package:crdt_sync_flutter/crdt_sync_flutter.dart' show E2ePassphraseButton; import 'package:file_selector/file_selector.dart'; import 'package:http/http.dart' as http; +import 'package:kuhy_credit/kuhy_credit.dart'; import 'package:material_ui/material_ui.dart'; import 'package:sync_settings_ui/sync_settings_ui.dart'; import 'package:todo/analytics/analytics_event.dart'; @@ -264,6 +265,14 @@ class _SettingsScreenState extends State { ), _openGitHubMirror, ), + // kuhy's credit closes the list; its panel opens above the logo. + const Padding( + padding: EdgeInsets.all(16), + child: Align( + alignment: Alignment.centerLeft, + child: KuhyCredit(alignStart: true), + ), + ), ], ), ); diff --git a/pubspec.lock b/pubspec.lock index 0264562..dee3145 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -587,6 +587,15 @@ packages: url: "https://pub.dev" source: hosted version: "4.12.0" + kuhy_credit: + dependency: "direct main" + description: + path: "kuhy_credit/flutter" + ref: "kuhy-credit-v0.3.0" + resolved-ref: c3946412729991bf1e9c3b6a5cc55dbe80419fc0 + url: "https://github.com/kuhyx/utils" + source: git + version: "0.3.0" leak_tracker: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index e34a3e6..b26620b 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -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: 1.0.104+1 +version: 1.0.105+1 environment: sdk: ^3.12.2 @@ -80,6 +80,12 @@ dependencies: image: 4.13.1 # Camera + gallery picks for image attachments on Android. image_picker: 1.2.4 + # kuhy's logo credit, shown at the end of Settings. + kuhy_credit: + git: + url: https://github.com/kuhyx/utils + ref: kuhy-credit-v0.3.0 + path: kuhy_credit/flutter # Flutter 3.50 deprecates package:flutter/material.dart; the shared UI # packages (design_system, sync_settings_ui) sit on material_ui, so the app # must too or their widgets lose MaterialLocalizations. @@ -98,7 +104,6 @@ dependencies: # Retained only to read the legacy on-device DB during the one-time # migration in NoteRepository.open; remove once all devices are migrated. sqlite_crdt: 3.0.4 - # Shared "Sync settings" screen (Firebase + local backup), reused across # every kuhy app that syncs. GitHub mirror stays app-local (see # lib/ui/github_mirror_screen.dart) since here it also triggers a note diff --git a/test/settings_screen_test.dart b/test/settings_screen_test.dart index 74527a0..3dfede2 100644 --- a/test/settings_screen_test.dart +++ b/test/settings_screen_test.dart @@ -3,10 +3,11 @@ import 'dart:io'; import 'package:crdt_sync/crdt_sync.dart'; import 'package:file_selector_platform_interface/file_selector_platform_interface.dart'; -import 'package:material_ui/material_ui.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:http/http.dart' as http; import 'package:http/testing.dart'; +import 'package:kuhy_credit/kuhy_credit.dart'; +import 'package:material_ui/material_ui.dart'; import 'package:plugin_platform_interface/plugin_platform_interface.dart'; import 'package:shared_preferences/shared_preferences.dart'; import 'package:sync_settings_ui/sync_settings_ui.dart'; @@ -197,4 +198,10 @@ void main() { // suite cannot write to the user's ~/todo. expect(resolveExportHome(), Platform.environment['HOME']); }); + + testWidgets('renders KuhyCredit at the bottom of the list', (tester) async { + await pumpSettings(tester); + + expect(find.byType(KuhyCredit, skipOffstage: false), findsOneWidget); + }); }