refactor: onboarding

release/mobdr-v0.0.1 v0.0.1+1
Frédérik Benoist 2023-06-18 23:05:48 +02:00
parent 946e3528e7
commit 89b5aae586
13 changed files with 38 additions and 36 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 248 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

View File

@ -1,4 +1,6 @@
PODS:
- audioplayers_darwin (0.0.1):
- Flutter
- camera_avfoundation (0.0.1):
- Flutter
- connectivity_plus (0.0.1):
@ -43,6 +45,8 @@ PODS:
- path_provider_foundation (0.0.1):
- Flutter
- FlutterMacOS
- permission_handler_apple (9.1.0):
- Flutter
- ReachabilitySwift (5.0.0)
- SDWebImage (5.16.0):
- SDWebImage/Core (= 5.16.0)
@ -63,6 +67,7 @@ PODS:
- Flutter
DEPENDENCIES:
- audioplayers_darwin (from `.symlinks/plugins/audioplayers_darwin/ios`)
- camera_avfoundation (from `.symlinks/plugins/camera_avfoundation/ios`)
- connectivity_plus (from `.symlinks/plugins/connectivity_plus/ios`)
- device_info_plus (from `.symlinks/plugins/device_info_plus/ios`)
@ -74,6 +79,7 @@ DEPENDENCIES:
- objectbox_flutter_libs (from `.symlinks/plugins/objectbox_flutter_libs/ios`)
- package_info_plus (from `.symlinks/plugins/package_info_plus/ios`)
- path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/ios`)
- permission_handler_apple (from `.symlinks/plugins/permission_handler_apple/ios`)
- shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/ios`)
- sqflite (from `.symlinks/plugins/sqflite/ios`)
- wakelock (from `.symlinks/plugins/wakelock/ios`)
@ -91,6 +97,8 @@ SPEC REPOS:
- Toast
EXTERNAL SOURCES:
audioplayers_darwin:
:path: ".symlinks/plugins/audioplayers_darwin/ios"
camera_avfoundation:
:path: ".symlinks/plugins/camera_avfoundation/ios"
connectivity_plus:
@ -113,6 +121,8 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/package_info_plus/ios"
path_provider_foundation:
:path: ".symlinks/plugins/path_provider_foundation/ios"
permission_handler_apple:
:path: ".symlinks/plugins/permission_handler_apple/ios"
shared_preferences_foundation:
:path: ".symlinks/plugins/shared_preferences_foundation/ios"
sqflite:
@ -123,6 +133,7 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/webview_flutter_wkwebview/ios"
SPEC CHECKSUMS:
audioplayers_darwin: 877d9a4d06331c5c374595e46e16453ac7eafa40
camera_avfoundation: 3125e8cd1a4387f6f31c6c63abb8a55892a9eeeb
connectivity_plus: 07c49e96d7fc92bc9920617b83238c4d178b446a
device_info_plus: e5c5da33f982a436e103237c0c85f9031142abed
@ -138,6 +149,7 @@ SPEC CHECKSUMS:
objectbox_flutter_libs: 61d74196d924fbc773da5f5757d1e9fab7b3cc78
package_info_plus: 6c92f08e1f853dc01228d6f553146438dafcd14e
path_provider_foundation: c68054786f1b4f3343858c1e1d0caaded73f0be9
permission_handler_apple: 8f116445eff3c0e7c65ad60f5fef5490aa94b4e4
ReachabilitySwift: 985039c6f7b23a1da463388634119492ff86c825
SDWebImage: 2aea163b50bfcb569a2726b6a754c54a4506fcf6
SDWebImageWebPCoder: 295a6573c512f54ad2dd58098e64e17dcf008499

View File

@ -30,10 +30,7 @@ const String ERROR_OCCURED = 'Error occured, please try again later';
const int LIMIT_PAGE = 8;
const String GLOBAL_URL = 'https://ijtechnology.net/assets/images/api/devkit';
//const String GLOBAL_URL = 'http://192.168.0.4/devkit';
//const String GLOBAL_URL = 'http://192.168.100.9/devkit';
const String GLOBAL_IMAGES_URL = 'https://mp4.ikksgroup.com/mobdr';
const String LOCAL_IMAGES_URL = 'assets/images';
class ApiConstants {

View File

@ -307,7 +307,7 @@ class _OverBoardState extends State<OverBoard> with TickerProviderStateMixin {
),
Padding(
padding: new EdgeInsets.only(
top: 10.0, bottom: 30.0, left: 30.0, right: 30.0),
top: 10.0, bottom: 25.0, left: 30.0, right: 30.0),
child: new Text(
page.title!,
textAlign: TextAlign.center,
@ -319,7 +319,7 @@ class _OverBoardState extends State<OverBoard> with TickerProviderStateMixin {
),
Padding(
padding: new EdgeInsets.only(
bottom: 75.0, left: 30.0, right: 30.0),
bottom: 10.0, left: 30.0, right: 30.0),
child: new Text(
page.body!,
textAlign: TextAlign.center,

View File

@ -15,23 +15,33 @@ class _OnBoardingPageState extends State<OnBoardingPage> {
final _pageList = [
PageModel(
color: Colors.white,
imageAssetPath: LOCAL_IMAGES_URL + '/onboarding/search_product.gif',
title: 'Choose Product',
body: 'Search and browse the product you want to buy at iJShop',
imageFromUrl: GLOBAL_IMAGES_URL + '/onboarding-calendar.png',
title: 'MP4 Calendar',
body: 'Plan your monthly visits',
doAnimateImage: true),
PageModel(
color: Colors.white,
imageFromUrl: GLOBAL_URL + '/apps/ecommerce/onboarding/cart.png',
title: 'Add to Cart and Pay',
body:
'Add the product to shopping cart, choose delivery and then pay with your preferences payment',
imageFromUrl: GLOBAL_IMAGES_URL + '/onboarding-photos.png',
title: 'Take Photos',
body: 'Take all your photos of your visit',
doAnimateImage: true),
PageModel(
color: Colors.white,
imageFromUrl: GLOBAL_URL + '/apps/ecommerce/onboarding/delivery.png',
title: 'Delivery',
body:
'Wait until the product that has been purchased comes to the house',
imageFromUrl: GLOBAL_IMAGES_URL + '/onboarding-photo.png',
title: 'Edit Photo',
body: 'Position tags, adjust visibility, specify competitor',
doAnimateImage: true),
PageModel(
color: Colors.white,
imageFromUrl: GLOBAL_IMAGES_URL + '/onboarding-synchro.png',
title: 'MP4 synchronisation',
body: 'Synchronise your data quickly and easily with MP4 :)',
doAnimateImage: true),
PageModel(
color: Colors.white,
imageFromUrl: GLOBAL_IMAGES_URL + '/onboarding-visite.png',
title: 'MP4 Visit',
body: 'All your photos will appear in your MP4 visit !',
doAnimateImage: true),
];
@ -40,12 +50,6 @@ class _OnBoardingPageState extends State<OnBoardingPage> {
super.initState();
}
// this function used if user click finish, you won't see this page again until you clear your data of this apps in your phone setting
/*void _finishOnBoarding() async {
final SharedPreferences _pref = await SharedPreferences.getInstance();
await _pref.setBool('onBoarding', false);
}*/
@override
void dispose() {
super.dispose();
@ -58,8 +62,6 @@ class _OnBoardingPageState extends State<OnBoardingPage> {
pages: _pageList,
showBullets: true,
finishCallback: () {
//_finishOnBoarding();
// after you click finish, direct to signin page
// Adjust with your need using push replacement or push remove until
//Navigator.of(context).pushAndRemoveUntil(MaterialPageRoute(builder: (context) => SigninPage()), (Route<dynamic> route) => false);

View File

@ -11,7 +11,6 @@ import 'package:flutter_image_compress/flutter_image_compress.dart';
import 'package:image_picker/image_picker.dart';
import 'package:path/path.dart' as path;
import 'package:path_provider/path_provider.dart';
import 'package:mobdr/config/global_style.dart';
import 'package:mobdr/config/constant.dart';
@ -568,12 +567,10 @@ class _VisitPhotoTypologyListPageState
/// The temporary file name will start with 'sim_'.
Future<File> copyImageFromAssetsToTemporaryDirectory() async {
final String randomName = 'sim_${DateTime.now().microsecondsSinceEpoch}';
final Directory tempDir = await getTemporaryDirectory();
final String tempPath = tempDir.path;
final String assetPath = 'assets/images/simulator.jpeg';
final ByteData data = await rootBundle.load(assetPath);
final File tempFile = File('$tempPath/$randomName.jpeg');
final File tempFile = File('${SharedPrefs().photosDir}/$randomName.jpeg');
await tempFile.writeAsBytes(data.buffer.asUint8List(), flush: true);
return tempFile;

View File

@ -198,13 +198,7 @@ flutter:
- assets/images/logo_dark.png
- assets/images/logo_mp4.png
- assets/images/logo_horizontal.png
- assets/images/synchro.png
- assets/images/onboarding/search_product.gif
- assets/images/process_timeline/status1.png
- assets/images/process_timeline/status2.png
- assets/images/process_timeline/status3.png
- assets/images/process_timeline/status4.png
- assets/images/process_timeline/status5.png
- assets/images/simulator.jpeg
- assets/lang/fr.json