diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index b61b240..045a898 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -6,7 +6,6 @@ - NSFaceIDUsageDescription - Why is my app authenticating using face id? + for authentication CFBundleDevelopmentRegion $(DEVELOPMENT_LANGUAGE) CFBundleDisplayName @@ -11,7 +11,7 @@ CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) + com.app.traderscircuit CFBundleInfoDictionaryVersion 6.0 CFBundleName diff --git a/lib/main.dart b/lib/main.dart index 59e492c..ffdff95 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -89,6 +89,7 @@ class _MyAppState extends State with WidgetsBindingObserver { super.initState(); Utils.getStoragePermission(); WidgetsBinding.instance.addObserver(this); + FlutterBranchSdk.init().then((value) => listenDynamicLinks()); connectivity = Connectivity(); checkInternet(); @@ -109,11 +110,10 @@ class _MyAppState extends State with WidgetsBindingObserver { }); } }); - // print(_connectionStatus); } void listenDynamicLinks() async { - streamSubscription = FlutterBranchSdk.initSession().listen((data) { + streamSubscription = FlutterBranchSdk.listSession().listen((data) { print('listenDynamicLinks - DeepLink Data: $data'); controllerData.sink.add((data.toString())); if (data.containsKey('+clicked_branch_link') && @@ -174,7 +174,7 @@ class _MyAppState extends State with WidgetsBindingObserver { fontFamily: 'hiragino', ), debugShowCheckedModeBanner: false, - initialRoute: RouteName.splashScreen, + initialRoute: RouteName.optionChain, getPages: AppRoutes.appRoutes(), ), designSize: const Size(390, 844), diff --git a/lib/view/MainScreen/HomeScreen.dart b/lib/view/MainScreen/HomeScreen.dart index 7bb4de5..ecd0fa6 100644 --- a/lib/view/MainScreen/HomeScreen.dart +++ b/lib/view/MainScreen/HomeScreen.dart @@ -71,7 +71,6 @@ class _HomeScreenState extends State { String calculatePercentageChange(double openPrice, double currentPrice) { final percentageChange = ((currentPrice - openPrice) / openPrice) * 100; - log(percentageChange.toStringAsFixed(2)); return percentageChange.toStringAsFixed(2); } @@ -718,7 +717,6 @@ Widget cardcallWidget( ), GestureDetector( onTap: () { - log("RUNNING"); Get.to(const ExploreUnseen()); }, child: Container( diff --git a/lib/view/MainScreen/stockDetails/option_chain_screen.dart b/lib/view/MainScreen/stockDetails/option_chain_screen.dart index 10f9c2d..63b07c5 100644 --- a/lib/view/MainScreen/stockDetails/option_chain_screen.dart +++ b/lib/view/MainScreen/stockDetails/option_chain_screen.dart @@ -1,8 +1,6 @@ import 'package:fl_chart/fl_chart.dart'; import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:flutter_svg/svg.dart'; -import 'package:gap/gap.dart'; import 'package:get/get.dart' hide FormData; import 'package:traderscircuit/Utils/Common/comonGlassmorphicContainer.dart'; import 'package:traderscircuit/Utils/Common/sized_box.dart'; @@ -19,7 +17,6 @@ class OptionChainScreen extends StatefulWidget { } class _OptionChainScreenState extends State { - Color _indicatorColor = Color(0xff00C236); List containerTexts = [ "9 MAY", "10 MAY", @@ -35,6 +32,7 @@ class _OptionChainScreenState extends State { drawerEnableOpenDragGesture: false, extendBody: true, appBar: const CommonAppbar( + height: 50, titleTxt: "", ), body: Stack( @@ -54,7 +52,6 @@ class _OptionChainScreenState extends State { SizedBox( height: 60, width: double.infinity, - // color: Colors.amber, child: ListView.builder( shrinkWrap: true, scrollDirection: Axis.horizontal, @@ -73,47 +70,122 @@ class _OptionChainScreenState extends State { ); }), ), - Table( - border: TableBorder.symmetric( - outside: BorderSide( + Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(6), + border: Border.all( width: 1, - color: Color(0xFF4A73FB).withOpacity(0.3), + color: const Color(0xFF4A73FB).withOpacity(0.3), ), ), - columnWidths: { - 0: FlexColumnWidth(1), - 1: FlexColumnWidth(1), - 2: FlexColumnWidth(2), - 3: FlexColumnWidth(1), - 4: FlexColumnWidth(1), - }, - children: [ - TableRow( - decoration: BoxDecoration(color: Colors.transparent), - children: [ - tableMainHeader('Calls'), - tableMainHeader(''), - tableMainHeader('Option Chain'), - tableMainHeader(''), - tableMainHeader('Puts'), - ], - ), - TableRow( - decoration: BoxDecoration(color: Color(0xff00295C)), - children: [ - tableHeader('OI', 'change'), - tableHeader('LTP', 'change'), - tableHeader('Price', ''), - tableHeader('LTP', 'change'), - tableHeader('OI', 'change'), - ], - ), - ...List.generate( - 15, - (index) => tableRow(index), - ), - ], - ) + child: Column( + children: [ + Padding( + padding: const EdgeInsets.symmetric( + vertical: 5, horizontal: 10), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + tableMainHeader('Calls'), + tableMainHeader('Option Chain'), + tableMainHeader('Puts'), + ], + ), + ), + Container( + decoration: BoxDecoration( + color: const Color(0xff00295C), + border: Border( + top: BorderSide( + width: 1, + color: const Color(0xFF4A73FB) + .withOpacity(0.3), + ), + )), + child: Row( + children: [ + Expanded(child: tableHeader('OI', 'change')), + Expanded(child: tableHeader('LTP', 'change')), + Expanded( + flex: 2, child: tableHeader('Price', '')), + Expanded(child: tableHeader('LTP', 'change')), + Expanded(child: tableHeader('OI', 'change')), + ], + ), + ), + Stack( + children: [ + SizedBox( + height: + MediaQuery.of(context).size.height - 330, + child: SingleChildScrollView( + child: Table( + border: TableBorder( + horizontalInside: BorderSide( + width: 1, + color: const Color(0xFF4A73FB) + .withOpacity(0.3), + ), + ), + columnWidths: const { + 0: FlexColumnWidth(1), + 1: FlexColumnWidth(1), + 2: FlexColumnWidth(2), + 3: FlexColumnWidth(1), + 4: FlexColumnWidth(1), + }, + children: [ + ...List.generate( + 15, + (index) => tableRow(index), + ), + ], + ), + ), + ), + Positioned( + left: 0, + right: 0, + top: 200, // Adjust the position as needed + child: Row( + children: [ + Expanded( + child: CustomPaint( + painter: DottedLinePainter( + color: Color(0xFF4A73FB)), + child: Container( + height: 1, + ), + ), + ), + Container( + width: 80, // Adjust width as needed + height: 30, + color: const Color(0xff00295C), + alignment: Alignment.center, + child: Text('22,851.75', + style: TextStyle( + color: Colors.white, + fontWeight: FontWeight.bold, + fontSize: 12.sp)), + ), + Expanded( + child: CustomPaint( + painter: DottedLinePainter( + color: Color(0xFF4A73FB)), + child: Container( + height: 1, + ), + ), + ), + ], + ), + ), + ], + ), + ], + ), + ), ], ), ), @@ -148,7 +220,7 @@ class _OptionChainScreenState extends State { Widget tableMainHeader(String text) { return Center( child: Padding( - padding: const EdgeInsets.symmetric(vertical: 127.0), + padding: const EdgeInsets.symmetric(vertical: 10.0), child: Text(text, style: TextStyle( color: Colors.white, @@ -164,11 +236,11 @@ class _OptionChainScreenState extends State { color: index % 2 == 0 ? Colors.transparent : Colors.transparent, ), children: [ - tableCell('1,43,875', '\n59,625'), - tableCell('271.00', '\n-45.65'), + tableCell('0.3', ''), + tableCell('271.00', ''), tableCell('22,250', ''), - tableCell('41.35', '\n-8.20'), - tableCell('10,07,275', '\n2,71,400'), + tableCell('41.35', ''), + tableCell('0.3', ''), ], ); } @@ -235,7 +307,7 @@ class OptionChainTable extends StatelessWidget { child: Column( children: [ Table( - columnWidths: { + columnWidths: const { 0: FlexColumnWidth(1), 1: FlexColumnWidth(1), 2: FlexColumnWidth(1), @@ -246,7 +318,7 @@ class OptionChainTable extends StatelessWidget { // border: TableBorder.all(color: Colors.white), children: [ TableRow( - decoration: BoxDecoration(color: Colors.black), + decoration: const BoxDecoration(color: Colors.black), children: [ tableHeader('OI\nchange'), tableHeader('LTP\nchange'), @@ -269,7 +341,8 @@ class OptionChainTable extends StatelessWidget { padding: const EdgeInsets.all(8.0), child: Center( child: Text(text, - style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold)), + style: const TextStyle( + color: Colors.white, fontWeight: FontWeight.bold)), ), ); } @@ -295,8 +368,37 @@ class OptionChainTable extends StatelessWidget { return Padding( padding: const EdgeInsets.all(8.0), child: Center( - child: Text(text, style: TextStyle(color: Colors.white)), + child: Text(text, style: const TextStyle(color: Colors.white)), ), ); } } + +class DottedLinePainter extends CustomPainter { + final Color color; + + DottedLinePainter({required this.color}); + + @override + void paint(Canvas canvas, Size size) { + var paint = Paint() + ..color = color + ..strokeWidth = 1 + ..style = PaintingStyle.stroke; + + var max = size.width; + var dashWidth = 5; + var dashSpace = 3; + double startX = 0; + + while (startX < max) { + canvas.drawLine(Offset(startX, 0), Offset(startX + dashWidth, 0), paint); + startX += dashWidth + dashSpace; + } + } + + @override + bool shouldRepaint(CustomPainter oldDelegate) { + return false; + } +} diff --git a/pubspec.lock b/pubspec.lock index 0317477..b94c4ed 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -357,10 +357,10 @@ packages: dependency: transitive description: name: firebase_core_web - sha256: "22fcb352744908224fc7be3caae254836099786acfe5df6e9fe901e9c2575a41" + sha256: c8e1d59385eee98de63c92f961d2a7062c5d9a65e7f45bdc7f1b0b205aab2492 url: "https://pub.dev" source: hosted - version: "2.17.1" + version: "2.11.5" firebase_crashlytics: dependency: "direct main" description: @@ -728,30 +728,6 @@ packages: url: "https://pub.dev" source: hosted version: "0.4.9" - leak_tracker: - dependency: transitive - description: - name: leak_tracker - sha256: "78eb209deea09858f5269f5a5b02be4049535f568c07b275096836f01ea323fa" - url: "https://pub.dev" - source: hosted - version: "10.0.0" - leak_tracker_flutter_testing: - dependency: transitive - description: - name: leak_tracker_flutter_testing - sha256: b46c5e37c19120a8a01918cfaf293547f47269f7cb4b0058f21531c2465d6ef0 - url: "https://pub.dev" - source: hosted - version: "2.0.1" - leak_tracker_testing: - dependency: transitive - description: - name: leak_tracker_testing - sha256: a597f72a664dbd293f3bfc51f9ba69816f84dcd403cdac7066cb3f6003f3ab47 - url: "https://pub.dev" - source: hosted - version: "2.0.1" lints: dependency: transitive description: @@ -828,26 +804,26 @@ packages: dependency: transitive description: name: matcher - sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb + sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e" url: "https://pub.dev" source: hosted - version: "0.12.16+1" + version: "0.12.16" material_color_utilities: dependency: transitive description: name: material_color_utilities - sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" + sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41" url: "https://pub.dev" source: hosted - version: "0.8.0" + version: "0.5.0" meta: dependency: transitive description: name: meta - sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04 + sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e url: "https://pub.dev" source: hosted - version: "1.11.0" + version: "1.10.0" mime: dependency: transitive description: @@ -892,10 +868,10 @@ packages: dependency: transitive description: name: path - sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" + sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" url: "https://pub.dev" source: hosted - version: "1.9.0" + version: "1.8.3" path_drawing: dependency: transitive description: @@ -1470,14 +1446,6 @@ packages: url: "https://github.com/kishan06/videoPlayerKB.git" source: git version: "0.0.2" - vm_service: - dependency: transitive - description: - name: vm_service - sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957 - url: "https://pub.dev" - source: hosted - version: "13.0.0" wakelock: dependency: transitive description: @@ -1522,26 +1490,18 @@ packages: dependency: transitive description: name: web - sha256: "97da13628db363c635202ad97068d47c5b8aa555808e7a9411963c533b449b27" + sha256: afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152 url: "https://pub.dev" source: hosted - version: "0.5.1" - web_socket: - dependency: transitive - description: - name: web_socket - sha256: "24301d8c293ce6fe327ffe6f59d8fd8834735f0ec36e4fd383ec7ff8a64aa078" - url: "https://pub.dev" - source: hosted - version: "0.1.5" + version: "0.3.0" web_socket_channel: dependency: "direct main" description: name: web_socket_channel - sha256: a2d56211ee4d35d9b344d9d4ce60f362e4f5d1aafb988302906bd732bc731276 + sha256: d88238e5eac9a42bb43ca4e721edba3c08c6354d4a53063afaa568516217621b url: "https://pub.dev" source: hosted - version: "3.0.0" + version: "2.4.0" win32: dependency: transitive description: @@ -1567,5 +1527,5 @@ packages: source: hosted version: "6.3.0" sdks: - dart: ">=3.3.0 <4.0.0" + dart: ">=3.2.0 <4.0.0" flutter: ">=3.16.0" diff --git a/pubspec.yaml b/pubspec.yaml index 8660521..0a71333 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -62,7 +62,7 @@ dependencies: flutter_inappwebview: ^6.0.0 flutter_branch_sdk: ^7.1.0 socket_io_client: ^2.0.3+1 - web_socket_channel: ^3.0.0 + web_socket_channel: dev_dependencies: