diff --git a/trackeroo/android/app/build.gradle b/trackeroo/android/app/build.gradle index d044c0f2bfce7757713ab18be85e42a49b6633c9..896cb4849846ab948998c89ef93c24620ecd8ea1 100644 --- a/trackeroo/android/app/build.gradle +++ b/trackeroo/android/app/build.gradle @@ -28,6 +28,7 @@ apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" android { compileSdkVersion flutter.compileSdkVersion ndkVersion flutter.ndkVersion + ndkVersion "25.1.8937393" compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 diff --git a/trackeroo/assets/rive/piggy.riv b/trackeroo/assets/rive/piggy.riv new file mode 100644 index 0000000000000000000000000000000000000000..fb164d47a191d21d69bea50ade5ca43d43a17993 Binary files /dev/null and b/trackeroo/assets/rive/piggy.riv differ diff --git a/trackeroo/lib/app_scaffold.dart b/trackeroo/lib/app_scaffold.dart index c5f3f88965b81ac5705f58483f7174754094ce8e..c7010969fb360ffbcc881a97dd678081676d6b91 100644 --- a/trackeroo/lib/app_scaffold.dart +++ b/trackeroo/lib/app_scaffold.dart @@ -64,8 +64,8 @@ class _AppScaffoldState extends State<AppScaffold> { label: 'Home' ), NavigationDestination( - icon: Icon(Icons.bar_chart_rounded), - selectedIcon: Icon(Icons.bar_chart_rounded), + icon: Icon(Icons.bar_chart), + selectedIcon: Icon(Icons.bar_chart), label: 'Details' ), NavigationDestination( diff --git a/trackeroo/lib/frontend/utils/onboarding/ob_categories.dart b/trackeroo/lib/frontend/utils/onboarding/ob_categories.dart index ef8c65989cfde24100da405bf90eb96e792655e2..037f64484448ff43de75968d51ba8186a9d49dc9 100644 --- a/trackeroo/lib/frontend/utils/onboarding/ob_categories.dart +++ b/trackeroo/lib/frontend/utils/onboarding/ob_categories.dart @@ -11,15 +11,22 @@ class OnboardingCategories extends StatelessWidget { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Text( - 'Categories', - style: TextStyle( - fontSize: 40.0, - fontWeight: FontWeight.w300 - ), + Row( + children: [ + Icon(Icons.category_rounded, size: 40.0), + SizedBox(width: 20.0), + Text( + 'Categories', + style: TextStyle( + fontSize: 40.0, + fontWeight: FontWeight.w300 + ), + ), + ], ), + SizedBox(height: 20.0), Text( - 'shows budget and lets you create and manage categories', + 'Edit existing categories or create new ones. What ever you need in order to categorize and sort your expenditures. ', style: TextStyle( fontSize: 16.0 ), diff --git a/trackeroo/lib/frontend/utils/onboarding/ob_details.dart b/trackeroo/lib/frontend/utils/onboarding/ob_details.dart index 695e030548b274eb418021e55b601437b3711a42..070d4dea01b89fd3d5a8cdb228f3c7aefa358e37 100644 --- a/trackeroo/lib/frontend/utils/onboarding/ob_details.dart +++ b/trackeroo/lib/frontend/utils/onboarding/ob_details.dart @@ -11,15 +11,22 @@ class OnboardingDetails extends StatelessWidget { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Text( - 'Details', - style: TextStyle( - fontSize: 40.0, - fontWeight: FontWeight.w300 - ), + Row( + children: [ + Icon(Icons.bar_chart, size: 40.0), + SizedBox(width: 20.0), + Text( + 'Details', + style: TextStyle( + fontSize: 40.0, + fontWeight: FontWeight.w300 + ), + ), + ], ), + SizedBox(height: 20.0), Text( - 'gives in depth information', + 'Deep dive into all of your transactions and analyze your spending. ', style: TextStyle( fontSize: 16.0 ), diff --git a/trackeroo/lib/frontend/utils/onboarding/ob_home.dart b/trackeroo/lib/frontend/utils/onboarding/ob_home.dart index b80dc576c49372f530367e8a77eba1f6e045e65b..913d50166ad70d88c2f3d65ba5f85399a47e6014 100644 --- a/trackeroo/lib/frontend/utils/onboarding/ob_home.dart +++ b/trackeroo/lib/frontend/utils/onboarding/ob_home.dart @@ -11,15 +11,22 @@ class OnboardingHome extends StatelessWidget { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Text( - 'Home', - style: TextStyle( - fontSize: 40.0, - fontWeight: FontWeight.w300 - ), + Row( + children: [ + Icon(Icons.home_rounded, size: 40.0), + SizedBox(width: 20.0), + Text( + 'Home', + style: TextStyle( + fontSize: 40.0, + fontWeight: FontWeight.w300 + ), + ), + ], ), + SizedBox(height: 20.0), Text( - 'gives an overview', + 'Get an overview of your balance and average spending, aswell as your latest transactions.', style: TextStyle( fontSize: 16.0 ), diff --git a/trackeroo/lib/frontend/utils/onboarding/ob_trackeroo.dart b/trackeroo/lib/frontend/utils/onboarding/ob_trackeroo.dart index 58e4d5f4dcefa43fd4c6a2b5138154dd692b1fa7..a82f035b5b9e43e93efc6d92363d2e1beb8307f4 100644 --- a/trackeroo/lib/frontend/utils/onboarding/ob_trackeroo.dart +++ b/trackeroo/lib/frontend/utils/onboarding/ob_trackeroo.dart @@ -1,29 +1,73 @@ +// ignore_for_file: must_be_immutable + import 'package:flutter/material.dart'; +import 'package:rive/rive.dart'; -class OnboardingTrackeroo extends StatelessWidget { +class OnboardingTrackeroo extends StatefulWidget { const OnboardingTrackeroo({super.key}); + @override + State<OnboardingTrackeroo> createState() => _OnboardingTrackerooState(); +} + +class _OnboardingTrackerooState extends State<OnboardingTrackeroo> { + SMITrigger? _trigger; + + void _onRiveInit(Artboard artboard) { + final controller = StateMachineController.fromArtboard(artboard, 'State Machine 1')!; + artboard.addController(controller); + _trigger = controller.findInput<bool>('Trigger 1') as SMITrigger; + Future.delayed(const Duration(milliseconds: 1000), () { + _hitTrigger(); + }); + } + + void _hitTrigger() => _trigger?.fire(); + @override Widget build(BuildContext context) { - return const SafeArea( + return SafeArea( child: Padding( - padding: EdgeInsets.all(20.0), + padding: const EdgeInsets.all(20.0), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Text( + const Text( 'Trackeroo', style: TextStyle( fontSize: 40.0, fontWeight: FontWeight.w300 ), ), - Text( + const Text( 'enables you to tackle your finances and keep an eye on your spending.', style: TextStyle( fontSize: 16.0 ), ), + GestureDetector( + onTap: _hitTrigger, + child: Center( + child: SizedBox( + width: 300.0, + height: 500.0, + child: RiveAnimation.asset( + 'assets/rive/piggy.riv', + onInit: _onRiveInit, + animations: const ['Coinflip'], + fit: BoxFit.contain + ), + ), + ), + ), + const Center( + child: Text( + '(you are allowed to pet the pig)', + style: TextStyle( + fontSize: 10.0 + ), + ), + ) ] ), ), diff --git a/trackeroo/macos/Flutter/GeneratedPluginRegistrant.swift b/trackeroo/macos/Flutter/GeneratedPluginRegistrant.swift index e777c67df2219fce2c33861bf98710f86bfc79b3..7f14ccd490a9a92bcf0e85baa55cf8b890c162ed 100644 --- a/trackeroo/macos/Flutter/GeneratedPluginRegistrant.swift +++ b/trackeroo/macos/Flutter/GeneratedPluginRegistrant.swift @@ -6,7 +6,9 @@ import FlutterMacOS import Foundation import path_provider_foundation +import rive_common func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) + RivePlugin.register(with: registry.registrar(forPlugin: "RivePlugin")) } diff --git a/trackeroo/pubspec.lock b/trackeroo/pubspec.lock index 1091aeee26b687316fb51a7189c4823e393b6850..4a35c637540d148bb69242b7ab28429402251e73 100644 --- a/trackeroo/pubspec.lock +++ b/trackeroo/pubspec.lock @@ -251,6 +251,11 @@ packages: description: flutter source: sdk version: "0.0.0" + flutter_web_plugins: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" frontend_server_client: dependency: transitive description: @@ -307,6 +312,14 @@ packages: url: "https://pub.dev" source: hosted version: "2.0.0" + http: + dependency: transitive + description: + name: http + sha256: "5895291c13fa8a3bd82e76d5627f69e0d85ca6a30dcac95c4ea19a5d555879c2" + url: "https://pub.dev" + source: hosted + version: "0.13.6" http_multi_server: dependency: transitive description: @@ -507,6 +520,22 @@ packages: url: "https://pub.dev" source: hosted version: "1.2.3" + rive: + dependency: "direct main" + description: + name: rive + sha256: "55e1f8bf249444545a7c832830d2bbb9adae759193fb879294bc6018b9f0eedd" + url: "https://pub.dev" + source: hosted + version: "0.11.3" + rive_common: + dependency: transitive + description: + name: rive_common + sha256: "7e17937b790bb2f631767b3d505da8c298309c0a6ab08cd317fa6fe081ed5b63" + url: "https://pub.dev" + source: hosted + version: "0.0.10" shelf: dependency: transitive description: diff --git a/trackeroo/pubspec.yaml b/trackeroo/pubspec.yaml index 5694bfdd520a1a53bd32405f5239f60999a20f6f..f5c57614cf3ff75168af11f65b7203532a3eaa82 100644 --- a/trackeroo/pubspec.yaml +++ b/trackeroo/pubspec.yaml @@ -41,6 +41,7 @@ dependencies: hive_generator: ^2.0.0 get_it: ^7.6.0 flutter_colorpicker: ^1.0.3 + rive: ^0.11.3 dev_dependencies: flutter_test: @@ -66,9 +67,8 @@ flutter: uses-material-design: true # To add assets to your application, add an assets section, like this: - # assets: - # - images/a_dot_burr.jpeg - # - images/a_dot_ham.jpeg + assets: + - assets/rive/ # An image asset can refer to one or more resolution-specific "variants", see # https://flutter.dev/assets-and-images/#resolution-aware diff --git a/trackeroo/windows/flutter/generated_plugin_registrant.cc b/trackeroo/windows/flutter/generated_plugin_registrant.cc index 8b6d4680af388f28db8742ef7fb8246e2bb1fffb..829b2da2c8f5a872d548826f5e377ff50a4ef212 100644 --- a/trackeroo/windows/flutter/generated_plugin_registrant.cc +++ b/trackeroo/windows/flutter/generated_plugin_registrant.cc @@ -6,6 +6,9 @@ #include "generated_plugin_registrant.h" +#include <rive_common/rive_plugin.h> void RegisterPlugins(flutter::PluginRegistry* registry) { + RivePluginRegisterWithRegistrar( + registry->GetRegistrarForPlugin("RivePlugin")); } diff --git a/trackeroo/windows/flutter/generated_plugins.cmake b/trackeroo/windows/flutter/generated_plugins.cmake index b93c4c30c16703f640bc38523e56204ade09399e..ea49fcc46346a9a90b5694f2dc3c3b353ecfd165 100644 --- a/trackeroo/windows/flutter/generated_plugins.cmake +++ b/trackeroo/windows/flutter/generated_plugins.cmake @@ -3,6 +3,7 @@ # list(APPEND FLUTTER_PLUGIN_LIST + rive_common ) list(APPEND FLUTTER_FFI_PLUGIN_LIST