added stock details screen and api integration
This commit is contained in:
@@ -82,4 +82,7 @@ class ApiUrls {
|
||||
|
||||
//kyc
|
||||
static String getKyc = "${base}get-kyc-images";
|
||||
|
||||
//Stock Details
|
||||
static String stockDetailsApi = "${base}get-details-of-stock";
|
||||
}
|
||||
|
||||
@@ -208,6 +208,17 @@ Widget text12W500(String text) {
|
||||
);
|
||||
}
|
||||
|
||||
Widget text12W600(String text) {
|
||||
return Text(
|
||||
text,
|
||||
style: TextStyle(
|
||||
fontSize: 12.sp,
|
||||
color: Colors.white,
|
||||
fontWeight: FontWeight.w600,
|
||||
fontFamily: 'hiragino'),
|
||||
);
|
||||
}
|
||||
|
||||
Widget text8W400(String text) {
|
||||
return Text(
|
||||
text,
|
||||
|
||||
@@ -8,6 +8,7 @@ import 'package:flutter/services.dart';
|
||||
import 'package:fluttertoast/fluttertoast.dart';
|
||||
import 'package:get/get.dart' as getx;
|
||||
import 'package:permission_handler/permission_handler.dart';
|
||||
import 'package:traderscircuit/model/StockDetailsModel/stock_details_model.dart';
|
||||
|
||||
class Utils {
|
||||
static Future<MultipartFile> networkImageToMultipartFile(
|
||||
@@ -38,6 +39,23 @@ class Utils {
|
||||
return file;
|
||||
}
|
||||
|
||||
static String removeDecimal(String price) {
|
||||
final List<String> splittedPrice = price.split(".");
|
||||
if (splittedPrice[1] == "0") {
|
||||
return splittedPrice[0];
|
||||
} else {
|
||||
return "${splittedPrice[0]}.${splittedPrice[1]}";
|
||||
}
|
||||
}
|
||||
|
||||
static List<num> extractPriceFromGraph(List<Candles> data) {
|
||||
final List<num> priceData = [];
|
||||
for (final element in data) {
|
||||
priceData.add(element.close!);
|
||||
}
|
||||
return priceData;
|
||||
}
|
||||
|
||||
static showToast(String? msg) {
|
||||
if (msg != null && msg != "null" && msg.isNotEmpty) {
|
||||
Fluttertoast.showToast(
|
||||
|
||||
Reference in New Issue
Block a user