diff --git a/lib/main.dart b/lib/main.dart index 407f8fe..d3e8e72 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -111,38 +111,39 @@ class _TimeTrackerState extends State { int appLaunches = prefs.getInt("appLaunches") ?? 0; if (appLaunches > 4) { Future.delayed( - const Duration(seconds: 10), - () => showCupertinoDialog( - context: context, - builder: (BuildContext context) => CupertinoAlertDialog( - title: const Text("Dir gefällt der TimeTracker?"), - content: const Text("Dann zeig es mir!"), - actions: [ - CupertinoDialogAction( - isDefaultAction: true, - child: const Text("Ich lasse ein Bewertung da ⭐"), - onPressed: () { - Navigator.of(context, rootNavigator: true).pop("Rate"); - AppReview.writeReview; - }, - ), - CupertinoDialogAction( - child: const Text("Ich kaufe dir etwas 🛒"), - onPressed: () { - Navigator.of(context, rootNavigator: true).pop("Buy"); - _tabController.index = 3; - }, - ), - CupertinoDialogAction( - child: const Text("Alles erledigt 🎉"), - onPressed: () { - Navigator.of(context, rootNavigator: true).pop("Cancel"); - prefs.setInt("appLaunches", -1); - }, - ), - ], - ), - )); + const Duration(seconds: 10), + () => showCupertinoDialog( + context: context, + builder: (BuildContext context) => CupertinoAlertDialog( + title: const Text("Dir gefällt der TimeTracker?"), + content: const Text("Dann zeig es mir!"), + actions: [ + CupertinoDialogAction( + isDefaultAction: true, + child: const Text("Ich lasse ein Bewertung da ⭐"), + onPressed: () { + Navigator.of(context, rootNavigator: true).pop("Rate"); + AppReview.writeReview; + }, + ), + CupertinoDialogAction( + child: const Text("Ich kaufe dir etwas 🛒"), + onPressed: () { + Navigator.of(context, rootNavigator: true).pop("Buy"); + _tabController.index = 3; + }, + ), + CupertinoDialogAction( + child: const Text("Alles erledigt 🎉"), + onPressed: () { + Navigator.of(context, rootNavigator: true).pop("Cancel"); + prefs.setInt("appLaunches", -1); + }, + ), + ], + ), + ), + ); } else if (appLaunches > -1) { prefs.setInt("appLaunches", ++appLaunches); } @@ -675,15 +676,7 @@ class _TimeTrackerState extends State { ), ), ), - CSControl( - "API Schlüssel", - Text( - api.authToken, - style: const TextStyle( - color: CupertinoColors.black, - ), - ), - ), + CSSecret("API Schlüssel", api.authToken), CSButton(CSButtonType.DESTRUCTIVE, "Abmelden", () { Navigator.of(context, rootNavigator: true) .pushReplacement(CupertinoPageRoute(builder: (BuildContext context) => CredentialsPage())) diff --git a/pubspec.lock b/pubspec.lock index f131bad..af6201f 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -198,9 +198,11 @@ packages: flutter_cupertino_settings: dependency: "direct main" description: - name: flutter_cupertino_settings - url: "https://pub.dartlang.org" - source: hosted + path: "." + ref: secret + resolved-ref: f3ad342c6cac3a91fea3bf6c8ef5a5fa707e5d7c + url: "https://github.com/SimonIT/flutter_cupertino_settings.git" + source: git version: "0.2.0" flutter_easyrefresh: dependency: "direct main" diff --git a/pubspec.yaml b/pubspec.yaml index 80fcc0a..96170b3 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -20,7 +20,10 @@ dependencies: flutter_typeahead: ^1.7.0 flutter_easyrefresh: ^2.0.4 html_unescape: ^1.0.1+3 - flutter_cupertino_settings: ^0.2.0 + flutter_cupertino_settings: + git: + url: https://github.com/SimonIT/flutter_cupertino_settings.git + ref: secret url_launcher: ^5.2.2 in_app_purchase: ^0.2.2+2 app_review: ^1.0.0