195 lines
6.4 KiB
Dart
195 lines
6.4 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
import 'package:flutter_svg/svg.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/Common/text.dart';
|
|
import 'package:traderscircuit/view/Sidemenu/Sidemenu.dart';
|
|
import 'package:traderscircuit/view/onBoarding/splashScreen1.dart';
|
|
|
|
class ShortTrade extends StatefulWidget {
|
|
const ShortTrade({super.key});
|
|
|
|
@override
|
|
State<ShortTrade> createState() => _ShortTradeState();
|
|
}
|
|
|
|
class _ShortTradeState extends State<ShortTrade> {
|
|
GlobalKey<ScaffoldState> _scaffoldKey1 = GlobalKey<ScaffoldState>();
|
|
List<String> containerTexts = ["Container 1", "Container 2", "Container 3"];
|
|
var selectedIndex = 0.obs;
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Scaffold(
|
|
key: _scaffoldKey1,
|
|
backgroundColor: Colors.black,
|
|
drawer: Container(width: 320.w, child: SideMenu()),
|
|
extendBody: true,
|
|
appBar: CommonAppbar(
|
|
titleTxt: '',
|
|
preferredSize: Size.fromHeight(60.h),
|
|
showLeading: false,
|
|
customleading: InkWell(
|
|
onTap: () {
|
|
_scaffoldKey1.currentState?.openDrawer();
|
|
},
|
|
child: Center(
|
|
child: Image.asset(
|
|
'assets/images/png/menu.png',
|
|
height: 15.h,
|
|
width: 20.w,
|
|
),
|
|
),
|
|
// Icon(
|
|
// Icons.menu,
|
|
// color: Colors.white,
|
|
// size: 27.sp,
|
|
// ),
|
|
),
|
|
),
|
|
body: Stack(children: [
|
|
CommonBlurLeft(),
|
|
CommonBlurRight(),
|
|
Stack(children: [
|
|
Padding(
|
|
padding: EdgeInsets.symmetric(horizontal: 16, vertical: 16),
|
|
child: ListView(physics: BouncingScrollPhysics(), children: [
|
|
sizedBoxHeight(20.h),
|
|
cardSwingWidget(
|
|
text: 'Indiabulls Housing Finance Ltd',
|
|
amount: '₹ 196.50 - ₹ 197',
|
|
pdfname: '₹ 204'),
|
|
sizedBoxHeight(20.h),
|
|
// ListView.builder(
|
|
// shrinkWrap: true,
|
|
// scrollDirection: Axis.vertical,
|
|
// itemCount: containerTexts.length,
|
|
// itemBuilder: (context, index) {
|
|
// return topContainer(containerTexts[index], index);
|
|
// },
|
|
// )
|
|
]))
|
|
])
|
|
]));
|
|
}
|
|
|
|
Widget cardSwingWidget(
|
|
{required String text, required String amount, required String pdfname}) {
|
|
return commonGlassContainer(
|
|
width: double.infinity,
|
|
height: 251.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: LinearGradient(
|
|
begin: Alignment.topLeft,
|
|
end: Alignment.bottomRight,
|
|
colors: [
|
|
Color(0xff3A3A3A),
|
|
Color(0xFF3A3A3A),
|
|
],
|
|
),
|
|
borderGradient: 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(text),
|
|
Spacer(),
|
|
Container(
|
|
width: 62.w,
|
|
height: 25.h,
|
|
decoration: BoxDecoration(
|
|
borderRadius: BorderRadius.circular(4.r),
|
|
color: Color(0xFFFFAD31),
|
|
),
|
|
child: Center(child: text16W400_1B1B1B('Hold')),
|
|
)
|
|
],
|
|
),
|
|
),
|
|
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(amount)
|
|
],
|
|
),
|
|
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 (1) 1.png'),
|
|
text15W600(pdfname),
|
|
],
|
|
)
|
|
],
|
|
)
|
|
],
|
|
),
|
|
)
|
|
],
|
|
),
|
|
);
|
|
}
|
|
|
|
Widget topContainer(String text, int index) {
|
|
return Obx(() {
|
|
return selectedIndex.value == index
|
|
? Container(
|
|
height: 40,
|
|
width: 126,
|
|
decoration: BoxDecoration(
|
|
borderRadius: BorderRadius.circular(5),
|
|
color: Color(0Xff6C0000),
|
|
),
|
|
child: Center(child: Text(text)),
|
|
)
|
|
: commonGlassContainer(
|
|
width: 126,
|
|
height: 40,
|
|
borderradius: 5,
|
|
customWidget: Center(child: Text(text)),
|
|
);
|
|
});
|
|
}
|
|
}
|