io api settings api

This commit is contained in:
jayesh
2024-07-25 19:19:25 +05:30
parent bc15d0b1b3
commit 9b44dc0cf3
67 changed files with 2871 additions and 394 deletions

View File

@@ -81,4 +81,10 @@ class RouteName {
//Bank Details
static const String addBankDetailsScreen = "addBankDetailsScreen";
//Vimeo
static const String vimeoScreen = "vimeoScreen";
//PDF
static const String pdfReaderScreen = "pdfReaderScreen";
}

View File

@@ -30,6 +30,7 @@ import 'package:tanami_app/features/register/presentation/pages/register_step_sc
import 'package:tanami_app/features/securePin/presentation/pages/pin_screen.dart';
import 'package:tanami_app/features/welcome/presentation/pages/weclome_screen.dart';
import 'package:tanami_app/shared/components/no_internet.dart';
import 'package:tanami_app/shared/components/read_pdf.dart';
import '../../features/MainScreens/Wallet/presentation/pages/deposit/deposit_completed_screen.dart';
import '../../features/MainScreens/main_screen.dart';
@@ -39,6 +40,7 @@ import '../../features/login/presentation/pages/login_screen.dart';
import '../../features/register/presentation/pages/register_user_details_screen.dart';
import '../../features/securePin/presentation/pages/confirm_pin_screen.dart';
import '../../features/splash/presentation/pages/splash_screen.dart';
import '../../shared/components/viemo_screen.dart';
/* CREATED BY - JAYESH JAIN
DATE - 24-05-2024
@@ -313,6 +315,25 @@ final goRouter = GoRouter(
return const FAQScreen();
},
),
GoRoute(
name: RouteName.vimeoScreen,
path: "${RouteName.vimeoScreen}/:videoUrl",
builder: (context, state) {
return VimeoScreen(
videoUrl: state.pathParameters["videoUrl"]!,
);
},
),
GoRoute(
name: RouteName.pdfReaderScreen,
path: "${RouteName.pdfReaderScreen}/:title/:pdfUrl",
builder: (context, state) {
return ReadPDF(
title: state.pathParameters["title"]!,
pdfUrl: state.pathParameters["pdfUrl"]!,
);
},
),
],
),
],

View File

@@ -109,6 +109,58 @@ class AppText {
//FAQ
static const String faqTitle = "faqTitle";
static const String gettingStarted = "gettingStarted";
static const String knowledgeAndEducation = "knowledgeAndEducation";
static const String complianceSecurityAndSupport =
"complianceSecurityAndSupport";
static const String getStartedTitle1 = "getStartedTitle1";
static const String geStartedDesc1 = "geStartedDesc1";
static const String getStartedTitle2 = "getStartedTitle2";
static const String geStartedDesc2 = "geStartedDesc2";
static const String getStartedTitle3 = "getStartedTitle3";
static const String geStartedDesc3 = "geStartedDesc3";
static const String investmentTitle1 = "investmentTitle1";
static const String investmentDesc1 = "investmentDesc1";
static const String investmentTitle2 = "investmentTitle2";
static const String investmentDesc2 = "investmentDesc2";
static const String investmentTitle3 = "investmentTitle3";
static const String investmentDesc3 = "investmentDesc3";
static const String investmentTitle4 = "investmentTitle4";
static const String investmentDesc4 = "investmentDesc4";
static const String investmentTitle5 = "investmentTitle5";
static const String investmentDesc5 = "investmentDesc5";
static const String investmentTitle6 = "investmentTitle6";
static const String investmentDesc6 = "investmentDesc6";
static const String investmentTitle7 = "investmentTitle7";
static const String investmentDesc7 = "investmentDesc7";
static const String investmentTitle8 = "investmentTitle8";
static const String investmentDesc8 = "investmentDesc8";
static const String investmentTitle9 = "investmentTitle9";
static const String investmentDesc9 = "investmentDesc9";
static const String investmentTitle10 = "investmentTitle10";
static const String investmentDesc10 = "investmentDesc10";
static const String investmentTitle11 = "investmentTitle11";
static const String investmentDesc11 = "investmentDesc11";
static const String investmentTitle12 = "investmentTitle12";
static const String investmentDesc12 = "investmentDesc12";
static const String investmentTitle13 = "investmentTitle13";
static const String investmentDesc13 = "investmentDesc13";
static const String knowledgeTitle1 = "knowledgeTitle1";
static const String knowledgeDesc1 = "knowledgeDesc1";
static const String knowledgeTitle2 = "knowledgeTitle2";
static const String knowledgeDesc2 = "knowledgeDesc2";
static const String knowledgeTitle3 = "knowledgeTitle3";
static const String knowledgeDesc3 = "knowledgeDesc3";
static const String securityTitle1 = "securityTitle1";
static const String securityDesc1 = "securityDesc1";
static const String securityTitle2 = "securityTitle2";
static const String securityDesc2 = "securityDesc2";
static const String securityTitle3 = "securityTitle3";
static const String securityDesc3 = "securityDesc3";
static const String securityTitle4 = "securityTitle4";
static const String securityDesc4 = "securityDesc4";
static const String securityTitle5 = "securityTitle5";
static const String securityDesc5 = "securityDesc5";
//Security
static const String unlockText = "unlockText";
@@ -144,6 +196,9 @@ class AppText {
static const String masterPinAddedSucessfullyText =
"masterPinAddedSucessfullyText";
static const String toRestorePasswordYouWillBeLoggedOut =
"toRestorePasswordYouWillBeLoggedOut";
//Forgot Password
static const String almostHere = "almostHere";
static const String completeAcc = "completeAcc";
@@ -270,6 +325,7 @@ class AppText {
static const String currentPsswordText = "currentPsswordText";
static const String bankDetails = "bankDetails";
static const String addBankDetails = "addBankDetails";
static const String websiteText = "websiteText";
//Contact Admin
static const String byPhoneText = "byPhoneText";

View File

@@ -0,0 +1,16 @@
import 'package:intl/intl.dart';
class DateTimeFormatter {
String formatDate(String dateString) {
// Parse the input date string
DateTime dateTime = DateTime.parse(dateString);
// Define the output format
DateFormat formatter = DateFormat('MMM dd yyyy');
// Format the date
String formattedDate = formatter.format(dateTime);
return formattedDate;
}
}

View File

@@ -0,0 +1,10 @@
import 'package:device_info_plus/device_info_plus.dart';
class DeviceInfoData {
final deviceInfoPlugin = DeviceInfoPlugin();
Future<String> getDeviceId() async {
var dataV = await deviceInfoPlugin.androidInfo;
return dataV.id.toString();
}
}

View File

@@ -16,4 +16,15 @@ class CommaTextInputFormatter extends TextInputFormatter {
selection: TextSelection.collapsed(offset: newText.length),
);
}
String getInitials(String name) {
List<String> words = name.split(' ');
String initials = '';
for (var word in words) {
if (word.isNotEmpty) {
initials += word[0].toUpperCase();
}
}
return initials;
}
}

View File

@@ -17,3 +17,12 @@ void launchEmail(String email) async {
throw 'Could not launch $url';
}
}
void launchWebsiteUrl(String websiteUrl) async {
final url = websiteUrl;
if (await canLaunchUrl(Uri.parse(url))) {
await launchUrl(Uri.parse(url), mode: LaunchMode.externalApplication);
} else {
throw 'Could not launch $url';
}
}