diff --git a/gsf/ios/Podfile.lock b/gsf/ios/Podfile.lock index 2c5e489..780034f 100644 --- a/gsf/ios/Podfile.lock +++ b/gsf/ios/Podfile.lock @@ -357,4 +357,4 @@ SPEC CHECKSUMS: PODFILE CHECKSUM: a4ad73d8b0c939a70a630a3969a613f644c04b40 -COCOAPODS: 1.13.0 +COCOAPODS: 1.15.2 diff --git a/gsf/ios/Runner.xcodeproj/project.pbxproj b/gsf/ios/Runner.xcodeproj/project.pbxproj index 312d42b..edd0bb4 100644 --- a/gsf/ios/Runner.xcodeproj/project.pbxproj +++ b/gsf/ios/Runner.xcodeproj/project.pbxproj @@ -27,7 +27,7 @@ 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; - EAC2B08A5EF3DB337047B851 /* BuildFile in Frameworks */ = {isa = PBXBuildFile; }; + EAC2B08A5EF3DB337047B851 /* (null) in Frameworks */ = {isa = PBXBuildFile; }; F28142B6420A67828003E26E /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 559CD4C37425C2E8E38C2D7D /* Pods_Runner.framework */; }; /* End PBXBuildFile section */ @@ -58,7 +58,7 @@ /* Begin PBXFileReference section */ 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; - 1AF7D2912B8C725000853315 /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = "GoogleService-Info.plist"; path = "../../../../../../Documents/WDI IMP/gsf/GoogleService-Info.plist"; sourceTree = ""; }; + 1AF7D2912B8C725000853315 /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = ""; }; 220B64C42A7253A2006E498E /* Runner.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Runner.entitlements; sourceTree = ""; }; 227E281E2AA8694400B81730 /* OneSignalNotificationServiceExtension.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = OneSignalNotificationServiceExtension.appex; sourceTree = BUILT_PRODUCTS_DIR; }; 227E28202AA8694400B81730 /* NotificationService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NotificationService.swift; sourceTree = ""; }; @@ -77,6 +77,7 @@ 529068B22A8E58A4004ABCB1 /* AdSupport.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AdSupport.framework; path = System/Library/Frameworks/AdSupport.framework; sourceTree = SDKROOT; }; 529068B42A8E58AF004ABCB1 /* StoreKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = StoreKit.framework; path = System/Library/Frameworks/StoreKit.framework; sourceTree = SDKROOT; }; 529068B62A8E58B7004ABCB1 /* LinkPresentation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = LinkPresentation.framework; path = System/Library/Frameworks/LinkPresentation.framework; sourceTree = SDKROOT; }; + 52C0E9972BCD0407007842BA /* GoogleService-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = "GoogleService-Info.plist"; path = "Runner/GoogleService-Info.plist"; sourceTree = ""; }; 559CD4C37425C2E8E38C2D7D /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 635852FDE7F8B5A361609B82 /* Pods_OneSignalNotificationServiceExtension.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_OneSignalNotificationServiceExtension.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 73E7677E7BC1C1EB29CDF77C /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; @@ -117,7 +118,7 @@ 529068A72A8E5864004ABCB1 /* CoreServices.framework in Frameworks */, 529068A52A8E5706004ABCB1 /* BranchSDK in Frameworks */, 529068B82A8F4849004ABCB1 /* WebKit.framework in Frameworks */, - EAC2B08A5EF3DB337047B851 /* BuildFile in Frameworks */, + EAC2B08A5EF3DB337047B851 /* (null) in Frameworks */, F28142B6420A67828003E26E /* Pods_Runner.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; @@ -150,6 +151,7 @@ 9740EEB11CF90186004384FC /* Flutter */ = { isa = PBXGroup; children = ( + 52C0E9972BCD0407007842BA /* GoogleService-Info.plist */, 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, 9740EEB21CF90195004384FC /* Debug.xcconfig */, 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, diff --git a/gsf/ios/Runner.xcworkspace/xcshareddata/swiftpm/Package.resolved b/gsf/ios/Runner.xcworkspace/xcshareddata/swiftpm/Package.resolved index 3966d58..5bf1daa 100644 --- a/gsf/ios/Runner.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/gsf/ios/Runner.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -1,4 +1,5 @@ { + "originHash" : "da338c7d827a9f8b10177e484783685675c8dff84a9dc59a904db0c53122e9f5", "pins" : [ { "identity" : "ios-branch-sdk-spm", @@ -10,5 +11,5 @@ } } ], - "version" : 2 + "version" : 3 } diff --git a/gsf/ios/Runner/Info.plist b/gsf/ios/Runner/Info.plist index 40091c5..f4358f4 100644 --- a/gsf/ios/Runner/Info.plist +++ b/gsf/ios/Runner/Info.plist @@ -23,7 +23,7 @@ CFBundlePackageType APPL CFBundleShortVersionString - 1.4 + 1.4.1 CFBundleSignature ???? CFBundleURLTypes diff --git a/gsf/lib/main.dart b/gsf/lib/main.dart index 4ff0a8f..d87e352 100644 --- a/gsf/lib/main.dart +++ b/gsf/lib/main.dart @@ -13,7 +13,6 @@ import 'package:gsp_app/scale/utils/local_storage.dart'; import 'package:gsp_app/view_model/StepcountController.dart'; import 'package:gsp_app/view_model/Stepcounts.dart'; import 'package:gsp_app/view_model/app_data_controller.dart'; -import 'package:gsp_app/views/pages/StepCount/HealthApp.dart'; import 'package:gsp_app/views/pages/splash.dart'; import 'package:gsp_app/views/theme.dart'; import 'package:icdevicemanager_flutter/ic_bluetooth_sdk.dart'; @@ -24,7 +23,6 @@ import 'package:pedometer/pedometer.dart'; import 'package:permission_handler/permission_handler.dart'; import 'package:shared_preferences/shared_preferences.dart'; import 'views/pages/intro/get_started.dart'; -import 'views/pages/test/age_defined.dart'; import 'views/short_video_player/svp_lib/injection.dart'; Future main() async { diff --git a/gsf/lib/views/pages/MenstrualCycleTracker/TrackerHomePage.dart b/gsf/lib/views/pages/MenstrualCycleTracker/TrackerHomePage.dart index b91bfab..4dfbdf6 100644 --- a/gsf/lib/views/pages/MenstrualCycleTracker/TrackerHomePage.dart +++ b/gsf/lib/views/pages/MenstrualCycleTracker/TrackerHomePage.dart @@ -86,12 +86,12 @@ class _TrackerHomePageState extends State { future: StoringDates().getAllList(), builder: (ctx, snapshot) { if (snapshot.connectionState == ConnectionState.waiting) { - return Center(child: CircularProgressIndicator()); + return const Center(child: CircularProgressIndicator()); } else if (snapshot.hasError) { return Center( child: Text( '${snapshot.error} occurred', - style: TextStyle(fontSize: 18), + style: const TextStyle(fontSize: 18), ), ); } @@ -103,7 +103,7 @@ class _TrackerHomePageState extends State { helperController.calculatePeriodDateForCalender(); } // } - + helperController.observableDateTimeOnTrackerHomePage.value = DateFormat('dd MMMM').format(DateTime.now()); // helperController.calculatePeriodDateForCalender(); @@ -182,15 +182,15 @@ class _TrackerHomePageState extends State { .value != null ? Padding( - padding: - EdgeInsets.only(left: 15), + padding: const EdgeInsets.only( + left: 15), child: Text( DateFormat('dd MMMM').format( helperController .predictedPeriodCycleForHomePage .value!), - style: - TextStyle(fontSize: 14), + style: const TextStyle( + fontSize: 14), ), ) : const Padding( @@ -302,8 +302,8 @@ class _TrackerHomePageState extends State { const SizedBox( width: 7, ), - Flexible( - child: const Text( + const Flexible( + child: Text( "Ovulation Date:", style: TextStyle(fontSize: 16), ), @@ -318,15 +318,16 @@ class _TrackerHomePageState extends State { .value != null ? Padding( - padding: EdgeInsets.only(left: 15), + padding: + const EdgeInsets.only(left: 15), child: Text( DateFormat('dd MMMM').format( helperController .ovulatingDate.last!), - style: TextStyle(fontSize: 14), + style: const TextStyle(fontSize: 14), ), ) - : Padding( + : const Padding( padding: EdgeInsets.only(left: 20), child: Text( "Not Tracking", @@ -409,7 +410,7 @@ class _TrackerHomePageState extends State { ), Positioned( bottom: 85, - right: 40, + right: 52, child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ @@ -452,7 +453,7 @@ class _TrackerHomePageState extends State { onTap: () { Get.to(() => const OverviewPage()); }, - child: Text( + child: const Text( "Overview", style: TextStyle( color: Color.fromRGBO(0, 0, 0, 1), @@ -495,7 +496,7 @@ class _TrackerHomePageState extends State { Obx(() => !helperController.endOfCycle.value ? const Text("Start of new Cycle") : helperController.disabledNext.value - ? Text("Not tracking") + ? const Text("Not tracking") : const Text("")), const SizedBox( height: 80, diff --git a/gsf/lib/views/pages/sidebar.dart b/gsf/lib/views/pages/sidebar.dart index 2a3e02a..39885b5 100644 --- a/gsf/lib/views/pages/sidebar.dart +++ b/gsf/lib/views/pages/sidebar.dart @@ -27,7 +27,6 @@ import 'faq/about_gsf.dart'; import 'faq/about_gsf_accordian.dart'; import 'insta/insta_clip_list.dart'; import 'insta/insta_web_view.dart'; -import 'test/upcoming_data_utc.dart'; class AppDrawer extends StatefulWidget { const AppDrawer({Key? key}) : super(key: key); @@ -144,17 +143,17 @@ class _AppDrawerState extends State { }, false), const SizedBox(height: 15), - // menuWidget('quiz', 'Menstrual cycle tracker', () { - // final isFilled = StorageService().readinitialSetup(); - // if (isFilled) { - // Get.back(); - // Get.to(() => TrackerHomePage()); - // } else { - // Get.back(); - // Get.to(() => const PeriodSelection()); - // } - // }, false), - // const SizedBox(height: 15), + menuWidget('quiz', 'Menstrual cycle tracker', () { + final isFilled = StorageService().readinitialSetup(); + if (isFilled) { + Get.back(); + Get.to(() => TrackerHomePage()); + } else { + Get.back(); + Get.to(() => const PeriodSelection()); + } + }, false), + const SizedBox(height: 15), // menuWidget('rank', 'LeaderBoard', () { // homePageController.updateBottomNavIndex(3); diff --git a/gsf/lib/views/pages/test/accordian.dart b/gsf/lib/views/pages/test/accordian.dart deleted file mode 100644 index a5ec10e..0000000 --- a/gsf/lib/views/pages/test/accordian.dart +++ /dev/null @@ -1,74 +0,0 @@ -import 'package:flutter/material.dart'; - -class AccordionExample extends StatefulWidget { - @override - _AccordionExampleState createState() => _AccordionExampleState(); -} - -class _AccordionExampleState extends State { - List _data = generateItems(5); - - @override - Widget build(BuildContext context) { - return Scaffold( - appBar: AppBar( - title: Text('Accordion Example'), - ), - body: SingleChildScrollView( - child: Container( - padding: EdgeInsets.all(16.0), - child: _buildPanel(), - ), - ), - ); - } - - Widget _buildPanel() { - return ExpansionPanelList( - elevation: 1, - expandedHeaderPadding: EdgeInsets.all(0), - expansionCallback: (int index, bool isExpanded) { - setState(() { - _data.forEach((item) { - item.isExpanded = false; - }); - _data[index].isExpanded = !isExpanded; - }); - }, - children: _data.map((Item item) { - return ExpansionPanel( - headerBuilder: (BuildContext context, bool isExpanded) { - return ListTile( - title: Text(item.headerValue), - ); - }, - body: ListTile( - title: Text(item.expandedValue), - ), - isExpanded: item.isExpanded, - ); - }).toList(), - ); - } -} - -class Item { - Item({ - required this.expandedValue, - required this.headerValue, - this.isExpanded = false, - }); - - String expandedValue; - String headerValue; - bool isExpanded; -} - -List generateItems(int count) { - return List.generate(count, (int index) { - return Item( - headerValue: 'Week ${index + 1}', - expandedValue: 'This is item number $index', - ); - }); -} diff --git a/gsf/lib/views/pages/test/age_calculator.dart b/gsf/lib/views/pages/test/age_calculator.dart deleted file mode 100644 index e53bed8..0000000 --- a/gsf/lib/views/pages/test/age_calculator.dart +++ /dev/null @@ -1,72 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:intl/intl.dart'; - - - -class AgeCalculator extends StatefulWidget { - const AgeCalculator({super.key}); - - @override - State createState() => _AgeCalculatorState(); -} - -class _AgeCalculatorState extends State { - final dateController = TextEditingController(); - String age = '0'; - - @override - void dispose() { - // Clean up the controller when the widget is removed - dateController.dispose(); - super.dispose(); - } - - String calculateAge(DateTime birthDate) { - DateTime currentDate = DateTime.now(); - int age = currentDate.year - birthDate.year; - int month1 = currentDate.month; - int month2 = birthDate.month; - if (month2 > month1) { - age--; - } else if (month1 == month2) { - int day1 = currentDate.day; - int day2 = birthDate.day; - if (day2 > day1) { - age--; - } - } - return age.toString(); - } - - @override - Widget build(BuildContext context) { - return Scaffold( - appBar: AppBar( - title: const Text('Flutter Date Picker Example'), - ), - body: Padding( - padding: const EdgeInsets.all(16.0), - child: Center( - child: Column(children: [ - TextField( - readOnly: true, - controller: dateController, - decoration: const InputDecoration(hintText: 'Pick your Date'), - onTap: () async { - var date = await showDatePicker( - context: context, - initialDate: DateTime.now(), - firstDate: DateTime(1900), - lastDate: DateTime(2100)); - if (date != null) { - setState(() { - age = calculateAge(date); - }); - dateController.text = DateFormat('dd/MM/yyyy').format(date); - } - }, - ), - Text('You are $age years old!') - ])))); - } -} \ No newline at end of file diff --git a/gsf/lib/views/pages/test/age_defined.dart b/gsf/lib/views/pages/test/age_defined.dart deleted file mode 100644 index 85f0146..0000000 --- a/gsf/lib/views/pages/test/age_defined.dart +++ /dev/null @@ -1,131 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:intl/intl.dart'; - -void main() { - runApp(const MyApp()); -} - -class MyApp extends StatelessWidget { - const MyApp({super.key}); - - @override - Widget build(BuildContext context) { - return MaterialApp( - title: 'Age Calculator', - theme: ThemeData( - primarySwatch: Colors.blue, - ), - home: AgeInputForm(), - ); - } -} - -class AgeInputForm extends StatefulWidget { - const AgeInputForm({super.key}); - - @override - _AgeInputFormState createState() => _AgeInputFormState(); -} - -class _AgeInputFormState extends State { - DateTime? _selectedDate; - final TextEditingController _ageController = TextEditingController(); - - void _selectDate(BuildContext context) async { - final DateTime? picked = await showDatePicker( - context: context, - initialDate: _selectedDate ?? DateTime.now(), - firstDate: DateTime(1900), - lastDate: DateTime.now(), - ); - - if (picked != null && picked != _selectedDate) { - setState( - () { - _selectedDate = picked; - final today = DateTime.now(); - final age = today.year - - _selectedDate!.year - - ((today.month > _selectedDate!.month || - (today.month == _selectedDate!.month && - today.day >= _selectedDate!.day)) - ? 0 - : 1); - _ageController.text = age.toString(); - }, - ); - } - } - - @override - Widget build(BuildContext context) { - return Scaffold( - appBar: AppBar( - title: Text('Age Calculator'), - ), - body: Padding( - padding: const EdgeInsets.all(16.0), - child: Form( - child: Column( - children: [ - FormField( - builder: (state) { - return InputDecorator( - decoration: InputDecoration( - labelText: 'Select your birthdate', - errorText: state.errorText, - ), - child: Row( - children: [ - Expanded( - child: Text( - _selectedDate != null - ? DateFormat('yyyy-MM-dd') - .format(_selectedDate!) - : 'Select your birthdate', - ), - ), - IconButton( - icon: Icon(Icons.calendar_today), - onPressed: () => _selectDate(context), - ), - ], - ), - ); - }, - validator: (value) { - if (value == null) { - return 'Please select your birthdate'; - } - return null; - }, - ), - SizedBox(height: 20.0), - TextFormField( - controller: _ageController, - keyboardType: TextInputType.number, - readOnly: true, - decoration: InputDecoration( - labelText: 'Age', - ), - ), - SizedBox(height: 20.0), - ElevatedButton( - onPressed: () { - // Handle form submission if needed - }, - child: Text('Submit'), - ), - ], - ), - ), - ), - ); - } - - @override - void dispose() { - _ageController.dispose(); - super.dispose(); - } -} diff --git a/gsf/lib/views/pages/test/animated_counter_clock.dart b/gsf/lib/views/pages/test/animated_counter_clock.dart deleted file mode 100644 index 281d2fc..0000000 --- a/gsf/lib/views/pages/test/animated_counter_clock.dart +++ /dev/null @@ -1,122 +0,0 @@ -import 'package:blobs/blobs.dart'; -import 'package:flutter/material.dart'; -import 'package:gsp_app/views/theme.dart'; -import 'package:intl/intl.dart'; -// import 'package:flutter_countdown_timer/index.dart'; -import 'package:slide_countdown/slide_countdown.dart'; -import '../../components/appbar.dart'; - -class AnimatedCounterClock extends StatefulWidget { - // final String activityTitle; - final dynamic timer; - const AnimatedCounterClock({Key? key, required this.timer}) : super(key: key); - - @override - State createState() => _AnimatedCounterClockState(); -} - -class _AnimatedCounterClockState extends State { - // late int timeDuration; - - BlobController blobCtrl = BlobController(); - @override - Widget build(BuildContext context) { - // print('Widget timer ${widget.timer}'); - - // chnage the datetime formate start - - // final dateStr = widget.timer; - // final newDateFormat = "yyyy, MM, dd"; - // final parsedDate = DateTime.parse(dateStr); - // final formattedDate = - // DateFormat(newDateFormat).format(parsedDate).split(','); - // print('formattedDate ${formattedDate.runtimeType}'); - - // List dateNew = formattedDate; - // List intList = dateNew.map((str) => int.parse(str)).toList(); - - // print('DATE NEW $dateNew'); - // final newYear = int.parse(dateNew[0]); - // final newMonth = int.parse(dateNew[1]); - // final newDay = int.parse(dateNew[2]); - // print('New year ${newDay}'); - - // var dateInt = DateTime.parse(widget.timer); - - // chnage the datetime formate end - - // final currentDate = DateTime.now(); - // final targetDate = DateTime(newYear, newMonth, 18); - // print('targeted date ${targetDate.runtimeType}'); - - // final duration = targetDate.difference(currentDate); - // final days = duration.inDays; - // final hours = duration.inHours.remainder(24); - // final minutes = duration.inMinutes.remainder(60); - // final seconds = duration.inSeconds.remainder(60); - - return Scaffold( - appBar: PreferredSize( - preferredSize: const Size.fromHeight(60), - child: CustomAppBars(titleHead: 'Animated Counter Clock'), - ), - body: Center( - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - const Spacer( - flex: 4, - ), - // Lottie.asset('assets/lottie/timer.json', height: 200), - Blob.animatedRandom( - loop: true, - size: 400, - edgesCount: 9, - minGrowth: 7, - controller: blobCtrl, - duration: const Duration(milliseconds: 1500), - styles: BlobStyles(color: ColorConstants.kPrimaryColor), - child: Center( - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - const Text( - 'We will go live\n within', - style: TextStyle( - fontSize: 18, - color: ColorConstants.kBlack, - ), - textAlign: TextAlign.center, - ), - const SizedBox(height: 10), - // Text( - // '${widget.timer} Days', - // style: TextStyle( - // fontSize: 25, - // color: ColorConstants.kBlack, - // ), - // ), - SlideCountdown( - duration: Duration(days: int.parse(widget.timer)), - decoration: - const BoxDecoration(color: Colors.transparent), - textStyle: const TextStyle( - color: ColorConstants.kBlack, fontSize: 30), - separatorStyle: const TextStyle( - color: ColorConstants.kBlack, fontSize: 30), - ) - ], - ), - ), - ), - const Spacer( - flex: 7, - ), - ], - ), - ), - ); - } -} diff --git a/gsf/lib/views/pages/test/animation.dart b/gsf/lib/views/pages/test/animation.dart deleted file mode 100644 index 0ae5311..0000000 --- a/gsf/lib/views/pages/test/animation.dart +++ /dev/null @@ -1,170 +0,0 @@ -import 'package:animations/animations.dart'; -import 'package:flutter/material.dart'; - -class Test1 extends StatefulWidget { - const Test1({Key? key}) : super(key: key); - - @override - State createState() => _Test1State(); -} - -class _Test1State extends State { - ContainerTransitionType transitionType = ContainerTransitionType.fade; - void _showMarkedAsDoneSnackbar(bool? isMarkedAsDone) {} - - @override - Widget build(BuildContext context) { - return Scaffold( - appBar: AppBar( - title: Text( - 'Animation Test', - style: TextStyle(fontSize: 20, color: Colors.white), - )), - body: Column( - children: [ - OpenContainer( - transitionType: ContainerTransitionType.fade, - transitionDuration: Duration(seconds: 1), - openBuilder: (BuildContext context, VoidCallback _) { - return const DetailsPage(); - }, - onClosed: _showMarkedAsDoneSnackbar, - tappable: false, - // closedBuilder: (context, action) { - // return Text('Close Builder action perform here'); - // }, - closedBuilder: (BuildContext _, VoidCallback openContainer) { - return _ExampleCard(openContainer: openContainer); - }, - ), - ], - ), - ); - } -} - -class OpenContainerWrapper extends StatelessWidget { - const OpenContainerWrapper({ - required this.closedBuilder, - required this.transitionType, - required this.onClosed, - }); - - final CloseContainerBuilder closedBuilder; - final ContainerTransitionType transitionType; - final ClosedCallback onClosed; - - @override - Widget build(BuildContext context) { - return OpenContainer( - transitionType: transitionType, - openBuilder: (BuildContext context, VoidCallback _) { - return const DetailsPage(); - }, - onClosed: onClosed, - tappable: false, - closedBuilder: closedBuilder, - ); - } -} - -class DetailsPage extends StatelessWidget { - const DetailsPage({this.includeMarkAsDoneButton = true}); - - final bool includeMarkAsDoneButton; - - @override - Widget build(BuildContext context) { - return Scaffold( - appBar: AppBar( - title: const Text('Details page'), - ), - body: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Container( - color: Colors.black38, - height: 250, - width: MediaQuery.of(context).size.width, - child: Padding( - padding: const EdgeInsets.all(70.0), - child: Image.asset( - 'assets/placeholder_image.png', - ), - ), - ), - Padding( - padding: const EdgeInsets.all(20.0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - 'Title', - style: Theme.of(context).textTheme.headlineSmall!.copyWith( - color: Colors.black54, - fontSize: 30.0, - ), - ), - const SizedBox(height: 10), - Text( - '_loremIpsumParagraph', - style: Theme.of(context).textTheme.bodyMedium!.copyWith( - color: Colors.black54, - height: 1.5, - fontSize: 16.0, - ), - ), - ], - ), - ), - ], - ), - ); - } -} - -class _ExampleCard extends StatelessWidget { - const _ExampleCard({required this.openContainer}); - - final VoidCallback openContainer; - - @override - Widget build(BuildContext context) { - return InkWell( - onTap: openContainer, - child: Column( - crossAxisAlignment: CrossAxisAlignment.stretch, - children: [ - Container( - color: Colors.black38, - child: Center( - child: Image.asset( - 'assets/placeholder_image.png', - width: 100, - ), - ), - ), - const ListTile( - title: Text('Title'), - subtitle: Text('Secondary text'), - ), - Padding( - padding: const EdgeInsets.only( - left: 16.0, - right: 16.0, - bottom: 16.0, - ), - child: Text( - 'Lorem ipsum dolor sit amet, consectetur ' - 'adipiscing elit, sed do eiusmod tempor.', - style: Theme.of(context) - .textTheme - .bodyMedium! - .copyWith(color: Colors.black54), - ), - ), - ], - ), - ); - } -} diff --git a/gsf/lib/views/pages/test/blobs.dart b/gsf/lib/views/pages/test/blobs.dart deleted file mode 100644 index 05114c8..0000000 --- a/gsf/lib/views/pages/test/blobs.dart +++ /dev/null @@ -1,74 +0,0 @@ -// import 'package:flutter/material.dart'; -// import 'package:blobs/blobs.dart'; -// import 'package:get/get.dart'; -// import 'package:slide_countdown/slide_countdown.dart'; - -// import '../../theme.dart'; - -// class Blobs extends StatelessWidget { -// const Blobs({super.key}); - -// @override -// Widget build(BuildContext context) { -// BlobController blobCtrl = BlobController(); -// // final days = 3; - -// final currentDate = DateTime.now(); -// final targetDate = DateTime(2023, 7, 18); - -// final duration = targetDate.difference(currentDate); -// final days = duration.inDays; -// final hours = duration.inHours.remainder(24); -// final minutes = duration.inMinutes.remainder(60); -// final seconds = duration.inSeconds.remainder(60); - -// final formattedTime = '$days, $hours, $minutes, $seconds'; - -// return Scaffold( -// body: Center( -// child: Blob.animatedRandom( -// loop: true, -// size: 400, -// edgesCount: 9, -// minGrowth: 7, -// controller: blobCtrl, -// duration: const Duration(milliseconds: 1500), -// styles: BlobStyles(color: const Color(0xffB33771)), -// child: Column( -// mainAxisAlignment: MainAxisAlignment.center, -// crossAxisAlignment: CrossAxisAlignment.center, -// children: [ -// const Text( -// 'Take a breath we will\n go live within', -// style: TextStyle( -// fontSize: 16, -// color: ColorConstants.kBlack, -// ), -// textAlign: TextAlign.center, -// ), -// Text( -// '${days} Days', -// style: TextStyle( -// fontSize: 25, -// color: ColorConstants.kBlack, -// ), -// ), -// SlideCountdown( -// duration: Duration( -// days: days, -// hours: hours, -// minutes: minutes, -// seconds: seconds), -// decoration: const BoxDecoration(color: Colors.transparent), -// textStyle: -// const TextStyle(color: ColorConstants.kBlack, fontSize: 30), -// separatorStyle: -// const TextStyle(color: ColorConstants.kBlack, fontSize: 30), -// ) -// ], -// ), -// ), -// ), -// ); -// } -// } diff --git a/gsf/lib/views/pages/test/bottom_nav.dart b/gsf/lib/views/pages/test/bottom_nav.dart deleted file mode 100644 index c799aef..0000000 --- a/gsf/lib/views/pages/test/bottom_nav.dart +++ /dev/null @@ -1,248 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:flutter_svg/flutter_svg.dart'; -import 'package:get/get.dart'; -import 'package:gsp_app/view_model/bottom_navigation_controller.dart'; -import 'package:gsp_app/views/pages/signIn/sign_in.dart'; - -import '../../../view_model/home_controller.dart'; -import '../../../view_model/home_page_controller.dart'; -import '../../theme.dart'; -import 'bottomnvigation_controller.dart'; - -class BottomNavigations extends StatefulWidget { - const BottomNavigations({ - Key? key, - // required this.three, - // required this.four, - // required this.five, - // required this.six, - // required this.seven, - }) : super(key: key); - // final GlobalKey three; - // final GlobalKey four; - // final GlobalKey five; - // final GlobalKey six; - // final GlobalKey seven; - - @override - State createState() => _BottomNavigationsState(); -} - -class _BottomNavigationsState extends State { - final NavigationCrontrollers navControllerTest = Get.find(); - int _selectedIndex = 0; - HomePageController homePageController = Get.put(HomePageController()); - final TabsController controller = TabsController(); - - void _onItemTapped(int index) { - HomePageController.SessionsActiveTabIndex = 0; - homePageController.updateBottomNavIndex(index); - } - - @override - void initState() { - super.initState(); - _selectedIndex = homePageController.bottomNavIndex.value; - } - - void ontaps() { - if (controller.isLoggedIn) { - _selectedIndex; - } else { - Get.to(() => const SignIn()); - } - } - - @override - Widget build(BuildContext context) { - final brightness = Get.theme.brightness; - double iconSize = 24; - return Theme( - data: Get.theme.copyWith(), - child: Container( - decoration: BoxDecoration( - boxShadow: [ - BoxShadow( - color: ColorConstants.kBlack.withOpacity(0.6), - blurRadius: 10, - spreadRadius: 2, - // offset: - ) - ], - borderRadius: const BorderRadius.only( - topLeft: Radius.circular(10), - topRight: Radius.circular(10), - )), - child: BottomNavigationBar( - unselectedFontSize: 10, - selectedFontSize: 10, - unselectedItemColor: (brightness == Brightness.light) - ? ColorConstants.kBlack.withOpacity(0.6) - : ColorConstants.kWhite, - items: [ - BottomNavigationBarItem( - activeIcon: ActiveIcon( - iconPath: - 'assets/image/menuicon/${(brightness == Brightness.light) ? 'home_black' : 'home'}.svg', - selectedIndex: _selectedIndex, - ), - // Showcase( - // targetPadding: const EdgeInsets.all(5), - // targetShapeBorder: const CircleBorder(), - // key: navControllerTest.f, - // description: 'Tap to see menu options', - // disableDefaultTargetGestures: true, - // child: - - // ), - icon: Padding( - padding: const EdgeInsets.only(bottom: 4.0), - child: SvgPicture.asset( - 'assets/image/menuicon/${(brightness == Brightness.light) ? 'home_black' : 'home'}.svg', - width: iconSize, - height: iconSize, - ), - ), - label: 'Home', - ), - BottomNavigationBarItem( - activeIcon: ActiveIcon( - iconPath: - 'assets/image/menuicon/${(brightness == Brightness.light) ? 'live_black' : 'live'}.svg', - selectedIndex: _selectedIndex, - ), - icon: Padding( - padding: const EdgeInsets.only(bottom: 4.0), - child: SvgPicture.asset( - 'assets/image/menuicon/${(brightness == Brightness.light) ? 'live_black' : 'live'}.svg', - width: iconSize, - height: iconSize, - ), - ), - - // Showcase( - // key: navControllerTest.g, - // targetShapeBorder: const CircleBorder(), - // targetPadding: const EdgeInsets.all(5), - // description: 'Tap to see menu options', - // disableDefaultTargetGestures: true, - // child: - // ), - label: 'Live Session', - ), - BottomNavigationBarItem( - activeIcon: ActiveIcon( - iconPath: - 'assets/image/menuicon/${(brightness == Brightness.light) ? 'weight_scale_black' : 'weight_scale'}.svg', - selectedIndex: _selectedIndex, - ), - icon: Padding( - padding: const EdgeInsets.only(bottom: 4.0), - child: SvgPicture.asset( - 'assets/image/menuicon/${(brightness == Brightness.light) ? 'weight_scale_black' : 'weight_scale'}.svg', - width: iconSize, - height: iconSize, - ), - ), - - // Showcase( - // targetShapeBorder: const CircleBorder(), - // targetPadding: const EdgeInsets.all(5), - // key: navControllerTest.h, - // description: 'Tap to see menu options', - // disableDefaultTargetGestures: true, - // child: - - // ), - label: 'Bio Maker', - ), - BottomNavigationBarItem( - activeIcon: ActiveIcon( - iconPath: - 'assets/image/menuicon/${(brightness == Brightness.light) ? 'ranking_black' : 'ranking'}.svg', - selectedIndex: _selectedIndex, - ), - icon: Padding( - padding: const EdgeInsets.only(bottom: 4.0), - child: SvgPicture.asset( - 'assets/image/menuicon/${(brightness == Brightness.light) ? 'ranking_black' : 'ranking'}.svg', - width: iconSize, - height: iconSize, - ), - ), - // Showcase( - // targetShapeBorder: const CircleBorder(), - // targetPadding: const EdgeInsets.all(5), - // key: navControllerTest.i, - // description: 'Tap to see menu options', - // disableDefaultTargetGestures: true, - // child: - // ), - label: 'My Ranking', - ), - BottomNavigationBarItem( - activeIcon: ActiveIcon( - iconPath: - 'assets/image/menuicon/${(brightness == Brightness.light) ? 'profile_black' : 'profile'}.svg', - selectedIndex: _selectedIndex, - ), - icon: Padding( - padding: const EdgeInsets.only(bottom: 4.0), - child: SvgPicture.asset( - 'assets/image/menuicon/${(brightness == Brightness.light) ? 'profile_black' : 'profile'}.svg', - width: iconSize, - height: iconSize, - ), - ), - // Showcase( - // targetShapeBorder: const CircleBorder(), - // targetPadding: const EdgeInsets.all(5), - // key: navControllerTest.j, - // description: 'Tap to see menu options', - // disableDefaultTargetGestures: true, - // child: - // ), - label: 'Profile', - ), - ], - type: BottomNavigationBarType.fixed, - currentIndex: _selectedIndex, - selectedItemColor: (brightness == Brightness.light) - ? ColorConstants.kBlack - : ColorConstants.kPrimaryColor, - iconSize: 40, - onTap: _onItemTapped, - elevation: 0, - ), - ), - ); - } -} - -class ActiveIcon extends StatelessWidget { - const ActiveIcon({ - required this.iconPath, - required this.selectedIndex, - Key? key, - }) : super(key: key); - - final String iconPath; - final int selectedIndex; - - @override - Widget build(BuildContext context) { - return Container( - width: 28, - height: 28, - padding: const EdgeInsets.all(5), - decoration: const BoxDecoration( - shape: BoxShape.circle, - color: ColorConstants.kPrimaryColor, - ), - child: SvgPicture.asset( - iconPath, - color: Colors.black, - ), - ); - } -} diff --git a/gsf/lib/views/pages/test/bottomnvigation_controller.dart b/gsf/lib/views/pages/test/bottomnvigation_controller.dart deleted file mode 100644 index c92b963..0000000 --- a/gsf/lib/views/pages/test/bottomnvigation_controller.dart +++ /dev/null @@ -1,16 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:get/get.dart'; - -// NavigationController extends NavigationController -class NavigationCrontrollers extends GetxController { - final a = GlobalKey>(); - final b = GlobalKey>(); - final c = GlobalKey>(); - final d = GlobalKey>(); - final e = GlobalKey>(); - final f = GlobalKey>(); - final g = GlobalKey>(); - final h = GlobalKey>(); - final i = GlobalKey>(); - final j = GlobalKey>(); -} diff --git a/gsf/lib/views/pages/test/colors_util.dart b/gsf/lib/views/pages/test/colors_util.dart deleted file mode 100644 index dd7e7c4..0000000 --- a/gsf/lib/views/pages/test/colors_util.dart +++ /dev/null @@ -1,13 +0,0 @@ -import 'package:flutter/material.dart'; - -class HexColor extends Color { - static int _getColorFromHex(String hexColor) { - hexColor = hexColor.toUpperCase().replaceAll("#", ""); - if (hexColor.length == 6) { - hexColor = "FF" + hexColor; - } - return int.parse(hexColor, radix: 16); - } - - HexColor(final String hexColor) : super(_getColorFromHex(hexColor)); -} diff --git a/gsf/lib/views/pages/test/counter_clock_list.dart b/gsf/lib/views/pages/test/counter_clock_list.dart deleted file mode 100644 index 14bda6d..0000000 --- a/gsf/lib/views/pages/test/counter_clock_list.dart +++ /dev/null @@ -1,59 +0,0 @@ -// import 'package:flutter/material.dart'; -// import 'package:flutter/src/widgets/framework.dart'; -// import 'package:flutter/src/widgets/placeholder.dart'; -// import 'package:get/get.dart'; -// import 'package:gsp_app/views/theme.dart'; - -// import 'animated_counter_clock.dart'; - -// class ClockCounterList extends StatefulWidget { -// const ClockCounterList({super.key}); - -// @override -// State createState() => _ClockCounterListState(); -// } - -// class _ClockCounterListState extends State { -// List timings = [ -// '2', -// '3', -// '1', -// '8', -// '6', -// '7', -// ]; -// @override -// Widget build(BuildContext context) { -// return Scaffold( -// appBar: AppBar( -// title: const Text('Counter Clock List'), -// ), -// body: Padding( -// padding: const EdgeInsets.symmetric(horizontal: 80), -// child: ListView.builder( -// itemCount: timings.length, -// shrinkWrap: true, -// itemBuilder: (context, index) { -// return Card( -// child: TextButton( -// style: TextButton.styleFrom( -// backgroundColor: ColorConstants.kPrimaryColor), -// onPressed: () { -// Get.to(AnimatedCounterClock( -// timer: timings[index], -// )); -// }, -// child: Text( -// 'Count ${index + 1}', -// style: const TextStyle( -// fontSize: 20, -// color: ColorConstants.kBlack, -// ), -// ), -// ), -// ); -// }, -// ), -// )); -// } -// } diff --git a/gsf/lib/views/pages/test/croper_image.dart b/gsf/lib/views/pages/test/croper_image.dart deleted file mode 100644 index 6e4a5c2..0000000 --- a/gsf/lib/views/pages/test/croper_image.dart +++ /dev/null @@ -1,297 +0,0 @@ -import 'dart:io'; - -import 'package:flutter/foundation.dart'; -import 'package:flutter/material.dart'; - -import 'package:image_cropper/image_cropper.dart'; -import 'package:image_picker/image_picker.dart'; - -class MyAppTest extends StatelessWidget { - const MyAppTest({Key? key}) : super(key: key); - - // This widget is the root of your application. - @override - Widget build(BuildContext context) { - return MaterialApp( - title: 'Flutter Demo', - theme: ThemeData( - primarySwatch: Colors.blue, - highlightColor: const Color(0xFFD0996F), - backgroundColor: const Color(0xFFFDF5EC), - canvasColor: const Color(0xFFFDF5EC), - textTheme: TextTheme( - headline5: ThemeData.light() - .textTheme - .headline5! - .copyWith(color: const Color(0xFFBC764A)), - ), - iconTheme: IconThemeData( - color: Colors.grey[600], - ), - appBarTheme: const AppBarTheme( - backgroundColor: Color(0xFFBC764A), - centerTitle: false, - foregroundColor: Colors.white, - actionsIconTheme: IconThemeData(color: Colors.white), - ), - elevatedButtonTheme: ElevatedButtonThemeData( - style: ButtonStyle( - backgroundColor: MaterialStateColor.resolveWith( - (states) => const Color(0xFFBC764A)), - ), - ), - outlinedButtonTheme: OutlinedButtonThemeData( - style: ButtonStyle( - foregroundColor: MaterialStateColor.resolveWith( - (states) => const Color(0xFFBC764A), - ), - side: MaterialStateBorderSide.resolveWith( - (states) => const BorderSide(color: Color(0xFFBC764A))), - ), - )), - home: const HomePages(title: 'Image Cropper Demo'), - ); - } -} - -class HomePages extends StatefulWidget { - final String title; - - const HomePages({ - Key? key, - required this.title, - }) : super(key: key); - - @override - _HomePagesState createState() => _HomePagesState(); -} - -class _HomePagesState extends State { - XFile? _pickedFile; - CroppedFile? _croppedFile; - - @override - Widget build(BuildContext context) { - return Scaffold( - appBar: !kIsWeb ? AppBar(title: Text(widget.title)) : null, - body: Column( - mainAxisSize: MainAxisSize.max, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - if (kIsWeb) - Padding( - padding: const EdgeInsets.all(kIsWeb ? 24.0 : 16.0), - child: Text( - widget.title, - style: Theme.of(context) - .textTheme - .displayMedium! - .copyWith(color: Theme.of(context).highlightColor), - ), - ), - Expanded(child: _body()), - ], - ), - ); - } - - Widget _body() { - if (_croppedFile != null || _pickedFile != null) { - return _imageCard(); - } else { - return _uploaderCard(); - } - } - - Widget _imageCard() { - return Center( - child: Column( - mainAxisSize: MainAxisSize.min, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Padding( - padding: - const EdgeInsets.symmetric(horizontal: kIsWeb ? 24.0 : 16.0), - child: Card( - elevation: 4.0, - child: Padding( - padding: const EdgeInsets.all(kIsWeb ? 24.0 : 16.0), - child: _image(), - ), - ), - ), - const SizedBox(height: 24.0), - _menu(), - ], - ), - ); - } - - Widget _image() { - final screenWidth = MediaQuery.of(context).size.width; - final screenHeight = MediaQuery.of(context).size.height; - if (_croppedFile != null) { - final path = _croppedFile!.path; - return ConstrainedBox( - constraints: BoxConstraints( - maxWidth: 0.8 * screenWidth, - maxHeight: 0.7 * screenHeight, - ), - child: kIsWeb ? Image.network(path) : Image.file(File(path)), - ); - } else if (_pickedFile != null) { - final path = _pickedFile!.path; - return ConstrainedBox( - constraints: BoxConstraints( - maxWidth: 0.8 * screenWidth, - maxHeight: 0.7 * screenHeight, - ), - child: kIsWeb ? Image.network(path) : Image.file(File(path)), - ); - } else { - return const SizedBox.shrink(); - } - } - - Widget _menu() { - return Row( - mainAxisSize: MainAxisSize.min, - children: [ - FloatingActionButton( - onPressed: () { - _clear(); - }, - backgroundColor: Colors.redAccent, - tooltip: 'Delete', - child: const Icon(Icons.delete), - ), - if (_croppedFile == null) - Padding( - padding: const EdgeInsets.only(left: 32.0), - child: FloatingActionButton( - onPressed: () { - _cropImage(); - }, - backgroundColor: const Color(0xFFBC764A), - tooltip: 'Crop', - child: const Icon(Icons.crop), - ), - ) - ], - ); - } - - Widget _uploaderCard() { - return Center( - child: Card( - elevation: 4.0, - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(16.0), - ), - child: SizedBox( - width: kIsWeb ? 380.0 : 320.0, - height: 300.0, - child: Column( - mainAxisSize: MainAxisSize.max, - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Expanded( - child: Padding( - padding: const EdgeInsets.all(16.0), - child: Center( - child: Column( - mainAxisSize: MainAxisSize.min, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Icon( - Icons.image, - color: Theme.of(context).highlightColor, - size: 80.0, - ), - const SizedBox(height: 24.0), - Text( - 'Upload an image to start', - style: kIsWeb - ? Theme.of(context).textTheme.headline5!.copyWith( - color: Theme.of(context).highlightColor) - : Theme.of(context).textTheme.bodyText2!.copyWith( - color: Theme.of(context).highlightColor), - ) - ], - ), - ), - ), - ), - Padding( - padding: const EdgeInsets.symmetric(vertical: 24.0), - child: ElevatedButton( - onPressed: () { - _uploadImage(); - }, - child: const Text('Upload'), - ), - ), - ], - ), - ), - ), - ); - } - - Future _cropImage() async { - if (_pickedFile != null) { - final croppedFile = await ImageCropper().cropImage( - sourcePath: _pickedFile!.path, - compressFormat: ImageCompressFormat.jpg, - compressQuality: 100, - uiSettings: [ - AndroidUiSettings( - toolbarTitle: 'Cropper', - toolbarColor: Colors.deepOrange, - toolbarWidgetColor: Colors.white, - initAspectRatio: CropAspectRatioPreset.original, - lockAspectRatio: false), - IOSUiSettings( - title: 'Cropper', - ), - WebUiSettings( - context: context, - presentStyle: CropperPresentStyle.dialog, - boundary: const CroppieBoundary( - width: 520, - height: 520, - ), - viewPort: - const CroppieViewPort(width: 480, height: 480, type: 'circle'), - enableExif: true, - enableZoom: true, - showZoomer: true, - ), - ], - ); - if (croppedFile != null) { - setState(() { - _croppedFile = croppedFile; - }); - } - } - } - - Future _uploadImage() async { - final pickedFile = - await ImagePicker().pickImage(source: ImageSource.gallery); - if (pickedFile != null) { - setState(() { - _pickedFile = pickedFile; - }); - } - } - - void _clear() { - setState(() { - _pickedFile = null; - _croppedFile = null; - }); - } -} diff --git a/gsf/lib/views/pages/test/date_calender.dart b/gsf/lib/views/pages/test/date_calender.dart deleted file mode 100644 index 76a5632..0000000 --- a/gsf/lib/views/pages/test/date_calender.dart +++ /dev/null @@ -1,152 +0,0 @@ -import 'package:flutter/material.dart'; - -import 'colors_util.dart'; -import 'date_utils.dart' as date_util; - -class MyHomePage1 extends StatefulWidget { - final String title; - const MyHomePage1({Key? key, required this.title}) : super(key: key); - - @override - _MyHomePage1State createState() => _MyHomePage1State(); -} - -class _MyHomePage1State extends State { - double width = 0.0; - double height = 0.0; - late ScrollController scrollController; - List currentMonthList = List.empty(); - DateTime currentDateTime = DateTime.now(); - - @override - void initState() { - currentMonthList = date_util.DateUtils.daysInMonth(currentDateTime); - currentMonthList.sort((a, b) => a.day.compareTo(b.day)); - currentMonthList = currentMonthList.toSet().toList(); - scrollController = - ScrollController(initialScrollOffset: 37.0 * currentDateTime.day); - super.initState(); - } - - Widget titleView() { - return Padding( - padding: const EdgeInsets.fromLTRB(0, 0, 0, 20), - child: Text( - date_util.DateUtils.months[currentDateTime.month - 1] + - ' ' + - currentDateTime.year.toString(), - style: const TextStyle( - color: Colors.white, - fontWeight: FontWeight.bold, - fontSize: 20, - ), - ), - ); - } - - Widget hrizontalCapsuleListView() { - return SizedBox( - width: width, - height: 70, - child: ListView.builder( - controller: scrollController, - scrollDirection: Axis.horizontal, - physics: const ClampingScrollPhysics(), - shrinkWrap: true, - itemCount: currentMonthList.length, - itemBuilder: (BuildContext context, int index) { - return capsuleView(index); - }, - ), - ); - } - - Widget capsuleView(int index) { - return Padding( - padding: const EdgeInsets.fromLTRB(8, 0, 0, 0), - child: GestureDetector( - onTap: () { - setState(() { - currentDateTime = currentMonthList[index]; - }); - }, - child: Container( - width: 45, - height: 67, - decoration: BoxDecoration( - color: (currentMonthList[index].day != currentDateTime.day) - ? Colors.red - : Colors.yellow, - borderRadius: BorderRadius.circular(40), - boxShadow: [ - BoxShadow( - offset: Offset(4, 4), - blurRadius: 4, - spreadRadius: 2, - color: Colors.black12, - ) - ]), - child: Center( - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - currentMonthList[index].day.toString(), - style: TextStyle( - fontSize: 22, - fontWeight: FontWeight.bold, - height: 1, - color: - (currentMonthList[index].day != currentDateTime.day) - ? HexColor("465876") - : Colors.white, - ), - ), - Text( - date_util.DateUtils - .weekdays[currentMonthList[index].weekday - 1], - style: TextStyle( - fontSize: - (currentMonthList[index].day != currentDateTime.day) - ? 12 - : 14, - fontWeight: FontWeight.bold, - color: - (currentMonthList[index].day != currentDateTime.day) - ? HexColor("465876") - : Colors.white, - ), - ) - ], - ), - ), - ), - )); - } - - Widget topView() { - return SizedBox( - // height: height * 0.35, - width: width, - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - children: [ - titleView(), - hrizontalCapsuleListView(), - ], - ), - ); - } - - @override - Widget build(BuildContext context) { - width = MediaQuery.of(context).size.width; - height = MediaQuery.of(context).size.height; - return Scaffold( - backgroundColor: Colors.black, - body: Stack( - children: [topView()], - ), - ); - } -} diff --git a/gsf/lib/views/pages/test/date_test.dart b/gsf/lib/views/pages/test/date_test.dart deleted file mode 100644 index b1d774d..0000000 --- a/gsf/lib/views/pages/test/date_test.dart +++ /dev/null @@ -1,41 +0,0 @@ -import 'package:flutter/material.dart'; - -class DateTEst extends StatelessWidget { - const DateTEst({Key? key}) : super(key: key); - - @override - Widget build(BuildContext context) { - final now = DateTime.now(); - final monthNames = [ - 'January', - 'February', - 'March', - 'April', - 'May', - 'June', - 'July', - 'August', - 'September', - 'October', - 'November', - 'December' - ]; - - return Scaffold( - appBar: AppBar( - title: Text('Current Date and Months List'), - ), - body: Column( - crossAxisAlignment: CrossAxisAlignment.stretch, - children: [ - Center( - child: Text( - '${now.day} ${monthNames[now.month - 1]}, ${now.year}', - style: const TextStyle(fontSize: 24), - ), - ), - ], - ), - ); - } -} diff --git a/gsf/lib/views/pages/test/date_utils.dart b/gsf/lib/views/pages/test/date_utils.dart deleted file mode 100644 index b9b3d76..0000000 --- a/gsf/lib/views/pages/test/date_utils.dart +++ /dev/null @@ -1,183 +0,0 @@ -library utils; - -import 'package:intl/intl.dart'; - -class DateUtils { - static final DateFormat _monthFormat = DateFormat('MMMM yyyy'); - static final DateFormat _dayFormat = DateFormat('dd'); - static final DateFormat _firstDayFormat = DateFormat('MMM dd'); - static final DateFormat _fullDayFormat = DateFormat('EEE MMM dd, yyyy'); - static final DateFormat _apiDayFormat = DateFormat('yyyy-MM-dd'); - - static String formatMonth(DateTime d) => _monthFormat.format(d); - - static String formatDay(DateTime d) => _dayFormat.format(d); - - static String formatFirstDay(DateTime d) => _firstDayFormat.format(d); - - static String fullDayFormat(DateTime d) => _fullDayFormat.format(d); - - static String apiDayFormat(DateTime d) => _apiDayFormat.format(d); - - static const List weekdays = [ - 'Mon', - 'Tue', - 'Wed', - 'Thu', - 'Fri', - 'Sat', - 'Sun' - ]; - - static const List months = [ - 'January', - 'February', - 'March', - 'April', - 'May', - 'June', - 'July', - 'August', - 'September', - 'October', - 'November', - 'December' - ]; - - /// The list of days in a given month - static List daysInMonth(DateTime month) { - var first = firstDayOfMonth(month); - var last = DateUtils.lastDayOfMonth(month); - - var daysAfter = 7 - last.weekday; - - // If the last day is sunday (7) the entire week must be rendered - if (daysAfter == 0) { - daysAfter = 7; - } - - // var lastToDisplay = last.add(Duration(days: daysAfter)); - return daysRange(first, last).toList(); - } - - static Iterable daysRange(DateTime first, DateTime last) { - var listOfDates = new List.generate( - last.day, (i) => DateTime(first.year, first.month, i + 1)); - return listOfDates; - } - - static bool isFirstDayOfMonth(DateTime day) { - return isSameDay(firstDayOfMonth(day), day); - } - - static bool isLastDayOfMonth(DateTime day) { - return isSameDay(lastDayOfMonth(day), day); - } - - static DateTime firstDayOfMonth(DateTime month) { - return DateTime(month.year, month.month); - } - - static DateTime firstDayOfWeek(DateTime day) { - /// Handle Daylight Savings by setting hour to 12:00 Noon - /// rather than the default of Midnight - day = DateTime.utc(day.year, day.month, day.day, 12); - - /// Weekday is on a 1-7 scale Monday - Sunday, - /// This Calendar works from Sunday - Monday - var decreaseNum = day.weekday % 7; - return day.subtract(Duration(days: decreaseNum)); - } - - static DateTime lastDayOfWeek(DateTime day) { - /// Handle Daylight Savings by setting hour to 12:00 Noon - /// rather than the default of Midnight - day = DateTime.utc(day.year, day.month, day.day, 12); - - /// Weekday is on a 1-7 scale Monday - Sunday, - /// This Calendar's Week starts on Sunday - var increaseNum = day.weekday % 7; - return day.add(Duration(days: 7 - increaseNum)); - } - - /// The last day of a given month - static DateTime lastDayOfMonth(DateTime month) { - var beginningNextMonth = (month.month < 12) - ? DateTime(month.year, month.month + 1, 1) - : DateTime(month.year + 1, 1, 1); - return beginningNextMonth.subtract(Duration(days: 1)); - } - - /// Returns a [DateTime] for each day the given range. - /// - /// [start] inclusive - /// [end] exclusive - static Iterable daysInRange(DateTime start, DateTime end) sync* { - var i = start; - var offset = start.timeZoneOffset; - while (i.day <= end.day) { - yield i; - i = i.add(Duration(days: 1)); - var timeZoneDiff = i.timeZoneOffset - offset; - if (timeZoneDiff.inSeconds != 0) { - offset = i.timeZoneOffset; - i = i.subtract(Duration(seconds: timeZoneDiff.inSeconds)); - } - } - } - - /// Whether or not two times are on the same day. - static bool isSameDay(DateTime a, DateTime b) { - return a.year == b.year && a.month == b.month && a.day == b.day; - } - - static bool isSameWeek(DateTime a, DateTime b) { - /// Handle Daylight Savings by setting hour to 12:00 Noon - /// rather than the default of Midnight - a = DateTime.utc(a.year, a.month, a.day); - b = DateTime.utc(b.year, b.month, b.day); - - var diff = a.toUtc().difference(b.toUtc()).inDays; - if (diff.abs() >= 7) { - return false; - } - - var min = a.isBefore(b) ? a : b; - var max = a.isBefore(b) ? b : a; - var result = max.weekday % 7 - min.weekday % 7 >= 0; - return result; - } - - static DateTime previousMonth(DateTime m) { - var year = m.year; - var month = m.month; - if (month == 1) { - year--; - month = 12; - } else { - month--; - } - return DateTime(year, month); - } - - static DateTime nextMonth(DateTime m) { - var year = m.year; - var month = m.month; - - if (month == 12) { - year++; - month = 1; - } else { - month++; - } - return DateTime(year, month); - } - - static DateTime previousWeek(DateTime w) { - return w.subtract(Duration(days: 7)); - } - - static DateTime nextWeek(DateTime w) { - return w.add(Duration(days: 7)); - } -} diff --git a/gsf/lib/views/pages/test/detailscreen.dart b/gsf/lib/views/pages/test/detailscreen.dart deleted file mode 100644 index f171498..0000000 --- a/gsf/lib/views/pages/test/detailscreen.dart +++ /dev/null @@ -1,129 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:get/get.dart'; - -class Detail extends StatefulWidget { - const Detail({Key? key}) : super(key: key); - - @override - _DetailState createState() => _DetailState(); -} - -class _DetailState extends State { - final GlobalKey _one = GlobalKey(); - BuildContext? myContext; - - @override - void initState() { - super.initState(); - //NOTE: remove ambiguate function if you are using - //flutter version greater than 3.x and direct use WidgetsBinding.instance - // ambiguate(WidgetsBinding.instance)?.addPostFrameCallback( - // (_) => Future.delayed( - // const Duration(milliseconds: 200), - // () { - // ShowCaseWidget.of(myContext!).startShowCase([_one]); - // }, - // ), - // ); - } - - @override - Widget build(BuildContext context) { - return - // ShowCaseWidget( - // builder: Builder( - // builder: (context) { - // myContext = context; - // return - Scaffold( - appBar: AppBar( - backgroundColor: Colors.transparent, - elevation: 0, - leading: IconButton( - icon: const Icon( - Icons.arrow_back, - color: Colors.black, - ), - onPressed: () { - Navigator.pop(context); - }, - ), - ), - body: Padding( - padding: const EdgeInsets.all(16), - child: ListView( - children: [ - InkWell( - onTap: () {}, - child: const Text( - 'Flutter Notification', - style: TextStyle( - fontSize: 25, - fontWeight: FontWeight.w600, - ), - ), - ), - // Showcase( - // key: _one, - // title: 'Title', - // description: 'Desc', - // child: - - // ), - const SizedBox( - height: 16, - ), - const Text( - 'Hi, you have new Notification from flutter group, open ' - 'slack and check it out', - style: TextStyle(fontSize: 18, fontWeight: FontWeight.w500), - ), - const SizedBox( - height: 16, - ), - RichText( - text: const TextSpan( - style: TextStyle( - fontWeight: FontWeight.w400, - color: Colors.black, - ), - children: [ - TextSpan(text: 'Hi team,\n\n'), - TextSpan( - text: 'As some of you know, we’re moving to Slack for ' - 'our internal team communications. Slack is a ' - 'messaging app where we can talk, share files, ' - 'and work together. It also connects with tools ' - 'we already use, like [add your examples here], ' - 'plus 900+ other apps.\n\n', - ), - TextSpan( - text: 'Why are we moving to Slack?\n\n', - style: TextStyle( - fontWeight: FontWeight.w600, - color: Colors.black, - ), - ), - TextSpan( - text: 'We want to use the best communication tools to ' - 'make our lives easier and be more productive. ' - 'Having everything in one place will help us ' - 'work together better and faster, rather than ' - 'jumping around between emails, IMs, texts and ' - 'a bunch of other programs. Everything you share ' - 'in Slack is automatically indexed and archived, ' - 'creating a searchable archive of all our work.', - ), - ], - ), - ), - ], - ), - ), - ); - - // }, - // ), - // ); - } -} diff --git a/gsf/lib/views/pages/test/image_downloader.dart b/gsf/lib/views/pages/test/image_downloader.dart deleted file mode 100644 index cefccbc..0000000 --- a/gsf/lib/views/pages/test/image_downloader.dart +++ /dev/null @@ -1,52 +0,0 @@ -// import 'package:flutter/material.dart'; -// import 'package:image_downloader/image_downloader.dart'; - -// class ImageDownloaderInFile extends StatefulWidget { -// const ImageDownloaderInFile({Key? key}) : super(key: key); - -// @override -// _ImageDownloaderInFileState createState() => _ImageDownloaderInFileState(); -// } - -// class _ImageDownloaderInFileState extends State { -// String imageUrl = 'https://picsum.photos/id/42/200/200'; -// bool isDownloading = false; -// double progress = 0.0; - -// @override -// Widget build(BuildContext context) { -// return Scaffold( -// appBar: AppBar( -// title: Text('Download Image'), -// ), -// body: Center( -// child: Column( -// mainAxisAlignment: MainAxisAlignment.center, -// children: [ -// Image.network(imageUrl), -// const SizedBox(height: 16.0), -// if (isDownloading) -// LinearProgressIndicator( -// value: progress, -// ), -// OutlinedButton( -// onPressed: () { -// setState(() { -// isDownloading = true; -// }); -// ImageDownloader.downloadImage(imageUrl).then((value) { -// setState(() { -// isDownloading = false; -// }); -// }).catchError((error) { -// print('Error $error'); -// }); -// }, -// child: const Text('Download Image'), -// ), -// ], -// ), -// ), -// ); -// } -// } diff --git a/gsf/lib/views/pages/test/image_zoom.dart b/gsf/lib/views/pages/test/image_zoom.dart deleted file mode 100644 index c04ef06..0000000 --- a/gsf/lib/views/pages/test/image_zoom.dart +++ /dev/null @@ -1,30 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:photo_view/photo_view.dart'; - -class ImageZoom extends StatefulWidget { - const ImageZoom({Key? key}) : super(key: key); - - @override - State createState() => _ImageZoomState(); -} - -class _ImageZoomState extends State { - @override - Widget build(BuildContext context) { - return Scaffold( - appBar: AppBar(), - body: PhotoView( - // minScale: 100.01, - // maxScale: 100.00, - imageProvider: const NetworkImage( - "https://images.unsplash.com/photo-1687161590608-6d948d357bad?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1906&q=80"), - minScale: PhotoViewComputedScale.contained * 0.8, - // enableRotation: true, - heroAttributes: PhotoViewHeroAttributes(tag: 'tag') - // initialScale: 0.5, - // maxScale: PhotoViewComputedScale.covered * 1.1, - // initialScale: PhotoViewComputedScale.covered * 1.1, - ), - ); - } -} diff --git a/gsf/lib/views/pages/test/just_audio.dart b/gsf/lib/views/pages/test/just_audio.dart deleted file mode 100644 index b6c5085..0000000 --- a/gsf/lib/views/pages/test/just_audio.dart +++ /dev/null @@ -1,79 +0,0 @@ -import 'package:audio_video_progress_bar/audio_video_progress_bar.dart'; -import 'package:flutter/material.dart'; -import 'page_manager.dart'; - -class JustAudios extends StatefulWidget { - const JustAudios({Key? key}) : super(key: key); - - @override - _JustAudiosState createState() => _JustAudiosState(); -} - -class _JustAudiosState extends State { - late final PageManager _pageManager; - - @override - void initState() { - super.initState(); - _pageManager = PageManager(); - } - - @override - void dispose() { - _pageManager.dispose(); - super.dispose(); - } - - @override - Widget build(BuildContext context) { - return MaterialApp( - home: Scaffold( - body: Padding( - padding: const EdgeInsets.all(20.0), - child: Column( - children: [ - const Spacer(), - ValueListenableBuilder( - valueListenable: _pageManager.progressNotifier, - builder: (_, value, __) { - return ProgressBar( - progress: value.current, - buffered: value.buffered, - total: value.total, - onSeek: _pageManager.seek, - ); - }, - ), - ValueListenableBuilder( - valueListenable: _pageManager.buttonNotifier, - builder: (_, value, __) { - switch (value) { - case ButtonState.loading: - return Container( - margin: const EdgeInsets.all(8.0), - width: 32.0, - height: 32.0, - child: const CircularProgressIndicator(), - ); - case ButtonState.paused: - return IconButton( - icon: const Icon(Icons.play_arrow), - iconSize: 32.0, - onPressed: _pageManager.play, - ); - case ButtonState.playing: - return IconButton( - icon: const Icon(Icons.pause), - iconSize: 32.0, - onPressed: _pageManager.pause, - ); - } - }, - ), - ], - ), - ), - ), - ); - } -} diff --git a/gsf/lib/views/pages/test/modelTest.dart b/gsf/lib/views/pages/test/modelTest.dart deleted file mode 100644 index 166aa62..0000000 --- a/gsf/lib/views/pages/test/modelTest.dart +++ /dev/null @@ -1,95 +0,0 @@ -// ignore_for_file: prefer_const_constructors, unrelated_type_equality_checks - -import 'dart:async'; - -import 'package:flutter/material.dart'; -import 'package:get_storage/get_storage.dart'; -import 'package:intl/intl.dart'; - -class PopupAfterTwoMinutes extends StatefulWidget { - const PopupAfterTwoMinutes({Key? key}) : super(key: key); - - @override - _PopupAfterTwoMinutesState createState() => _PopupAfterTwoMinutesState(); -} - -class _PopupAfterTwoMinutesState extends State { - late DateTime _lastShown; - late GetStorage _storage; - late Timer timer; - - @override - void initState() { - super.initState(); - final tData = DateFormat("HH:mm:ss a").format(DateTime.now()); - final now = DateTime.now(); - print('current date time :- ${now}'); - print('current only time :- ${tData}'); - final confirmTime = '13:06:00 PM'; - - Timer mytimer = Timer.periodic(Duration(seconds: 2), (timer) { - if (tData == confirmTime) { - print('timer every 2 seconds'); - } - }); - // _initPrefs(); - } - - void _initPrefs() async { - await GetStorage.init(); - _storage = GetStorage(); - _lastShown = DateTime.tryParse(_storage.read('last_shown3') ?? '') ?? - DateTime.now().subtract(const Duration(days: 1)); - // print('last_shown time: ${GetStorage().read('last_shown3')}'); - // print('last_shown only: ${_lastShown}'); - // subtracting 24 hours to ensure that the popup is shown immediately on the first run - _checkToShowPopup(); - } - - void _checkToShowPopup() { - final tData = DateFormat("HH:mm:ss a").format(DateTime.now()); - final now = DateTime.now(); - final confirmTime = '01:04:00'; - print('current date time :- ${now}'); - print('current only time :- ${tData}'); - final difference = now.difference(_lastShown); - // print('difference.inSeconds :- ${difference.inSeconds}'); - if (tData == confirmTime) { - print('timer every 2 seconds'); - } - } - - void _showPopup() { - showDialog( - context: context, - builder: (context) { - return AlertDialog( - title: Text('Popup Title'), - content: Text('Popup Content'), - actions: [ - TextButton( - onPressed: () { - Navigator.pop(context); - _lastShown = DateTime.now(); - _storage.write('last_shown3', _lastShown.toString()); - }, - child: Text('OK'), - ), - ], - ); - }, - ); - } - - @override - Widget build(BuildContext context) { - return Scaffold( - appBar: AppBar( - title: Text('My App'), - ), - body: Center( - child: Text('Welcome to my app!'), - ), - ); - } -} diff --git a/gsf/lib/views/pages/test/no_internet_connection.dart b/gsf/lib/views/pages/test/no_internet_connection.dart deleted file mode 100644 index f6c1cc6..0000000 --- a/gsf/lib/views/pages/test/no_internet_connection.dart +++ /dev/null @@ -1,85 +0,0 @@ -import 'dart:async'; -import 'dart:developer' as developer; - -import 'package:connectivity_plus/connectivity_plus.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter/services.dart'; - -import 'package:flutter_svg/flutter_svg.dart'; - -import '../../components/appbar.dart'; -import '../../components/btn.dart'; -import '../../theme.dart'; - -class NoInternetConnectTest extends StatefulWidget { - const NoInternetConnectTest({Key? key}) : super(key: key); - - @override - State createState() => _NoInternetConnectTestState(); -} - -class _NoInternetConnectTestState extends State { - ConnectivityResult _connectionStatus = ConnectivityResult.none; - final Connectivity _connectivity = Connectivity(); - late StreamSubscription _connectivitySubscription; - - @override - void initState() { - super.initState(); - initConnectivity(); - - _connectivitySubscription = - _connectivity.onConnectivityChanged.listen(_updateConnectionStatus); - } - - @override - void dispose() { - _connectivitySubscription.cancel(); - super.dispose(); - } - - // Platform messages are asynchronous, so we initialize in an async method. - Future initConnectivity() async { - late ConnectivityResult result; - // Platform messages may fail, so we use a try/catch PlatformException. - try { - result = await _connectivity.checkConnectivity(); - } on PlatformException catch (e) { - developer.log('Couldn\'t check connectivity status', error: e); - return; - } - - // If the widget was removed from the tree while the asynchronous platform - // message was in flight, we want to discard the reply rather than calling - // setState to update our non-existent appearance. - if (!mounted) { - return Future.value(null); - } - - return _updateConnectionStatus(result); - } - - Future _updateConnectionStatus(ConnectivityResult result) async { - setState(() { - _connectionStatus = result; - }); - } - - @override - Widget build(BuildContext context) { - return Scaffold( - backgroundColor: ColorConstants.kBlack, - appBar: PreferredSize( - preferredSize: const Size.fromHeight(60), - child: CustomAppBars( - titleHead: 'No Internet', - showLeading: false, - ), - ), - body: Center( - child: Text( - 'Connection Status: ${_connectionStatus.toString()}', - ), - )); - } -} diff --git a/gsf/lib/views/pages/test/our_thoutghs.dart b/gsf/lib/views/pages/test/our_thoutghs.dart deleted file mode 100644 index 515a2c2..0000000 --- a/gsf/lib/views/pages/test/our_thoutghs.dart +++ /dev/null @@ -1,137 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:get/get.dart'; -import 'package:gsp_app/repository/response_data.dart'; - -import '../../../modals/share_thoughts.dart'; -import '../../../repository/services/share_thoughts_service.dart'; -import '../../components/btn.dart'; -import '../../theme.dart'; - -class ShareThoutghs extends StatefulWidget { - const ShareThoutghs({Key? key}) : super(key: key); - - @override - State createState() => _ShareThoutghsState(); -} - -class _ShareThoutghsState extends State { - @override - void initState() { - super.initState(); - } - - @override - Widget build(BuildContext context) { - return Scaffold( - body: Center( - child: Padding( - padding: EdgeInsets.symmetric(horizontal: context.width * 0.05), - child: FutureBuilder( - future: GetOurThoughts().getShareThoughtsData(), - builder: (context, snapshot) { - if (snapshot.connectionState == ConnectionState.done && - snapshot.hasData) { - ShareOurthoutghs shareOurthoutghs = snapshot.data!.data; - // print('GetOurThoughts :- ${shareOurthoutghs.userThoughts}'); - // print( - // 'snapshot connectionState :- ${snapshot.connectionState}'); - var thoughts = shareOurthoutghs.userThoughts.split(' '); - var indexs = thoughts; - print('GetOurThoughts new :- ${indexs}'); - return Column( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Container( - decoration: BoxDecoration( - color: ColorConstants.kBlack, - borderRadius: BorderRadius.circular(20), - ), - child: Padding( - padding: const EdgeInsets.symmetric( - horizontal: 15, vertical: 25), - child: Stack( - clipBehavior: Clip.none, - children: [ - Positioned( - top: -80, - left: 0, - right: 0, - child: Align( - alignment: Alignment.center, - child: Container( - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(100), - ), - width: 100, - height: 100, - child: Image.asset( - 'assets/image/feedback_img/power.png', - fit: BoxFit.cover, - alignment: Alignment.center, - ), - ), - ), - ), - Column( - children: [ - const SizedBox(height: 56), - Text( - '${thoughts[0]}', - style: TextStyle( - fontSize: 30, - color: ColorConstants.kWhite, - fontWeight: FontWeight.w500, - letterSpacing: 1.07, - ), - ), - Text( - '${thoughts[1]}', - style: TextStyle( - fontSize: 42, - color: ColorConstants.kPrimaryColor, - fontWeight: FontWeight.w600, - letterSpacing: 3, - height: 1, - ), - ), - Text( - '${thoughts[2]}', - style: TextStyle( - fontSize: 30, - color: ColorConstants.kWhite, - height: 1, - fontWeight: FontWeight.w500, - letterSpacing: 1.07, - ), - ), - const SizedBox(height: 35), - FullWdtBtn( - btnText: 'Let\'s Go', - onTap: () { - Get.back(); - // Get.offAll( - // () => ShowCaseWidget( - // builder: Builder( - // builder: (context) => const HomePage(), - // ), - // ), - // () => const HomePage(), - // ); - }, - ) - ], - ), - ], - ), - ), - ), - ], - ); - } - return const CircularProgressIndicator(); - }, - )), - )); - } -} diff --git a/gsf/lib/views/pages/test/page_manager.dart b/gsf/lib/views/pages/test/page_manager.dart deleted file mode 100644 index 35959cf..0000000 --- a/gsf/lib/views/pages/test/page_manager.dart +++ /dev/null @@ -1,99 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:just_audio/just_audio.dart'; - -class PageManager { - final progressNotifier = ValueNotifier( - ProgressBarState( - current: Duration.zero, - buffered: Duration.zero, - total: Duration.zero, - ), - ); - final buttonNotifier = ValueNotifier(ButtonState.paused); - - static const url = - 'https://ghantalele.com/uploads/files/data-78/38825/Besharam%20Rang_192(Ghantalele.com).mp3'; - static const urlAssets = 'assets/audio/nature.mp3'; - late AudioPlayer _audioPlayer; - PageManager() { - _init(); - } - - void _init() async { - _audioPlayer = AudioPlayer(); - await _audioPlayer.setUrl(url); - // await _audioPlayer.setAsset(url); - - _audioPlayer.playerStateStream.listen((playerState) { - final isPlaying = playerState.playing; - final processingState = playerState.processingState; - if (processingState == ProcessingState.loading || - processingState == ProcessingState.buffering) { - buttonNotifier.value = ButtonState.loading; - } else if (!isPlaying) { - buttonNotifier.value = ButtonState.paused; - } else if (processingState != ProcessingState.completed) { - buttonNotifier.value = ButtonState.playing; - } else { - _audioPlayer.seek(Duration.zero); - _audioPlayer.pause(); - } - }); - - _audioPlayer.positionStream.listen((position) { - final oldState = progressNotifier.value; - progressNotifier.value = ProgressBarState( - current: position, - buffered: oldState.buffered, - total: oldState.total, - ); - }); - - _audioPlayer.bufferedPositionStream.listen((bufferedPosition) { - final oldState = progressNotifier.value; - progressNotifier.value = ProgressBarState( - current: oldState.current, - buffered: bufferedPosition, - total: oldState.total, - ); - }); - - _audioPlayer.durationStream.listen((totalDuration) { - final oldState = progressNotifier.value; - progressNotifier.value = ProgressBarState( - current: oldState.current, - buffered: oldState.buffered, - total: totalDuration ?? Duration.zero, - ); - }); - } - - void play() { - _audioPlayer.play(); - } - - void pause() { - _audioPlayer.pause(); - } - - void seek(Duration position) { - _audioPlayer.seek(position); - } - - void dispose() { - _audioPlayer.dispose(); - } -} - -class ProgressBarState { - ProgressBarState({ - required this.current, - required this.buffered, - required this.total, - }); - final Duration current; - final Duration buffered; - final Duration total; -} - -enum ButtonState { paused, playing, loading } diff --git a/gsf/lib/views/pages/test/past_session.dart b/gsf/lib/views/pages/test/past_session.dart deleted file mode 100644 index fae805c..0000000 --- a/gsf/lib/views/pages/test/past_session.dart +++ /dev/null @@ -1,583 +0,0 @@ -import 'dart:convert'; - -import 'package:flutter/material.dart'; -import 'package:flutter_svg/svg.dart'; -import 'package:get/get.dart'; -import 'package:get_storage/get_storage.dart'; -import 'package:http/http.dart' as http; -import 'package:skeletons/skeletons.dart'; -import 'package:url_launcher/url_launcher.dart'; - -import '../../../modals/past_session_model.dart'; -import '../../../repository/endpoints.dart'; -import '../../../repository/response_data.dart'; -import '../../../repository/services/cj/past_session_services.dart'; -import '../../../view_model/global_controller.dart'; -import '../../theme.dart'; - -class PastSessionView extends StatefulWidget { - const PastSessionView({super.key}); - - @override - _PastSessionViewState createState() => _PastSessionViewState(); -} - -class _PastSessionViewState extends State { - @override - void initState() { - super.initState(); - // fetchData(); // Fetch data when the widget is initialized - } - - @override - Widget build(BuildContext context) { - return Scaffold( - appBar: AppBar( - title: const Text('Past Session'), - ), - body: Column( - children: [ - Expanded( - child: previousSession(), - ), - ], - ), - ); - } - - previousSession() { - GlobalController globalContoller = Get.put(GlobalController()); - Future _launchInBrowser(String url) async { - var urlN = Uri.parse(url); - if (!await launchUrl( - urlN, - mode: LaunchMode.externalApplication, - )) { - throw Exception('Could not launch $url'); - } - } - - bool expandTile = false; - - return Padding( - padding: const EdgeInsets.symmetric(horizontal: 20), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - const SizedBox(height: 10), - FutureBuilder( - future: PastActivity().getPastActivityData(), - builder: (context, snapshot) { - if (snapshot.connectionState == ConnectionState.done && - snapshot.hasData) { - // var week index - // print( - // 'Data!.result!.schedule! ${pastData!.result!.schedule![0].pastData![0].day}'); - - var pastDataInData = pastData!.result!.schedule!; - return Expanded( - child: pastData?.result != null - ? ListView.builder( - physics: const ScrollPhysics(), - scrollDirection: Axis.vertical, - shrinkWrap: true, - itemCount: pastDataInData.length, - itemBuilder: (context, index) { - return - pastDataInData[index].pastData!.isNotEmpty? Container( - margin: const EdgeInsets.only( - bottom: 20, - ), // Set margin around each panel - child: ClipRRect( - borderRadius: BorderRadius.only( - bottomLeft: Radius.circular(30), - bottomRight: Radius.circular(30) - ), - - child: StatefulBuilder( - builder: (context, setState) { - return ExpansionPanelList( - dividerColor: - ColorConstants.kPrimaryColor, - elevation: 1, - expandedHeaderPadding: const EdgeInsets.all(0), - expansionCallback: - (int index, bool isExpanded) { - // isExpanded = !isExpanded; - if (isExpanded == false) { - setState(() { - expandTile = true; - }); - } else { - setState(() { - expandTile = false; - }); - } - }, - children: [ - ExpansionPanel( - headerBuilder: (BuildContext context, - bool isExpanded) { - return ListTile( - title: Text( - 'Week ${index+1}', // "Week ${((e.index) - listLen).abs()}", - style: const TextStyle( - color: ColorConstants - .kPrimaryColor, - ), - ), - ); - }, - body: Padding( - padding: const EdgeInsets.only( - bottom: 20, - left: 20, - right: 20, - ), - child: pastDataInData[index].pastData!.isEmpty - ? Center( - child: Text( - 'No Session found ☹️.', - style: TextStyle( - color: !globalContoller - .darkMode.value - ? Colors.black - : ColorConstants - .kPrimaryColor, - fontSize: 16, - ), - textAlign: - TextAlign.center, - ), - ) - : ListView.builder( - itemCount: - pastDataInData[index].pastData!.length, - shrinkWrap: true, - physics: ScrollPhysics(), - itemBuilder: - (context, index1) { - return Container( - decoration: - BoxDecoration( - border: Border.all( - color: ColorConstants - .kPrimaryColor, - ), - borderRadius: - BorderRadius - .circular(5), - ), - margin: EdgeInsets.only( - bottom: 20), - padding: EdgeInsets - .symmetric( - horizontal: 10, - vertical: 10, - ), - child: Row( - mainAxisAlignment: - MainAxisAlignment - .spaceBetween, - children: [ - Column( - mainAxisAlignment: - MainAxisAlignment - .start, - crossAxisAlignment: - CrossAxisAlignment - .start, - children: [ - Row( - children: [ - SvgPicture - .asset( - 'assets/image/calendar.svg'), - SizedBox( - width: - 10), - Text( - '${pastDataInData[index].pastData![index1].day}', - style: - TextStyle( - fontSize: - 14, - color: ColorConstants - .kWhite, - ), - ), - ], - ), - SizedBox( - height: 8), - Text( - '${pastDataInData[index].pastData![index1].activityName}', - style: - TextStyle( - fontSize: - 20, - color: ColorConstants - .kWhite, - fontFamily: - 'SFPRO', - letterSpacing: - 0.4, - fontWeight: - FontWeight - .bold, - ), - ), - SizedBox( - height: 10), - Row( - children: [ - SvgPicture - .asset( - 'assets/image/duration.svg'), - SizedBox( - width: - 10), - Text( - 'Duration ${pastDataInData[index].pastData![index1].duration} min', - style: - TextStyle( - fontSize: - 14, - color: ColorConstants - .kWhite, - ), - ), - Text( - ' - Yoga', - style: - TextStyle( - fontSize: - 14, - color: ColorConstants - .kWhite, - ), - ), - ], - ) - ], - ), - Container( - decoration: - BoxDecoration( - border: - Border.all( - color: ColorConstants - .kPrimaryColor, - width: 2, - ), - shape: BoxShape - .circle, - ), - child: - GestureDetector( - // redirect to Zoom for live session - onTap: () { - _launchInBrowser( - 'https://us02web.zoom.us/rec/share/Pcc6SAUO9DEjt2Cm25ZtN57ODUJNBobl4CYabomLyJl4wqseoq11hT5r454gIvZy.9xwrGs9_Un8vRIR4'); - // _launchURL(e.pastData![index].url); - }, - child: - const Padding( - padding: - EdgeInsets - .all( - 3.0), - child: Icon( - Icons - .play_arrow_rounded, - color: ColorConstants - .kPrimaryColor, - size: 35, - ), - ), - ), - ), - ], - ), - ); - }, - ), - ), - isExpanded: expandTile, - ), - ], - ); - }, - ), - ), - ):const SizedBox(); - }, - ) - : Center( - child: Text( - 'No Session found ☹️.', - style: TextStyle( - color: !globalContoller.darkMode.value - ? Colors.black - : ColorConstants.kPrimaryColor, - fontSize: 16, - ), - textAlign: TextAlign.center, - ), - ), - ); - } - return Padding( - padding: const EdgeInsets.only(top: 20, left: 10, right: 10), - child: ListView.builder( - physics: const BouncingScrollPhysics(), - scrollDirection: Axis.vertical, - shrinkWrap: true, - itemCount: 2, - itemBuilder: (context, index) => Container( - margin: const EdgeInsets.only(bottom: 20), - child: SkeletonAvatar( - style: SkeletonAvatarStyle( - padding: const EdgeInsets.symmetric(horizontal: 8), - width: Get.width * 0.88, - height: 200, - borderRadius: BorderRadius.circular(20), - ), - ), - ), - ), - ); - }, - ), - ], - ), - ); - } -} - - - - -// Container( -// margin: EdgeInsets.only( -// bottom: 20, -// ), // Set margin around each panel -// child: ClipRRect( -// borderRadius: BorderRadius.circular(30), -// child: StatefulBuilder( -// builder: (context, setState) { -// return ExpansionPanelList( -// dividerColor: -// ColorConstants.kPrimaryColor, -// elevation: 1, -// expandedHeaderPadding: EdgeInsets.all(0), -// expansionCallback: -// (int index, bool isExpanded) { -// // isExpanded = !isExpanded; -// if (isExpanded == false) { -// setState(() { -// expandTile = true; -// }); -// } else { -// setState(() { -// expandTile = false; -// }); -// } -// }, -// children: [ -// ExpansionPanel( -// headerBuilder: (BuildContext context, -// bool isExpanded) { -// return ListTile( -// title: Text( -// 'Week ${(e.id)}', // "Week ${((e.index) - listLen).abs()}", -// style: TextStyle( -// color: ColorConstants -// .kPrimaryColor, -// ), -// ), -// ); -// }, -// body: Padding( -// padding: const EdgeInsets.only( -// bottom: 20, -// left: 20, -// right: 20, -// ), -// child: e.pastData!.isEmpty -// ? Center( -// child: Text( -// 'No Session found ☹️.', -// style: TextStyle( -// color: !globalContoller -// .darkMode.value -// ? Colors.black -// : ColorConstants -// .kPrimaryColor, -// fontSize: 16, -// ), -// textAlign: -// TextAlign.center, -// ), -// ) -// : ListView.builder( -// itemCount: -// e.pastData!.length, -// shrinkWrap: true, -// physics: ScrollPhysics(), -// itemBuilder: -// (context, index) { -// return Container( -// decoration: -// BoxDecoration( -// border: Border.all( -// color: ColorConstants -// .kPrimaryColor, -// ), -// borderRadius: -// BorderRadius -// .circular(5), -// ), -// margin: EdgeInsets.only( -// bottom: 20), -// padding: EdgeInsets -// .symmetric( -// horizontal: 10, -// vertical: 10, -// ), -// child: Row( -// mainAxisAlignment: -// MainAxisAlignment -// .spaceBetween, -// children: [ -// Column( -// mainAxisAlignment: -// MainAxisAlignment -// .start, -// crossAxisAlignment: -// CrossAxisAlignment -// .start, -// children: [ -// Row( -// children: [ -// SvgPicture -// .asset( -// 'assets/image/calendar.svg'), -// SizedBox( -// width: -// 10), -// Text( -// '${e.pastData![index].day}', -// style: -// TextStyle( -// fontSize: -// 14, -// color: ColorConstants -// .kWhite, -// ), -// ), -// ], -// ), -// SizedBox( -// height: 8), -// Text( -// '${e.pastData![index].activityName}', -// style: -// TextStyle( -// fontSize: -// 20, -// color: ColorConstants -// .kWhite, -// fontFamily: -// 'SFPRO', -// letterSpacing: -// 0.4, -// fontWeight: -// FontWeight -// .bold, -// ), -// ), -// SizedBox( -// height: 10), -// Row( -// children: [ -// SvgPicture -// .asset( -// 'assets/image/duration.svg'), -// SizedBox( -// width: -// 10), -// Text( -// 'Duration ${e.pastData![index].duration} min', -// style: -// TextStyle( -// fontSize: -// 14, -// color: ColorConstants -// .kWhite, -// ), -// ), -// Text( -// ' - Yoga', -// style: -// TextStyle( -// fontSize: -// 14, -// color: ColorConstants -// .kWhite, -// ), -// ), -// ], -// ) -// ], -// ), -// Container( -// decoration: -// BoxDecoration( -// border: -// Border.all( -// color: ColorConstants -// .kPrimaryColor, -// width: 2, -// ), -// shape: BoxShape -// .circle, -// ), -// child: -// GestureDetector( -// // redirect to Zoom for live session -// onTap: () { -// _launchInBrowser( -// 'https://us02web.zoom.us/rec/share/Pcc6SAUO9DEjt2Cm25ZtN57ODUJNBobl4CYabomLyJl4wqseoq11hT5r454gIvZy.9xwrGs9_Un8vRIR4'); -// // _launchURL(e.pastData![index].url); -// }, -// child: -// const Padding( -// padding: -// EdgeInsets -// .all( -// 3.0), -// child: Icon( -// Icons -// .play_arrow_rounded, -// color: ColorConstants -// .kPrimaryColor, -// size: 35, -// ), -// ), -// ), -// ), -// ], -// ), -// ); -// }, -// ), -// ), -// isExpanded: expandTile, -// ), -// ], -// ); -// }, -// ), -// ), -// ); diff --git a/gsf/lib/views/pages/test/scroll_test.dart b/gsf/lib/views/pages/test/scroll_test.dart deleted file mode 100644 index 6b91c95..0000000 --- a/gsf/lib/views/pages/test/scroll_test.dart +++ /dev/null @@ -1,48 +0,0 @@ -import 'package:flutter/material.dart'; - -class MyHomePagetest extends StatefulWidget { - const MyHomePagetest({Key? key}) : super(key: key); - - @override - _MyHomePagetestState createState() => _MyHomePagetestState(); -} - -class _MyHomePagetestState extends State { - ScrollController listScrollController = ScrollController(); - @override - Widget build(BuildContext context) { - return Scaffold( - appBar: AppBar(), - - // Floating action button implemented with the - // auto scroll function to the bottom of list - floatingActionButton: FloatingActionButton( - onPressed: () { - if (listScrollController.hasClients) { - final position = listScrollController.position.maxScrollExtent; - listScrollController.animateTo( - position, - duration: const Duration(seconds: 3), - curve: Curves.easeOut, - ); - } - }, - isExtended: true, - tooltip: "Scroll to Bottom", - child: const Icon(Icons.arrow_downward), - ), - - // ListView with 100 list items - body: ListView.builder( - // Scroll Controller for functionality - controller: listScrollController, - itemCount: 100, - itemBuilder: (context, index) { - return ListTile( - title: Text("Item ${index + 1}"), - ); - }, - ), - ); - } -} diff --git a/gsf/lib/views/pages/test/sliver_appbar.dart b/gsf/lib/views/pages/test/sliver_appbar.dart deleted file mode 100644 index e5b976a..0000000 --- a/gsf/lib/views/pages/test/sliver_appbar.dart +++ /dev/null @@ -1,211 +0,0 @@ -// ignore_for_file: prefer_const_constructors - -import 'package:flutter/material.dart'; -import 'package:get/get.dart'; -import '../../theme.dart'; - -class PodcastListTest extends StatelessWidget { - const PodcastListTest({Key? key}) : super(key: key); - - @override - Widget build(BuildContext context) { - return Scaffold( - backgroundColor: ColorConstants.kBlack, - body: NestedScrollView( - headerSliverBuilder: (BuildContext context, bool innerBoxIsScrolled) { - return [ - SliverOverlapAbsorber( - handle: NestedScrollView.sliverOverlapAbsorberHandleFor(context), - sliver: SliverAppBar( - backgroundColor: ColorConstants.kBlack, - titleSpacing: 0, - leadingWidth: 70, - stretch: true, - leading: Padding( - padding: const EdgeInsets.only( - top: 10, left: 18, right: 15, bottom: 10), - child: InkWell( - splashColor: const Color(0xff313030).withOpacity(0.5), - borderRadius: BorderRadius.circular(7), - onTap: () => Get.back(), - child: Container( - width: 50, - height: 50, - decoration: BoxDecoration( - color: const Color(0xff313030), - borderRadius: BorderRadius.circular(7), - ), - child: const Padding( - padding: EdgeInsets.only(left: 8.0), - child: Icon( - Icons.arrow_back_ios, - color: ColorConstants.kWhite, - size: 20, - ), - ), - ), - ), - ), - stretchTriggerOffset: 80, - automaticallyImplyLeading: false, - flexibleSpace: FlexibleSpaceBar( - titlePadding: const EdgeInsets.all(0.0), - // collapseMode: CollapseMode.pin, - // expandedTitleScale: 1, - background: Image.asset( - 'assets/image/podcast/podcastImg.jpg', - fit: BoxFit.cover, - alignment: Alignment.topCenter, - ), - - title: innerBoxIsScrolled - ? SizedBox( - width: Get.size.width, - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - SizedBox(height: 30), - Row( - // crossAxisAlignment: CrossAxisAlignment.center, - children: [ - // Text( - // 'Our Daily Latest Podcast', - // style: TextStyle( - // fontSize: 20, - // color: ColorConstants.kWhite, - // fontFamily: 'SFPRO', - // ), - // ), - Spacer(), - Text( - 'Set To Inspire', - style: TextStyle( - fontSize: 25, - color: ColorConstants.kWhite, - fontFamily: 'SFPRO', - fontWeight: FontWeight.w600, - ), - ), - Spacer(), - Container( - width: 32, - height: 32, - decoration: BoxDecoration( - color: ColorConstants.kPrimaryColor - .withOpacity(0.9), - shape: BoxShape.circle, - ), - child: const Icon( - Icons.play_arrow_rounded, - color: ColorConstants.kBlack, - size: 30, - ), - ), - ], - ), - ], - ), - ) - : SizedBox( - width: Get.size.width, - child: Column( - mainAxisAlignment: MainAxisAlignment.end, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - 'Set To Inspire', - style: TextStyle( - fontSize: 25, - color: ColorConstants.kWhite, - fontFamily: 'SFPRO', - fontWeight: FontWeight.w600, - ), - ), - Row( - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: - MainAxisAlignment.spaceBetween, - children: [ - Text( - 'Our Daily Latest Podcast', - style: TextStyle( - fontSize: 20, - color: ColorConstants.kWhite, - fontFamily: 'SFPRO', - ), - ), - Container( - width: 32, - height: 32, - decoration: BoxDecoration( - color: ColorConstants.kPrimaryColor - .withOpacity(0.9), - shape: BoxShape.circle, - ), - child: const Icon( - Icons.play_arrow_rounded, - color: ColorConstants.kBlack, - size: 30, - ), - ), - ], - ), - ], - ), - ), - ), - pinned: true, - expandedHeight: 295, - ), - ) - ]; - }, - body: Builder(builder: (BuildContext context) { - return CustomScrollView( - slivers: [ - SliverOverlapInjector( - // This is the flip side of the SliverOverlapAbsorber above. - handle: - NestedScrollView.sliverOverlapAbsorberHandleFor(context), - ), - SliverToBoxAdapter( - child: Container( - height: 90, - color: Colors.black, - ), - ), - SliverToBoxAdapter( - child: Container( - height: 200, - color: Colors.red, - ), - ), - SliverToBoxAdapter( - child: Padding( - padding: const EdgeInsets.all(8.0), - child: Container( - height: 200, - color: Colors.green, - ), - ), - ), - SliverToBoxAdapter( - child: Container( - height: 200, - color: Colors.blue, - ), - ), - SliverToBoxAdapter( - child: Container( - height: 200, - color: Colors.red, - ), - ), - ], - ); - }), - ), - ); - } -} diff --git a/gsf/lib/views/pages/test/story_viewr.dart b/gsf/lib/views/pages/test/story_viewr.dart deleted file mode 100644 index 9d0ff8b..0000000 --- a/gsf/lib/views/pages/test/story_viewr.dart +++ /dev/null @@ -1,185 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:story_view/story_view.dart'; - -class StoryViewr extends StatelessWidget { - final StoryController controller = StoryController(); - - @override - Widget build(BuildContext context) { - return Scaffold( - appBar: AppBar( - title: Text("Delicious Ghanaian Meals"), - ), - body: Container( - margin: EdgeInsets.all( - 8, - ), - child: ListView( - children: [ - Container( - height: 300, - child: StoryView( - controller: controller, - storyItems: [ - StoryItem.text( - title: - "Hello world!\nHave a look at some great Ghanaian delicacies. I'm sorry if your mouth waters. \n\nTap!", - backgroundColor: Colors.orange, - roundedTop: true, - ), - // StoryItem.inlineImage( - // NetworkImage( - // "https://image.ibb.co/gCZFbx/Banku-and-tilapia.jpg"), - // caption: Text( - // "Banku & Tilapia. The food to keep you charged whole day.\n#1 Local food.", - // style: TextStyle( - // color: Colors.white, - // backgroundColor: Colors.black54, - // fontSize: 17, - // ), - // ), - // ), - StoryItem.inlineImage( - url: - "https://image.ibb.co/cU4WGx/Omotuo-Groundnut-Soup-braperucci-com-1.jpg", - controller: controller, - caption: Text( - "Omotuo & Nkatekwan; You will love this meal if taken as supper.", - style: TextStyle( - color: Colors.white, - backgroundColor: Colors.black54, - fontSize: 17, - ), - ), - ), - StoryItem.inlineImage( - url: - "https://media.giphy.com/media/5GoVLqeAOo6PK/giphy.gif", - controller: controller, - caption: Text( - "Hektas, sektas and skatad", - style: TextStyle( - color: Colors.white, - backgroundColor: Colors.black54, - fontSize: 17, - ), - ), - ) - ], - onStoryShow: (s) { - print("Showing a story"); - }, - onComplete: () { - print("Completed a cycle"); - }, - progressPosition: ProgressPosition.bottom, - repeat: false, - inline: true, - ), - ), - Material( - child: InkWell( - onTap: () { - Navigator.of(context).push( - MaterialPageRoute(builder: (context) => MoreStories())); - }, - child: Container( - decoration: BoxDecoration( - color: Colors.black54, - borderRadius: - BorderRadius.vertical(bottom: Radius.circular(8))), - padding: EdgeInsets.symmetric(vertical: 8), - child: Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Icon( - Icons.arrow_forward, - color: Colors.white, - ), - SizedBox( - width: 16, - ), - Text( - "View more stories", - style: TextStyle(fontSize: 16, color: Colors.white), - ), - ], - ), - ), - ), - ), - ], - ), - ), - ); - } -} - -class MoreStories extends StatefulWidget { - @override - _MoreStoriesState createState() => _MoreStoriesState(); -} - -class _MoreStoriesState extends State { - final storyController = StoryController(); - - @override - void dispose() { - storyController.dispose(); - super.dispose(); - } - - @override - Widget build(BuildContext context) { - return Scaffold( - appBar: AppBar( - title: Text("More"), - ), - body: StoryView( - storyItems: [ - StoryItem.text( - title: "I guess you'd love to see more of our food. That's great.", - backgroundColor: Colors.blue, - ), - StoryItem.text( - title: "Nice!\n\nTap to continue.", - backgroundColor: Colors.red, - textStyle: TextStyle( - fontFamily: 'Dancing', - fontSize: 40, - ), - ), - StoryItem.pageImage( - url: - "https://image.ibb.co/cU4WGx/Omotuo-Groundnut-Soup-braperucci-com-1.jpg", - caption: "Still sampling", - controller: storyController, - ), - StoryItem.pageImage( - url: "https://media.giphy.com/media/5GoVLqeAOo6PK/giphy.gif", - caption: "Working with gifs", - controller: storyController), - StoryItem.pageImage( - url: "https://media.giphy.com/media/XcA8krYsrEAYXKf4UQ/giphy.gif", - caption: "Hello, from the other side", - controller: storyController, - ), - StoryItem.pageImage( - url: "https://media.giphy.com/media/XcA8krYsrEAYXKf4UQ/giphy.gif", - caption: "Hello, from the other side2", - controller: storyController, - ), - ], - onStoryShow: (s) { - print("Showing a story"); - }, - onComplete: () { - print("Completed a cycle"); - }, - progressPosition: ProgressPosition.top, - repeat: false, - controller: storyController, - ), - ); - } -} diff --git a/gsf/lib/views/pages/test/test.dart b/gsf/lib/views/pages/test/test.dart deleted file mode 100644 index 7c0f1e1..0000000 --- a/gsf/lib/views/pages/test/test.dart +++ /dev/null @@ -1,556 +0,0 @@ -import 'dart:developer'; - -import 'package:flutter/material.dart'; -import 'package:flutter/services.dart'; -import 'package:get/get.dart'; - -import 'bottom_nav.dart'; -import 'bottomnvigation_controller.dart'; -import 'detailscreen.dart'; - -class MyApps extends StatelessWidget { - const MyApps({Key? key}) : super(key: key); - - @override - Widget build(BuildContext context) { - return MaterialApp( - title: 'Flutter ShowCase', - theme: ThemeData( - primaryColor: const Color(0xffEE5366), - ), - debugShowCheckedModeBanner: false, - home: Scaffold(body: const MailPage() - - // ShowCaseWidget( - // onStart: (index, key) { - // log('onStart: $index, $key'); - // }, - // onComplete: (index, key) { - // log('onComplete: $index, $key'); - // if (index == 4) { - // SystemChrome.setSystemUIOverlayStyle( - // SystemUiOverlayStyle.light.copyWith( - // statusBarIconBrightness: Brightness.dark, - // statusBarColor: Colors.white, - // ), - // ); - // } - // }, - // blurValue: 1, - // builder: Builder(builder: (context) => const MailPage()), - // autoPlayDelay: const Duration(seconds: 3), - // ), - ), - ); - } -} - -class MailPage extends StatefulWidget { - const MailPage({Key? key}) : super(key: key); - - @override - _MailPageState createState() => _MailPageState(); -} - -class _MailPageState extends State { - final NavigationCrontrollers navControllerTest = - Get.put(NavigationCrontrollers()); - // final GlobalKey _one = GlobalKey(); - // final GlobalKey _two = GlobalKey(); - // final GlobalKey _three = GlobalKey(); - // final GlobalKey _four = GlobalKey(); - // final GlobalKey _five = GlobalKey(); - List mails = []; - - final scrollController = ScrollController(); - - @override - void initState() { - super.initState(); - //Start showcase view after current widget frames are drawn. - //NOTE: remove ambiguate function if you are using - //flutter version greater than 3.x and direct use WidgetsBinding.instance - // WidgetsBinding.instance.addPostFrameCallback( - // (_) => ShowCaseWidget.of(context).startShowCase([ - // navControllerTest.a, - // navControllerTest.b, - // navControllerTest.c, - // navControllerTest.d, - // navControllerTest.e, - // navControllerTest.f, - // navControllerTest.g, - // navControllerTest.h, - // navControllerTest.i, - // navControllerTest.j, - // ]), - // ); - - mails = [ - Mail( - sender: 'Medium', - sub: 'Showcase View', - msg: 'Check new showcase View', - date: '1 May', - isUnread: false, - ), - Mail( - sender: 'Quora', - sub: 'New Question for you', - msg: 'Hi, There is new question for you', - date: '2 May', - isUnread: true, - ), - Mail( - sender: 'Google', - sub: 'Flutter 1.5', - msg: 'We have launched Flutter 1.5', - date: '3 May', - isUnread: false, - ), - Mail( - sender: 'Github', - sub: 'Showcase View', - msg: 'New star on your showcase view.', - date: '4 May ', - isUnread: true, - ), - Mail( - sender: 'Simform', - sub: 'Credit card Plugin', - msg: 'Check out our credit card plugin', - date: '5 May', - isUnread: false, - ), - Mail( - sender: 'Flutter', - sub: 'Flutter is Future', - msg: 'Flutter launched for Web', - date: '6 May', - isUnread: true, - ), - Mail( - sender: 'Medium', - sub: 'Showcase View', - msg: 'Check new showcase View', - date: '7 May ', - isUnread: false, - ), - Mail( - sender: 'Simform', - sub: 'Credit card Plugin', - msg: 'Check out our credit card plugin', - date: '8 May', - isUnread: true, - ), - Mail( - sender: 'Flutter', - sub: 'Flutter is Future', - msg: 'Flutter launched for Web', - date: '9 May', - isUnread: false, - ), - ]; - } - - @override - void dispose() { - scrollController.dispose(); - super.dispose(); - } - - @override - Widget build(BuildContext context) { - return Scaffold( - backgroundColor: Colors.white, - body: SafeArea( - bottom: false, - child: Column( - children: [ - const SizedBox( - height: 20, - ), - Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Row( - children: [ - Expanded( - child: Container( - padding: const EdgeInsets.only(left: 10, right: 8), - child: Container( - padding: const EdgeInsets.all(12), - decoration: BoxDecoration( - color: const Color(0xffF9F9F9), - border: Border.all( - color: const Color(0xffF3F3F3), - width: 2, - ), - borderRadius: BorderRadius.circular(8), - ), - child: Row( - children: [ - Expanded( - child: Row( - children: [ - GestureDetector( - onTap: () => print('menu button clicked'), - child: Icon( - Icons.menu, - color: Theme.of(context).primaryColor, - ), - ), - // Showcase( - // key: navControllerTest.a, - // description: 'Tap to see menu options', - // disableDefaultTargetGestures: true, - // child: - // ), - const SizedBox( - width: 10, - ), - const Text( - 'Search email', - style: TextStyle( - color: Colors.black45, - fontSize: 16, - letterSpacing: 0.4, - ), - ), - const Spacer(), - const Icon( - Icons.search, - color: Color(0xffADADAD), - ), - ], - ), - ), - ], - ), - ), - ), - ), - // Showcase( - // targetPadding: const EdgeInsets.all(5), - // key: navControllerTest.b, - // title: 'Profile', - // description: - // "Tap to see profile which contains user's name, profile picture, mobile number and country", - // tooltipBackgroundColor: Theme.of(context).primaryColor, - // textColor: Colors.white, - // targetShapeBorder: const CircleBorder(), - // child: - - // ), - Container( - padding: const EdgeInsets.all(5), - width: 45, - height: 45, - decoration: BoxDecoration( - shape: BoxShape.circle, - color: Theme.of(context).primaryColor, - ), - child: Image.asset('assets/image/1.png'), - ), - const SizedBox( - width: 12, - ) - ], - ), - const SizedBox( - height: 10, - ), - Container( - padding: const EdgeInsets.only(left: 16, top: 4), - child: const Text( - 'PRIMARY', - style: TextStyle( - color: Colors.black, - fontSize: 15, - fontWeight: FontWeight.bold, - ), - ), - ), - ], - ), - const Padding(padding: EdgeInsets.only(top: 8)), - Expanded( - child: ListView.builder( - controller: scrollController, - physics: const BouncingScrollPhysics(), - itemBuilder: (context, index) { - if (index == 0) { - return showcaseMailTile( - navControllerTest.c, true, context, mails.first); - } - return MailTile( - mail: mails[index % mails.length], - ); - }, - ), - ), - ], - ), - ), - floatingActionButton: FloatingActionButton( - backgroundColor: Theme.of(context).primaryColor, - onPressed: () { - setState(() { - /* reset ListView to ensure that the showcased widgets are - * currently rendered so the showcased keys are available in the - * render tree. */ - scrollController.jumpTo(0); - // ShowCaseWidget.of(context).startShowCase([ - // navControllerTest.a, - // navControllerTest.b, - // navControllerTest.c, - // navControllerTest.d, - // navControllerTest.e - // ]); - }); - }, - child: const Icon( - Icons.add, - ), - ), - - // Showcase( - // key: navControllerTest.e, - // title: 'Compose Mail', - // description: 'Click here to compose mail', - // targetShapeBorder: const CircleBorder(), - // child: - - // ), - bottomNavigationBar: BottomNavigations(), - ); - } - - GestureDetector showcaseMailTile(GlobalKey> key, - bool showCaseDetail, BuildContext context, Mail mail) { - return GestureDetector( - onTap: () { - Navigator.push( - context, - MaterialPageRoute( - builder: (_) => const Detail(), - ), - ); - }, - child: Container( - padding: const EdgeInsets.symmetric(vertical: 8), - child: MailTile( - mail: mail, - showCaseKey: navControllerTest.d, - showCaseDetail: showCaseDetail, - ) - - // Showcase( - // key: key, - // description: 'Tap to check mail', - // disposeOnTap: true, - // onTargetClick: () { - // Navigator.push( - // context, - // MaterialPageRoute( - // builder: (_) => const Detail(), - // ), - // ).then((_) { - // setState(() { - // ShowCaseWidget.of(context).startShowCase( - // [navControllerTest.d, navControllerTest.e]); - // }); - // }); - // }, - // child: - - // ), - ), - ); - } -} - -class SAvatarExampleChild extends StatelessWidget { - const SAvatarExampleChild({ - Key? key, - }) : super(key: key); - - @override - Widget build(BuildContext context) { - return Container( - margin: const EdgeInsets.all(10), - child: Container( - width: 45, - height: 45, - decoration: const BoxDecoration( - shape: BoxShape.circle, - color: Color(0xffFCD8DC), - ), - child: Center( - child: Text( - 'S', - style: TextStyle( - color: Theme.of(context).primaryColor, - fontWeight: FontWeight.bold, - fontSize: 16, - ), - ), - ), - ), - ); - } -} - -class Mail { - Mail({ - required this.sender, - required this.sub, - required this.msg, - required this.date, - required this.isUnread, - }); - - String sender; - String sub; - String msg; - String date; - bool isUnread; -} - -class MailTile extends StatelessWidget { - const MailTile( - {required this.mail, - this.showCaseDetail = false, - this.showCaseKey, - Key? key}) - : super(key: key); - final bool showCaseDetail; - final GlobalKey>? showCaseKey; - final Mail mail; - - @override - Widget build(BuildContext context) { - return Container( - padding: const EdgeInsets.only(left: 6, right: 16, top: 8, bottom: 8), - color: mail.isUnread ? const Color(0xffFFF6F7) : Colors.white, - child: Row( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Expanded( - child: Row( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - if (showCaseDetail) - // Showcase.withWidget( - // key: showCaseKey!, - // height: 50, - // width: 140, - // targetShapeBorder: const CircleBorder(), - // targetBorderRadius: const BorderRadius.all( - // Radius.circular(150), - // ), - // container: - - // Column( - // crossAxisAlignment: CrossAxisAlignment.start, - // children: [ - // Container( - // width: 45, - // height: 45, - // decoration: const BoxDecoration( - // shape: BoxShape.circle, - // color: Color(0xffFCD8DC), - // ), - // child: Center( - // child: Text( - // 'S', - // style: TextStyle( - // color: Theme.of(context).primaryColor, - // fontWeight: FontWeight.bold, - // fontSize: 16, - // ), - // ), - // ), - // ), - // const SizedBox( - // height: 10, - // ), - // const Text( - // "Your sender's profile ", - // style: TextStyle(color: Colors.white), - // ) - // ], - // ), - // child: const SAvatarExampleChild(), - // ) - // else - // const SAvatarExampleChild(), - const Padding(padding: EdgeInsets.only(left: 8)), - Expanded( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - mail.sender, - overflow: TextOverflow.ellipsis, - style: TextStyle( - fontWeight: mail.isUnread - ? FontWeight.bold - : FontWeight.normal, - fontSize: 17, - ), - ), - Text( - mail.sub, - overflow: TextOverflow.ellipsis, - style: const TextStyle( - fontWeight: FontWeight.normal, - fontSize: 16, - ), - ), - Text( - mail.msg, - overflow: TextOverflow.ellipsis, - style: TextStyle( - fontWeight: FontWeight.normal, - color: mail.isUnread - ? Theme.of(context).primaryColor - : Colors.black, - fontSize: 15, - ), - ), - ], - ), - ) - ], - ), - ), - SizedBox( - width: 50, - child: Column( - children: [ - const SizedBox( - height: 5, - ), - Text( - mail.date, - style: const TextStyle( - fontWeight: FontWeight.normal, - fontSize: 12, - color: Colors.grey, - ), - ), - const SizedBox( - height: 10, - ), - Icon( - mail.isUnread ? Icons.star : Icons.star_border, - color: mail.isUnread ? const Color(0xffFBC800) : Colors.grey, - ), - ], - ), - ), - ], - ), - ); - } -} diff --git a/gsf/lib/views/pages/test/test1.dart b/gsf/lib/views/pages/test/test1.dart deleted file mode 100644 index aafb2cd..0000000 --- a/gsf/lib/views/pages/test/test1.dart +++ /dev/null @@ -1,155 +0,0 @@ -import 'package:flutter/material.dart'; - -import 'colors_util.dart'; -import 'date_utils.dart' as date_util; - -class HorizonatalView extends StatefulWidget { - final String title; - const HorizonatalView({Key? key, required this.title}) : super(key: key); - - @override - _HorizonatalViewState createState() => _HorizonatalViewState(); -} - -class _HorizonatalViewState extends State { - double width = 0.0; - double height = 0.0; - late ScrollController scrollController; - List currentMonthList = List.empty(); - DateTime currentDateTime = DateTime.now(); - - @override - void initState() { - currentMonthList = date_util.DateUtils.daysInMonth(currentDateTime); - currentMonthList.sort((a, b) => a.day.compareTo(b.day)); - currentMonthList = currentMonthList.toSet().toList(); - scrollController = - ScrollController(initialScrollOffset: 37.0 * currentDateTime.day); - super.initState(); - } - - Widget titleView() { - return Padding( - padding: const EdgeInsets.fromLTRB(0, 0, 0, 20), - child: Text( - date_util.DateUtils.months[currentDateTime.month - 1] + - ' ' + - currentDateTime.year.toString(), - style: const TextStyle( - color: Colors.white, - fontWeight: FontWeight.bold, - fontSize: 20, - ), - ), - ); - } - - Widget hrizontalCapsuleListView() { - return SizedBox( - width: width, - height: 70, - child: ListView.builder( - controller: scrollController, - scrollDirection: Axis.horizontal, - physics: const ClampingScrollPhysics(), - shrinkWrap: true, - itemCount: currentMonthList.length, - itemBuilder: (BuildContext context, int index) { - return capsuleView(index); - }, - ), - ); - } - - Widget capsuleView(int index) { - return Padding( - padding: const EdgeInsets.fromLTRB(8, 0, 0, 0), - child: GestureDetector( - onTap: () { - setState(() { - currentDateTime = currentMonthList[index]; - }); - }, - child: Container( - width: 45, - height: 67, - decoration: BoxDecoration( - color: (currentMonthList[index].day != currentDateTime.day) - ? Colors.red - : Colors.yellow, - borderRadius: BorderRadius.circular(40), - boxShadow: [ - BoxShadow( - offset: Offset(4, 4), - blurRadius: 4, - spreadRadius: 2, - color: Colors.black12, - ) - ]), - child: Center( - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - currentMonthList[index].day.toString(), - style: TextStyle( - fontSize: 22, - fontWeight: FontWeight.bold, - height: 1, - color: - (currentMonthList[index].day != currentDateTime.day) - ? HexColor("465876") - : Colors.white, - ), - ), - Text( - date_util.DateUtils - .weekdays[currentMonthList[index].weekday - 1], - style: TextStyle( - fontSize: - (currentMonthList[index].day != currentDateTime.day) - ? 12 - : 14, - fontWeight: FontWeight.bold, - color: - (currentMonthList[index].day != currentDateTime.day) - ? HexColor("465876") - : Colors.white, - ), - ) - ], - ), - ), - ), - )); - } - - Widget topView() { - return SizedBox( - // height: height * 0.35, - width: width, - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - children: [ - titleView(), - hrizontalCapsuleListView(), - ], - ), - ); - } - - @override - Widget build(BuildContext context) { - width = MediaQuery.of(context).size.width; - height = MediaQuery.of(context).size.height; - return Scaffold( - backgroundColor: Colors.black, - body: Padding( - padding: const EdgeInsets.only(top: 180.0), - child: Stack( - children: [topView()], - ), - ), - ); - } -} diff --git a/gsf/lib/views/pages/test/test_page.dart b/gsf/lib/views/pages/test/test_page.dart deleted file mode 100644 index 130aa71..0000000 --- a/gsf/lib/views/pages/test/test_page.dart +++ /dev/null @@ -1,12 +0,0 @@ -// import 'package:flutter/material.dart'; - -// class TestPage extends StatelessWidget { -// const TestPage({super.key}); - -// @override -// Widget build(BuildContext context) { -// return Scaffold( -// body: Center(child: Text("Shikha")), -// ); -// } -// } \ No newline at end of file diff --git a/gsf/lib/views/pages/test/time_zone.dart b/gsf/lib/views/pages/test/time_zone.dart deleted file mode 100644 index faf3615..0000000 --- a/gsf/lib/views/pages/test/time_zone.dart +++ /dev/null @@ -1,463 +0,0 @@ -// // ignore_for_file: deprecated_member_use - -// import 'dart:convert'; - -// import 'package:flutter/material.dart'; -// import 'package:flutter_custom_tabs/flutter_custom_tabs.dart'; -// import 'package:flutter_svg/svg.dart'; -// import 'package:get/get.dart'; -// import 'package:gsp_app/view_model/utc_time_contoller.dart'; -// import 'package:intl/intl.dart'; -// // import 'package:url_launcher/url_launcher.dart'; - -// import '../../../modals/live_session_model.dart'; -// import '../../../view_model/global_controller.dart'; -// import '../../components/appbar.dart'; -// import '../../components/btn.dart'; -// import '../../theme.dart'; - -// class SessionsDetails extends StatefulWidget { -// final LiveActivityModel data; -// const SessionsDetails({required this.data, Key? key}) : super(key: key); - -// @override -// State createState() => _SessionsDetailsState(); -// } - -// class _SessionsDetailsState extends State { -// @override -// Widget build(BuildContext context) { -// // convertTimeInUtcWithouAmAndPm - -// var timeInUtc = convertUtcToLocalTime(widget.data.time); -// var spliUtcTime = timeInUtc.split(' '); -// var startTimeSessoin = spliUtcTime[0].split(':'); - -// var now = DateTime.now(); - -// var currentTimeFormatted = DateFormat('hh:mm a').format(now); - -// void mains() { -// var timeCurrentTime = currentTimeFormatted; -// var timeUtcBackendTime = timeInUtc; -// var durationTime = "${widget.data.dayDuration} minutes"; - -// // Define a date format for parsing times -// var timeFormat = DateFormat('hh:mm a'); - -// try { -// // Parse the time strings -// var currentTime = timeFormat.parse(timeCurrentTime); -// var backendTime = timeFormat.parse(timeUtcBackendTime); - -// // Parse the duration string -// var durationMatch = RegExp(r'(\d+) (\w+)').firstMatch(durationTime); -// var durationValue = int.parse(durationMatch!.group(1)!); -// var durationUnit = durationMatch.group(2)!; - -// // Calculate the new time after adding the duration -// var newTime = durationUnit == 'minutes' -// ? currentTime.add(Duration(minutes: durationValue)) -// : currentTime.add(Duration(hours: durationValue)); -// print('durationMatch ${newTime}'); - -// // Compare the times and display the appropriate message -// if (currentTime.isBefore(backendTime)) { -// print("Wait"); -// } else if (newTime.isAtSameMomentAs(backendTime)) { -// print("Join Now"); -// } else { -// print("Expire"); -// } -// } catch (e) { -// print("Invalid date format: $e"); -// } -// } - -// setState(() { -// mains(); -// }); - -// // print('Session Time current time ${currentTimeFormatted}'); -// // print('Session Time utc backend time ${timeInUtc}'); - -// // final tames = TimeOfDay( -// // hour: int.parse(startTimeSessoin[0]), -// // minute: int.parse(startTimeSessoin[1]), -// // ); -// // print('DATA OF INNER OF LIVE Sessions ${timeInUtc}'); - -// // var newFormateDate = DateFormat.Hm().format(DateTime.now().toLocal()); -// // var newTames= newFormateDate.split(":"); -// // print('newFormateDate ${newTames[0]}'); - -// // int newHour = int.parse(newTames[0]); -// // int newMinute = int.parse(newTames[1]); - -// // final currentTime = TimeOfDay.now(); -// final currentTime = TimeOfDay.now(); - -// // print('current time $currentTime'); - -// // print( -// // 'timeDifference hour multiplied with 60 ${currentTime.hour} minutes ${currentTime.minute} backend time ${widget.data.time} converted time ${timeInUtc}'); - -// // final timeDifference = currentTime.hour * 60 + -// // currentTime.minute - -// // (tames.hour * 60 + tames.minute); - -// String btnJoining = ''; - -// bool trueAndFalse = false; - -// // checkTimeSession() { -// // // print('check sessions'); -// // if (timeDifference <= widget.data.dayDuration) { -// // btnJoining = 'Please wait to join'; -// // trueAndFalse = false; -// // } - -// // if (timeDifference >= 0) { -// // btnJoining = 'Join Now'; -// // trueAndFalse = true; -// // } - -// // // if (timeDifference >= widget.data.dayDuration) { -// // // btnJoining = 'Session has been ended'; -// // // trueAndFalse = false; -// // // } -// // } -// // setState(() { -// // checkTimeSession(); -// // }); - -// // print( -// // 'timeDifference ${timeDifference} ${btnJoining} vwyecdghwed ${(timeDifference >= 0 && timeDifference <= data.dayDuration)}'); - -// GlobalController globalContoller = Get.put(GlobalController()); -// List benifitActivity = -// jsonDecode(widget.data.activityData[0].benefits.toString()); -// List preRequisit = -// jsonDecode(widget.data.activityData[0].preRequisites.toString()); -// // print('zoom link ${data.zoomLink}'); - -// _launchZoomMeeting(BuildContext context, String zoomLink) async { -// try { -// await launch( -// zoomLink, -// customTabsOption: CustomTabsOption( -// toolbarColor: Theme.of(context).primaryColor, -// enableDefaultShare: true, -// enableUrlBarHiding: true, -// showPageTitle: true, -// ), -// ); -// } catch (e) { -// print('Error launching Zoom: $e'); -// // Handle the error, e.g., show an error message to the user. -// } -// } - -// // void launchZoom(url) async { -// // print('ZOOM URL $url'); -// // final String zoomAppUrl = url; - -// // if (await canLaunch(zoomAppUrl)) { -// // await launch(zoomAppUrl); -// // } else { -// // showDialog( -// // context: context, -// // builder: (BuildContext context) => AlertDialog( -// // title: const Text('Zoom App Not Found'), -// // content: const Text( -// // 'To join this Zoom meeting, please install the Zoom app.'), -// // actions: [ -// // TextButton( -// // onPressed: () async { -// // const String zoomPlayStoreUrl = -// // 'https://play.google.com/store/apps/details?id=us.zoom.videomeetings'; -// // if (await canLaunch(zoomPlayStoreUrl)) { -// // await launch(zoomPlayStoreUrl); -// // } else { -// // throw 'Could not launch $zoomPlayStoreUrl'; -// // } -// // }, -// // child: const Text('Download'), -// // ), -// // TextButton( -// // onPressed: () => Navigator.pop(context), -// // child: const Text('Cancel'), -// // ), -// // ], -// // ), -// // ); -// // } -// // } - -// // Future joinZoomMeeting() async { -// // if (await launchUrl(Uri.parse(meetingUrl))) { -// // await launchUrl(Uri.parse(meetingUrl)); -// // } else { -// // throw 'Could not launch $meetingUrl'; -// // } -// // } -// // print('check time session ${(timeDifference >= 0 && timeDifference <= widget.data.dayDuration)}'); - -// return Scaffold( -// appBar: PreferredSize( -// preferredSize: const Size.fromHeight(60), -// child: CustomAppBars(titleHead: 'Live Session'), -// ), -// body: SingleChildScrollView( -// physics: const BouncingScrollPhysics(), -// child: Column( -// children: [ -// Container( -// width: Get.size.width * 1, -// height: 400, -// decoration: BoxDecoration( -// image: DecorationImage( -// image: NetworkImage(widget.data.activityDayBanner), -// alignment: Alignment.topCenter, -// fit: BoxFit.cover, -// ), -// ), -// child: Column( -// mainAxisAlignment: MainAxisAlignment.end, -// children: [ -// GestureDetector( -// onTap: () { -// // joinZoomMeeting(); -// }, -// child: Container( -// width: 60, -// height: 60, -// decoration: BoxDecoration( -// color: ColorConstants.kPrimaryColor.withOpacity(0.5), -// shape: BoxShape.circle, -// ), -// child: const Padding( -// padding: EdgeInsets.all(8.0), -// child: Icon( -// Icons.play_arrow, -// color: ColorConstants.kBlack, -// size: 35, -// ), -// ), -// ), -// ), -// const SizedBox(height: 20), -// Text( -// widget.data.activityName, -// style: const TextStyle( -// fontSize: 26, -// color: ColorConstants.kWhite, -// fontFamily: 'SFPRO', -// letterSpacing: 0.6, -// fontWeight: FontWeight.bold, -// ), -// ), -// const SizedBox(height: 12), -// SvgPicture.asset('assets/image/live-streaming.svg'), -// const SizedBox(height: 12), -// Padding( -// padding: const EdgeInsets.symmetric(horizontal: 50), -// child: Container( -// decoration: BoxDecoration( -// border: Border.all( -// width: 1, -// color: ColorConstants.kWhite, -// ), -// borderRadius: BorderRadius.circular(10), -// ), -// child: Row( -// children: [ -// Expanded( -// flex: 2, -// child: Column( -// mainAxisAlignment: MainAxisAlignment.center, -// crossAxisAlignment: CrossAxisAlignment.center, -// children: [ -// Text( -// '${widget.data.dayDuration.toString()} min', -// // '', -// style: const TextStyle( -// fontSize: 20, -// color: Color(0xffffffff), -// // fontWeight: FontWeight.w500, -// ), -// ), -// const Text( -// 'Activity Duration', -// style: TextStyle( -// fontSize: 14, -// color: Color(0xffffffff), -// fontWeight: FontWeight.w300, -// ), -// ), -// ], -// ), -// ), -// Expanded( -// flex: 0, -// child: Container( -// width: 1, -// height: 50, -// color: const Color(0xffffffff), -// ), -// ), -// Expanded( -// flex: 2, -// child: Column( -// mainAxisAlignment: MainAxisAlignment.center, -// crossAxisAlignment: CrossAxisAlignment.center, -// children: [ -// Text( -// widget.data.subscription.planName -// .split(' ')[0], -// style: const TextStyle( -// fontSize: 20, -// color: Color(0xffffffff), -// ), -// ), -// const Text( -// 'Activity Level', -// style: TextStyle( -// fontSize: 14, -// color: Color(0xffffffff), -// fontWeight: FontWeight.w300, -// // height: 1, -// ), -// ), -// ], -// ), -// ), -// ], -// ), -// ), -// ), -// const SizedBox(height: 30), -// ], -// ), -// ), -// Padding( -// padding: const EdgeInsets.symmetric(horizontal: 22, vertical: 20), -// child: Column( -// crossAxisAlignment: CrossAxisAlignment.start, -// children: [ -// Text( -// 'About the session', -// style: TextStyle( -// fontSize: 18, -// color: !globalContoller.darkMode.value -// ? ColorConstants.kBlack -// : ColorConstants.kWhite, -// ), -// ), -// const SizedBox(height: 10), -// Text( -// widget.data.description.toString(), -// style: TextStyle( -// fontSize: 16, -// color: !globalContoller.darkMode.value -// ? ColorConstants.kBlack -// : ColorConstants.kWhite, -// ), -// ), -// const SizedBox(height: 30), -// Text( -// 'How will this activity help', -// style: TextStyle( -// fontSize: 18, -// color: !globalContoller.darkMode.value -// ? ColorConstants.kBlack.withOpacity(0.7) -// : ColorConstants.kWhite, -// ), -// ), -// const SizedBox(height: 10), -// Wrap(children: [ -// for (var item in benifitActivity) -// Padding( -// padding: const EdgeInsets.only(right: 12.0, top: 10), -// child: Container( -// decoration: BoxDecoration( -// border: Border.all( -// color: ColorConstants.kPrimaryColor, -// width: 1, -// ), -// borderRadius: BorderRadius.circular(25), -// ), -// child: Padding( -// padding: const EdgeInsets.symmetric( -// horizontal: 15, vertical: 10), -// child: Text( -// item, -// style: TextStyle( -// fontSize: 14, -// color: !globalContoller.darkMode.value -// ? ColorConstants.kBlack -// : ColorConstants.kWhite, -// ), -// ), -// ), -// ), -// ) -// ]), -// const SizedBox(height: 20), -// Text( -// 'How can you prepare yourself for the session', -// style: TextStyle( -// fontSize: 18, -// color: !globalContoller.darkMode.value -// ? ColorConstants.kBlack -// : ColorConstants.kWhite, -// ), -// ), -// const SizedBox(height: 15), -// Wrap(children: [ -// for (var item in preRequisit) -// Padding( -// padding: const EdgeInsets.only(right: 12.0, top: 10), -// child: Container( -// decoration: BoxDecoration( -// border: Border.all( -// color: ColorConstants.kPrimaryColor, -// width: 1, -// ), -// borderRadius: BorderRadius.circular(25), -// ), -// child: Padding( -// padding: const EdgeInsets.symmetric( -// horizontal: 15, vertical: 10), -// child: Text( -// item, -// style: TextStyle( -// fontSize: 14, -// color: !globalContoller.darkMode.value -// ? ColorConstants.kBlack -// : ColorConstants.kWhite, -// ), -// ), -// ), -// ), -// ) -// ]), -// ], -// ), -// ), -// const SizedBox(height: 80), -// ], -// ), -// ), -// floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked, -// floatingActionButton: Padding( -// padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 10), -// child: FullWdtBtn( -// // disabled: (timeDifference >= 0 && timeDifference <= widget.data.dayDuration) ? false : true, -// btnText: 'Join Now', -// onTap: () => _launchZoomMeeting(context, widget.data.zoomLink), -// ), -// ), -// ); -// } -// } diff --git a/gsf/lib/views/pages/test/upcoming_data_utc.dart b/gsf/lib/views/pages/test/upcoming_data_utc.dart deleted file mode 100644 index 027a164..0000000 --- a/gsf/lib/views/pages/test/upcoming_data_utc.dart +++ /dev/null @@ -1,260 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:get/get.dart'; -import 'package:intl/intl.dart'; -import 'package:skeletons/skeletons.dart'; - -import '../../../modals/upcoming_session_model.dart'; -import '../../../repository/response_data.dart'; -import '../../../repository/services/cj/upcoming_activity_service.dart'; -import '../../../view_model/global_controller.dart'; -import '../../../view_model/utc_time_contoller.dart'; -import '../../components/btn.dart'; -import '../../components/page_animation.dart'; -import '../../theme.dart'; -import '../Sessions/count_me.dart'; - -class TestTimeInUpcoming extends StatefulWidget { - const TestTimeInUpcoming({super.key}); - - @override - State createState() => _TestTimeInUpcomingState(); -} - -class _TestTimeInUpcomingState extends State { - GlobalController globalContoller = Get.put(GlobalController()); - @override - Widget build(BuildContext context) { - return Scaffold( - appBar: AppBar( - title: Text('Test Time'), - ), - body: Column( - children: [ - Expanded( - child: upcomingSession(), - ) - ], - ), - ); - } - - upcomingSession() { - return FutureBuilder( - future: UpcomingActivityServices().getUpcomingActivitydataUtc(), - builder: (context, snapshot) { - if (snapshot.connectionState == ConnectionState.done && - snapshot.hasData) { - // print('snapshot data in upcomimg ${snapshot.data!.data}'); - List data = snapshot.data!.data; - // print( - // 'All data drive ${data[0].subscription.planName.split(' ')[0]}'); - String formatDate(String dateStr) { - DateTime date = DateTime.parse(dateStr).toLocal(); - String formattedDate = DateFormat('d MMMM y').format(date); - return formattedDate; - } - - // print('data[index].activityName ${data[0].activityData.first.techerData.teacherName}'); - - return (data.isNotEmpty) - ? Column( - children: [ - const SizedBox(height: 20), - Expanded( - child: ListView.builder( - scrollDirection: Axis.vertical, - itemCount: data.length, - itemBuilder: (context, index) { - - // final dateTime = - // data[index].date.toString().split(' ')[0]; - // DateTime dates = DateTime.parse(dateTime); - // String formattedDate = - // DateFormat('dd MMMM yyyy').format(dates); - var dateTimeStand = - '${data[index].subscription.planName.split(' ')[0]}: ${data[index].dayDuration} mins - ${convertUtcToLocalTime(data[index].time)}'; - print('dateTimeStand $dateTimeStand'); - return Padding( - padding: const EdgeInsets.only(bottom: 20), - child: OpenContainerWrappers( - closeBuild: Container( - height: 280, - width: Get.size.width, - decoration: BoxDecoration( - image: DecorationImage( - image: NetworkImage( - data[index].activityDayBanner, - ), - fit: BoxFit.cover, - alignment: Alignment.topCenter, - ), - ), - child: Column( - children: [ - const Spacer(), - // Container( - // decoration: BoxDecoration( - // color: ColorConstants.kPrimaryColor - // .withOpacity(0.5), - // shape: BoxShape.circle, - // ), - // child: GestureDetector( - // // redirect on count me screen - // // onTap: () => Get.to(() => const VimeoPlayer()), - // child: const Padding( - // padding: EdgeInsets.all(8.0), - // child: Icon( - // Icons.play_arrow, - // color: ColorConstants.kBlack, - // size: 35, - // ), - // ), - // ), - // ), - const SizedBox(height: 10), - Text( - data[index].activityName, - style: TextStyle( - fontSize: 26, - color: ColorConstants.kWhite, - fontFamily: 'SFPRO', - letterSpacing: 0.4, - fontWeight: FontWeight.bold, - ), - ), - const SizedBox(height: 10), - Text( - '$dateTimeStand', - // '${data[index].subscription.planName}: ${data[index].activityDuration} mins - ${data[index].time.toString()} ${(int.parse(data[index].time.toString().split(':')[0])) < 12 ? 'AM' : 'PM'} - Yoga', - // '', - style: TextStyle( - fontSize: 18, - color: Color(0xffD9D9D9), - ), - ), - const SizedBox(height: 8), - Container( - height: 50, - width: 50, - decoration: BoxDecoration( - border: Border.all( - color: const Color(0xffF5F5F5), - width: 1, - ), - shape: BoxShape.circle, - ), - child: Padding( - padding: const EdgeInsets.all(2.0), - child: ClipRRect( - borderRadius: - BorderRadius.circular(50), - child: Image.asset( - 'assets/image/gsf_avatar.png', - fit: BoxFit.cover, - filterQuality: - FilterQuality.high, - ), - ), - ), - ), - const SizedBox(height: 8), - Text( - 'With ${data[index].activityData.first.techerData.teacherName}', - style: TextStyle( - fontSize: 13, - color: ColorConstants.kWhite, - fontFamily: 'SFPRo', - ), - ), - const SizedBox(height: 7), - Container( - decoration: BoxDecoration( - borderRadius: - BorderRadius.circular(22), - border: Border.all( - color: ColorConstants.kWhite, - width: 1, - ), - ), - child: Padding( - padding: EdgeInsets.symmetric( - horizontal: 10, vertical: 4), - child: Text( - formatDate(data[index].date), - style: TextStyle( - fontSize: 14, - color: ColorConstants.kWhite, - ), - ), - ), - ), - const SizedBox(height: 10), - Padding( - padding: const EdgeInsets.symmetric( - horizontal: 50), - child: FullWdtBtn( - btnText: 'Count me in', - onTap: () => Get.to( - () => CountMe( - activityTitle: - data[index].activityName, - date: data[index].date, - timer: data[index].time, - // sDate: , - ), - ), - ), - ), - const SizedBox(height: 20), - ], - ), - ), - openBuild: CountMe( - activityTitle: data[index].activityName, - timer: data[index].time, - date: data[index].date, - ), - ), - ); - })), - ], - ) - : Center( - child: Text( - 'No Session Found ☹️.', - style: TextStyle( - color: - // !globalContoller.darkMode.value - // ? Colors.black - // : - ColorConstants.kPrimaryColor, - fontSize: 16, - ), - textAlign: TextAlign.center, - ), - ); - } - return Padding( - padding: const EdgeInsets.only(top: 20, left: 10, right: 10), - child: ListView.builder( - physics: const BouncingScrollPhysics(), - scrollDirection: Axis.vertical, - shrinkWrap: true, - itemCount: 4, - itemBuilder: (context, index) => Container( - margin: EdgeInsets.only(bottom: 20), - child: SkeletonAvatar( - style: SkeletonAvatarStyle( - padding: const EdgeInsets.symmetric(horizontal: 8), - width: Get.width * 0.88, - height: 200, - borderRadius: BorderRadius.circular(20), - ), - ), - ), - ), - ); - }, - ); - } -} diff --git a/gsf/lib/views/pages/test/video_player.dart b/gsf/lib/views/pages/test/video_player.dart deleted file mode 100644 index 5a8b1bb..0000000 --- a/gsf/lib/views/pages/test/video_player.dart +++ /dev/null @@ -1,123 +0,0 @@ -// import 'package:chewie/chewie.dart'; -// import 'package:flutter/material.dart'; -// import 'package:gsp_app/theme.dart'; -// import 'package:video_player/video_player.dart'; - -// class VideoPlayerView extends StatefulWidget { -// const VideoPlayerView({Key? key}) : super(key: key); - -// @override -// State createState() => _VideoPlayerViewState(); -// } - -// class _VideoPlayerViewState extends State { -// @override -// Widget build(BuildContext context) { -// return Scaffold( -// appBar: AppBar( -// title: const Text( -// 'Video Player', -// style: TextStyle( -// fontSize: 20, -// color: ColorConstants.kWhite, -// fontFamily: 'SFRPO', -// ), -// ), -// ), -// body: Padding( -// padding: const EdgeInsets.symmetric(horizontal: 22.0, vertical: 20), -// child: Column( -// children: const [ -// Text( -// 'Video viwer will goes at down side', -// style: TextStyle( -// fontSize: 22, -// color: ColorConstants.kBlack, -// fontFamily: 'SFPRO', -// fontWeight: FontWeight.w600, -// ), -// ), -// Expanded( -// child: VideoPlayer( -// dataSourceType: DataSourceType.asset, -// url: 'assets/video/video.mp4', -// ), -// ) -// ], -// ), -// ), -// ); -// } -// } - -// class VideoPlayer extends StatefulWidget { -// const VideoPlayer({Key? key, required this.dataSourceType, required this.url}) -// : super(key: key); -// final String url; -// final DataSourceType dataSourceType; - -// @override -// State createState() => _VideoPlayerState(); -// } - -// class _VideoPlayerState extends State { -// late VideoPlayerController _videoPlayerController; -// ChewieController? chewieController; - -// Future loadVideoPlayer() async { -// _videoPlayerController = -// VideoPlayerController.network('https://vimeo.com/253989945'); -// await Future.wait([ -// _videoPlayerController.initialize(), -// ]); -// chewieController = ChewieController( -// videoPlayerController: _videoPlayerController, -// autoPlay: false, -// looping: false, -// ); -// setState(() {}); -// } - -// @override -// void initState() { -// super.initState(); -// loadVideoPlayer(); -// } - -// @override -// void dispose() { -// super.dispose(); -// _videoPlayerController.dispose(); -// chewieController?.dispose(); -// } - -// @override -// Widget build(BuildContext context) { -// return Scaffold( -// body: Column( -// children: [ -// // AspectRatio( -// // aspectRatio: 16 / 9, -// // child: Chewie(controller: chewieController), -// // ), -// AspectRatio( -// aspectRatio: 16 / 9, -// child: (chewieController != null) && -// chewieController!.videoPlayerController.value.isInitialized -// ? Chewie(controller: chewieController!) -// : Column( -// mainAxisAlignment: MainAxisAlignment.center, -// children: const [ -// CircularProgressIndicator(), -// SizedBox( -// height: 20, -// ), -// Text('Loading'), -// ], -// ), -// ), -// ], -// ), -// ); -// } -// } diff --git a/gsf/lib/views/pages/test/vimeo_video_player.dart b/gsf/lib/views/pages/test/vimeo_video_player.dart deleted file mode 100644 index b54262b..0000000 --- a/gsf/lib/views/pages/test/vimeo_video_player.dart +++ /dev/null @@ -1,36 +0,0 @@ -// import 'package:flutter/material.dart'; -// import 'package:pod_player_new/pod_player_new.dart'; - -// class VidemoVidePlayer extends StatefulWidget { -// const VidemoVidePlayer({Key? key}) : super(key: key); - -// @override -// State createState() => _VidemoVidePlayerState(); -// } - -// class _VidemoVidePlayerState extends State { -// @override -// @override -// Widget build(BuildContext context) { -// var podPlayerController = PodPlayerController( -// playVideoFrom: PlayVideoFrom.network( -// 'https://player.vimeo.com/progressive_redirect/playback/838250799/rendition/720p/file.mp4?loc=external&signature=274e145f6401b0b45a6a4bd513f6f4ffec467f1c879514525df0a02de501abba'), -// podPlayerConfig: const PodPlayerConfig( -// autoPlay: false, -// isLooping: false, -// ), -// )..initialise() -// // ..disableFullScreen(context) -// ; -// return Scaffold( -// appBar: AppBar(), -// body: PodVideoPlayer( -// controller: podPlayerController, -// matchFrameAspectRatioToVideo: true, -// matchVideoAspectRatioToFrame: true, -// alwaysShowProgressBar: true, -// backgroundColor: Colors.black, -// ), -// ); -// } -// } diff --git a/gsf/lib/views/pages/test/zoom_integration.dart/live_session.dart b/gsf/lib/views/pages/test/zoom_integration.dart/live_session.dart deleted file mode 100644 index 0b81ed7..0000000 --- a/gsf/lib/views/pages/test/zoom_integration.dart/live_session.dart +++ /dev/null @@ -1,78 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:flutter_custom_tabs/flutter_custom_tabs.dart'; -// import 'package:url_launcher/url_launcher.dart'; - -class LiveSessionTest extends StatefulWidget { - const LiveSessionTest({super.key}); - - @override - State createState() => _LiveSessionTestState(); -} - -class _LiveSessionTestState extends State { - // final zoomLink = Uri.encodeFull( - // 'https://us05web.zoom.us/j/83122647084?pwd=NT8kQaYNSJoJgLhLjbPeoLR67XkKIY.1'); - - - @override - Widget build(BuildContext context) { - return Scaffold( - appBar: AppBar( - title: const Text('Test Live Session on zoom'), - ), - body: Center( - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - OutlinedButton( - // onPressed: () { - // // Replace the Zoom meeting link below with your own - // final zoomLink = 'https://us05web.zoom.us/j/83122647084?pwd=NT8kQaYNSJoJgLhLjbPeoLR67XkKIY.1'; - // _launchZoomMeeting(zoomLink); - // }, - - onPressed: () { - // Replace the Zoom meeting link below with your own - final zoomLink = 'https://us05web.zoom.us/j/85083052578?pwd=OV2pGuDoCHbE74tMYswHmrfJuQit1R.1'; - _launchZoomMeeting(context, zoomLink); - }, - child: const Text('Click to go Live on Zoom'), - ) - ], - ), - ), - ); - } - // _launchZoomMeeting(String zoomLink) async { - // try { - // if (await canLaunch(zoomLink)) { - // await launch(zoomLink); - // } else { - // print('Could not launch Zoom: Invalid URL'); - // // Handle the error, e.g., show an error message to the user. - // } - // } catch (e) { - // print('Error launching Zoom: $e'); - // // Handle the error, e.g., show an error message to the user. - // } - // } - - - _launchZoomMeeting(BuildContext context, String zoomLink) async { - try { - await launch( - zoomLink, - customTabsOption: CustomTabsOption( - toolbarColor: Theme.of(context).primaryColor, - enableDefaultShare: true, - enableUrlBarHiding: true, - showPageTitle: true, - ), - ); - } catch (e) { - print('Error launching Zoom: $e'); - // Handle the error, e.g., show an error message to the user. - } - } -} diff --git a/gsf/lib/views/pages/test/zoom_integration.dart/main_video.dart b/gsf/lib/views/pages/test/zoom_integration.dart/main_video.dart deleted file mode 100644 index 7f16914..0000000 --- a/gsf/lib/views/pages/test/zoom_integration.dart/main_video.dart +++ /dev/null @@ -1,57 +0,0 @@ -// import 'package:flutter/material.dart'; -// import 'package:get/get.dart'; -// import 'package:gsp_app/views/theme.dart'; - -// import 'zoom_recorded_video_podPlayer.dart'; - -// class MainVideoRecodrd extends StatefulWidget { -// const MainVideoRecodrd({Key? key}) : super(key: key); - -// @override -// State createState() => _MainVideoRecodrdState(); -// } - -// class _MainVideoRecodrdState extends State { -// final listRecorded = [ -// 'https://player.vimeo.com/progressive_redirect/playback/838250799/rendition/720p/file.mp4?loc=external&signature=274e145f6401b0b45a6a4bd513f6f4ffec467f1c879514525df0a02de501abba', -// 'https://player.vimeo.com/progressive_redirect/playback/802199625/rendition/720p/file.mp4?loc=external&signature=1216c2b99f8cf0046a9bce1798d78dbbe69a5ea8f341334f21a79bfe1c90cb49', -// 'https://player.vimeo.com/progressive_redirect/playback/802200978/rendition/1080p/file.mp4?loc=external&signature=2524b7c1a1f841fa3de701bdd5e0c8fea0676dae2e5621e27f08d5bd95a61922', -// 'https://player.vimeo.com/progressive_redirect/playback/802200207/rendition/720p/file.mp4?loc=external&signature=eaa047c0e223f373da159641d09a5b28e57aae211e6d283c918d8efeabfe2c1b' -// ]; -// @override -// Widget build(BuildContext context) { -// return Scaffold( -// appBar: AppBar(), -// body: ListView.builder( -// itemCount: listRecorded.length, -// shrinkWrap: true, -// itemBuilder: (context, index) { -// return GestureDetector( -// onTap: () { -// // print(index); -// Get.to( -// () => ZoomPodVideoPlayerRecorded( -// urlLink: listRecorded[index], -// ), -// ); -// }, -// child: Container( -// padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 20), -// decoration: BoxDecoration( -// border: Border.all(color: ColorConstants.kPrimaryColor), -// ), -// margin: const EdgeInsets.symmetric(horizontal: 20, vertical: 10), -// child: Row( -// mainAxisAlignment: MainAxisAlignment.spaceBetween, -// children: [ -// // Text('data'), -// Text((index + 1).toString()), -// ], -// ), -// ), -// ); -// }, -// ), -// ); -// } -// } diff --git a/gsf/lib/views/pages/test/zoom_integration.dart/past__recoded_zoom.dart b/gsf/lib/views/pages/test/zoom_integration.dart/past__recoded_zoom.dart deleted file mode 100644 index c1dc33d..0000000 --- a/gsf/lib/views/pages/test/zoom_integration.dart/past__recoded_zoom.dart +++ /dev/null @@ -1,29 +0,0 @@ -import 'package:flutter/material.dart'; - -class PastRecordedZoom extends StatefulWidget { - const PastRecordedZoom({super.key}); - - @override - State createState() => _PastRecordedZoomState(); -} - -class _PastRecordedZoomState extends State { - @override - Widget build(BuildContext context) { - return Scaffold( - appBar: AppBar( - title: const Text('Past Recorded Zoom Vide'), - ), - body: Center( - child: Column( - children: [ - OutlinedButton( - onPressed: () {}, - child: const Text('Click to watch recorded video'), - ), - ], - ), - ), - ); - } -} diff --git a/gsf/lib/views/pages/test/zoom_integration.dart/zoom_recorded_video_podPlayer.dart b/gsf/lib/views/pages/test/zoom_integration.dart/zoom_recorded_video_podPlayer.dart deleted file mode 100644 index cd5fae6..0000000 --- a/gsf/lib/views/pages/test/zoom_integration.dart/zoom_recorded_video_podPlayer.dart +++ /dev/null @@ -1,39 +0,0 @@ -// import 'package:flutter/material.dart'; -// import 'package:pod_player_new/pod_player_new.dart'; - -// class ZoomPodVideoPlayerRecorded extends StatefulWidget { -// final String urlLink; -// const ZoomPodVideoPlayerRecorded({Key? key, required this.urlLink}) -// : super(key: key); - -// @override -// State createState() => -// _ZoomPodVideoPlayerRecordedState(); -// } - -// class _ZoomPodVideoPlayerRecordedState -// extends State { -// @override -// Widget build(BuildContext context) { -// var podPlayerController = PodPlayerController( -// playVideoFrom: PlayVideoFrom.network(widget.urlLink), -// podPlayerConfig: const PodPlayerConfig( -// autoPlay: false, -// isLooping: false, -// ), -// ) -// ..initialise() -// ..disableFullScreen(context); -// return Scaffold( -// appBar: AppBar(), -// body: PodVideoPlayer( -// videoTitle: Text('data'), -// controller: podPlayerController, -// matchFrameAspectRatioToVideo: true, -// matchVideoAspectRatioToFrame: true, -// alwaysShowProgressBar: true, -// backgroundColor: Colors.black, -// ), -// ); -// } -// } diff --git a/gsf/lib/views/pages/test/zoom_integration.dart/zoom_redirect.dart b/gsf/lib/views/pages/test/zoom_integration.dart/zoom_redirect.dart deleted file mode 100644 index ec0445d..0000000 --- a/gsf/lib/views/pages/test/zoom_integration.dart/zoom_redirect.dart +++ /dev/null @@ -1,97 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:flutter/src/foundation/key.dart'; -import 'package:flutter/src/widgets/framework.dart'; -import 'package:flutter/src/widgets/placeholder.dart'; -import 'package:url_launcher/url_launcher.dart'; - -class ZoomRedirect extends StatefulWidget { - const ZoomRedirect({Key? key}) : super(key: key); - - @override - State createState() => ZoomRedirectState(); -} - -class ZoomRedirectState extends State { - // void joinZoomMeeting() async { - // String meetingUrl = - // "https://us05web.zoom.us/j/84932374918?pwd=VzhXTUZLTHB3VXNjSm5WNlEyOU5QUT09"; - - // // Replace MEETING_ID and MEETING_PASSWORD with the actual values - - // if (await canLaunch(meetingUrl)) { - // await launch(meetingUrl); - // } else { - // throw 'Could not launch $meetingUrl'; - // } - // } - void downloadZoomApp() async { - final String zoomPlayStoreLink = - 'https://play.google.com/store/apps/details?id=us.zoom.videomeetings'; - - if (await canLaunch(zoomPlayStoreLink)) { - await launch(zoomPlayStoreLink); - } else { - throw 'Could not launch $zoomPlayStoreLink'; - } - } - - Future _launchZoom(url) async { - if (await canLaunch(url)) { - await launch(url); - } else { - throw 'Could not launch $url'; - } - } - - void launchZoomApp(String zoomLiveLink) async { - final url = 'zoomus://$zoomLiveLink'; - final isZoomInstalled = await canLaunch(url); - - if (isZoomInstalled) { - await launch(url); - } else { - showDialog( - context: context, - builder: (BuildContext context) => AlertDialog( - title: const Text('Zoom App Not Found'), - content: GestureDetector( - onTap: downloadZoomApp, - child: const Text( - 'To join this Zoom meeting, please install the Zoom app.'), - ), - actions: [ - TextButton( - onPressed: downloadZoomApp, - child: const Text('OK'), - ), - ], - ), - ); - } - } - - @override - Widget build(BuildContext context) { - return Scaffold( - appBar: AppBar( - title: const Text('Zoom Redirect'), - ), - body: Center( - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - OutlinedButton( - onPressed: () { - launchZoomApp( - 'https://us05web.zoom.us/j/84305285845?pwd=cFNVS2Z6K2lsNHBLYzdZOG9sWVpHdz09'); - }, - child: const Icon(Icons.play_arrow_outlined), - ), - const Text('Redirect on Zoom Link'), - ], - ), - ), - ); - } -} diff --git a/gsf/lib/views/pages/test/zoom_integration.dart/zoom_video_recorded.dart b/gsf/lib/views/pages/test/zoom_integration.dart/zoom_video_recorded.dart deleted file mode 100644 index af7f87b..0000000 --- a/gsf/lib/views/pages/test/zoom_integration.dart/zoom_video_recorded.dart +++ /dev/null @@ -1,36 +0,0 @@ -// ignore_for_file: prefer_const_constructors - -import 'package:flutter/material.dart'; -import 'package:gsp_app/views/theme.dart'; -import 'package:webview_flutter/webview_flutter.dart'; - -class VimoeRecordedVideoPlayer extends StatefulWidget { - final String url; - const VimoeRecordedVideoPlayer({Key? key, required this.url}) - : super(key: key); - - @override - _VimoeRecordedVideoPlayerState createState() => - _VimoeRecordedVideoPlayerState(); -} - -class _VimoeRecordedVideoPlayerState extends State { - // var webViewController = - - @override - Widget build(BuildContext context) { - return Scaffold( - appBar: AppBar( - title: Text('Zoom Vimeo Video Recorded'), - ), - body: WebViewWidget( - controller: WebViewController() - ..setJavaScriptMode(JavaScriptMode.unrestricted) - ..setBackgroundColor(ColorConstants.kBlack) - ..loadRequest( - Uri.parse(widget.url), - ), - ), - ); - } -} diff --git a/gsf/lib/views/pages/test/zoom_recorded_video/main_video.dart b/gsf/lib/views/pages/test/zoom_recorded_video/main_video.dart deleted file mode 100644 index 7f16914..0000000 --- a/gsf/lib/views/pages/test/zoom_recorded_video/main_video.dart +++ /dev/null @@ -1,57 +0,0 @@ -// import 'package:flutter/material.dart'; -// import 'package:get/get.dart'; -// import 'package:gsp_app/views/theme.dart'; - -// import 'zoom_recorded_video_podPlayer.dart'; - -// class MainVideoRecodrd extends StatefulWidget { -// const MainVideoRecodrd({Key? key}) : super(key: key); - -// @override -// State createState() => _MainVideoRecodrdState(); -// } - -// class _MainVideoRecodrdState extends State { -// final listRecorded = [ -// 'https://player.vimeo.com/progressive_redirect/playback/838250799/rendition/720p/file.mp4?loc=external&signature=274e145f6401b0b45a6a4bd513f6f4ffec467f1c879514525df0a02de501abba', -// 'https://player.vimeo.com/progressive_redirect/playback/802199625/rendition/720p/file.mp4?loc=external&signature=1216c2b99f8cf0046a9bce1798d78dbbe69a5ea8f341334f21a79bfe1c90cb49', -// 'https://player.vimeo.com/progressive_redirect/playback/802200978/rendition/1080p/file.mp4?loc=external&signature=2524b7c1a1f841fa3de701bdd5e0c8fea0676dae2e5621e27f08d5bd95a61922', -// 'https://player.vimeo.com/progressive_redirect/playback/802200207/rendition/720p/file.mp4?loc=external&signature=eaa047c0e223f373da159641d09a5b28e57aae211e6d283c918d8efeabfe2c1b' -// ]; -// @override -// Widget build(BuildContext context) { -// return Scaffold( -// appBar: AppBar(), -// body: ListView.builder( -// itemCount: listRecorded.length, -// shrinkWrap: true, -// itemBuilder: (context, index) { -// return GestureDetector( -// onTap: () { -// // print(index); -// Get.to( -// () => ZoomPodVideoPlayerRecorded( -// urlLink: listRecorded[index], -// ), -// ); -// }, -// child: Container( -// padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 20), -// decoration: BoxDecoration( -// border: Border.all(color: ColorConstants.kPrimaryColor), -// ), -// margin: const EdgeInsets.symmetric(horizontal: 20, vertical: 10), -// child: Row( -// mainAxisAlignment: MainAxisAlignment.spaceBetween, -// children: [ -// // Text('data'), -// Text((index + 1).toString()), -// ], -// ), -// ), -// ); -// }, -// ), -// ); -// } -// } diff --git a/gsf/lib/views/pages/test/zoom_recorded_video/zoom_recorded_video_podPlayer.dart b/gsf/lib/views/pages/test/zoom_recorded_video/zoom_recorded_video_podPlayer.dart deleted file mode 100644 index cd5fae6..0000000 --- a/gsf/lib/views/pages/test/zoom_recorded_video/zoom_recorded_video_podPlayer.dart +++ /dev/null @@ -1,39 +0,0 @@ -// import 'package:flutter/material.dart'; -// import 'package:pod_player_new/pod_player_new.dart'; - -// class ZoomPodVideoPlayerRecorded extends StatefulWidget { -// final String urlLink; -// const ZoomPodVideoPlayerRecorded({Key? key, required this.urlLink}) -// : super(key: key); - -// @override -// State createState() => -// _ZoomPodVideoPlayerRecordedState(); -// } - -// class _ZoomPodVideoPlayerRecordedState -// extends State { -// @override -// Widget build(BuildContext context) { -// var podPlayerController = PodPlayerController( -// playVideoFrom: PlayVideoFrom.network(widget.urlLink), -// podPlayerConfig: const PodPlayerConfig( -// autoPlay: false, -// isLooping: false, -// ), -// ) -// ..initialise() -// ..disableFullScreen(context); -// return Scaffold( -// appBar: AppBar(), -// body: PodVideoPlayer( -// videoTitle: Text('data'), -// controller: podPlayerController, -// matchFrameAspectRatioToVideo: true, -// matchVideoAspectRatioToFrame: true, -// alwaysShowProgressBar: true, -// backgroundColor: Colors.black, -// ), -// ); -// } -// } diff --git a/gsf/lib/views/pages/test/zoom_redirect.dart b/gsf/lib/views/pages/test/zoom_redirect.dart deleted file mode 100644 index ec0445d..0000000 --- a/gsf/lib/views/pages/test/zoom_redirect.dart +++ /dev/null @@ -1,97 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:flutter/src/foundation/key.dart'; -import 'package:flutter/src/widgets/framework.dart'; -import 'package:flutter/src/widgets/placeholder.dart'; -import 'package:url_launcher/url_launcher.dart'; - -class ZoomRedirect extends StatefulWidget { - const ZoomRedirect({Key? key}) : super(key: key); - - @override - State createState() => ZoomRedirectState(); -} - -class ZoomRedirectState extends State { - // void joinZoomMeeting() async { - // String meetingUrl = - // "https://us05web.zoom.us/j/84932374918?pwd=VzhXTUZLTHB3VXNjSm5WNlEyOU5QUT09"; - - // // Replace MEETING_ID and MEETING_PASSWORD with the actual values - - // if (await canLaunch(meetingUrl)) { - // await launch(meetingUrl); - // } else { - // throw 'Could not launch $meetingUrl'; - // } - // } - void downloadZoomApp() async { - final String zoomPlayStoreLink = - 'https://play.google.com/store/apps/details?id=us.zoom.videomeetings'; - - if (await canLaunch(zoomPlayStoreLink)) { - await launch(zoomPlayStoreLink); - } else { - throw 'Could not launch $zoomPlayStoreLink'; - } - } - - Future _launchZoom(url) async { - if (await canLaunch(url)) { - await launch(url); - } else { - throw 'Could not launch $url'; - } - } - - void launchZoomApp(String zoomLiveLink) async { - final url = 'zoomus://$zoomLiveLink'; - final isZoomInstalled = await canLaunch(url); - - if (isZoomInstalled) { - await launch(url); - } else { - showDialog( - context: context, - builder: (BuildContext context) => AlertDialog( - title: const Text('Zoom App Not Found'), - content: GestureDetector( - onTap: downloadZoomApp, - child: const Text( - 'To join this Zoom meeting, please install the Zoom app.'), - ), - actions: [ - TextButton( - onPressed: downloadZoomApp, - child: const Text('OK'), - ), - ], - ), - ); - } - } - - @override - Widget build(BuildContext context) { - return Scaffold( - appBar: AppBar( - title: const Text('Zoom Redirect'), - ), - body: Center( - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - OutlinedButton( - onPressed: () { - launchZoomApp( - 'https://us05web.zoom.us/j/84305285845?pwd=cFNVS2Z6K2lsNHBLYzdZOG9sWVpHdz09'); - }, - child: const Icon(Icons.play_arrow_outlined), - ), - const Text('Redirect on Zoom Link'), - ], - ), - ), - ); - } -} diff --git a/gsf/lib/views/pages/test/zoom_video_recorded.dart b/gsf/lib/views/pages/test/zoom_video_recorded.dart deleted file mode 100644 index af7f87b..0000000 --- a/gsf/lib/views/pages/test/zoom_video_recorded.dart +++ /dev/null @@ -1,36 +0,0 @@ -// ignore_for_file: prefer_const_constructors - -import 'package:flutter/material.dart'; -import 'package:gsp_app/views/theme.dart'; -import 'package:webview_flutter/webview_flutter.dart'; - -class VimoeRecordedVideoPlayer extends StatefulWidget { - final String url; - const VimoeRecordedVideoPlayer({Key? key, required this.url}) - : super(key: key); - - @override - _VimoeRecordedVideoPlayerState createState() => - _VimoeRecordedVideoPlayerState(); -} - -class _VimoeRecordedVideoPlayerState extends State { - // var webViewController = - - @override - Widget build(BuildContext context) { - return Scaffold( - appBar: AppBar( - title: Text('Zoom Vimeo Video Recorded'), - ), - body: WebViewWidget( - controller: WebViewController() - ..setJavaScriptMode(JavaScriptMode.unrestricted) - ..setBackgroundColor(ColorConstants.kBlack) - ..loadRequest( - Uri.parse(widget.url), - ), - ), - ); - } -} diff --git a/gsf/pubspec.lock b/gsf/pubspec.lock index 3d3c508..7759843 100644 --- a/gsf/pubspec.lock +++ b/gsf/pubspec.lock @@ -1952,34 +1952,34 @@ packages: dependency: "direct main" description: name: webview_flutter - sha256: "47663d51a9061451aa3880a214ee9a65dcbb933b77bc44388e194279ab3ccaf6" + sha256: "42393b4492e629aa3a88618530a4a00de8bb46e50e7b3993fedbfdc5352f0dbf" url: "https://pub.dev" source: hosted - version: "4.0.7" + version: "4.4.2" webview_flutter_android: dependency: transitive description: name: webview_flutter_android - sha256: "489c4162cbddea9116a9622f0f881c3cc26317d119322150d7608f2223ffa72d" + sha256: "8326ee235f87605a2bfc444a4abc897f4abc78d83f054ba7d3d1074ce82b4fbf" url: "https://pub.dev" source: hosted - version: "3.5.2" + version: "3.12.1" webview_flutter_platform_interface: dependency: transitive description: name: webview_flutter_platform_interface - sha256: "6341f92977609be71391f4d4dcd64bfaa8ac657af1dfb2e231b5c1724e8c6c36" + sha256: "6d9213c65f1060116757a7c473247c60f3f7f332cac33dc417c9e362a9a13e4f" url: "https://pub.dev" source: hosted - version: "2.2.0" + version: "2.6.0" webview_flutter_wkwebview: dependency: transitive description: name: webview_flutter_wkwebview - sha256: "2ef3f65fd49061c18e4d837a411308f2850417f2d0a7c11aad2c3857bee12c18" + sha256: accdaaa49a2aca2dc3c3230907988954cdd23fed0a19525d6c9789d380f4dc76 url: "https://pub.dev" source: hosted - version: "3.3.0" + version: "3.9.4" win32: dependency: transitive description: