Skip to content
Snippets Groups Projects
Commit 6b60ab00 authored by Florian Schindler's avatar Florian Schindler
Browse files

added rive and rive animation to the project and onboarding

parent 0c270824
No related branches found
No related tags found
No related merge requests found
Showing with 132 additions and 31 deletions
......@@ -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
......
File added
......@@ -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(
......
......@@ -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
),
......
......@@ -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
),
......
......@@ -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
),
......
// 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
),
),
)
]
),
),
......
......@@ -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"))
}
......@@ -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:
......
......@@ -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
......
......@@ -6,6 +6,9 @@
#include "generated_plugin_registrant.h"
#include <rive_common/rive_plugin.h>
void RegisterPlugins(flutter::PluginRegistry* registry) {
RivePluginRegisterWithRegistrar(
registry->GetRegistrarForPlugin("RivePlugin"));
}
......@@ -3,6 +3,7 @@
#
list(APPEND FLUTTER_PLUGIN_LIST
rive_common
)
list(APPEND FLUTTER_FFI_PLUGIN_LIST
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment