diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..8c43058 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,25 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "name": "hwyd", + "request": "launch", + "type": "dart" + }, + { + "name": "hwyd (profile mode)", + "request": "launch", + "type": "dart", + "flutterMode": "profile" + }, + { + "name": "hwyd (release mode)", + "request": "launch", + "type": "dart", + "flutterMode": "release" + } + ] +} \ No newline at end of file diff --git a/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/android/app/src/main/res/mipmap-hdpi/ic_launcher.png index db77bb4..8b4fc77 100644 Binary files a/android/app/src/main/res/mipmap-hdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/android/app/src/main/res/mipmap-mdpi/ic_launcher.png index 17987b7..84bfb66 100644 Binary files a/android/app/src/main/res/mipmap-mdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png index 09d4391..3fb3357 100644 Binary files a/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png index d5f1c8d..6fb0b15 100644 Binary files a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png index 4d6372e..a92f561 100644 Binary files a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 248281d..cc54ce9 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -1,7 +1,5 @@ PODS: - Flutter (1.0.0) - - flutter_keyboard_visibility (0.0.1): - - Flutter - path_provider_foundation (0.0.1): - Flutter - FlutterMacOS @@ -15,7 +13,6 @@ PODS: DEPENDENCIES: - Flutter (from `Flutter`) - - flutter_keyboard_visibility (from `.symlinks/plugins/flutter_keyboard_visibility/ios`) - path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`) - share_plus (from `.symlinks/plugins/share_plus/ios`) - shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`) @@ -24,8 +21,6 @@ DEPENDENCIES: EXTERNAL SOURCES: Flutter: :path: Flutter - flutter_keyboard_visibility: - :path: ".symlinks/plugins/flutter_keyboard_visibility/ios" path_provider_foundation: :path: ".symlinks/plugins/path_provider_foundation/darwin" share_plus: @@ -37,7 +32,6 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854 - flutter_keyboard_visibility: 0339d06371254c3eb25eeb90ba8d17dca8f9c069 path_provider_foundation: 29f094ae23ebbca9d3d0cec13889cd9060c0e943 share_plus: c3fef564749587fc939ef86ffb283ceac0baf9f5 shared_preferences_foundation: 5b919d13b803cadd15ed2dc053125c68730e5126 diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/100.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/100.png new file mode 100644 index 0000000..149783c Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/100.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/1024.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/1024.png new file mode 100644 index 0000000..b4a5512 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/1024.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/114.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/114.png new file mode 100644 index 0000000..03e77b0 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/114.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/120.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/120.png new file mode 100644 index 0000000..dc6fc22 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/120.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/144.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/144.png new file mode 100644 index 0000000..78418c7 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/144.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/152.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/152.png new file mode 100644 index 0000000..d4772d5 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/152.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/167.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/167.png new file mode 100644 index 0000000..0625587 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/167.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/180.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/180.png new file mode 100644 index 0000000..f8e2083 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/180.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/20.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/20.png new file mode 100644 index 0000000..beff22d Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/20.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/29.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/29.png new file mode 100644 index 0000000..808ce60 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/29.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/40.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/40.png new file mode 100644 index 0000000..a17f532 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/40.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/50.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/50.png new file mode 100644 index 0000000..726ab83 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/50.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/57.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/57.png new file mode 100644 index 0000000..b02dc18 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/57.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/58.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/58.png new file mode 100644 index 0000000..506602d Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/58.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/60.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/60.png new file mode 100644 index 0000000..0b1e910 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/60.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/72.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/72.png new file mode 100644 index 0000000..7ca5191 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/72.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/76.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/76.png new file mode 100644 index 0000000..0b8b046 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/76.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/80.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/80.png new file mode 100644 index 0000000..c50b9ec Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/80.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/87.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/87.png new file mode 100644 index 0000000..81ec1e2 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/87.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json index d36b1fa..65b74d7 100644 --- a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json +++ b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -1,122 +1 @@ -{ - "images" : [ - { - "size" : "20x20", - "idiom" : "iphone", - "filename" : "Icon-App-20x20@2x.png", - "scale" : "2x" - }, - { - "size" : "20x20", - "idiom" : "iphone", - "filename" : "Icon-App-20x20@3x.png", - "scale" : "3x" - }, - { - "size" : "29x29", - "idiom" : "iphone", - "filename" : "Icon-App-29x29@1x.png", - "scale" : "1x" - }, - { - "size" : "29x29", - "idiom" : "iphone", - "filename" : "Icon-App-29x29@2x.png", - "scale" : "2x" - }, - { - "size" : "29x29", - "idiom" : "iphone", - "filename" : "Icon-App-29x29@3x.png", - "scale" : "3x" - }, - { - "size" : "40x40", - "idiom" : "iphone", - "filename" : "Icon-App-40x40@2x.png", - "scale" : "2x" - }, - { - "size" : "40x40", - "idiom" : "iphone", - "filename" : "Icon-App-40x40@3x.png", - "scale" : "3x" - }, - { - "size" : "60x60", - "idiom" : "iphone", - "filename" : "Icon-App-60x60@2x.png", - "scale" : "2x" - }, - { - "size" : "60x60", - "idiom" : "iphone", - "filename" : "Icon-App-60x60@3x.png", - "scale" : "3x" - }, - { - "size" : "20x20", - "idiom" : "ipad", - "filename" : "Icon-App-20x20@1x.png", - "scale" : "1x" - }, - { - "size" : "20x20", - "idiom" : "ipad", - "filename" : "Icon-App-20x20@2x.png", - "scale" : "2x" - }, - { - "size" : "29x29", - "idiom" : "ipad", - "filename" : "Icon-App-29x29@1x.png", - "scale" : "1x" - }, - { - "size" : "29x29", - "idiom" : "ipad", - "filename" : "Icon-App-29x29@2x.png", - "scale" : "2x" - }, - { - "size" : "40x40", - "idiom" : "ipad", - "filename" : "Icon-App-40x40@1x.png", - "scale" : "1x" - }, - { - "size" : "40x40", - "idiom" : "ipad", - "filename" : "Icon-App-40x40@2x.png", - "scale" : "2x" - }, - { - "size" : "76x76", - "idiom" : "ipad", - "filename" : "Icon-App-76x76@1x.png", - "scale" : "1x" - }, - { - "size" : "76x76", - "idiom" : "ipad", - "filename" : "Icon-App-76x76@2x.png", - "scale" : "2x" - }, - { - "size" : "83.5x83.5", - "idiom" : "ipad", - "filename" : "Icon-App-83.5x83.5@2x.png", - "scale" : "2x" - }, - { - "size" : "1024x1024", - "idiom" : "ios-marketing", - "filename" : "Icon-App-1024x1024@1x.png", - "scale" : "1x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} +{"images":[{"size":"60x60","expected-size":"180","filename":"180.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"3x"},{"size":"40x40","expected-size":"80","filename":"80.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"2x"},{"size":"40x40","expected-size":"120","filename":"120.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"3x"},{"size":"60x60","expected-size":"120","filename":"120.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"2x"},{"size":"57x57","expected-size":"57","filename":"57.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"1x"},{"size":"29x29","expected-size":"58","filename":"58.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"2x"},{"size":"29x29","expected-size":"29","filename":"29.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"1x"},{"size":"29x29","expected-size":"87","filename":"87.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"3x"},{"size":"57x57","expected-size":"114","filename":"114.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"2x"},{"size":"20x20","expected-size":"40","filename":"40.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"2x"},{"size":"20x20","expected-size":"60","filename":"60.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"3x"},{"size":"1024x1024","filename":"1024.png","expected-size":"1024","idiom":"ios-marketing","folder":"Assets.xcassets/AppIcon.appiconset/","scale":"1x"},{"size":"40x40","expected-size":"80","filename":"80.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"2x"},{"size":"72x72","expected-size":"72","filename":"72.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"1x"},{"size":"76x76","expected-size":"152","filename":"152.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"2x"},{"size":"50x50","expected-size":"100","filename":"100.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"2x"},{"size":"29x29","expected-size":"58","filename":"58.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"2x"},{"size":"76x76","expected-size":"76","filename":"76.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"1x"},{"size":"29x29","expected-size":"29","filename":"29.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"1x"},{"size":"50x50","expected-size":"50","filename":"50.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"1x"},{"size":"72x72","expected-size":"144","filename":"144.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"2x"},{"size":"40x40","expected-size":"40","filename":"40.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"1x"},{"size":"83.5x83.5","expected-size":"167","filename":"167.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"2x"},{"size":"20x20","expected-size":"20","filename":"20.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"1x"},{"size":"20x20","expected-size":"40","filename":"40.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"2x"}]} \ No newline at end of file diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png deleted file mode 100644 index dc9ada4..0000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png deleted file mode 100644 index 7353c41..0000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png deleted file mode 100644 index 797d452..0000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png deleted file mode 100644 index 6ed2d93..0000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png deleted file mode 100644 index 4cd7b00..0000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png deleted file mode 100644 index fe73094..0000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png deleted file mode 100644 index 321773c..0000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png deleted file mode 100644 index 797d452..0000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png deleted file mode 100644 index 502f463..0000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png deleted file mode 100644 index 0ec3034..0000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png deleted file mode 100644 index 0ec3034..0000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png deleted file mode 100644 index e9f5fea..0000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png deleted file mode 100644 index 84ac32a..0000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png deleted file mode 100644 index 8953cba..0000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png deleted file mode 100644 index 0467bf1..0000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png and /dev/null differ diff --git a/lib/screens/hwyd.dart b/lib/screens/hwyd.dart index 307c84d..7c46882 100644 --- a/lib/screens/hwyd.dart +++ b/lib/screens/hwyd.dart @@ -3,8 +3,10 @@ import 'dart:convert'; import 'package:flutter/material.dart'; -import 'package:introduction_screen/introduction_screen.dart'; import 'package:shared_preferences/shared_preferences.dart'; +import 'package:cupertino_onboarding/cupertino_onboarding.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:url_launcher/url_launcher.dart'; import 'journal_page.dart'; @@ -28,8 +30,8 @@ class _HwydState extends State { _checkOnboardStatus() async { SharedPreferences prefs = await SharedPreferences.getInstance(); setState(() { - showOnboard = - jsonDecode(prefs.getString(_onBoardKey) ?? json.encode(true)); + showOnboard = true; + // jsonDecode(prefs.getString(_onBoardKey) ?? json.encode(true)); }); } @@ -45,52 +47,47 @@ class _HwydState extends State { : const JournalPage(); } + Future _launchPrivacyPolicyUrl() async { + Uri privacyPolicyUrl = Uri.parse( + 'https://github.com/omartoutounji/hwyd/tree/master/privacy-policy/hwyd-app-privacy-policy.pdf'); + if (!await launchUrl(privacyPolicyUrl)) { + throw Exception('Could not launch $privacyPolicyUrl'); + } + } + Widget _buildIntroductionScreen() { - return IntroductionScreen( - pages: [ - PageViewModel( - title: "hwyd", - body: - "Welcome to the world's first nano journal. So simple, all you'll want to do is write your heart out ♥️", - image: Center( - child: Image.asset('assets/hwyd_logo.png', width: 250), - ), - ), - PageViewModel( - title: "Creating a new note", - body: "Just tap the hwyd logo to create a new note️", - image: const Center( - child: Icon( - Icons.add, - size: 250, + return CupertinoOnboarding( + onPressedOnLastPage: () { + // _disableOnboard(); + Navigator.pushReplacementNamed(context, '/journal'); + }, + widgetAboveBottomButton: CupertinoButton( + child: Text( + 'Privacy Policy', + style: TextStyle( + color: CupertinoColors.systemTeal.resolveFrom(context), ), ), + onPressed: () => _launchPrivacyPolicyUrl(), ), - PageViewModel( - title: "Viewing previous notes", - body: - "Swipe from left to right to see other notes. Don't worry about saving, everything auto-saves. Also don't worry about privacy, contents are only saved on your device so no one can access it but you. Not even hwyd.", - image: const Center( - child: Icon(Icons.swipe, size: 250), - ), - ), - PageViewModel( - title: "Changing font size", - body: - "Swipe the other way around from right to left and move the slider to change font size", - image: const Center( - child: Icon(Icons.format_size, size: 250), - ), - ) - ], - onDone: () { - _disableOnboard(); - Navigator.pushReplacementNamed(context, '/journal'); - }, - showSkipButton: false, - next: const Icon(Icons.navigate_next), - showNextButton: true, - done: const Text("Done", style: TextStyle(fontWeight: FontWeight.w600)), - ); + pages: [ + WhatsNewPage(title: const Text("Welcome to hwyd"), features: const [ + WhatsNewFeature( + title: Text("The comfort of privacy"), + description: Text( + "hwyd is built from the ground up to be private and secure. We don’t know what journals you enter or what you type. Heck, we don't — and will never know a damn thing about you! Don't believe us? Check out our privacy policy below."), + icon: Icon(Icons.lock)), + WhatsNewFeature( + title: Text("Clean and calm"), + description: Text( + "Clean and calm, hwyd shapes itself to how you use it. It's a journal that doesn’t just meet your needs — it anticipates them."), + icon: Icon(Icons.self_improvement)), + WhatsNewFeature( + title: Text("Space for the different sides of you"), + description: Text( + "Effortlessly organize everything you journal — work, study, hobbies — all in one place with Dresser."), + icon: Icon(Icons.favorite)) + ]) + ]); } } diff --git a/lib/screens/journal_page.dart b/lib/screens/journal_page.dart index a032b8b..d587042 100644 --- a/lib/screens/journal_page.dart +++ b/lib/screens/journal_page.dart @@ -9,9 +9,8 @@ import 'package:flutter/services.dart'; import 'package:google_fonts/google_fonts.dart'; import 'package:shared_preferences/shared_preferences.dart'; import 'package:share_plus/share_plus.dart'; -import 'package:url_launcher/url_launcher.dart'; -import '../model/Note.dart'; +import 'package:hwyd/model/Note.dart'; class JournalPage extends StatefulWidget { const JournalPage({super.key}); @@ -27,7 +26,6 @@ class _JournalPageState extends State { final Image logo = Image.asset('assets/hwyd_logo.png', width: 50); final textController = TextEditingController(); final renameController = TextEditingController(); - double _currentSliderValue = 80; final GlobalKey _scaffoldKey = GlobalKey(); bool isRenameTextFieldEnabled = false; @@ -41,8 +39,107 @@ class _JournalPageState extends State { greeting = getRandomGreeting(); } + String getRandomEmoji() { + var emojis = [ + "✌", + "😂", + "😝", + "😁", + "😱", + "👉", + "🙌", + "🍻", + "🔥", + "🌈", + "☀", + "🎈", + "🌹", + "💄", + "🎀", + "⚽", + "🎾", + "🏁", + "😡", + "👿", + "🐻", + "🐶", + "🐬", + "🐟", + "🍀", + "👀", + "🚗", + "🍎", + "💝", + "💙", + "👌", + "❤", + "😍", + "😉", + "😓", + "😳", + "💪", + "💩", + "🍸", + "🔑", + "💖", + "🌟", + "🎉", + "🌺", + "🎶", + "👠", + "🏈", + "⚾", + "🏆", + "👽", + "💀", + "🐵", + "🐮", + "🐩", + "🐎", + "💣", + "👃", + "👂", + "🍓", + "💘", + "💜", + "👊", + "💋", + "😘", + "😜", + "😵", + "🙏", + "👋", + "🚽", + "💃", + "💎", + "🚀", + "🌙", + "🎁", + "⛄", + "🌊", + "⛵", + "🏀", + "🎱", + "💰", + "👶", + "👸", + "🐰", + "🐷", + "🐍", + "🐫", + "🔫", + "👄", + "🚲", + "🍉", + "💛", + "💚" + ]; + final random = Random(); + return emojis[random.nextInt(emojis.length)]; + } + Note getNewNote() { - return Note(getPrettyDate(), ""); + return Note("${getRandomEmoji()} ${getPrettyDate()}", ""); } String getPrettyDate() { @@ -50,14 +147,6 @@ class _JournalPageState extends State { DateTime.now(), [M, ' ', d, ' at ', HH, ':', nn, '.', ss]); } - Future _launchPrivacyPolicyUrl() async { - Uri privacyPolicyUrl = Uri.parse( - 'https://github.com/omartoutounji/hwyd/tree/master/privacy-policy/hwyd-app-privacy-policy.pdf'); - if (!await launchUrl(privacyPolicyUrl)) { - throw Exception('Could not launch $privacyPolicyUrl'); - } - } - _loadNotes() async { SharedPreferences prefs = await SharedPreferences.getInstance(); setState(() { @@ -66,7 +155,6 @@ class _JournalPageState extends State { .map((i) => Note.fromJson(i))); currentNoteIndex = notes.length - 1; textController.text = notes[currentNoteIndex].text; - _currentSliderValue = prefs.getDouble('fontSize') ?? 80; }); } @@ -83,7 +171,6 @@ class _JournalPageState extends State { _save() async { SharedPreferences prefs = await SharedPreferences.getInstance(); prefs.setString('notes', json.encode(notes)); - prefs.setDouble('fontSize', _currentSliderValue); } _createNewNote() async { @@ -166,17 +253,14 @@ class _JournalPageState extends State { textAlign: TextAlign.center, ), ), - IconButton( - onPressed: notes[currentNoteIndex].text.isEmpty - ? null - : () => Share.share(notes[currentNoteIndex].text), - icon: const Icon(Icons.ios_share)), Padding( padding: const EdgeInsets.only(right: 15.0), child: IconButton( - onPressed: () => _deleteNote(currentNoteIndex), - icon: const Icon(Icons.delete_outline)), - ) + onPressed: notes[currentNoteIndex].text.isEmpty + ? null + : () => Share.share(notes[currentNoteIndex].text), + icon: const Icon(Icons.ios_share)), + ), ], ), Expanded( @@ -256,7 +340,7 @@ class _JournalPageState extends State { padding: const EdgeInsets.only(top: 50), children: [ DrawerHeader( - child: Text('Notes', + child: Text('Dresser', style: GoogleFonts.raleway( textStyle: TextStyle( fontWeight: FontWeight.w400, @@ -323,9 +407,11 @@ class _JournalPageState extends State { decoration: InputDecoration.collapsed( hintStyle: TextStyle( fontSize: 20, - color: currentNoteIndex == index - ? null - : Colors.grey), + color: MediaQuery.of(context) + .platformBrightness != + Brightness.dark + ? Colors.white + : Colors.black), hintText: currentNote.name, border: InputBorder.none), ), @@ -350,13 +436,6 @@ class _JournalPageState extends State { ), ); }), - InkWell( - child: const Text( - 'Privacy Policy', - style: TextStyle(color: Colors.grey), - ), - onTap: () => _launchPrivacyPolicyUrl(), - ) ], ), ) diff --git a/pubspec.lock b/pubspec.lock index 9b0661a..57a6be3 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -1,6 +1,30 @@ # Generated by pub # See https://dart.dev/tools/pub/glossary#lockfile packages: + _fe_analyzer_shared: + dependency: transitive + description: + name: _fe_analyzer_shared + sha256: ae92f5d747aee634b87f89d9946000c2de774be1d6ac3e58268224348cd0101a + url: "https://pub.dev" + source: hosted + version: "61.0.0" + analyzer: + dependency: transitive + description: + name: analyzer + sha256: ea3d8652bda62982addfd92fdc2d0214e5f82e43325104990d4f4c4a2a313562 + url: "https://pub.dev" + source: hosted + version: "5.13.0" + args: + dependency: transitive + description: + name: args + sha256: eef6c46b622e0494a36c5a12d10d77fb4e855501a91c1b9ef9339326e58f0596 + url: "https://pub.dev" + source: hosted + version: "2.4.2" async: dependency: transitive description: @@ -41,6 +65,22 @@ packages: url: "https://pub.dev" source: hosted version: "1.17.2" + convert: + dependency: transitive + description: + name: convert + sha256: "0f08b14755d163f6e2134cb58222dd25ea2a2ee8a195e53983d57c075324d592" + url: "https://pub.dev" + source: hosted + version: "3.1.1" + coverage: + dependency: transitive + description: + name: coverage + sha256: "595a29b55ce82d53398e1bcc2cba525d7bd7c59faeb2d2540e9d42c390cfeeeb" + url: "https://pub.dev" + source: hosted + version: "1.6.4" cross_file: dependency: transitive description: @@ -65,6 +105,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.0.6" + cupertino_onboarding: + dependency: "direct main" + description: + name: cupertino_onboarding + sha256: "948327610ba9204cde7d3f9a4f7fa2c5571272702a8c8c4d9ae0a2ec022393f1" + url: "https://pub.dev" + source: hosted + version: "1.2.0" date_format: dependency: "direct main" description: @@ -110,54 +158,6 @@ packages: description: flutter source: sdk version: "0.0.0" - flutter_keyboard_visibility: - dependency: transitive - description: - name: flutter_keyboard_visibility - sha256: "4983655c26ab5b959252ee204c2fffa4afeb4413cd030455194ec0caa3b8e7cb" - url: "https://pub.dev" - source: hosted - version: "5.4.1" - flutter_keyboard_visibility_linux: - dependency: transitive - description: - name: flutter_keyboard_visibility_linux - sha256: "6fba7cd9bb033b6ddd8c2beb4c99ad02d728f1e6e6d9b9446667398b2ac39f08" - url: "https://pub.dev" - source: hosted - version: "1.0.0" - flutter_keyboard_visibility_macos: - dependency: transitive - description: - name: flutter_keyboard_visibility_macos - sha256: c5c49b16fff453dfdafdc16f26bdd8fb8d55812a1d50b0ce25fc8d9f2e53d086 - url: "https://pub.dev" - source: hosted - version: "1.0.0" - flutter_keyboard_visibility_platform_interface: - dependency: transitive - description: - name: flutter_keyboard_visibility_platform_interface - sha256: e43a89845873f7be10cb3884345ceb9aebf00a659f479d1c8f4293fcb37022a4 - url: "https://pub.dev" - source: hosted - version: "2.0.0" - flutter_keyboard_visibility_web: - dependency: transitive - description: - name: flutter_keyboard_visibility_web - sha256: d3771a2e752880c79203f8d80658401d0c998e4183edca05a149f5098ce6e3d1 - url: "https://pub.dev" - source: hosted - version: "2.0.0" - flutter_keyboard_visibility_windows: - dependency: transitive - description: - name: flutter_keyboard_visibility_windows - sha256: fc4b0f0b6be9b93ae527f3d527fb56ee2d918cd88bbca438c478af7bcfd0ef73 - url: "https://pub.dev" - source: hosted - version: "1.0.0" flutter_lints: dependency: "direct dev" description: @@ -176,6 +176,22 @@ packages: description: flutter source: sdk version: "0.0.0" + frontend_server_client: + dependency: transitive + description: + name: frontend_server_client + sha256: "408e3ca148b31c20282ad6f37ebfa6f4bdc8fede5b74bc2f08d9d92b55db3612" + url: "https://pub.dev" + source: hosted + version: "3.2.0" + glob: + dependency: transitive + description: + name: glob + sha256: "0e7014b3b7d4dac1ca4d6114f82bf1782ee86745b9b42a92c9289c23d8a0ab63" + url: "https://pub.dev" + source: hosted + version: "2.1.2" google_fonts: dependency: "direct main" description: @@ -192,6 +208,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.1.0" + http_multi_server: + dependency: transitive + description: + name: http_multi_server + sha256: "97486f20f9c2f7be8f514851703d0119c3596d14ea63227af6f7a481ef2b2f8b" + url: "https://pub.dev" + source: hosted + version: "3.2.1" http_parser: dependency: transitive description: @@ -200,14 +224,14 @@ packages: url: "https://pub.dev" source: hosted version: "4.0.2" - introduction_screen: - dependency: "direct main" + io: + dependency: transitive description: - name: introduction_screen - sha256: "72d25ceb71471773783f72783608e17585af93d4bc6474df577fcfe9e7842852" + name: io + sha256: "2ec25704aba361659e10e3e5f5d672068d332fc8ac516421d483a11e5cbd061e" url: "https://pub.dev" source: hosted - version: "3.1.12" + version: "1.0.4" js: dependency: transitive description: @@ -224,6 +248,14 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.1" + logging: + dependency: transitive + description: + name: logging + sha256: "623a88c9594aa774443aa3eb2d41807a48486b5613e67599fb4c41c0ad47c340" + url: "https://pub.dev" + source: hosted + version: "1.2.0" matcher: dependency: transitive description: @@ -256,6 +288,22 @@ packages: url: "https://pub.dev" source: hosted version: "1.0.4" + node_preamble: + dependency: transitive + description: + name: node_preamble + sha256: "6e7eac89047ab8a8d26cf16127b5ed26de65209847630400f9aefd7cd5c730db" + url: "https://pub.dev" + source: hosted + version: "2.0.2" + package_config: + dependency: transitive + description: + name: package_config + sha256: "1c5b77ccc91e4823a5af61ee74e6b972db1ef98c2ff5a18d3161c982a55448bd" + url: "https://pub.dev" + source: hosted + version: "2.1.0" path: dependency: transitive description: @@ -328,6 +376,22 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.6" + pool: + dependency: transitive + description: + name: pool + sha256: "20fe868b6314b322ea036ba325e6fc0711a22948856475e2c2b6306e8ab39c2a" + url: "https://pub.dev" + source: hosted + version: "1.5.1" + pub_semver: + dependency: transitive + description: + name: pub_semver + sha256: "40d3ab1bbd474c4c2328c91e3a7df8c6dd629b79ece4c4bd04bee496a224fb0c" + url: "https://pub.dev" + source: hosted + version: "2.1.4" share_plus: dependency: "direct main" description: @@ -400,11 +464,59 @@ packages: url: "https://pub.dev" source: hosted version: "2.3.2" + shelf: + dependency: transitive + description: + name: shelf + sha256: ad29c505aee705f41a4d8963641f91ac4cee3c8fad5947e033390a7bd8180fa4 + url: "https://pub.dev" + source: hosted + version: "1.4.1" + shelf_packages_handler: + dependency: transitive + description: + name: shelf_packages_handler + sha256: "89f967eca29607c933ba9571d838be31d67f53f6e4ee15147d5dc2934fee1b1e" + url: "https://pub.dev" + source: hosted + version: "3.0.2" + shelf_static: + dependency: transitive + description: + name: shelf_static + sha256: a41d3f53c4adf0f57480578c1d61d90342cd617de7fc8077b1304643c2d85c1e + url: "https://pub.dev" + source: hosted + version: "1.1.2" + shelf_web_socket: + dependency: transitive + description: + name: shelf_web_socket + sha256: "9ca081be41c60190ebcb4766b2486a7d50261db7bd0f5d9615f2d653637a84c1" + url: "https://pub.dev" + source: hosted + version: "1.0.4" sky_engine: dependency: transitive description: flutter source: sdk version: "0.0.99" + source_map_stack_trace: + dependency: transitive + description: + name: source_map_stack_trace + sha256: "84cf769ad83aa6bb61e0aa5a18e53aea683395f196a6f39c4c881fb90ed4f7ae" + url: "https://pub.dev" + source: hosted + version: "2.1.1" + source_maps: + dependency: transitive + description: + name: source_maps + sha256: "708b3f6b97248e5781f493b765c3337db11c5d2c81c3094f10904bfa8004c703" + url: "https://pub.dev" + source: hosted + version: "0.10.12" source_span: dependency: transitive description: @@ -453,6 +565,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.2.1" + test: + dependency: "direct dev" + description: + name: test + sha256: "13b41f318e2a5751c3169137103b60c584297353d4b1761b66029bae6411fe46" + url: "https://pub.dev" + source: hosted + version: "1.24.3" test_api: dependency: transitive description: @@ -461,6 +581,14 @@ packages: url: "https://pub.dev" source: hosted version: "0.6.0" + test_core: + dependency: transitive + description: + name: test_core + sha256: "99806e9e6d95c7b059b7a0fc08f07fc53fabe54a829497f0d9676299f1e8637e" + url: "https://pub.dev" + source: hosted + version: "0.5.3" typed_data: dependency: transitive description: @@ -549,6 +677,22 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.4" + vm_service: + dependency: transitive + description: + name: vm_service + sha256: c538be99af830f478718b51630ec1b6bee5e74e52c8a802d328d9e71d35d2583 + url: "https://pub.dev" + source: hosted + version: "11.10.0" + watcher: + dependency: transitive + description: + name: watcher + sha256: "3d2ad6751b3c16cf07c7fca317a1413b3f26530319181b37e3b9039b84fc01d8" + url: "https://pub.dev" + source: hosted + version: "1.1.0" web: dependency: transitive description: @@ -557,6 +701,22 @@ packages: url: "https://pub.dev" source: hosted version: "0.1.4-beta" + web_socket_channel: + dependency: transitive + description: + name: web_socket_channel + sha256: d88238e5eac9a42bb43ca4e721edba3c08c6354d4a53063afaa568516217621b + url: "https://pub.dev" + source: hosted + version: "2.4.0" + webkit_inspection_protocol: + dependency: transitive + description: + name: webkit_inspection_protocol + sha256: "87d3f2333bb240704cd3f1c6b5b7acd8a10e7f0bc28c28dcf14e782014f4a572" + url: "https://pub.dev" + source: hosted + version: "1.2.1" win32: dependency: transitive description: @@ -573,6 +733,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.0.3" + yaml: + dependency: transitive + description: + name: yaml + sha256: "75769501ea3489fca56601ff33454fe45507ea3bfb014161abc3b43ae25989d5" + url: "https://pub.dev" + source: hosted + version: "3.1.2" sdks: dart: ">=3.1.4 <4.0.0" flutter: ">=3.13.0" diff --git a/pubspec.yaml b/pubspec.yaml index 55abb8a..e8ad0e2 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -13,15 +13,16 @@ dependencies: google_fonts: ^6.1.0 shared_preferences: ^2.0.5 date_format: ^2.0.2 - introduction_screen: ^3.1.12 file: ^6.1.4 share_plus: ^7.2.1 url_launcher: ^6.2.1 + cupertino_onboarding: ^1.2.0 dev_dependencies: flutter_test: sdk: flutter flutter_lints: ^2.0.0 + test: ^1.24.3 flutter: assets: diff --git a/test/hwyd_sanity_test.dart b/test/hwyd_sanity_test.dart new file mode 100644 index 0000000..f5b764d --- /dev/null +++ b/test/hwyd_sanity_test.dart @@ -0,0 +1,97 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_test/flutter_test.dart'; +import 'package:hwyd/screens/journal_page.dart'; + +void main() { + testWidgets('Hwyd sanity test', (WidgetTester tester) async { + // Isolate the JournalPage widget out of our app safely so we can test it as testWidget + Widget testWidget = const MediaQuery( + data: MediaQueryData(), child: MaterialApp(home: JournalPage())); + + // Rebuild the widget tree for our test widget + await tester.pumpWidget(testWidget); + + // Ensure testWidget is visible + await tester.ensureVisible(find.byWidget(testWidget)); + + // Ensure user can see the menu, share and add icons + await tester.ensureVisible(find.byIcon(Icons.menu)); + await tester.ensureVisible(find.byIcon(Icons.ios_share)); + await tester.ensureVisible(find.byIcon(Icons.add)); + + // Search for our hint text and verify there is one widget + expect(find.byType(TextField), findsOneWidget); + + // Enter a mock journal + await tester.enterText(find.byType(TextField), 'my day was great!'); + + // Expect to find the new mock journal on screen + expect(find.text('my day was great!'), findsOneWidget); + + // Press on menu icon to open drawer + await tester.tap(find.byIcon(Icons.menu)); + + // Rebuild widget tree or wait for animation to complete + await tester.pumpAndSettle(); + + // Expect the Drawer to be there in widget tree + expect(find.byType(Drawer), findsOneWidget); + + // Ensure the Drawer is visible + await tester.ensureVisible(find.byType(Drawer)); + + // Ensure there is one journal in the drawer only + expect(find.byType(ListTile), findsOneWidget); + + // Tap on rename name button to rename journal + await tester.tap(find.byIcon(Icons.drive_file_rename_outline)); + + // Rename journal to 'journal1'. We're using the first text field we find. + await tester.enterText(find.byType(TextField).first, 'journal1'); + + // Expect to find renamed journal in Drawer + expect(find.text('journal1'), findsOneWidget); + + // Press on menu icon to close drawer. Disable warning since we intend to tap off-screen share button + await tester.tap(find.byIcon(Icons.ios_share), warnIfMissed: false); + + // Rebuild widget tree or wait for animation to complete + await tester.pumpAndSettle(); + + // Expect the Drawer to be gone in widget tree + expect(find.byType(Drawer), findsNothing); + + // Press on add button to create new jounrnal + await tester.tap(find.byIcon(Icons.add)); + + // Rebuild widget tree or wait for animation to complete + await tester.pumpAndSettle(); + + // Press on menu icon to open drawer + await tester.tap(find.byIcon(Icons.menu)); + + // Rebuild widget tree or wait for animation to complete + await tester.pumpAndSettle(); + + // Expect the Drawer to be there in widget tree + expect(find.byType(Drawer), findsOneWidget); + + // Ensure the Drawer is visible + await tester.ensureVisible(find.byType(Drawer)); + + // Ensure there are 2 journals journal in the drawer only + expect(find.byType(ListTile), findsNWidgets(2)); + + // Rebuild widget tree or wait for animation to complete + await tester.pumpAndSettle(); + + // Dismiss 1 journal + await tester.drag(find.byType(Dismissible).first, const Offset(500, 0)); + + // Build the widget until the dismiss animation ends. + await tester.pumpAndSettle(); + + // Ensure that one journal is now deleted and there is only 1 left + expect(find.byType(ListTile), findsOneWidget); + }); +} diff --git a/test/hwyd_smoke_test.dart b/test/hwyd_smoke_test.dart deleted file mode 100644 index 0fdc1d6..0000000 --- a/test/hwyd_smoke_test.dart +++ /dev/null @@ -1,25 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:hwyd/screens/journal_page.dart'; - -void main() { - testWidgets('Hwyd smoke test', (WidgetTester tester) async { - // Take the JournalPage widget out of our app safely so we can test it without the onboarding page - Widget testWidget = const MediaQuery( - data: MediaQueryData(), - child: MaterialApp(home: JournalPage()) - ); - - // Load the JournalPage widget - await tester.pumpWidget(testWidget); - - // Search for our hint text and verify there is one widget - expect(find.byType(TextField), findsOneWidget); - - // Enter a mock journal - await tester.enterText(find.byType(TextField), 'my day was great!'); - - // Expect to find the new mock journal on screen - expect(find.text('my day was great!'), findsOneWidget); - }); -}