video player error
This commit is contained in:
@@ -97,7 +97,7 @@ class _MyAppState extends State<MyApp> with WidgetsBindingObserver {
|
||||
fontFamily: 'manrope',
|
||||
),
|
||||
debugShowCheckedModeBanner: false,
|
||||
initialRoute: RouteName.mainscreen,
|
||||
initialRoute: RouteName.contentbytes,
|
||||
getPages: AppRoutes.appRoutes(),
|
||||
),
|
||||
designSize: const Size(390, 844),
|
||||
|
||||
@@ -12,6 +12,7 @@ import 'package:traderscircuit/Utils/Common/sized_box.dart';
|
||||
import 'package:traderscircuit/Utils/text.dart';
|
||||
import 'package:traderscircuit/resources/routes/route_name.dart';
|
||||
import 'package:traderscircuit/view/MainScreen/MainScreen.dart';
|
||||
import 'package:traderscircuit/view/Sidemenu/PlayerWidget.dart';
|
||||
import 'package:traderscircuit/view/Sidemenu/Sidemenu.dart';
|
||||
import 'package:traderscircuit/view/onBoarding/splashScreen1.dart';
|
||||
|
||||
@@ -241,19 +242,26 @@ Widget ActiveCallsTab() {
|
||||
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,
|
||||
InkWell(
|
||||
onTap: () {
|
||||
Get.to(
|
||||
() => PlayerWidget(),
|
||||
);
|
||||
},
|
||||
child: 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,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
@@ -87,6 +87,7 @@ class _NotificationScreenState extends State<NotificationScreen> {
|
||||
),
|
||||
sizedBoxHeight(30.h),
|
||||
ListView.builder(
|
||||
physics: NeverScrollableScrollPhysics(),
|
||||
shrinkWrap: true,
|
||||
itemCount: CardList.length,
|
||||
itemBuilder: (context, index) {
|
||||
|
||||
@@ -35,7 +35,7 @@ class _HoldingsState extends State<Holdings> {
|
||||
key: _scaffoldKey1,
|
||||
backgroundColor: Colors.black,
|
||||
drawerEnableOpenDragGesture: false,
|
||||
drawer: Container(width: 320.w, child: SideMenu()),
|
||||
drawer: Container( child: SideMenu()),
|
||||
extendBody: true,
|
||||
appBar: AppBar(
|
||||
scrolledUnderElevation: 0.0,
|
||||
|
||||
@@ -26,7 +26,7 @@ class _PortfolioState extends State<Portfolio> {
|
||||
key: _scaffoldKey1,
|
||||
backgroundColor: Colors.black,
|
||||
drawerEnableOpenDragGesture: false,
|
||||
drawer: Container(width: 320.w, child: SideMenu()),
|
||||
drawer: Container(child: SideMenu()),
|
||||
extendBody: true,
|
||||
appBar: AppBar(
|
||||
scrolledUnderElevation: 0.0,
|
||||
|
||||
@@ -10,7 +10,9 @@ import 'package:traderscircuit/Utils/Common/commonBotton.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/resources/routes/route_name.dart';
|
||||
import 'package:traderscircuit/view/MainScreen/MainScreen.dart';
|
||||
import 'package:traderscircuit/view/Sidemenu/PlayerWidget.dart';
|
||||
import 'package:traderscircuit/view/Sidemenu/Sidemenu.dart';
|
||||
import 'package:traderscircuit/view/onBoarding/splashScreen1.dart';
|
||||
|
||||
@@ -168,7 +170,14 @@ class _ShortTradeState extends State<ShortTrade> {
|
||||
border: Border.all(
|
||||
color: Color(0xFF3A3A3A),
|
||||
)),
|
||||
child: Center(child: text16W500('View More')),
|
||||
child: Center(
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
Get.toNamed(RouteName.contentbytes);
|
||||
},
|
||||
child: text16W500('View More'),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -183,19 +192,24 @@ class _ShortTradeState extends State<ShortTrade> {
|
||||
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,
|
||||
InkWell(
|
||||
onTap: () {
|
||||
Get.to(PlayerWidget());
|
||||
},
|
||||
child: 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,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
@@ -589,7 +589,7 @@ class Videos extends StatelessWidget {
|
||||
sizedBoxHeight(20.h),
|
||||
InkWell(
|
||||
onTap: () {
|
||||
Get.to(PlayerWidget());
|
||||
Get.to(() => PlayerWidget());
|
||||
},
|
||||
child: commonGlassContainer(
|
||||
borderradius: 8,
|
||||
@@ -642,7 +642,9 @@ class Videos extends StatelessWidget {
|
||||
sizedBoxHeight(20.h),
|
||||
InkWell(
|
||||
onTap: () {
|
||||
Get.to(PlayerWidget());
|
||||
Get.to(() {
|
||||
PlayerWidget();
|
||||
});
|
||||
},
|
||||
child: commonGlassContainer(
|
||||
borderradius: 8,
|
||||
@@ -732,7 +734,9 @@ class Videos extends StatelessWidget {
|
||||
sizedBoxHeight(20.h),
|
||||
InkWell(
|
||||
onTap: () {
|
||||
Get.to(PlayerWidget());
|
||||
Get.to(() {
|
||||
PlayerWidget();
|
||||
});
|
||||
},
|
||||
child: commonGlassContainer(
|
||||
borderradius: 8,
|
||||
|
||||
@@ -14,54 +14,55 @@ class PlayerWidget extends StatefulWidget {
|
||||
class _PlayerWidgetState extends State<PlayerWidget> {
|
||||
late VideoPlayerController videoPlayerController;
|
||||
late ChewieController chewieController;
|
||||
bool isVideoIntialized = false;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
// TODO: implement initState
|
||||
super.initState();
|
||||
videoPlayerController = VideoPlayerController.networkUrl(Uri.parse(
|
||||
"https://flutter.github.io/assets-for-api-docs/assets/videos/bee.mp4"));
|
||||
_initializePlayer();
|
||||
}
|
||||
|
||||
_initializePlayer() async {
|
||||
videoPlayerController = VideoPlayerController.networkUrl(Uri.tryParse(
|
||||
"https://flutter.github.io/assets-for-api-docs/assets/videos/bee.mp4")!);
|
||||
|
||||
await videoPlayerController.initialize();
|
||||
initChewie();
|
||||
}
|
||||
|
||||
initChewie() {
|
||||
chewieController = ChewieController(
|
||||
videoPlayerController: videoPlayerController,
|
||||
autoPlay: true,
|
||||
looping: false);
|
||||
|
||||
videoPlayerController.initialize().then((value) {
|
||||
setState(() {
|
||||
isVideoIntialized = true;
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
if (isVideoIntialized) {
|
||||
return Scaffold(
|
||||
backgroundColor: Colors.black,
|
||||
appBar: AppBar(
|
||||
backgroundColor: Colors.black,
|
||||
leading: InkWell(
|
||||
onTap: () => Get.back(),
|
||||
child: Icon(
|
||||
Icons.arrow_back_ios,
|
||||
color: Colors.white,
|
||||
return videoPlayerController != null &&
|
||||
videoPlayerController.value.isInitialized
|
||||
? Scaffold(
|
||||
backgroundColor: Colors.black,
|
||||
appBar: AppBar(
|
||||
backgroundColor: Colors.black,
|
||||
leading: InkWell(
|
||||
onTap: () => Get.back(),
|
||||
child: Icon(
|
||||
Icons.arrow_back_ios,
|
||||
color: Colors.white,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
// CommonAppbar(titleTxt: ""),
|
||||
body: Center(
|
||||
child: AspectRatio(
|
||||
aspectRatio: videoPlayerController.value.aspectRatio,
|
||||
child: Chewie(
|
||||
controller: chewieController,
|
||||
// CommonAppbar(titleTxt: ""),
|
||||
body: Center(
|
||||
child: AspectRatio(
|
||||
aspectRatio: videoPlayerController.value.aspectRatio,
|
||||
child: Chewie(
|
||||
controller: chewieController,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
} else {
|
||||
return Center(child: CircularProgressIndicator());
|
||||
}
|
||||
)
|
||||
: Center(child: CircularProgressIndicator());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -183,7 +183,7 @@ class _SideMenuState extends State<SideMenu> {
|
||||
selected: true,
|
||||
onTap: () {
|
||||
setState(() {
|
||||
// Get.toNamed(RouteName.privacypolicy);
|
||||
Get.toNamed(RouteName.contentbytes);
|
||||
});
|
||||
},
|
||||
),
|
||||
@@ -254,7 +254,7 @@ class _SideMenuState extends State<SideMenu> {
|
||||
ListTile(
|
||||
leading: SvgPicture.asset(
|
||||
'assets/images/svg/sidemenu/Group 51347.svg'),
|
||||
title: text18W400('My Subscription'),
|
||||
title: text18W400('My Risk Profile'),
|
||||
trailing: Container(
|
||||
height: 35.h,
|
||||
width: 122.w,
|
||||
@@ -267,7 +267,7 @@ class _SideMenuState extends State<SideMenu> {
|
||||
selected: true,
|
||||
onTap: () {
|
||||
setState(() {
|
||||
// Get.toNamed(RouteName.privacypolicy);
|
||||
Get.toNamed(RouteName.updateriskprofile);
|
||||
});
|
||||
},
|
||||
),
|
||||
@@ -458,7 +458,14 @@ void navigateTo(int index, BuildContext context) {
|
||||
text20W400_center(
|
||||
'Are you sure you want to logout your account?'),
|
||||
sizedBoxHeight(50.h),
|
||||
CommonYesNoBtn(),
|
||||
CommonYesNoBtn(
|
||||
yesonTap: () {
|
||||
Get.toNamed(RouteName.loginscreen);
|
||||
},
|
||||
noonTap: () {
|
||||
Get.back();
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
@@ -109,7 +109,9 @@ class _AddDetailsState extends State<AddDetails> {
|
||||
SizedBox(
|
||||
height: 15.h,
|
||||
),
|
||||
CustomTextFormField(),
|
||||
CustomTextFormField(
|
||||
texttype: TextInputType.emailAddress,
|
||||
),
|
||||
SizedBox(
|
||||
height: 30.h,
|
||||
),
|
||||
@@ -121,7 +123,9 @@ class _AddDetailsState extends State<AddDetails> {
|
||||
SizedBox(
|
||||
height: 15.h,
|
||||
),
|
||||
CustomTextFormField(),
|
||||
CustomTextFormField(
|
||||
texttype: TextInputType.phone,
|
||||
),
|
||||
SizedBox(
|
||||
height: 30.h,
|
||||
),
|
||||
|
||||
@@ -366,7 +366,9 @@ class _KycState extends State<Kyc> {
|
||||
SizedBox(
|
||||
height: 15.h,
|
||||
),
|
||||
const CustomTextFormField(),
|
||||
const CustomTextFormField(
|
||||
texttype: TextInputType.phone,
|
||||
),
|
||||
SizedBox(
|
||||
height: 30.h,
|
||||
),
|
||||
|
||||
@@ -309,8 +309,13 @@ class _LoginScreenState extends State<LoginScreen> {
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
text16W700(
|
||||
"Continue as guest",
|
||||
InkWell(
|
||||
onTap: () {
|
||||
Get.toNamed(RouteName.mainscreen);
|
||||
},
|
||||
child: text16W700(
|
||||
"Continue as guest",
|
||||
),
|
||||
),
|
||||
],
|
||||
)
|
||||
|
||||
@@ -8,7 +8,6 @@ import 'package:traderscircuit/Utils/Common/commonBotton.dart';
|
||||
import 'package:traderscircuit/Utils/text.dart';
|
||||
import 'package:traderscircuit/resources/routes/route_name.dart';
|
||||
import 'package:traderscircuit/view/onBoarding/splashScreen1.dart';
|
||||
import 'package:traderscircuit/Utils/Dialogs.dart';
|
||||
|
||||
class VerifyOTP extends StatefulWidget {
|
||||
const VerifyOTP({super.key});
|
||||
@@ -51,6 +50,8 @@ class _VerifyOTPState extends State<VerifyOTP> {
|
||||
child: PinCodeTextField(
|
||||
showCursor: true,
|
||||
cursorColor: Colors.white,
|
||||
hintStyle:
|
||||
TextStyle(fontSize: 18.sp, color: Colors.white),
|
||||
textStyle:
|
||||
TextStyle(fontSize: 18.sp, color: Colors.white),
|
||||
errorTextSpace: 22,
|
||||
|
||||
Reference in New Issue
Block a user