import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; import 'package:glassmorphism/glassmorphism.dart'; import 'package:traderscircuit/Utils/Common/CommonAppbar.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/model/ExploreUnseenModel/explore_unseen_model.dart'; import 'package:traderscircuit/view/onBoarding/splashScreen1.dart'; import 'package:traderscircuit/view_model/ExploreApi/explore_api.dart'; class ExploreUnseen extends StatefulWidget { const ExploreUnseen({super.key}); @override State createState() => _ExploreUnseenState(); } class _ExploreUnseenState extends State { GlobalKey _scaffoldKey1 = GlobalKey(); ExploreModel exploreModel = ExploreModel(); RxBool isApiCalling = true.obs; @override void initState() { ExploreApi().getExploreData().then((value) { exploreModel = ExploreModel.fromJson(value.data); isApiCalling.value = false; }); super.initState(); } @override Widget build(BuildContext context) { return Scaffold( key: _scaffoldKey1, backgroundColor: Colors.black, extendBody: true, appBar: CommonAppbar(titleTxt: ''), body: Stack( children: [ CommonBlurLeft(), CommonBlurRight(), Obx( () => isApiCalling.value ? Center( child: CircularProgressIndicator( color: Color(0xFF0093FF),), ) : Stack( children: [ Padding( padding: EdgeInsets.symmetric( horizontal: 16, ), child: isApiCalling.value ? Center( child: CircularProgressIndicator( color: Color(0xFF0093FF),), ) : ListView( physics: BouncingScrollPhysics(), children: [ text22W600('Explore The Unseen'), sizedBoxHeight(35.h), ListView.builder( physics: NeverScrollableScrollPhysics(), shrinkWrap: true, itemCount: exploreModel.data! .exploreTheUnseenActiveCalls!.length, itemBuilder: (context, index) { return Column( children: [ commonGlassContainer( width: double.infinity, height: 176.h, borderradius: 8, customWidget: Column( children: [ Padding( padding: EdgeInsets.symmetric( vertical: 16.h, horizontal: 16.w), child: Row( children: [ GlassmorphicContainer( width: 47.w, height: 47.h, borderRadius: 100, blur: 10, alignment: Alignment.center, border: 0.9, linearGradient: const LinearGradient( begin: Alignment.topLeft, end: Alignment .bottomRight, colors: [ Color(0xff3A3A3A), Color(0xFF3A3A3A), ], ), borderGradient: const LinearGradient( begin: Alignment.topLeft, end: Alignment .bottomRight, colors: [ Color.fromRGBO( 70, 5, 1, 0.8), Color.fromRGBO(102, 102, 102, 0.8), ], ), child: Center( child: Image.asset( 'assets/images/png/square_TRIDENT_com 1.png'), ), ), sizedBoxWidth(15.w), text18W600( exploreModel.data! .exploreTheUnseenActiveCalls! .elementAt( index) .stockName ?? "", ), Spacer(), Container( width: 62.w, height: 25.h, decoration: BoxDecoration( borderRadius: BorderRadius .circular( 4.r), color: exploreModel .data! .exploreTheUnseenActiveCalls! .first .recommendationActionsXid == 1 ? Colors.green : exploreModel .data! .exploreTheUnseenActiveCalls! .first .recommendationActionsXid == 2 ? Colors.red : exploreModel .data! .exploreTheUnseenActiveCalls! .first .recommendationActionsXid == 3 ? const Color( 0xFFFFAD31) : Colors .white, // Color(0xFFFFAD31), ), child: Center( child: text16W400_1B1B1B(exploreModel .data! .exploreTheUnseenActiveCalls! .first .recommendationActionsXid == 1 ? "Buy" : exploreModel .data! .exploreTheUnseenActiveCalls! .first .recommendationActionsXid == 2 ? "Sell" : exploreModel.data!.exploreTheUnseenActiveCalls!.first.recommendationActionsXid == 3 ? "Hold" : exploreModel.data!.exploreTheUnseenActiveCalls!.first.recommendationActionsXid == 4 ? "Exit" : "")), ) ], ), ), Container( width: double.infinity, height: 1.h, color: Color(0xFF3A3A3A), ), Padding( padding: const EdgeInsets.all(20), child: Row( children: [ Column( crossAxisAlignment: CrossAxisAlignment .start, children: [ text14W400_979797( 'Initial Entry Price'), sizedBoxHeight(5.h), text15W600(exploreModel .data! .exploreTheUnseenActiveCalls! .elementAt( index) .buyPrice ?? "") ], ), Spacer(), // sizedBoxWidth(50.w), Column( crossAxisAlignment: CrossAxisAlignment .start, children: [ text14W400_979797( 'Report'), sizedBoxHeight(5.h), Row( children: [ // SvgPicture.asset('assets/images/svg/pdfsvg.svg'), Image.asset( 'assets/images/png/pdf.png', height: 20.h, width: 20.w, ), text15W600( "Download Pdf"), ], ) ], ) ], ), ) ], ), ), sizedBoxHeight(30.h), ], ); }, ), ], ), ), ], ), ) ], ), // bottomNavigationBar: bottomnavigationbar(mainController), ); } }