Merge branch 'main' into splash
This commit is contained in:
@@ -32,8 +32,33 @@
|
||||
<category android:name="android.intent.category.LAUNCHER"/>
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<!-- Don't delete the meta-data below.
|
||||
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
|
||||
|
||||
<!-- SMALL CASE API-->
|
||||
<activity android:name="com.smallcase.gateway.screens.transaction.activity.TransactionProcessActivity"
|
||||
android:exported="true">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
<category android:name="android.intent.category.BROWSABLE" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<data
|
||||
android:host="pi-advisors"
|
||||
android:scheme="scgateway"
|
||||
/>
|
||||
</intent-filter>
|
||||
</activity>
|
||||
|
||||
<activity android:name="com.smallcase.gateway.screens.common.RedirectActivity"
|
||||
android:exported="true">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
<category android:name="android.intent.category.BROWSABLE" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<data
|
||||
android:host="pi-advisors"
|
||||
android:scheme="scgatewayredirect"
|
||||
/>
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<meta-data
|
||||
android:name="flutterEmbedding"
|
||||
android:value="2" />
|
||||
|
||||
@@ -10,7 +10,7 @@ class MainController extends GetxController {
|
||||
var currentTab = [
|
||||
const HomeScreen(),
|
||||
const ShortTrade(),
|
||||
const Holdings(),
|
||||
const Portfolio(),
|
||||
].obs;
|
||||
|
||||
void updateTab(int index) {
|
||||
|
||||
@@ -1,12 +1,19 @@
|
||||
import 'dart:math';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:traderscircuit/controller/risk_profile_controller.dart';
|
||||
|
||||
import '../text.dart';
|
||||
|
||||
class CustomDropDownWidget extends StatefulWidget {
|
||||
const CustomDropDownWidget(
|
||||
{super.key, required this.header, required this.listData});
|
||||
{super.key,
|
||||
required this.header,
|
||||
required this.title,
|
||||
required this.listData});
|
||||
final String header;
|
||||
final String title;
|
||||
final List<String> listData;
|
||||
|
||||
@override
|
||||
@@ -16,6 +23,27 @@ class CustomDropDownWidget extends StatefulWidget {
|
||||
class _CustomDropDownWidgetState extends State<CustomDropDownWidget> {
|
||||
RxBool onDropTap = false.obs;
|
||||
RxString selectedValue = "".obs;
|
||||
RiskProfileController riskProfileController =
|
||||
Get.put(RiskProfileController());
|
||||
|
||||
void updateOrAddData(String key, String value) {
|
||||
bool keyExists = false;
|
||||
for (int i = 0; i < riskProfileController.selectedData.length; i++) {
|
||||
Map<String, String> item = riskProfileController.selectedData[i];
|
||||
if (item.containsKey(key)) {
|
||||
riskProfileController.selectedData[i][key] =
|
||||
value; // Update existing value
|
||||
keyExists = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!keyExists) {
|
||||
// Add new key-value pair
|
||||
riskProfileController.selectedData.add({key: value});
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Obx(
|
||||
@@ -146,6 +174,8 @@ class _CustomDropDownWidgetState extends State<CustomDropDownWidget> {
|
||||
onTap: () {
|
||||
selectedValue.value = widget.listData[index];
|
||||
onDropTap.value = !onDropTap.value;
|
||||
updateOrAddData(
|
||||
widget.title, widget.listData[index]);
|
||||
},
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
class ApiUrls {
|
||||
// PIE BASE URL FOR SMALL CASE --> NEED TO BE UPDATED
|
||||
|
||||
static const String pieBase = "https://app.piadvisors.in/";
|
||||
|
||||
//Base URL
|
||||
static const base = "http://192.168.50.112/Trader_circuit/api/";
|
||||
|
||||
@@ -25,4 +29,13 @@ class ApiUrls {
|
||||
|
||||
//FAQ API
|
||||
static String faqApi = "${base}getFaq";
|
||||
|
||||
//RISK PROFILE API
|
||||
static String getRiskProfileQuestionAnswerApi = "${base}riskProfileQueAns";
|
||||
static String addRiskProfileQuestionAnswerApi = "${base}addUserRiskProfile";
|
||||
|
||||
//CONTENT BYTES API
|
||||
static String getContentBytesCategoriesApi =
|
||||
"${base}getContentByteCategories";
|
||||
static String getContentBytesApi = "${base}getContentBytes";
|
||||
}
|
||||
|
||||
11
lib/controller/content_bytes_controller.dart
Normal file
11
lib/controller/content_bytes_controller.dart
Normal file
@@ -0,0 +1,11 @@
|
||||
import 'package:get/get.dart';
|
||||
import 'package:traderscircuit/model/ContentBytesModel/content_bytes_categories_model.dart';
|
||||
import 'package:traderscircuit/model/ContentBytesModel/content_bytes_model.dart';
|
||||
|
||||
class ContentBytesController extends GetxController {
|
||||
ContentBytesCategoriesModel contentBytesCategoriesModel =
|
||||
ContentBytesCategoriesModel();
|
||||
ContentBytesModel contentBytesModel = ContentBytesModel();
|
||||
int filterId = 0;
|
||||
RxBool isApiCalling = true.obs;
|
||||
}
|
||||
9
lib/controller/risk_profile_controller.dart
Normal file
9
lib/controller/risk_profile_controller.dart
Normal file
@@ -0,0 +1,9 @@
|
||||
import 'package:get/get.dart';
|
||||
|
||||
import '../model/RiskProfileModel/risk_profile_ques_answer_model.dart';
|
||||
|
||||
class RiskProfileController extends GetxController {
|
||||
RiskProfileQuestionAnswerModel riskProfileQuestionAnswerModel =
|
||||
RiskProfileQuestionAnswerModel();
|
||||
List<Map<String, String>> selectedData = [];
|
||||
}
|
||||
@@ -16,7 +16,7 @@ class NetworkApiServices extends BaseApiServices {
|
||||
base64.encode(
|
||||
utf8.encode('traderCircuitUser:71%@L%es^bUX94`J9XT*@bh,._WWM{'));
|
||||
@override
|
||||
Future<ResponseData> getApi(String url) async {
|
||||
Future<ResponseData> getApi(String url, {bool isAuth = false}) async {
|
||||
if (kDebugMode) {
|
||||
print("api url is >>> $url");
|
||||
}
|
||||
@@ -25,14 +25,17 @@ class NetworkApiServices extends BaseApiServices {
|
||||
String? token = prefs.getString('accessToken').toString();
|
||||
log(token);
|
||||
try {
|
||||
response = await dio.get(
|
||||
url,
|
||||
// options: Options(headers: {
|
||||
// 'authorization': "Bearer $token",
|
||||
|
||||
// // "device-id": deviceId
|
||||
// })
|
||||
);
|
||||
response = await dio.get(url,
|
||||
options: (token == null || token == "")
|
||||
? Options(
|
||||
headers: {
|
||||
"Authorization": basicAuth,
|
||||
},
|
||||
)
|
||||
: Options(headers: {
|
||||
"Authorization": basicAuth,
|
||||
'access-token': token,
|
||||
}));
|
||||
|
||||
if (response.statusCode == 200) {
|
||||
return ResponseData<dynamic>(
|
||||
@@ -61,7 +64,7 @@ class NetworkApiServices extends BaseApiServices {
|
||||
}
|
||||
|
||||
@override
|
||||
Future<ResponseData> postApi(data, String url) async {
|
||||
Future<ResponseData> postApi(data, String url, {bool isAuth = false}) async {
|
||||
if (kDebugMode) {
|
||||
print("data >>> $data");
|
||||
print("api url is >>> $url");
|
||||
|
||||
@@ -7,6 +7,7 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
import 'package:traderscircuit/firebase_options.dart';
|
||||
import 'package:scgateway_flutter_plugin/scgateway_flutter_plugin.dart';
|
||||
import 'package:traderscircuit/resources/routes/route_name.dart';
|
||||
import 'package:firebase_core/firebase_core.dart';
|
||||
import 'package:traderscircuit/resources/routes/routes.dart';
|
||||
@@ -28,6 +29,14 @@ Future<void> main() async {
|
||||
// GlobalVariables globalVariables = GlobalVariables();
|
||||
//token = prefs.getString('token');
|
||||
// OnBoard = prefs.getBool("OnBoard");
|
||||
|
||||
//smallcase
|
||||
ScgatewayFlutterPlugin.setConfigEnvironment(
|
||||
GatewayEnvironment.PRODUCTION,
|
||||
'pi-advisors',
|
||||
false,
|
||||
[],
|
||||
);
|
||||
SystemChrome.setPreferredOrientations([
|
||||
DeviceOrientation.portraitUp,
|
||||
]).then((value) => runApp(const MyApp()));
|
||||
|
||||
@@ -0,0 +1,83 @@
|
||||
class ContentBytesCategoriesModel {
|
||||
String? status;
|
||||
int? statusCode;
|
||||
String? message;
|
||||
List<Data>? data;
|
||||
|
||||
ContentBytesCategoriesModel(
|
||||
{this.status, this.statusCode, this.message, this.data});
|
||||
|
||||
ContentBytesCategoriesModel.fromJson(Map<String, dynamic> json) {
|
||||
status = json['status'];
|
||||
statusCode = json['status_code'];
|
||||
message = json['message'];
|
||||
if (json['data'] != null) {
|
||||
data = <Data>[];
|
||||
json['data'].forEach((v) {
|
||||
data!.add(Data.fromJson(v));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = <String, dynamic>{};
|
||||
data['status'] = status;
|
||||
data['status_code'] = statusCode;
|
||||
data['message'] = message;
|
||||
if (this.data != null) {
|
||||
data['data'] = this.data!.map((v) => v.toJson()).toList();
|
||||
}
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class Data {
|
||||
int? id;
|
||||
String? contentType;
|
||||
String? title;
|
||||
String? description;
|
||||
String? tags;
|
||||
String? file;
|
||||
int? categoryId;
|
||||
String? image;
|
||||
String? isActive;
|
||||
|
||||
Data({
|
||||
this.id,
|
||||
this.contentType,
|
||||
this.title,
|
||||
this.description,
|
||||
this.tags,
|
||||
this.file,
|
||||
this.categoryId,
|
||||
this.image,
|
||||
this.isActive,
|
||||
});
|
||||
|
||||
Data.fromJson(Map<String, dynamic> json) {
|
||||
id = json['id'];
|
||||
contentType = json['content_type'];
|
||||
title = json['title'];
|
||||
description = json['description'];
|
||||
tags = json['tags'];
|
||||
file = json['file'];
|
||||
categoryId = json['category_id'];
|
||||
image = json['image'];
|
||||
isActive = json['is_active'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = <String, dynamic>{};
|
||||
data['id'] = id;
|
||||
data['content_type'] = contentType;
|
||||
data['title'] = title;
|
||||
data['description'] = description;
|
||||
data['tags'] = tags;
|
||||
data['file'] = file;
|
||||
data['category_id'] = categoryId;
|
||||
data['image'] = image;
|
||||
data['is_active'] = isActive;
|
||||
|
||||
return data;
|
||||
}
|
||||
}
|
||||
222
lib/model/ContentBytesModel/content_bytes_model.dart
Normal file
222
lib/model/ContentBytesModel/content_bytes_model.dart
Normal file
@@ -0,0 +1,222 @@
|
||||
class ContentBytesModel {
|
||||
String? status;
|
||||
int? statusCode;
|
||||
String? message;
|
||||
Data? data;
|
||||
|
||||
ContentBytesModel({this.status, this.statusCode, this.message, this.data});
|
||||
|
||||
ContentBytesModel.fromJson(Map<String, dynamic> json) {
|
||||
status = json['status'];
|
||||
statusCode = json['status_code'];
|
||||
message = json['message'];
|
||||
data = json['data'] != null ? Data.fromJson(json['data']) : null;
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = <String, dynamic>{};
|
||||
data['status'] = status;
|
||||
data['status_code'] = statusCode;
|
||||
data['message'] = message;
|
||||
if (this.data != null) {
|
||||
data['data'] = this.data!.toJson();
|
||||
}
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class Data {
|
||||
List<Video>? video;
|
||||
List<Audio>? audio;
|
||||
List<Read>? read;
|
||||
|
||||
Data({this.video, this.audio, this.read});
|
||||
|
||||
Data.fromJson(Map<String, dynamic> json) {
|
||||
if (json['video'] != null) {
|
||||
video = <Video>[];
|
||||
json['video'].forEach((v) {
|
||||
video!.add(Video.fromJson(v));
|
||||
});
|
||||
}
|
||||
if (json['audio'] != null) {
|
||||
audio = <Audio>[];
|
||||
json['audio'].forEach((v) {
|
||||
audio!.add(Audio.fromJson(v));
|
||||
});
|
||||
}
|
||||
if (json['read'] != null) {
|
||||
read = <Read>[];
|
||||
json['read'].forEach((v) {
|
||||
read!.add(Read.fromJson(v));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = <String, dynamic>{};
|
||||
if (video != null) {
|
||||
data['video'] = video!.map((v) => v.toJson()).toList();
|
||||
}
|
||||
if (audio != null) {
|
||||
data['audio'] = audio!.map((v) => v.toJson()).toList();
|
||||
}
|
||||
if (read != null) {
|
||||
data['read'] = read!.map((v) => v.toJson()).toList();
|
||||
}
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class Video {
|
||||
int? id;
|
||||
String? contentType;
|
||||
String? title;
|
||||
String? description;
|
||||
String? tags;
|
||||
String? file;
|
||||
int? categoryId;
|
||||
String? image;
|
||||
String? isActive;
|
||||
|
||||
Video({
|
||||
this.id,
|
||||
this.contentType,
|
||||
this.title,
|
||||
this.description,
|
||||
this.tags,
|
||||
this.file,
|
||||
this.categoryId,
|
||||
this.image,
|
||||
this.isActive,
|
||||
});
|
||||
|
||||
Video.fromJson(Map<String, dynamic> json) {
|
||||
id = json['id'];
|
||||
contentType = json['content_type'];
|
||||
title = json['title'];
|
||||
description = json['description'];
|
||||
tags = json['tags'];
|
||||
file = json['file'];
|
||||
categoryId = json['category_id'];
|
||||
image = json['image'];
|
||||
isActive = json['is_active'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = <String, dynamic>{};
|
||||
data['id'] = id;
|
||||
data['content_type'] = contentType;
|
||||
data['title'] = title;
|
||||
data['description'] = description;
|
||||
data['tags'] = tags;
|
||||
data['file'] = file;
|
||||
data['category_id'] = categoryId;
|
||||
data['image'] = image;
|
||||
data['is_active'] = isActive;
|
||||
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class Audio {
|
||||
int? id;
|
||||
String? contentType;
|
||||
String? title;
|
||||
String? description;
|
||||
String? tags;
|
||||
String? file;
|
||||
int? categoryId;
|
||||
String? image;
|
||||
String? isActive;
|
||||
|
||||
Audio({
|
||||
this.id,
|
||||
this.contentType,
|
||||
this.title,
|
||||
this.description,
|
||||
this.tags,
|
||||
this.file,
|
||||
this.categoryId,
|
||||
this.image,
|
||||
this.isActive,
|
||||
});
|
||||
|
||||
Audio.fromJson(Map<String, dynamic> json) {
|
||||
id = json['id'];
|
||||
contentType = json['content_type'];
|
||||
title = json['title'];
|
||||
description = json['description'];
|
||||
tags = json['tags'];
|
||||
file = json['file'];
|
||||
categoryId = json['category_id'];
|
||||
image = json['image'];
|
||||
isActive = json['is_active'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = <String, dynamic>{};
|
||||
data['id'] = id;
|
||||
data['content_type'] = contentType;
|
||||
data['title'] = title;
|
||||
data['description'] = description;
|
||||
data['tags'] = tags;
|
||||
data['file'] = file;
|
||||
data['category_id'] = categoryId;
|
||||
data['image'] = image;
|
||||
data['is_active'] = isActive;
|
||||
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class Read {
|
||||
int? id;
|
||||
String? contentType;
|
||||
String? title;
|
||||
String? description;
|
||||
String? tags;
|
||||
String? file;
|
||||
int? categoryId;
|
||||
String? image;
|
||||
String? isActive;
|
||||
|
||||
Read({
|
||||
this.id,
|
||||
this.contentType,
|
||||
this.title,
|
||||
this.description,
|
||||
this.tags,
|
||||
this.file,
|
||||
this.categoryId,
|
||||
this.image,
|
||||
this.isActive,
|
||||
});
|
||||
|
||||
Read.fromJson(Map<String, dynamic> json) {
|
||||
id = json['id'];
|
||||
contentType = json['content_type'];
|
||||
title = json['title'];
|
||||
description = json['description'];
|
||||
tags = json['tags'];
|
||||
file = json['file'];
|
||||
categoryId = json['category_id'];
|
||||
image = json['image'];
|
||||
isActive = json['is_active'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = <String, dynamic>{};
|
||||
data['id'] = id;
|
||||
data['content_type'] = contentType;
|
||||
data['title'] = title;
|
||||
data['description'] = description;
|
||||
data['tags'] = tags;
|
||||
data['file'] = file;
|
||||
data['category_id'] = categoryId;
|
||||
data['image'] = image;
|
||||
data['is_active'] = isActive;
|
||||
|
||||
return data;
|
||||
}
|
||||
}
|
||||
123
lib/model/RiskProfileModel/risk_profile_ques_answer_model.dart
Normal file
123
lib/model/RiskProfileModel/risk_profile_ques_answer_model.dart
Normal file
@@ -0,0 +1,123 @@
|
||||
class RiskProfileQuestionAnswerModel {
|
||||
String? status;
|
||||
int? statusCode;
|
||||
String? message;
|
||||
List<Data>? data;
|
||||
|
||||
RiskProfileQuestionAnswerModel(
|
||||
{this.status, this.statusCode, this.message, this.data});
|
||||
|
||||
RiskProfileQuestionAnswerModel.fromJson(Map<String, dynamic> json) {
|
||||
status = json['status'];
|
||||
statusCode = json['status_code'];
|
||||
message = json['message'];
|
||||
if (json['data'] != null) {
|
||||
data = <Data>[];
|
||||
json['data'].forEach((v) {
|
||||
data!.add(Data.fromJson(v));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = <String, dynamic>{};
|
||||
data['status'] = status;
|
||||
data['status_code'] = statusCode;
|
||||
data['message'] = message;
|
||||
if (this.data != null) {
|
||||
data['data'] = this.data!.map((v) => v.toJson()).toList();
|
||||
}
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class Data {
|
||||
int? id;
|
||||
String? question;
|
||||
String? isActive;
|
||||
|
||||
String? createdAt;
|
||||
String? updatedAt;
|
||||
List<Answer>? answer;
|
||||
|
||||
Data(
|
||||
{this.id,
|
||||
this.question,
|
||||
this.isActive,
|
||||
this.createdAt,
|
||||
this.updatedAt,
|
||||
this.answer});
|
||||
|
||||
Data.fromJson(Map<String, dynamic> json) {
|
||||
id = json['id'];
|
||||
question = json['question'];
|
||||
isActive = json['is_active'];
|
||||
|
||||
createdAt = json['created_at'];
|
||||
updatedAt = json['updated_at'];
|
||||
if (json['answer'] != null) {
|
||||
answer = <Answer>[];
|
||||
json['answer'].forEach((v) {
|
||||
answer!.add(Answer.fromJson(v));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = <String, dynamic>{};
|
||||
data['id'] = id;
|
||||
data['question'] = question;
|
||||
data['is_active'] = isActive;
|
||||
|
||||
data['created_at'] = createdAt;
|
||||
data['updated_at'] = updatedAt;
|
||||
if (answer != null) {
|
||||
data['answer'] = answer!.map((v) => v.toJson()).toList();
|
||||
}
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class Answer {
|
||||
int? id;
|
||||
int? questionId;
|
||||
String? answer;
|
||||
int? points;
|
||||
String? isActive;
|
||||
|
||||
String? createdAt;
|
||||
String? updatedAt;
|
||||
|
||||
Answer(
|
||||
{this.id,
|
||||
this.questionId,
|
||||
this.answer,
|
||||
this.points,
|
||||
this.isActive,
|
||||
this.createdAt,
|
||||
this.updatedAt});
|
||||
|
||||
Answer.fromJson(Map<String, dynamic> json) {
|
||||
id = json['id'];
|
||||
questionId = json['question_id'];
|
||||
answer = json['answer'];
|
||||
points = json['points'];
|
||||
isActive = json['is_active'];
|
||||
|
||||
createdAt = json['created_at'];
|
||||
updatedAt = json['updated_at'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = <String, dynamic>{};
|
||||
data['id'] = id;
|
||||
data['question_id'] = questionId;
|
||||
data['answer'] = answer;
|
||||
data['points'] = points;
|
||||
data['is_active'] = isActive;
|
||||
|
||||
data['created_at'] = createdAt;
|
||||
data['updated_at'] = updatedAt;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
34
lib/model/SmallCaseModel/broker_account_model.dart
Normal file
34
lib/model/SmallCaseModel/broker_account_model.dart
Normal file
@@ -0,0 +1,34 @@
|
||||
class BrokerAccountModel {
|
||||
final String? id;
|
||||
final String? userId;
|
||||
final String? brokerName;
|
||||
final String? authToken;
|
||||
final String? txnId;
|
||||
|
||||
const BrokerAccountModel({
|
||||
required this.id,
|
||||
required this.userId,
|
||||
required this.brokerName,
|
||||
required this.authToken,
|
||||
required this.txnId,
|
||||
});
|
||||
|
||||
factory BrokerAccountModel.fromJson(Map<String, dynamic> json) {
|
||||
return BrokerAccountModel(
|
||||
id: json['id'].toString(),
|
||||
userId: json['user_id'].toString(),
|
||||
brokerName: json['broker_name'] as String?,
|
||||
authToken: json['auth_token'] as String?,
|
||||
txnId: json['transaction_id'] as String?,
|
||||
);
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = <String, dynamic>{};
|
||||
data['user_id'] = userId;
|
||||
data['broker_name'] = brokerName;
|
||||
data['auth_token'] = authToken;
|
||||
data['transaction_id'] = txnId;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@@ -1,14 +1,23 @@
|
||||
import 'dart:async';
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:async/async.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:lottie/lottie.dart';
|
||||
import 'package:scgateway_flutter_plugin/scgateway_flutter_plugin.dart';
|
||||
import 'package:traderscircuit/Utils/Common/CommonBottomNavigation.dart';
|
||||
import 'package:traderscircuit/Utils/Common/commonBotton.dart';
|
||||
import 'package:traderscircuit/Utils/text.dart';
|
||||
import 'package:traderscircuit/view/MainScreen/MainScreen.dart';
|
||||
import 'package:traderscircuit/view/MainScreen/Portfolio/Holdings.dart';
|
||||
import 'package:traderscircuit/view/Sidemenu/Sidemenu.dart';
|
||||
import 'package:traderscircuit/view/onBoarding/splashScreen1.dart';
|
||||
|
||||
import '../../../model/SmallCaseModel/broker_account_model.dart';
|
||||
import '../../../view_model/SmallCaseApi/smallcase_api_methods.dart';
|
||||
|
||||
class Portfolio extends StatefulWidget {
|
||||
const Portfolio({super.key});
|
||||
|
||||
@@ -20,13 +29,238 @@ class _PortfolioState extends State<Portfolio> {
|
||||
GlobalKey<ScaffoldState> _scaffoldKey1 = GlobalKey<ScaffoldState>();
|
||||
List<String> containerTexts = ["Swing Trade", "Multibagger", "Options"];
|
||||
final selectedIndex = 0.obs;
|
||||
|
||||
FutureGroup fetchUserIdAndBrokerAccounts = FutureGroup();
|
||||
List<BrokerAccountModel> myBrokerAccounts = [];
|
||||
@override
|
||||
void initState() {
|
||||
// fetchUserIdAndBrokerAccounts.add(getUserId()); // TODO Need to add userid here
|
||||
fetchUserIdAndBrokerAccounts.add(fetchBrokerAccounts());
|
||||
fetchUserIdAndBrokerAccounts.close();
|
||||
// fetchUserIdAndBrokerAccounts.future.then((value) {
|
||||
// int userId = value[0];
|
||||
// List<BrokerAccountModel> brokerAccounts = value[1];
|
||||
// try {
|
||||
// myBrokerAccounts.addAll(brokerAccounts
|
||||
// .where((element) => element.userId == userId.toString()));
|
||||
// } catch (e) {}
|
||||
// debugPrint("myBrokerAccounts.length ${myBrokerAccounts.length}");
|
||||
// debugPrint("BrokerAccounts.length ${brokerAccounts.length}");
|
||||
// if (myBrokerAccounts.isEmpty) {
|
||||
// setState(() {
|
||||
// body = Center(
|
||||
// child: Column(
|
||||
// mainAxisSize: MainAxisSize.min,
|
||||
// children: [
|
||||
// const Text("You need to add broker account"),
|
||||
// const Text("to fetch holdings"),
|
||||
// const SizedBox(height: 6),
|
||||
// OutlinedButton(
|
||||
// onPressed: () {
|
||||
// //Get.off(Broker());
|
||||
// Get.to(() => Broker());
|
||||
// },
|
||||
// child: const Text("Brokerage Account"),
|
||||
// )
|
||||
// ],
|
||||
// ));
|
||||
// });
|
||||
// } else {
|
||||
// setBodyToBrokers();
|
||||
// }
|
||||
// });
|
||||
|
||||
super.initState();
|
||||
}
|
||||
|
||||
// void setBodyToBrokers() {
|
||||
// setState(() {
|
||||
// body = Padding(
|
||||
// padding: const EdgeInsets.only(top: 28, left: 28, right: 28),
|
||||
// child: Column(mainAxisSize: MainAxisSize.min, children: [
|
||||
// const Text("Please select your broker account"),
|
||||
// const SizedBox(height: 8),
|
||||
// Expanded(
|
||||
// child: ListView.builder(
|
||||
// itemCount: myBrokerAccounts.length,
|
||||
// itemBuilder: (context, index) {
|
||||
// return OutlinedButton(
|
||||
// onPressed: () {
|
||||
// setState(() {
|
||||
// body = const Center(child: CircularProgressIndicator());
|
||||
// });
|
||||
// fetchHoldingsImportTxnId(
|
||||
// myBrokerAccounts.elementAt(index).authToken!)
|
||||
// .then((txnIdResponse) {
|
||||
// if (txnIdResponse.statusCode == 200) {
|
||||
// debugPrint('SESSION STARTED');
|
||||
// debugPrint(
|
||||
// 'AUTH TOKEN: ${myBrokerAccounts.elementAt(index).authToken!}');
|
||||
// fetchHoldingsImportTxnId(
|
||||
// myBrokerAccounts.elementAt(index).authToken!)
|
||||
// .then((txnRes) {
|
||||
// String txnId =
|
||||
// jsonDecode(txnRes.body)['data']['transactionId'];
|
||||
// debugPrint('TXN ID $txnId');
|
||||
// ScgatewayFlutterPlugin.triggerGatewayTransaction(
|
||||
// txnId)
|
||||
// .then(
|
||||
// (txnRes) {
|
||||
// debugPrint('TXN RES $txnRes');
|
||||
// if (txnRes != null) {
|
||||
// fetchHoldings(
|
||||
// //holdingsAuthToken
|
||||
// myBrokerAccounts
|
||||
// .elementAt(index)
|
||||
// .authToken!)
|
||||
// .then(
|
||||
// (holdings) {
|
||||
// setState(() {
|
||||
// // body = netWorthPage(holdings);
|
||||
// });
|
||||
// },
|
||||
// );
|
||||
// }
|
||||
// },
|
||||
// );
|
||||
// });
|
||||
// } else {
|
||||
// debugPrint('SESSION EXPIRED');
|
||||
// onTxnTimeout();
|
||||
// }
|
||||
// });
|
||||
// },
|
||||
// child: Text(myBrokerAccounts.elementAt(index).brokerName!),
|
||||
// );
|
||||
// },
|
||||
// ),
|
||||
// )
|
||||
// ]),
|
||||
// );
|
||||
// });
|
||||
// }
|
||||
|
||||
// void onTxnTimeout() {
|
||||
// bool showDialogContent = true;
|
||||
// bool replaceDialogContentWithLoader = false;
|
||||
// showDialog(
|
||||
// barrierDismissible: false,
|
||||
// context: context,
|
||||
// builder: (context) => AlertDialog(content: StatefulBuilder(
|
||||
// builder: (context, setDialogState) {
|
||||
// return Column(
|
||||
// mainAxisSize: MainAxisSize.min,
|
||||
// children: [
|
||||
// Visibility(
|
||||
// visible: showDialogContent,
|
||||
// child: Column(
|
||||
// mainAxisSize: MainAxisSize.min,
|
||||
// crossAxisAlignment: CrossAxisAlignment.start,
|
||||
// children: [
|
||||
// const Text("Transaction Timeout",
|
||||
// style: TextStyle(
|
||||
// fontWeight: FontWeight.bold,
|
||||
// fontSize: 18,
|
||||
// )),
|
||||
// const SizedBox(height: 18),
|
||||
// const Text("You need to login again to continue"),
|
||||
// const SizedBox(height: 18),
|
||||
// Row(
|
||||
// mainAxisAlignment: MainAxisAlignment.end,
|
||||
// children: [
|
||||
// OutlinedButton(
|
||||
// onPressed: () {
|
||||
// setBodyToBrokers();
|
||||
// Get.back();
|
||||
// },
|
||||
// child: const Text("Cancel"),
|
||||
// ),
|
||||
// const SizedBox(width: 12),
|
||||
// ElevatedButton(
|
||||
// onPressed: () {
|
||||
// setDialogState(() {
|
||||
// showDialogContent = false;
|
||||
// replaceDialogContentWithLoader = true;
|
||||
// });
|
||||
// //login again
|
||||
// fetchAuthToken().then((fetchedAuthToken) {
|
||||
// debugPrint(
|
||||
// "fetchedAuthToken $fetchedAuthToken");
|
||||
// fetchBrokerConnectTxnId(
|
||||
// authToken: fetchedAuthToken)
|
||||
// .then(
|
||||
// (txnId) =>
|
||||
// ScgatewayFlutterPlugin.initGateway(
|
||||
// fetchedAuthToken)
|
||||
// .then(
|
||||
// (value) => ScgatewayFlutterPlugin
|
||||
// .triggerGatewayTransaction(
|
||||
// txnId,
|
||||
// ).then(
|
||||
// (loginRes) {
|
||||
// if (loginRes != null) {
|
||||
// var data =
|
||||
// jsonDecode(loginRes)['data'];
|
||||
// if (data != null) {
|
||||
// String authToken = jsonDecode(
|
||||
// data)['smallcaseAuthToken'];
|
||||
// String brokerName =
|
||||
// jsonDecode(data)['broker'];
|
||||
// String txnId = jsonDecode(
|
||||
// data)['transactionId'];
|
||||
// getUserId().then((userId) {
|
||||
// postBrokerAccount(
|
||||
// userId: userId!
|
||||
// .toString(),
|
||||
// brokerName:
|
||||
// brokerName,
|
||||
// authToken: authToken,
|
||||
// txnId: txnId)
|
||||
// .then((isPosted) {
|
||||
// if (isPosted) {
|
||||
// // Get.back();
|
||||
// // setBodyToBrokers();
|
||||
// Get.off(Holdings());
|
||||
// }
|
||||
// });
|
||||
// });
|
||||
// }
|
||||
// }
|
||||
// },
|
||||
// ),
|
||||
// ),
|
||||
// );
|
||||
// });
|
||||
// },
|
||||
// child: const Text("Login Again"),
|
||||
// ),
|
||||
// ],
|
||||
// )
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
// Visibility(
|
||||
// visible: replaceDialogContentWithLoader,
|
||||
// child: const Padding(
|
||||
// padding: EdgeInsets.symmetric(vertical: 28.0),
|
||||
// child: Center(
|
||||
// child: CircularProgressIndicator(),
|
||||
// ),
|
||||
// ),
|
||||
// )
|
||||
// ],
|
||||
// );
|
||||
// },
|
||||
// )));
|
||||
// }
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
key: _scaffoldKey1,
|
||||
backgroundColor: Colors.black,
|
||||
drawerEnableOpenDragGesture: false,
|
||||
drawer: Container(child: SideMenu()),
|
||||
drawer: Container(child: const SideMenu()),
|
||||
extendBody: true,
|
||||
appBar: AppBar(
|
||||
scrolledUnderElevation: 0.0,
|
||||
@@ -49,12 +283,13 @@ class _PortfolioState extends State<Portfolio> {
|
||||
),
|
||||
body: Stack(
|
||||
children: [
|
||||
CommonBlurLeft(),
|
||||
CommonBlurRight(),
|
||||
const CommonBlurLeft(),
|
||||
const CommonBlurRight(),
|
||||
Stack(
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 16, vertical: 16),
|
||||
padding:
|
||||
const EdgeInsets.symmetric(horizontal: 16, vertical: 16),
|
||||
child: Column(
|
||||
children: [
|
||||
Row(
|
||||
@@ -75,15 +310,73 @@ class _PortfolioState extends State<Portfolio> {
|
||||
fontWeight: FontWeight.w400,
|
||||
),
|
||||
),
|
||||
Spacer(),
|
||||
const Spacer(),
|
||||
LottieBuilder.asset(
|
||||
"assets/images/empty.json",
|
||||
width: 200.w,
|
||||
height: 200.h,
|
||||
),
|
||||
Spacer(),
|
||||
CommonBtn(text: "Add"),
|
||||
Spacer(),
|
||||
const Spacer(),
|
||||
CommonBtn(
|
||||
text: "Add",
|
||||
onTap: () {
|
||||
// replaceAddAccountBtnWithLoader();
|
||||
// Timer.periodic(Duration(seconds: 8), (timer) {
|
||||
// // replaceLoaderWithAddAccountBtn();
|
||||
// timer.cancel();
|
||||
// });
|
||||
fetchAuthToken().then((fetchedAuthToken) {
|
||||
debugPrint("fetchedAuthToken $fetchedAuthToken");
|
||||
fetchBrokerConnectTxnId(authToken: fetchedAuthToken)
|
||||
.then(
|
||||
(txnId) => ScgatewayFlutterPlugin.initGateway(
|
||||
fetchedAuthToken)
|
||||
.then(
|
||||
(value) => ScgatewayFlutterPlugin
|
||||
.triggerGatewayTransaction(
|
||||
txnId,
|
||||
).then(
|
||||
(loginRes) {
|
||||
if (loginRes != null) {
|
||||
var data = jsonDecode(loginRes)['data'];
|
||||
if (data != null) {
|
||||
String authToken = jsonDecode(
|
||||
data)['smallcaseAuthToken'];
|
||||
String brokerName =
|
||||
jsonDecode(data)['broker'];
|
||||
String txnId =
|
||||
jsonDecode(data)['transactionId'];
|
||||
// getUserId().then((userId) {
|
||||
postBrokerAccount(
|
||||
userId: "12",
|
||||
brokerName: brokerName,
|
||||
authToken: authToken,
|
||||
txnId: txnId)
|
||||
.then((isPosted) {
|
||||
// replaceLoaderWithAddAccountBtn();
|
||||
// Navigator.pushReplacement(
|
||||
// context,
|
||||
// MaterialPageRoute(
|
||||
// builder: (context) =>
|
||||
// Broker()));
|
||||
ScaffoldMessenger.of(context)
|
||||
.clearSnackBars();
|
||||
ScaffoldMessenger.of(context)
|
||||
.showSnackBar(SnackBar(
|
||||
content: Text(
|
||||
'New broker account is added')));
|
||||
});
|
||||
// });
|
||||
// replaceLoaderWithAddAccountBtn();
|
||||
}
|
||||
}
|
||||
},
|
||||
),
|
||||
),
|
||||
);
|
||||
});
|
||||
}),
|
||||
const Spacer(),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
@@ -1,16 +1,23 @@
|
||||
import 'dart:developer';
|
||||
|
||||
import 'package:cached_network_image/cached_network_image.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
import 'package:gap/gap.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:traderscircuit/Utils/Common/CommonAppbar.dart';
|
||||
import 'package:traderscircuit/Utils/Common/CustomTextFormField.dart';
|
||||
import 'package:traderscircuit/Utils/Common/comonGlassmorphicContainer.dart';
|
||||
import 'package:traderscircuit/Utils/Common/sized_box.dart';
|
||||
import 'package:traderscircuit/Utils/text.dart';
|
||||
import 'package:traderscircuit/controller/content_bytes_controller.dart';
|
||||
import 'package:traderscircuit/model/ContentBytesModel/content_bytes_categories_model.dart';
|
||||
import 'package:traderscircuit/model/ContentBytesModel/content_bytes_model.dart';
|
||||
import 'package:traderscircuit/view/Sidemenu/ContentByte/PlayerWidget.dart';
|
||||
import 'package:traderscircuit/view/Sidemenu/ContentByte/Reels.dart';
|
||||
import 'package:traderscircuit/view/Sidemenu/Sidemenu.dart';
|
||||
import 'package:traderscircuit/view/onBoarding/splashScreen1.dart';
|
||||
import 'package:traderscircuit/view_model/ContentBytesApi/content_bytes_api.dart';
|
||||
|
||||
class ContentBytes extends StatefulWidget {
|
||||
const ContentBytes({super.key});
|
||||
@@ -65,24 +72,42 @@ class _ContentBytesState extends State<ContentBytes> {
|
||||
"Week of 21st March 2024",
|
||||
"Week of 21st March 2024",
|
||||
];
|
||||
|
||||
ContentBytesController contentBytesController =
|
||||
Get.put(ContentBytesController());
|
||||
@override
|
||||
void initState() {
|
||||
ContentBytesApi().getContentBytesCategoriesData().then((value) {
|
||||
contentBytesController.contentBytesCategoriesModel =
|
||||
ContentBytesCategoriesModel.fromJson(value.data);
|
||||
});
|
||||
ContentBytesApi().getContentBytesData("").then((value) {
|
||||
contentBytesController.contentBytesModel =
|
||||
ContentBytesModel.fromJson(value.data);
|
||||
contentBytesController.isApiCalling.value = false;
|
||||
});
|
||||
super.initState();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
key: _scaffoldKey1,
|
||||
backgroundColor: Colors.black,
|
||||
extendBody: true,
|
||||
appBar: CommonAppbar(titleTxt: "Content Bytes"),
|
||||
appBar: const CommonAppbar(titleTxt: "Content Bytes"),
|
||||
body: Stack(
|
||||
children: [
|
||||
CommonBlurLeft(),
|
||||
CommonBlurRight(),
|
||||
const CommonBlurLeft(),
|
||||
const CommonBlurRight(),
|
||||
Stack(
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 16, vertical: 16),
|
||||
padding:
|
||||
const EdgeInsets.symmetric(horizontal: 16, vertical: 16),
|
||||
child: ListView(
|
||||
children: [
|
||||
SizedBox(
|
||||
const SizedBox(
|
||||
height: 10,
|
||||
),
|
||||
DefaultTabController(
|
||||
@@ -139,7 +164,7 @@ class Reads extends StatelessWidget {
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
SizedBox(
|
||||
const SizedBox(
|
||||
width: 300,
|
||||
child: CustomTextFormField(
|
||||
leadingIcon: Icon(Icons.search),
|
||||
@@ -168,13 +193,13 @@ class Reads extends StatelessWidget {
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
crossAxisAlignment: CrossAxisAlignment.end,
|
||||
children: [
|
||||
SizedBox(
|
||||
const SizedBox(
|
||||
width: 10,
|
||||
),
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Spacer(),
|
||||
const Spacer(),
|
||||
SizedBox(
|
||||
width: 235.w,
|
||||
child: text20W400('"Stock Market Essentials"'),
|
||||
@@ -185,10 +210,10 @@ class Reads extends StatelessWidget {
|
||||
child: text16W400(
|
||||
'A Comprehensive Guide to Understanding the Market'),
|
||||
),
|
||||
Spacer()
|
||||
const Spacer()
|
||||
],
|
||||
),
|
||||
SizedBox(
|
||||
const SizedBox(
|
||||
width: 20,
|
||||
),
|
||||
Column(
|
||||
@@ -213,13 +238,13 @@ class Reads extends StatelessWidget {
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
crossAxisAlignment: CrossAxisAlignment.end,
|
||||
children: [
|
||||
SizedBox(
|
||||
const SizedBox(
|
||||
width: 10,
|
||||
),
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Spacer(),
|
||||
const Spacer(),
|
||||
SizedBox(
|
||||
width: 235.w,
|
||||
child: text20W400('"Stock Market Essentials"'),
|
||||
@@ -230,10 +255,10 @@ class Reads extends StatelessWidget {
|
||||
child: text16W400(
|
||||
'A Comprehensive Guide to Understanding the Market'),
|
||||
),
|
||||
Spacer()
|
||||
const Spacer()
|
||||
],
|
||||
),
|
||||
SizedBox(
|
||||
const SizedBox(
|
||||
width: 20,
|
||||
),
|
||||
Column(
|
||||
@@ -275,7 +300,7 @@ class Reads extends StatelessWidget {
|
||||
end: Alignment.bottomRight,
|
||||
colors: [
|
||||
Colors.white.withOpacity(0.1),
|
||||
Color(0xFFFFFFFF).withOpacity(0.05),
|
||||
const Color(0xFFFFFFFF).withOpacity(0.05),
|
||||
],
|
||||
stops: [
|
||||
0.1,
|
||||
@@ -317,7 +342,7 @@ class Reads extends StatelessWidget {
|
||||
end: Alignment.bottomRight,
|
||||
colors: [
|
||||
Colors.white.withOpacity(0.1),
|
||||
Color(0xFFFFFFFF).withOpacity(0.05),
|
||||
const Color(0xFFFFFFFF).withOpacity(0.05),
|
||||
],
|
||||
stops: [
|
||||
0.1,
|
||||
@@ -330,7 +355,7 @@ class Reads extends StatelessWidget {
|
||||
// mainAxisAlignment:
|
||||
// MainAxisAlignment.start,
|
||||
children: [
|
||||
SizedBox(
|
||||
const SizedBox(
|
||||
width: 10,
|
||||
),
|
||||
Image.asset(mostread[index]),
|
||||
@@ -388,7 +413,7 @@ class Audios extends StatelessWidget {
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
SizedBox(
|
||||
const SizedBox(
|
||||
width: 300,
|
||||
child: CustomTextFormField(
|
||||
leadingIcon: Icon(Icons.search),
|
||||
@@ -414,8 +439,8 @@ class Audios extends StatelessWidget {
|
||||
Container(
|
||||
height: 550,
|
||||
child: GridView.builder(
|
||||
physics: NeverScrollableScrollPhysics(),
|
||||
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
||||
physics: const NeverScrollableScrollPhysics(),
|
||||
gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(
|
||||
mainAxisExtent: 172,
|
||||
crossAxisCount: 2, // number of items in each row
|
||||
mainAxisSpacing: 8.0, // spacing between rows
|
||||
@@ -431,7 +456,7 @@ class Audios extends StatelessWidget {
|
||||
end: Alignment.bottomRight,
|
||||
colors: [
|
||||
Colors.white.withOpacity(0.1),
|
||||
Color(0xFFFFFFFF).withOpacity(0.05),
|
||||
const Color(0xFFFFFFFF).withOpacity(0.05),
|
||||
],
|
||||
stops: [
|
||||
0.1,
|
||||
@@ -452,7 +477,7 @@ class Audios extends StatelessWidget {
|
||||
children: [
|
||||
CircleAvatar(
|
||||
radius: 18.sp,
|
||||
child: Icon(Icons.headphones),
|
||||
child: const Icon(Icons.headphones),
|
||||
),
|
||||
SizedBox(
|
||||
width: 5.w,
|
||||
@@ -481,7 +506,7 @@ class Audios extends StatelessWidget {
|
||||
height: 250.h,
|
||||
child: ListView.separated(
|
||||
separatorBuilder: (context, index) {
|
||||
return SizedBox(
|
||||
return const SizedBox(
|
||||
width: 10,
|
||||
);
|
||||
},
|
||||
@@ -500,7 +525,7 @@ class Audios extends StatelessWidget {
|
||||
end: Alignment.bottomRight,
|
||||
colors: [
|
||||
Colors.white.withOpacity(0.1),
|
||||
Color(0xFFFFFFFF).withOpacity(0.05),
|
||||
const Color(0xFFFFFFFF).withOpacity(0.05),
|
||||
],
|
||||
stops: [
|
||||
0.1,
|
||||
@@ -512,7 +537,7 @@ class Audios extends StatelessWidget {
|
||||
child: Stack(
|
||||
children: [
|
||||
Image.asset(audionewimage[index]),
|
||||
Positioned(
|
||||
const Positioned(
|
||||
right: 5,
|
||||
top: 5,
|
||||
child: CircleAvatar(
|
||||
@@ -526,7 +551,7 @@ class Audios extends StatelessWidget {
|
||||
],
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
const SizedBox(
|
||||
height: 10,
|
||||
),
|
||||
Row(
|
||||
@@ -549,7 +574,7 @@ class Audios extends StatelessWidget {
|
||||
}
|
||||
}
|
||||
|
||||
class Videos extends StatelessWidget {
|
||||
class Videos extends StatefulWidget {
|
||||
const Videos({
|
||||
super.key,
|
||||
required this.images,
|
||||
@@ -558,243 +583,301 @@ class Videos extends StatelessWidget {
|
||||
final List<String> images;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return SingleChildScrollView(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Row(
|
||||
State<Videos> createState() => _VideosState();
|
||||
}
|
||||
|
||||
class _VideosState extends State<Videos> {
|
||||
ContentBytesController contentBytesController =
|
||||
Get.put(ContentBytesController());
|
||||
|
||||
Widget itemFilter(int index) {
|
||||
return Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
const Gap(8),
|
||||
text18W400(
|
||||
contentBytesController
|
||||
.contentBytesCategoriesModel.data![index].title!,
|
||||
texAl: TextAlign.center,
|
||||
),
|
||||
index ==
|
||||
contentBytesController
|
||||
.contentBytesCategoriesModel.data!.length -
|
||||
1
|
||||
? const SizedBox()
|
||||
: const Divider(
|
||||
color: Color(0xFF2C2C2C),
|
||||
thickness: 0.6,
|
||||
endIndent: 0,
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
Widget filter() {
|
||||
return PopupMenuButton(
|
||||
icon: Image.asset(
|
||||
"assets/images/png/filter.png",
|
||||
height: 30.h,
|
||||
width: 30.w,
|
||||
),
|
||||
color: const Color(0xFF191919),
|
||||
itemBuilder: (context) {
|
||||
return [
|
||||
PopupMenuItem(
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
SizedBox(
|
||||
width: 300,
|
||||
child: CustomTextFormField(
|
||||
leadingIcon: Icon(Icons.search),
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
width: 15.w,
|
||||
),
|
||||
Image.asset(
|
||||
"assets/images/png/filter.png",
|
||||
height: 30.h,
|
||||
width: 30.w,
|
||||
),
|
||||
],
|
||||
),
|
||||
SizedBox(
|
||||
height: 10.h,
|
||||
),
|
||||
text22W600('Content Bytes'),
|
||||
sizedBoxHeight(8.w),
|
||||
text16W400_DADADA('The Beauty and Power of Video'),
|
||||
sizedBoxHeight(20.h),
|
||||
InkWell(
|
||||
onTap: () {
|
||||
Get.to(() => PlayerWidget());
|
||||
},
|
||||
child: commonGlassContainer(
|
||||
borderradius: 8,
|
||||
width: double.infinity,
|
||||
height: 300.h,
|
||||
customWidget: Padding(
|
||||
padding:
|
||||
EdgeInsets.symmetric(vertical: 10.h, horizontal: 10.w),
|
||||
child: Column(
|
||||
children: [
|
||||
Container(
|
||||
height: 200.h,
|
||||
width: double.infinity,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(8.r),
|
||||
image: DecorationImage(
|
||||
image: AssetImage(
|
||||
'assets/images/png/Rectangle 17934.png'))),
|
||||
child: Center(
|
||||
child: SvgPicture.asset(
|
||||
'assets/images/svg/gridicons_play.svg',
|
||||
height: 56.h,
|
||||
width: 56.w,
|
||||
),
|
||||
),
|
||||
),
|
||||
sizedBoxHeight(20.h),
|
||||
Row(
|
||||
children: [
|
||||
CircleAvatar(
|
||||
radius: 23.r,
|
||||
backgroundImage: AssetImage(
|
||||
'assets/images/png/Ellipse 1494.png'),
|
||||
),
|
||||
sizedBoxWidth(10.w),
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
text18W500('Week of 21st February 2024'),
|
||||
// sizedBoxHeight(10.h),
|
||||
text12W400_979797('20k views . 2 days ago'),
|
||||
],
|
||||
)
|
||||
],
|
||||
)
|
||||
],
|
||||
),
|
||||
)),
|
||||
),
|
||||
sizedBoxHeight(20.h),
|
||||
InkWell(
|
||||
onTap: () {
|
||||
Get.to(() {
|
||||
PlayerWidget();
|
||||
});
|
||||
},
|
||||
child: commonGlassContainer(
|
||||
borderradius: 8,
|
||||
width: double.infinity,
|
||||
height: 300.h,
|
||||
customWidget: Padding(
|
||||
padding:
|
||||
EdgeInsets.symmetric(vertical: 10.h, horizontal: 10.w),
|
||||
child: Column(
|
||||
children: [
|
||||
Container(
|
||||
height: 200.h,
|
||||
width: double.infinity,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(8.r),
|
||||
image: DecorationImage(
|
||||
image: AssetImage(
|
||||
'assets/images/png/Rectangle 17934.png'))),
|
||||
child: Center(
|
||||
child: SvgPicture.asset(
|
||||
'assets/images/svg/gridicons_play.svg',
|
||||
height: 56.h,
|
||||
width: 56.w,
|
||||
),
|
||||
),
|
||||
),
|
||||
sizedBoxHeight(20.h),
|
||||
Row(
|
||||
children: [
|
||||
CircleAvatar(
|
||||
radius: 23.r,
|
||||
backgroundImage: AssetImage(
|
||||
'assets/images/png/Ellipse 1494.png'),
|
||||
),
|
||||
sizedBoxWidth(10.w),
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
text18W500('Week of 21st February 2024'),
|
||||
// sizedBoxHeight(10.h),
|
||||
text12W400_979797('20k views . 2 days ago'),
|
||||
],
|
||||
)
|
||||
],
|
||||
)
|
||||
],
|
||||
),
|
||||
)),
|
||||
),
|
||||
sizedBoxHeight(15.h),
|
||||
text22W600("Reels"),
|
||||
sizedBoxHeight(25.h),
|
||||
Container(
|
||||
height: 500,
|
||||
child: GridView.builder(
|
||||
physics: NeverScrollableScrollPhysics(),
|
||||
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
||||
mainAxisExtent: 215,
|
||||
crossAxisCount: 2, // number of items in each row
|
||||
mainAxisSpacing: 8.0, // spacing between rows
|
||||
crossAxisSpacing: 8.0, // spacing between columns
|
||||
),
|
||||
height: (Get.height *
|
||||
contentBytesController
|
||||
.contentBytesCategoriesModel.data!.length) /
|
||||
17,
|
||||
width: 150,
|
||||
child: ListView.builder(
|
||||
padding: EdgeInsets.zero,
|
||||
shrinkWrap: true,
|
||||
itemCount: contentBytesController
|
||||
.contentBytesCategoriesModel.data!.length,
|
||||
itemBuilder: (ctx, index) {
|
||||
return InkWell(
|
||||
onTap: () {
|
||||
// contentBytesController.isApiCalling.value = true;
|
||||
Get.back();
|
||||
contentBytesController.filterId =
|
||||
contentBytesController
|
||||
.contentBytesCategoriesModel
|
||||
.data![index]
|
||||
.categoryId!;
|
||||
|
||||
itemCount: 4, // total number of items
|
||||
itemBuilder: (context, index) {
|
||||
return InkWell(
|
||||
onTap: () {
|
||||
Get.to(
|
||||
() => Reels(),
|
||||
);
|
||||
},
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
gradient: LinearGradient(
|
||||
begin: Alignment.topLeft,
|
||||
end: Alignment.bottomRight,
|
||||
colors: [
|
||||
Colors.white.withOpacity(0.1),
|
||||
Color(0xFFFFFFFF).withOpacity(0.05),
|
||||
],
|
||||
stops: [
|
||||
0.1,
|
||||
1,
|
||||
],
|
||||
),
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
log(contentBytesController.filterId.toString());
|
||||
},
|
||||
child: itemFilter(index));
|
||||
}),
|
||||
),
|
||||
// GestureDetector(
|
||||
// onTap: () async {
|
||||
// // contentBytesController.isApiCalling.value = true;
|
||||
// Get.back();
|
||||
// // await InventoriesApi()
|
||||
// // .getInventoriesData(
|
||||
// // searchController.text,
|
||||
// // filterList,
|
||||
// // inventoriesController.fromWarehouse
|
||||
// // ? inventoriesController.wareHouseId
|
||||
// // : 0)
|
||||
// // .then((value) async {
|
||||
// // inventoriesController.inventoriesDataModel.value =
|
||||
// // InventoriesDataModel.fromJson(value.data);
|
||||
|
||||
// // inventoriesController.isApiCalling.value = false;
|
||||
// // });
|
||||
// },
|
||||
// child: Container(
|
||||
// padding:
|
||||
// EdgeInsets.symmetric(horizontal: 30.w, vertical: 10.h),
|
||||
// margin:
|
||||
// EdgeInsets.symmetric(horizontal: 30.w, vertical: 25.h),
|
||||
// decoration: BoxDecoration(
|
||||
// color: AppColors.buttoncolour,
|
||||
// borderRadius: BorderRadius.circular(20)),
|
||||
// child: Center(child: textWhite16('Apply Now')),
|
||||
// ))
|
||||
],
|
||||
))
|
||||
];
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
Widget videoCard(Video video) {
|
||||
return InkWell(
|
||||
onTap: () {
|
||||
Get.to(() => PlayerWidget(), arguments: {
|
||||
"video_url": video.file,
|
||||
});
|
||||
},
|
||||
child: commonGlassContainer(
|
||||
borderradius: 8,
|
||||
width: double.infinity,
|
||||
height: 300.h,
|
||||
customWidget: Padding(
|
||||
padding: EdgeInsets.symmetric(vertical: 10.h, horizontal: 10.w),
|
||||
child: Column(
|
||||
children: [
|
||||
Container(
|
||||
height: 200.h,
|
||||
width: double.infinity,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(8.r),
|
||||
image: DecorationImage(
|
||||
image: NetworkImage(
|
||||
video.image!,
|
||||
))),
|
||||
child: Center(
|
||||
child: SvgPicture.asset(
|
||||
'assets/images/svg/gridicons_play.svg',
|
||||
height: 56.h,
|
||||
width: 56.w,
|
||||
),
|
||||
child: Image.asset(images[index]),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
sizedBoxHeight(20.h),
|
||||
Row(
|
||||
children: [
|
||||
CircleAvatar(
|
||||
radius: 23.r,
|
||||
backgroundImage: const AssetImage(
|
||||
'assets/images/png/Ellipse 1494.png'),
|
||||
),
|
||||
sizedBoxWidth(10.w),
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
text18W500(video.title!),
|
||||
// sizedBoxHeight(10.h),
|
||||
text12W400_979797('20k views . 2 days ago'),
|
||||
],
|
||||
)
|
||||
],
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
sizedBoxHeight(20.h),
|
||||
InkWell(
|
||||
onTap: () {
|
||||
Get.to(() {
|
||||
PlayerWidget();
|
||||
});
|
||||
},
|
||||
child: commonGlassContainer(
|
||||
borderradius: 8,
|
||||
width: double.infinity,
|
||||
height: 300.h,
|
||||
customWidget: Padding(
|
||||
padding:
|
||||
EdgeInsets.symmetric(vertical: 10.h, horizontal: 10.w),
|
||||
child: Column(
|
||||
)),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Obx(
|
||||
() => SingleChildScrollView(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
const SizedBox(
|
||||
width: 295,
|
||||
child: CustomTextFormField(
|
||||
leadingIcon: Icon(Icons.search),
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
width: 15.w,
|
||||
),
|
||||
filter(),
|
||||
],
|
||||
),
|
||||
SizedBox(
|
||||
height: 10.h,
|
||||
),
|
||||
text22W600('Content Bytes'),
|
||||
sizedBoxHeight(8.w),
|
||||
text16W400_DADADA('The Beauty and Power of Video'),
|
||||
sizedBoxHeight(20.h),
|
||||
contentBytesController.isApiCalling.value
|
||||
? const Column(
|
||||
children: [
|
||||
Container(
|
||||
height: 200.h,
|
||||
width: double.infinity,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(8.r),
|
||||
image: DecorationImage(
|
||||
image: AssetImage(
|
||||
'assets/images/png/Rectangle 17934.png'))),
|
||||
child: Center(
|
||||
child: SvgPicture.asset(
|
||||
'assets/images/svg/gridicons_play.svg',
|
||||
height: 56.h,
|
||||
width: 56.w,
|
||||
),
|
||||
Gap(50),
|
||||
Center(
|
||||
child: CircularProgressIndicator(
|
||||
color: Color(0xFF9A0000),
|
||||
),
|
||||
),
|
||||
sizedBoxHeight(20.h),
|
||||
Row(
|
||||
children: [
|
||||
CircleAvatar(
|
||||
radius: 23.r,
|
||||
backgroundImage: AssetImage(
|
||||
'assets/images/png/Ellipse 1494.png'),
|
||||
],
|
||||
)
|
||||
: Column(
|
||||
children: [
|
||||
contentBytesController
|
||||
.contentBytesModel.data!.video!.length <
|
||||
1
|
||||
? const SizedBox()
|
||||
: videoCard(contentBytesController
|
||||
.contentBytesModel.data!.video![0]),
|
||||
contentBytesController
|
||||
.contentBytesModel.data!.video!.length <=
|
||||
1
|
||||
? const SizedBox()
|
||||
: sizedBoxHeight(20.h),
|
||||
contentBytesController
|
||||
.contentBytesModel.data!.video!.length <
|
||||
2
|
||||
? const SizedBox()
|
||||
: videoCard(contentBytesController
|
||||
.contentBytesModel.data!.video![1]),
|
||||
sizedBoxHeight(15.h),
|
||||
text22W600("Reels"),
|
||||
sizedBoxHeight(25.h),
|
||||
Container(
|
||||
height: 500,
|
||||
child: GridView.builder(
|
||||
physics: const NeverScrollableScrollPhysics(),
|
||||
gridDelegate:
|
||||
const SliverGridDelegateWithFixedCrossAxisCount(
|
||||
mainAxisExtent: 215,
|
||||
crossAxisCount: 2, // number of items in each row
|
||||
mainAxisSpacing: 8.0, // spacing between rows
|
||||
crossAxisSpacing: 8.0, // spacing between columns
|
||||
),
|
||||
sizedBoxWidth(10.w),
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
text18W500('Week of 21st February 2024'),
|
||||
// sizedBoxHeight(10.h),
|
||||
text12W400_979797('20k views . 2 days ago'),
|
||||
],
|
||||
)
|
||||
],
|
||||
)
|
||||
|
||||
itemCount: 4, // total number of items
|
||||
itemBuilder: (context, index) {
|
||||
return InkWell(
|
||||
onTap: () {
|
||||
Get.to(
|
||||
() => const Reels(),
|
||||
);
|
||||
},
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
gradient: LinearGradient(
|
||||
begin: Alignment.topLeft,
|
||||
end: Alignment.bottomRight,
|
||||
colors: [
|
||||
Colors.white.withOpacity(0.1),
|
||||
const Color(0xFFFFFFFF).withOpacity(0.05),
|
||||
],
|
||||
stops: [
|
||||
0.1,
|
||||
1,
|
||||
],
|
||||
),
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
),
|
||||
child: Image.asset(widget.images[index]),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
// sizedBoxHeight(10.h),
|
||||
contentBytesController
|
||||
.contentBytesModel.data!.video!.length <
|
||||
3
|
||||
? const SizedBox()
|
||||
: ListView.builder(
|
||||
physics: NeverScrollableScrollPhysics(),
|
||||
itemCount: contentBytesController
|
||||
.contentBytesModel.data!.video!.length -
|
||||
2,
|
||||
shrinkWrap: true,
|
||||
itemBuilder: (ctx, index) {
|
||||
return Container(
|
||||
margin: EdgeInsets.only(
|
||||
bottom: 20,
|
||||
),
|
||||
child: videoCard(contentBytesController
|
||||
.contentBytesModel
|
||||
.data!
|
||||
.video![index + 2]),
|
||||
);
|
||||
})
|
||||
],
|
||||
),
|
||||
)),
|
||||
),
|
||||
],
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -13,30 +13,22 @@ class PlayerWidget extends StatefulWidget {
|
||||
class _PlayerWidgetState extends State<PlayerWidget> {
|
||||
late VideoPlayerController videoPlayerController;
|
||||
late ChewieController chewieController;
|
||||
|
||||
var videoUrl = Get.arguments["video_url"];
|
||||
@override
|
||||
void initState() {
|
||||
// TODO: implement initState
|
||||
super.initState();
|
||||
_initializePlayer();
|
||||
super.initState();
|
||||
}
|
||||
|
||||
// _initializePlayer() async {
|
||||
// videoPlayerController = VideoPlayerController.networkUrl(Uri.parse(
|
||||
// "https://flutter.github.io/assets-for-api-docs/assets/videos/bee.mp4"));
|
||||
|
||||
// await videoPlayerController.initialize();
|
||||
// initChewie();
|
||||
// }
|
||||
|
||||
_initializePlayer() async {
|
||||
try {
|
||||
videoPlayerController = VideoPlayerController.network(
|
||||
"https://assets.mixkit.co/videos/preview/mixkit-spinning-around-the-earth-29351-large.mp4",
|
||||
videoPlayerController = VideoPlayerController.networkUrl(
|
||||
Uri.parse(videoUrl),
|
||||
);
|
||||
|
||||
await videoPlayerController.initialize();
|
||||
initChewie();
|
||||
setState(() {});
|
||||
} catch (e) {
|
||||
print("Error initializing video player: $e");
|
||||
}
|
||||
|
||||
@@ -68,6 +68,7 @@ class CreateTicketBottomSheet {
|
||||
"Content Buytes",
|
||||
"Market Insights"
|
||||
],
|
||||
title: "",
|
||||
),
|
||||
const Gap(14),
|
||||
Stack(
|
||||
|
||||
@@ -18,6 +18,7 @@ import 'package:traderscircuit/view/onBoarding/splashScreen1.dart';
|
||||
import 'package:traderscircuit/view_model/Login/add_kyc_api.dart';
|
||||
|
||||
import '../../controller/kyc_controller.dart';
|
||||
import '../../view_model/RiskProfileApi/risk_profile_api.dart';
|
||||
|
||||
import 'package:path/path.dart' as path;
|
||||
|
||||
|
||||
@@ -1,15 +1,21 @@
|
||||
import 'dart:ui';
|
||||
import 'dart:convert';
|
||||
import 'dart:developer';
|
||||
|
||||
import 'package:dio/dio.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:get/get.dart' hide FormData;
|
||||
import 'package:traderscircuit/Utils/Common/CommonAppbar.dart';
|
||||
import 'package:traderscircuit/Utils/Common/commonBotton.dart';
|
||||
import 'package:traderscircuit/Utils/dialogs.dart';
|
||||
import 'package:traderscircuit/Utils/text.dart';
|
||||
import 'package:traderscircuit/resources/routes/route_name.dart';
|
||||
import 'package:traderscircuit/controller/risk_profile_controller.dart';
|
||||
import 'package:traderscircuit/model/RiskProfileModel/risk_profile_ques_answer_model.dart';
|
||||
import 'package:traderscircuit/view/onBoarding/splashScreen1.dart';
|
||||
|
||||
import '../../Utils/Common/commonBotton.dart';
|
||||
import '../../Utils/Common/custom_drop_down.dart';
|
||||
import '../../resources/routes/route_name.dart';
|
||||
import '../../view_model/RiskProfileApi/risk_profile_api.dart';
|
||||
|
||||
class UpdateRiskProfile extends StatefulWidget {
|
||||
const UpdateRiskProfile({super.key});
|
||||
@@ -19,6 +25,34 @@ class UpdateRiskProfile extends StatefulWidget {
|
||||
}
|
||||
|
||||
class _UpdateRiskProfileState extends State<UpdateRiskProfile> {
|
||||
RxBool isLoading = true.obs;
|
||||
RiskProfileController riskProfileController =
|
||||
Get.put(RiskProfileController());
|
||||
List<int> questionIdList = [];
|
||||
List<int> answerIdList = [];
|
||||
List<Map<String, List<String>>> dropHeader = [];
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
RiskProfileApi().getRiskProfileData().then((value) {
|
||||
riskProfileController.riskProfileQuestionAnswerModel =
|
||||
RiskProfileQuestionAnswerModel.fromJson(value.data);
|
||||
for (var a
|
||||
in riskProfileController.riskProfileQuestionAnswerModel.data!) {
|
||||
List<String> titleTxt = [];
|
||||
titleTxt.clear();
|
||||
for (var b in a.answer!) {
|
||||
titleTxt.add(b.answer!);
|
||||
}
|
||||
dropHeader.add({a.question!: titleTxt});
|
||||
}
|
||||
|
||||
log(dropHeader.toString());
|
||||
isLoading.value = false;
|
||||
});
|
||||
super.initState();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
@@ -28,125 +62,151 @@ class _UpdateRiskProfileState extends State<UpdateRiskProfile> {
|
||||
),
|
||||
backgroundColor: Colors.black,
|
||||
extendBody: true,
|
||||
body: Stack(
|
||||
children: [
|
||||
const CommonBlurLeft(),
|
||||
const CommonBlurRight(),
|
||||
Stack(
|
||||
children: [
|
||||
Padding(
|
||||
padding:
|
||||
const EdgeInsets.symmetric(horizontal: 16, vertical: 16),
|
||||
child: ListView(
|
||||
physics: const BouncingScrollPhysics(),
|
||||
// mainAxisAlignment: MainAxisAlignment.start,
|
||||
// crossAxisAlignment: CrossAxisAlignment.start,
|
||||
|
||||
children: [
|
||||
updateRiskProfileData(
|
||||
"What is your investment goal?",
|
||||
"Select your goal",
|
||||
),
|
||||
updateRiskProfileData(
|
||||
"Add Investment Experience field",
|
||||
"Select your Experience",
|
||||
),
|
||||
updateRiskProfileData(
|
||||
"What types of stocks do you prefer?",
|
||||
"Select types of stock",
|
||||
),
|
||||
updateRiskProfileData(
|
||||
"What is your Risk Perception?",
|
||||
"Select your Perception",
|
||||
),
|
||||
updateRiskProfileData(
|
||||
"What is your favoured Market Condition?",
|
||||
"Select Condition",
|
||||
),
|
||||
updateRiskProfileData(
|
||||
"What is your Emotional Response to Market Volatility?",
|
||||
"Choose your query",
|
||||
),
|
||||
SizedBox(
|
||||
height: 70.h,
|
||||
),
|
||||
CommonBtn(
|
||||
text: "Submit",
|
||||
onTap: () {
|
||||
Get.toNamed(RouteName.mainscreen);
|
||||
},
|
||||
),
|
||||
SizedBox(
|
||||
height: 10.h,
|
||||
),
|
||||
],
|
||||
body: Obx(
|
||||
() => isLoading.value
|
||||
? const Center(
|
||||
child: CircularProgressIndicator(
|
||||
color: Color(0xFF9A0000),
|
||||
),
|
||||
)
|
||||
: Stack(
|
||||
children: [
|
||||
const CommonBlurLeft(),
|
||||
const CommonBlurRight(),
|
||||
Stack(
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 16, vertical: 16),
|
||||
child: ListView.builder(
|
||||
itemCount: riskProfileController
|
||||
.riskProfileQuestionAnswerModel
|
||||
.data!
|
||||
.length +
|
||||
1,
|
||||
itemBuilder: (ctx, index) {
|
||||
return riskProfileController
|
||||
.riskProfileQuestionAnswerModel
|
||||
.data!
|
||||
.length <=
|
||||
index
|
||||
? Column(
|
||||
children: [
|
||||
SizedBox(
|
||||
height: 70.h,
|
||||
),
|
||||
CommonBtn(
|
||||
text: "Submit",
|
||||
onTap: () {
|
||||
questionIdList.clear();
|
||||
answerIdList.clear();
|
||||
if (riskProfileController
|
||||
.riskProfileQuestionAnswerModel
|
||||
.data!
|
||||
.length !=
|
||||
riskProfileController
|
||||
.selectedData.length) {
|
||||
utils.showToast(
|
||||
"All Fields Required");
|
||||
} else {
|
||||
// Iterate through selected data and match with provided data
|
||||
for (var entry
|
||||
in riskProfileController
|
||||
.selectedData) {
|
||||
String question =
|
||||
entry.keys.first;
|
||||
String answer =
|
||||
entry.values.first;
|
||||
|
||||
// Find matching question
|
||||
var questionMatch =
|
||||
riskProfileController
|
||||
.riskProfileQuestionAnswerModel
|
||||
.data!
|
||||
.firstWhere(
|
||||
(item) =>
|
||||
item.question ==
|
||||
question,
|
||||
);
|
||||
if (questionMatch != null) {
|
||||
questionIdList
|
||||
.add(questionMatch.id!);
|
||||
}
|
||||
|
||||
// Find matching answer
|
||||
if (questionMatch != null) {
|
||||
var answerMatch =
|
||||
questionMatch.answer!
|
||||
.firstWhere(
|
||||
(ans) =>
|
||||
ans.answer == answer,
|
||||
);
|
||||
if (answerMatch != null) {
|
||||
answerIdList
|
||||
.add(answerMatch.id!);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
RiskProfileApi()
|
||||
.addRiskProfileData(
|
||||
FormData.fromMap({
|
||||
"question_ids": jsonEncode(
|
||||
questionIdList),
|
||||
"answer_ids":
|
||||
jsonEncode(answerIdList),
|
||||
}))
|
||||
.then((value) {
|
||||
Map<String, dynamic>
|
||||
responseData =
|
||||
Map<String, dynamic>.from(
|
||||
value.data);
|
||||
utils.showToast(
|
||||
responseData["message"]);
|
||||
Get.toNamed(
|
||||
RouteName.mainscreen);
|
||||
});
|
||||
}
|
||||
},
|
||||
),
|
||||
SizedBox(
|
||||
height: 10.h,
|
||||
),
|
||||
],
|
||||
)
|
||||
: updateRiskProfileData(
|
||||
riskProfileController
|
||||
.riskProfileQuestionAnswerModel
|
||||
.data![index]
|
||||
.question!,
|
||||
"Select your goal",
|
||||
index);
|
||||
})),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Widget updateRiskProfileData(
|
||||
String tilte,
|
||||
String headerText,
|
||||
) {
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
text18W400(tilte),
|
||||
SizedBox(
|
||||
height: 15.h,
|
||||
),
|
||||
CustomDropDownWidget(
|
||||
header: headerText,
|
||||
listData: dropHeader[headerText]!,
|
||||
),
|
||||
SizedBox(
|
||||
height: 35.h,
|
||||
),
|
||||
],
|
||||
);
|
||||
Widget updateRiskProfileData(String tilte, String headerText, int index) {
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
text18W400(tilte),
|
||||
SizedBox(
|
||||
height: 15.h,
|
||||
),
|
||||
CustomDropDownWidget(
|
||||
header: headerText,
|
||||
listData: dropHeader[index][tilte]!,
|
||||
title: tilte,
|
||||
),
|
||||
SizedBox(
|
||||
height: 35.h,
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Map<String, List<String>> dropHeader = {
|
||||
"Select your goal": [
|
||||
"Wealth Preservation",
|
||||
"Capital Growth",
|
||||
"Income Generation",
|
||||
"Retirement Planning"
|
||||
],
|
||||
"Select your Experience": [
|
||||
"No Experience",
|
||||
"Beginner (0 - 3 months)",
|
||||
"Intermediate (3 - 12 months)",
|
||||
"Expert ( > 12 months)",
|
||||
"Professional ( 3 - 5 years )"
|
||||
],
|
||||
"Select types of stock": [
|
||||
"Swing Trade",
|
||||
"Options",
|
||||
"Multibagger",
|
||||
"Long term",
|
||||
],
|
||||
"Select your Perception": [
|
||||
"Very Conservative",
|
||||
"Conservative",
|
||||
"Moderate",
|
||||
"Aggressive",
|
||||
],
|
||||
"Select Condition": [
|
||||
"Bullish",
|
||||
"Neutral",
|
||||
"Bearish",
|
||||
],
|
||||
"Choose your query": [
|
||||
"Calm",
|
||||
"Neutral",
|
||||
"Anxious",
|
||||
"Stressed",
|
||||
],
|
||||
};
|
||||
|
||||
@@ -41,10 +41,12 @@ class _VerifyOTPState extends State<VerifyOTP> {
|
||||
_verifycheck() async {
|
||||
final isValid = _otpform.currentState?.validate();
|
||||
if (isValid!) {
|
||||
SharedPreferences prefs = await SharedPreferences.getInstance();
|
||||
Utils.loader();
|
||||
Map<String, String> updata = {
|
||||
"mobile_number": phonenumber.toString(),
|
||||
"otp": pincode.text,
|
||||
"playerId": prefs.getString("playerId")!,
|
||||
};
|
||||
final resp = await VerifyNumberAPI(updata).verifynumberApi();
|
||||
if (resp.status == ResponseStatus.SUCCESS) {
|
||||
|
||||
45
lib/view_model/ContentBytesApi/content_bytes_api.dart
Normal file
45
lib/view_model/ContentBytesApi/content_bytes_api.dart
Normal file
@@ -0,0 +1,45 @@
|
||||
import 'dart:developer';
|
||||
|
||||
import 'package:dio/dio.dart';
|
||||
|
||||
import '../../Utils/api_urls.dart';
|
||||
import '../../Utils/base_manager.dart';
|
||||
import '../../data/network/network_api_services.dart';
|
||||
|
||||
class ContentBytesApi {
|
||||
Future<ResponseData<dynamic>> getContentBytesCategoriesData() async {
|
||||
final response = await NetworkApiServices()
|
||||
.getApi(ApiUrls.getContentBytesCategoriesApi, isAuth: true);
|
||||
log(response.data.toString());
|
||||
if (response.status == ResponseStatus.SUCCESS) {
|
||||
Map<String, dynamic> responseData =
|
||||
Map<String, dynamic>.from(response.data);
|
||||
if (responseData['status'] == "success") {
|
||||
return response;
|
||||
} else {
|
||||
return ResponseData<dynamic>(
|
||||
responseData['message'], ResponseStatus.FAILED);
|
||||
}
|
||||
}
|
||||
return response;
|
||||
}
|
||||
|
||||
Future<ResponseData<dynamic>> getContentBytesData(dynamic data) async {
|
||||
final response = await NetworkApiServices().postApi(
|
||||
data,
|
||||
ApiUrls.getContentBytesApi,
|
||||
);
|
||||
log(response.data.toString());
|
||||
if (response.status == ResponseStatus.SUCCESS) {
|
||||
Map<String, dynamic> responseData =
|
||||
Map<String, dynamic>.from(response.data);
|
||||
if (responseData['status'] == "success") {
|
||||
return response;
|
||||
} else {
|
||||
return ResponseData<dynamic>(
|
||||
responseData['message'], ResponseStatus.FAILED);
|
||||
}
|
||||
}
|
||||
return response;
|
||||
}
|
||||
}
|
||||
45
lib/view_model/RiskProfileApi/risk_profile_api.dart
Normal file
45
lib/view_model/RiskProfileApi/risk_profile_api.dart
Normal file
@@ -0,0 +1,45 @@
|
||||
import 'dart:developer';
|
||||
|
||||
import 'package:dio/dio.dart';
|
||||
|
||||
import '../../Utils/api_urls.dart';
|
||||
import '../../Utils/base_manager.dart';
|
||||
import '../../data/network/network_api_services.dart';
|
||||
|
||||
class RiskProfileApi {
|
||||
Future<ResponseData<dynamic>> getRiskProfileData() async {
|
||||
final response = await NetworkApiServices()
|
||||
.getApi(ApiUrls.getRiskProfileQuestionAnswerApi, isAuth: true);
|
||||
log(response.data.toString());
|
||||
if (response.status == ResponseStatus.SUCCESS) {
|
||||
Map<String, dynamic> responseData =
|
||||
Map<String, dynamic>.from(response.data);
|
||||
if (responseData['status'] == "success") {
|
||||
return response;
|
||||
} else {
|
||||
return ResponseData<dynamic>(
|
||||
responseData['message'], ResponseStatus.FAILED);
|
||||
}
|
||||
}
|
||||
return response;
|
||||
}
|
||||
|
||||
Future<ResponseData<dynamic>> addRiskProfileData(FormData data) async {
|
||||
final response = await NetworkApiServices().postApi(
|
||||
data,
|
||||
ApiUrls.addRiskProfileQuestionAnswerApi,
|
||||
);
|
||||
log(response.data.toString());
|
||||
if (response.status == ResponseStatus.SUCCESS) {
|
||||
Map<String, dynamic> responseData =
|
||||
Map<String, dynamic>.from(response.data);
|
||||
if (responseData['status'] == "success") {
|
||||
return response;
|
||||
} else {
|
||||
return ResponseData<dynamic>(
|
||||
responseData['message'], ResponseStatus.FAILED);
|
||||
}
|
||||
}
|
||||
return response;
|
||||
}
|
||||
}
|
||||
137
lib/view_model/SmallCaseApi/smallcase_api_methods.dart
Normal file
137
lib/view_model/SmallCaseApi/smallcase_api_methods.dart
Normal file
@@ -0,0 +1,137 @@
|
||||
import 'dart:convert';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:http/http.dart' as http;
|
||||
import 'package:scgateway_flutter_plugin/scgateway_flutter_plugin.dart';
|
||||
|
||||
import '../../Utils/api_urls.dart';
|
||||
import '../../model/SmallCaseModel/broker_account_model.dart';
|
||||
|
||||
// void openDashboardPage(BuildContext context) {
|
||||
// Navigator.pushReplacement(
|
||||
// context, MaterialPageRoute(builder: ((context) => PortfolioMainUI())));
|
||||
// }
|
||||
|
||||
// void openEquityPage(BuildContext context, Map<String, dynamic> holdings) {
|
||||
// Navigator.push(
|
||||
// context,
|
||||
// MaterialPageRoute(
|
||||
// builder: ((context) => Equityinner(holdings: holdings))));
|
||||
// }
|
||||
|
||||
//broker account table
|
||||
//fetch broker accounts
|
||||
Future<List<BrokerAccountModel>> fetchBrokerAccounts() async {
|
||||
final response = await http.Client()
|
||||
.get(Uri.parse('${ApiUrls.pieBase}api/get_broker_account_data'));
|
||||
final parsed = jsonDecode(response.body);
|
||||
return parsed
|
||||
.map<BrokerAccountModel>((json) => BrokerAccountModel.fromJson(json))
|
||||
.toList();
|
||||
}
|
||||
|
||||
//delete broker account
|
||||
Future<bool> deleteBrokerAccount(int id) async {
|
||||
final response = await http.Client()
|
||||
.get(Uri.parse('${ApiUrls.pieBase}api/delete_brokerage_account/$id'));
|
||||
if (response.statusCode == 200) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
//post broker account
|
||||
Future<bool> postBrokerAccount({
|
||||
required String userId,
|
||||
required String brokerName,
|
||||
required String authToken,
|
||||
required String txnId,
|
||||
}) async {
|
||||
var response = await http.post(
|
||||
Uri.parse('${ApiUrls.pieBase}api/add_broker_account'),
|
||||
body: <String, String>{
|
||||
"user_id": userId,
|
||||
"broker_name": brokerName,
|
||||
"auth_token": authToken,
|
||||
"transaction_id": txnId,
|
||||
},
|
||||
);
|
||||
if (response.statusCode == 200) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
Future<String> fetchAuthToken() async {
|
||||
var response = await http.get(
|
||||
Uri.parse(
|
||||
'${ApiUrls.pieBase}api/get_small_case_auth_token/',
|
||||
),
|
||||
);
|
||||
return jsonDecode(response.body)['data'];
|
||||
}
|
||||
|
||||
Future<String> fetchBrokerConnectTxnId({required String authToken}) async {
|
||||
var response = await http.get(
|
||||
Uri.parse(
|
||||
'${ApiUrls.pieBase}api/get_small_case_broker_connect_transaction/$authToken',
|
||||
),
|
||||
);
|
||||
return jsonDecode(response.body)['data']['transactionId'];
|
||||
}
|
||||
|
||||
Future<http.Response> fetchHoldingsImportTxnId(String authToken) async {
|
||||
var response = await http.get(
|
||||
Uri.parse(
|
||||
'${ApiUrls.pieBase}api/get_small_case_holding_import_transaction_id/$authToken',
|
||||
),
|
||||
);
|
||||
return response;
|
||||
}
|
||||
|
||||
Future<Map<String, dynamic>> fetchHoldings(String authToken) async {
|
||||
var response = await http.get(
|
||||
Uri.parse(
|
||||
'${ApiUrls.pieBase}api/fetch_small_case_holding/$authToken',
|
||||
),
|
||||
);
|
||||
return jsonDecode(response.body)['data'];
|
||||
}
|
||||
|
||||
Future<String> fetchStocksOrderTxnId(String authToken, String body) async {
|
||||
var response = await http.post(Uri.parse(
|
||||
'${ApiUrls.pieBase}api/create_post_transaction_stock_order?body=$body&auth_token=$authToken'));
|
||||
var txnId = jsonDecode(response.body)['data']['transactionId'];
|
||||
return txnId;
|
||||
}
|
||||
|
||||
enum TradeType {
|
||||
BUY,
|
||||
SELL,
|
||||
}
|
||||
|
||||
void loginNTrade(String ticker, int quantity, TradeType tradeType) {
|
||||
fetchAuthToken().then((fetchedAuthToken) {
|
||||
// debugPrint("fetchedAuthToken $fetchedAuthToken");
|
||||
fetchBrokerConnectTxnId(authToken: fetchedAuthToken).then(
|
||||
(txnId) => ScgatewayFlutterPlugin.initGateway(fetchedAuthToken).then(
|
||||
(value) => ScgatewayFlutterPlugin.triggerGatewayTransaction(
|
||||
txnId,
|
||||
).then(
|
||||
(loginRes) {
|
||||
if (loginRes != null) {
|
||||
var data = jsonDecode(loginRes)['data'];
|
||||
if (data != null) {
|
||||
String authToken = jsonDecode(data)['smallcaseAuthToken'];
|
||||
String brokerName = jsonDecode(data)['broker'];
|
||||
String txnId = jsonDecode(data)['transactionId'];
|
||||
String body =
|
||||
'{"intent":"TRANSACTION","orderConfig":{"type":"SECURITIES","securities":[{"ticker":"$ticker","quantity":"$quantity","type":"${tradeType.name}"},{"ticker":"RELIANCE","quantity":1,"type":"BUY"}]}}';
|
||||
fetchStocksOrderTxnId(authToken, body).then(
|
||||
(stocksOrderTxnId) => ScgatewayFlutterPlugin
|
||||
.triggerGatewayTransaction(stocksOrderTxnId)
|
||||
.then(
|
||||
(value) => debugPrint("Stocks Order res $value")));
|
||||
}
|
||||
}
|
||||
},
|
||||
),
|
||||
),
|
||||
);
|
||||
});
|
||||
}
|
||||
40
pubspec.lock
40
pubspec.lock
@@ -26,7 +26,7 @@ packages:
|
||||
source: hosted
|
||||
version: "2.4.2"
|
||||
async:
|
||||
dependency: transitive
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: async
|
||||
sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c"
|
||||
@@ -93,10 +93,10 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: collection
|
||||
sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a
|
||||
sha256: f092b211a4319e98e5ff58223576de6c2803db36221657b46c82574721240687
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.18.0"
|
||||
version: "1.17.2"
|
||||
connectivity_plus:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
@@ -604,10 +604,10 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: meta
|
||||
sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e
|
||||
sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.10.0"
|
||||
version: "1.9.1"
|
||||
mime:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -776,6 +776,14 @@ packages:
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.27.7"
|
||||
scgateway_flutter_plugin:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: scgateway_flutter_plugin
|
||||
sha256: c52831292d73b7004af314f7e34ea4c510110da3e7d1cc274a745b3524e6a724
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.3.1"
|
||||
share_plus:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -889,18 +897,18 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: stack_trace
|
||||
sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b"
|
||||
sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.11.1"
|
||||
version: "1.11.0"
|
||||
stream_channel:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: stream_channel
|
||||
sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7
|
||||
sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.1.2"
|
||||
version: "2.1.1"
|
||||
string_scanner:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -929,10 +937,10 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: test_api
|
||||
sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b"
|
||||
sha256: "75760ffd7786fffdfb9597c35c5b27eaeec82be8edfb6d71d32651128ed7aab8"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.6.1"
|
||||
version: "0.6.0"
|
||||
typed_data:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -961,10 +969,10 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: url_launcher_web
|
||||
sha256: fff0932192afeedf63cdd50ecbb1bc825d31aed259f02bb8dba0f3b729a5e88b
|
||||
sha256: "7fd2f55fe86cea2897b963e864dc01a7eb0719ecc65fcef4c1cc3d686d718bb2"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.2.3"
|
||||
version: "2.2.0"
|
||||
url_launcher_windows:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -1106,10 +1114,10 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: web
|
||||
sha256: afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152
|
||||
sha256: dc8ccd225a2005c1be616fe02951e2e342092edf968cf0844220383757ef8f10
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.3.0"
|
||||
version: "0.1.4-beta"
|
||||
win32:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -1135,5 +1143,7 @@ packages:
|
||||
source: hosted
|
||||
version: "6.3.0"
|
||||
sdks:
|
||||
|
||||
dart: ">=3.2.3 <4.0.0"
|
||||
flutter: ">=3.16.6"
|
||||
|
||||
|
||||
@@ -39,8 +39,13 @@ dependencies:
|
||||
firebase_core:
|
||||
dio: ^5.1.2
|
||||
expansion_tile_group: ^1.2.4
|
||||
|
||||
local_auth: ^2.2.0
|
||||
|
||||
scgateway_flutter_plugin: ^2.3.1
|
||||
async: ^2.4.1
|
||||
|
||||
|
||||
dev_dependencies:
|
||||
flutter_test:
|
||||
sdk: flutter
|
||||
@@ -64,4 +69,4 @@ flutter:
|
||||
|
||||
- family: hiragino
|
||||
fonts:
|
||||
- asset: assets/fonts/hiragino/HiraginoInterface.ttc
|
||||
- asset: assets/fonts/hiragino/HiraginoInterface.ttc
|
||||
|
||||
Reference in New Issue
Block a user