add onboarding slides
5
.vscode/settings.json
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"cSpell.words": [
|
||||
"thounthends"
|
||||
]
|
||||
}
|
||||
BIN
assets/images/onboarding/01.png
Normal file
|
After Width: | Height: | Size: 307 KiB |
BIN
assets/images/onboarding/02.png
Normal file
|
After Width: | Height: | Size: 192 KiB |
BIN
assets/images/onboarding/03.png
Normal file
|
After Width: | Height: | Size: 581 KiB |
BIN
assets/images/onboarding/04.png
Normal file
|
After Width: | Height: | Size: 514 KiB |
BIN
assets/images/onboarding/05.png
Normal file
|
After Width: | Height: | Size: 95 KiB |
BIN
assets/images/onboarding/06.png
Normal file
|
After Width: | Height: | Size: 219 KiB |
BIN
assets/images/onboarding/mountain-7011121_1920.png
Normal file
|
After Width: | Height: | Size: 275 KiB |
BIN
assets/images/onboarding/mountain-7011121_640.png
Normal file
|
After Width: | Height: | Size: 83 KiB |
|
|
@ -1,4 +1,5 @@
|
|||
import 'package:twonly/main.dart';
|
||||
import 'package:twonly/src/views/onboarding_view.dart';
|
||||
import 'views/home_view.dart';
|
||||
import 'views/register_view.dart';
|
||||
import 'utils.dart';
|
||||
|
|
@ -20,6 +21,7 @@ class MyApp extends StatefulWidget {
|
|||
|
||||
class _MyAppState extends State<MyApp> {
|
||||
Future<bool> _isUserCreated = isUserCreated();
|
||||
bool _showOnboarding = true;
|
||||
bool _isConnected = false;
|
||||
int redColorOpacity = 0; // Start with dark red
|
||||
bool redColorGoUp = true;
|
||||
|
|
@ -104,12 +106,18 @@ class _MyAppState extends State<MyApp> {
|
|||
return snapshot.data!
|
||||
? HomeView(
|
||||
settingsController: widget.settingsController)
|
||||
: RegisterView(
|
||||
: _showOnboarding
|
||||
? OnboardingView(
|
||||
callbackOnSuccess: () {
|
||||
setState(() {
|
||||
_showOnboarding = false;
|
||||
});
|
||||
},
|
||||
)
|
||||
: RegisterView(callbackOnSuccess: () {
|
||||
_isUserCreated = isUserCreated();
|
||||
setState(() {});
|
||||
},
|
||||
); // Show the red line if not connected
|
||||
});
|
||||
} else {
|
||||
return Container();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -64,9 +64,7 @@ class _CameraPreviewViewState extends State<CameraPreviewView> {
|
|||
alignment: Alignment.bottomCenter,
|
||||
child: Column(
|
||||
children: [
|
||||
AwesomeZoomSelector(state: cameraState
|
||||
// controller: _controller,
|
||||
),
|
||||
AwesomeZoomSelector(state: cameraState),
|
||||
const SizedBox(height: 30),
|
||||
GestureDetector(
|
||||
onTap: () async {
|
||||
|
|
|
|||
118
lib/src/views/onboarding_view.dart
Normal file
|
|
@ -0,0 +1,118 @@
|
|||
import 'package:introduction_screen/introduction_screen.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class OnboardingView extends StatelessWidget {
|
||||
const OnboardingView({super.key, required this.callbackOnSuccess});
|
||||
final Function callbackOnSuccess;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
body: IntroductionScreen(
|
||||
bodyPadding: EdgeInsets.only(top: 75, left: 10, right: 10),
|
||||
pages: [
|
||||
PageViewModel(
|
||||
title: "Welcome to twonly!",
|
||||
body:
|
||||
"With twonly you can share pictures with friends that only you and the receiver can see!",
|
||||
image: Center(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(top: 100),
|
||||
child: Image.asset("assets/images/onboarding/01.png"),
|
||||
),
|
||||
),
|
||||
),
|
||||
PageViewModel(
|
||||
title: "No ads, no tracking",
|
||||
body:
|
||||
"twonly is complete add free and does not collect any personal data. The server does not save any data of you.",
|
||||
image: Center(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(top: 100),
|
||||
child: Image.asset("assets/images/onboarding/02.png"),
|
||||
),
|
||||
),
|
||||
),
|
||||
PageViewModel(
|
||||
title: "End-to-End protection",
|
||||
body:
|
||||
"twonly encrypts every message you send. For this it uses the Signal protocol which is currently the best way to encrypt messages with a minimum of metadata.",
|
||||
image: Center(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(top: 100),
|
||||
child: Image.asset("assets/images/onboarding/03.png"),
|
||||
),
|
||||
),
|
||||
),
|
||||
PageViewModel(
|
||||
title: "Hard work",
|
||||
body:
|
||||
"We try everything to give you the best experience but developing and maintaining is hard work and requires thousand of hours.",
|
||||
image: Center(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(top: 100),
|
||||
child: Image.asset("assets/images/onboarding/04.png"),
|
||||
),
|
||||
),
|
||||
),
|
||||
PageViewModel(
|
||||
title: "You are not the product!",
|
||||
body:
|
||||
"Nothing is free. Either you pay with your personal informations or with money. Twonly gives you the chance to use an sustainable social media product without exploiting you by collection you personal data.",
|
||||
image: Center(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(top: 100),
|
||||
child: Image.asset("assets/images/onboarding/05.png"),
|
||||
),
|
||||
),
|
||||
),
|
||||
PageViewModel(
|
||||
title: "Try for free!",
|
||||
bodyWidget: Column(
|
||||
children: [
|
||||
Text(
|
||||
"You can test twonly free for 14 days and then decide it is worth for you.",
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(fontSize: 18),
|
||||
),
|
||||
Padding(
|
||||
padding:
|
||||
const EdgeInsets.only(left: 50, right: 50, top: 20),
|
||||
child: FilledButton(
|
||||
onPressed: () {
|
||||
callbackOnSuccess();
|
||||
// On button pressed
|
||||
},
|
||||
child: const Text("Try for free"),
|
||||
)),
|
||||
],
|
||||
),
|
||||
image: Center(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(top: 100),
|
||||
child: Image.asset("assets/images/onboarding/06.png"),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
showNextButton: true,
|
||||
done: const Text("Our plans"),
|
||||
next: const Text("Next"),
|
||||
// done: RegisterView(callbackOnSuccess: callbackOnSuccess),
|
||||
onDone: () {
|
||||
callbackOnSuccess();
|
||||
// On button pressed
|
||||
},
|
||||
dotsDecorator: DotsDecorator(
|
||||
size: const Size.square(10.0),
|
||||
activeSize: const Size(20.0, 10.0),
|
||||
activeColor: Theme.of(context).colorScheme.primary,
|
||||
color: Theme.of(context).colorScheme.secondary,
|
||||
spacing: const EdgeInsets.symmetric(horizontal: 3.0),
|
||||
activeShape:
|
||||
RoundedRectangleBorder(borderRadius: BorderRadius.circular(25.0)),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
@ -28,7 +28,7 @@ class _ProfileViewState extends State<ProfileView> {
|
|||
if (snap.hasData) {
|
||||
return Text("Hello ${snap.data!.username}!");
|
||||
} else {
|
||||
return CircularProgressIndicator();
|
||||
return Container();
|
||||
}
|
||||
}),
|
||||
actions: [
|
||||
|
|
|
|||
64
pubspec.lock
|
|
@ -254,6 +254,14 @@ packages:
|
|||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "7.0.2"
|
||||
dots_indicator:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: dots_indicator
|
||||
sha256: f1599baa429936ba87f06ae5f2adc920a367b16d08f74db58c3d0f6e93bcdb5c
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.1.2"
|
||||
ed25519_edwards:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
@ -307,6 +315,54 @@ packages:
|
|||
description: flutter
|
||||
source: sdk
|
||||
version: "0.0.0"
|
||||
flutter_keyboard_visibility:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: flutter_keyboard_visibility
|
||||
sha256: "98664be7be0e3ffca00de50f7f6a287ab62c763fc8c762e0a21584584a3ff4f8"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "6.0.0"
|
||||
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_launcher_icons:
|
||||
dependency: "direct dev"
|
||||
description:
|
||||
|
|
@ -458,6 +514,14 @@ packages:
|
|||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.19.0"
|
||||
introduction_screen:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: introduction_screen
|
||||
sha256: "325f26e86fa3c3e86e6ab2bbc1fda860c9e6eae5ff29166fc2a3cab8f710d5b5"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.1.14"
|
||||
io:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ dependencies:
|
|||
google_fonts: ^6.2.1
|
||||
image: ^4.3.0
|
||||
intl: any
|
||||
introduction_screen: ^3.1.14
|
||||
json_annotation: ^4.9.0
|
||||
libsignal_protocol_dart: ^0.7.1
|
||||
logging: ^1.3.0
|
||||
|
|
@ -61,3 +62,9 @@ flutter:
|
|||
assets:
|
||||
# Add assets from the images directory to the application.
|
||||
- assets/images/
|
||||
- assets/images/onboarding/01.png
|
||||
- assets/images/onboarding/02.png
|
||||
- assets/images/onboarding/03.png
|
||||
- assets/images/onboarding/04.png
|
||||
- assets/images/onboarding/05.png
|
||||
- assets/images/onboarding/06.png
|
||||
|
|
|
|||