Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
146 changes: 146 additions & 0 deletions app/assets/fingerprint.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 24 additions & 0 deletions app/assets/journey.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5,034 changes: 5,034 additions & 0 deletions app/assets/news.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/tft.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
51 changes: 51 additions & 0 deletions app/assets/tft.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions app/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ PODS:
- Flutter
- url_launcher_ios (0.0.1):
- Flutter
- webview_flutter_wkwebview (0.0.1):
- Flutter

DEPENDENCIES:
- device_info_plus (from `.symlinks/plugins/device_info_plus/ios`)
Expand All @@ -60,6 +62,7 @@ DEPENDENCIES:
- sodium_libs (from `.symlinks/plugins/sodium_libs/ios`)
- uni_links (from `.symlinks/plugins/uni_links/ios`)
- url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`)
- webview_flutter_wkwebview (from `.symlinks/plugins/webview_flutter_wkwebview/ios`)

SPEC REPOS:
trunk:
Expand Down Expand Up @@ -100,6 +103,8 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/uni_links/ios"
url_launcher_ios:
:path: ".symlinks/plugins/url_launcher_ios/ios"
webview_flutter_wkwebview:
:path: ".symlinks/plugins/webview_flutter_wkwebview/ios"

SPEC CHECKSUMS:
device_info_plus: c6fb39579d0f423935b0c9ce7ee2f44b71b9fce6
Expand All @@ -121,6 +126,7 @@ SPEC CHECKSUMS:
sodium_libs: 0486eb2c3172ce494406367d4b379042444b769d
uni_links: d97da20c7701486ba192624d99bffaaffcfc298a
url_launcher_ios: 5334b05cef931de560670eeae103fd3e431ac3fe
webview_flutter_wkwebview: 2a23822e9039b7b1bc52e5add778e5d89ad488d1

PODFILE CHECKSUM: 2262097366c615de59b03ca3bf748d7aaad51773

Expand Down
6 changes: 5 additions & 1 deletion app/lib/main.dart
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:provider/provider.dart';
import 'package:threebotlogin/helpers/globals.dart';
import 'package:threebotlogin/screens/splash_screen.dart';
import 'package:threebotlogin/services/shared_preference_service.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:threebotlogin/widgets/wizard/terms_agreement.dart';

extension ColorSchemeExtension on ColorScheme {
Color get warning => brightness == Brightness.light
Expand Down Expand Up @@ -37,7 +39,9 @@ Future<void> main() async {
await setGlobalValues();

bool registered = doubleName != null;
runApp(MyApp(initDone: initDone, registered: registered));
runApp(ChangeNotifierProvider(
create: ((context) => TermsAgreement()),
child: MyApp(initDone: initDone, registered: registered)));
}

Future<void> setGlobalValues() async {
Expand Down
53 changes: 2 additions & 51 deletions app/lib/screens/init_screen.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import 'package:flutter/material.dart';
import 'package:flutter_inappwebview/flutter_inappwebview.dart';
import 'package:threebotlogin/app_config.dart';
import 'package:threebotlogin/services/shared_preference_service.dart';
import 'package:threebotlogin/screens/wizard/swipe_page.dart';

class InitScreen extends StatefulWidget {
const InitScreen({super.key});
Expand All @@ -11,56 +9,9 @@ class InitScreen extends StatefulWidget {
}

class _InitState extends State<InitScreen> {
late InAppWebViewController webView;
late InAppWebView iaWebView;

finish(List<dynamic> params) async {
print('**** LOAD DONE ');
saveInitDone();
Navigator.pop(context, true);
}

addHandler() {
webView.addJavaScriptHandler(handlerName: 'FINISH', callback: finish);
}

_InitState() {
iaWebView = InAppWebView(
initialUrlRequest: URLRequest(
url: Uri.parse(
'${AppConfig().wizardUrl()}?cache_buster=${DateTime.now().millisecondsSinceEpoch}')),
initialOptions: InAppWebViewGroupOptions(
android: AndroidInAppWebViewOptions(
supportMultipleWindows: true, useHybridComposition: true),
),
onWebViewCreated: (InAppWebViewController controller) {
webView = controller;
addHandler();
},
onCreateWindow:
(InAppWebViewController controller, CreateWindowAction req) {
return Future.value(true);
},
onLoadStart: (InAppWebViewController controller, Uri? url) {},
onLoadStop: (InAppWebViewController controller, Uri? url) async {},
onProgressChanged: (InAppWebViewController controller, int progress) {},
);
}

@override
void initState() {
super.initState();
}

@override
void dispose() {
super.dispose();
}

@override
Widget build(BuildContext context) {
return MaterialApp(
home: SafeArea(child: iaWebView),
);
return const Scaffold(body: SafeArea(child: SwipePage()));
}
}
19 changes: 19 additions & 0 deletions app/lib/screens/wizard/page1.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import 'package:flutter/material.dart';
import 'package:threebotlogin/widgets/wizard/common_page.dart';

class Page1 extends StatelessWidget {
const Page1({super.key});

@override
Widget build(BuildContext context) {
return const CommonPage(
title: 'Welcome to',
subtitle: '',
imagePath: 'assets/TF_log_horizontal.svg',
widthPercentage: 0.75,
heightPercentage: 0.2,
description:
'Threefold Connect is your main access point to the Threefold Grid and more. Please allow us to quickly show you around!',
);
}
}
19 changes: 19 additions & 0 deletions app/lib/screens/wizard/page2.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import 'package:flutter/material.dart';
import 'package:threebotlogin/widgets/wizard/common_page.dart';

class Page2 extends StatelessWidget {
const Page2({super.key});

@override
Widget build(BuildContext context) {
return const CommonPage(
title: 'MAXIMUM',
subtitle: 'SECURITY',
imagePath: 'assets/fingerprint.svg',
widthPercentage: 0.75,
heightPercentage: 0.5,
description:
'The app provides a secure authentication mechanism that provides your identity on the Threefold Grid.',
);
}
}
19 changes: 19 additions & 0 deletions app/lib/screens/wizard/page3.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import 'package:flutter/material.dart';
import 'package:threebotlogin/widgets/wizard/common_page.dart';

class Page3 extends StatelessWidget {
const Page3({super.key});

@override
Widget build(BuildContext context) {
return const CommonPage(
title: 'THREEFOLD',
subtitle: 'WALLET',
imagePath: 'assets/tft.png',
description:
'Access your ThreeFold Wallet and your ThreeFold Tokens (TFT). More currencies are to be added in the future.',
heightPercentage: 0.4,
widthPercentage: 0.75,
);
}
}
19 changes: 19 additions & 0 deletions app/lib/screens/wizard/page4.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import 'package:flutter/material.dart';
import 'package:threebotlogin/widgets/wizard/common_page.dart';

class Page4 extends StatelessWidget {
const Page4({super.key});

@override
Widget build(BuildContext context) {
return const CommonPage(
title: 'THREEFOLD',
subtitle: 'NEWS',
imagePath: 'assets/news.svg',
description:
"Stay updated with ThreeFold's latest updates via the News section within the app.",
heightPercentage: 0.5,
widthPercentage: 0.8,
);
}
}
Loading