From c344cd24fa8d5d2f4e14348689833aadc0e1793c Mon Sep 17 00:00:00 2001 From: Deepshikha Sinha Date: Mon, 10 Oct 2022 19:04:07 +0530 Subject: [PATCH 1/2] Fixed Depreciation in info.dart --- lib/screen/info.dart | 37 ++++++++++++++----------- lib/screen/onboarding_screen.dart | 2 ++ lib/screen/profile.dart | 2 +- lib/utils/endpoints.dart | 2 ++ pubspec.lock | 46 +++++++++++++++---------------- 5 files changed, 49 insertions(+), 40 deletions(-) diff --git a/lib/screen/info.dart b/lib/screen/info.dart index 9fdcf59..fdf06dc 100644 --- a/lib/screen/info.dart +++ b/lib/screen/info.dart @@ -117,26 +117,31 @@ class _InformationState extends State { pic: 'assets/arjun.jpg', name: 'Arjun Gupta', designation: 'Technical Team Lead', - fb: 'https://www.facebook.com/arjun.manas.1', - insta: 'https://www.instagram.com/arjupta/', - linkedin: 'https://www.linkedin.com/in/arjupta/', + fb: Uri.parse('https://www.facebook.com/arjun.manas.1'), + insta: Uri.parse('https://www.instagram.com/arjupta/'), + linkedin: Uri.parse('https://www.linkedin.com/in/arjupta/'), ), AppDevTile( pic: 'assets/aditya.jpeg', name: 'Aditya Kumar Singh', designation: 'Technical Executive', - fb: 'https://www.facebook.com/profile.php?id=100004271555775', - insta: 'https://www.instagram.com/itsadityaksingh/', - linkedin: 'https://www.linkedin.com/in/itsadityaksingh/', + fb: Uri.parse( + 'https://www.facebook.com/profile.php?id=100004271555775'), + insta: + Uri.parse('https://www.instagram.com/itsadityaksingh/'), + linkedin: Uri.parse( + 'https://www.linkedin.com/in/itsadityaksingh/'), ), AppDevTile( pic: 'assets/devansh.jpeg', name: 'Devansh Mishra', designation: 'Technical Executive', - fb: 'https://www.facebook.com/profile.php?id=100008164635361', - insta: 'https://www.instagram.com/keshavmishra_2612/', - linkedin: - 'https://www.linkedin.com/in/devansh-mishra-3a6138203/', + fb: Uri.parse( + 'https://www.facebook.com/profile.php?id=100008164635361'), + insta: Uri.parse( + 'https://www.instagram.com/keshavmishra_2612/'), + linkedin: Uri.parse( + 'https://www.linkedin.com/in/devansh-mishra-3a6138203/'), ), ], ), @@ -158,9 +163,9 @@ class AppDevTile extends StatelessWidget { required this.linkedin}); final String designation; final String name; - final String fb; - final String insta; - final String linkedin; + final Uri fb; + final Uri insta; + final Uri linkedin; final String pic; @override @@ -213,7 +218,7 @@ class AppDevTile extends StatelessWidget { mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: [ IconButton( - onPressed: () => launch(insta), + onPressed: () => launchUrl(insta), icon: Icon( FontAwesomeIcons.instagram, color: Colors.black, @@ -221,7 +226,7 @@ class AppDevTile extends StatelessWidget { ), ), IconButton( - onPressed: () => launch(linkedin), + onPressed: () => launchUrl(linkedin), icon: Icon( FontAwesomeIcons.linkedin, color: Colors.black, @@ -229,7 +234,7 @@ class AppDevTile extends StatelessWidget { ), ), IconButton( - onPressed: () => launch(fb), + onPressed: () => launchUrl(fb), icon: Icon( FontAwesomeIcons.facebook, color: Colors.black, diff --git a/lib/screen/onboarding_screen.dart b/lib/screen/onboarding_screen.dart index 846d9e3..3b3c13c 100644 --- a/lib/screen/onboarding_screen.dart +++ b/lib/screen/onboarding_screen.dart @@ -1,3 +1,5 @@ +// ignore_for_file: camel_case_types + import 'package:flutter/material.dart'; import 'package:shared_preferences/shared_preferences.dart'; import 'package:sochem/utils/constants.dart'; diff --git a/lib/screen/profile.dart b/lib/screen/profile.dart index 2907998..da31b8f 100644 --- a/lib/screen/profile.dart +++ b/lib/screen/profile.dart @@ -178,7 +178,7 @@ class _ProfilePageState extends State { child: Center( child: ListTile( leading: Icon( - Icons.class_outlined, + Icons.class__outlined, size: 35, ), title: Text( diff --git a/lib/utils/endpoints.dart b/lib/utils/endpoints.dart index 8c43e39..5e5fde3 100644 --- a/lib/utils/endpoints.dart +++ b/lib/utils/endpoints.dart @@ -1,3 +1,5 @@ +// ignore_for_file: non_constant_identifier_names + class Endpoints { static String config = 'https://api.sochem.org/api/conf'; static String profile = 'https://api.sochem.org/api/family-list/'; diff --git a/pubspec.lock b/pubspec.lock index 8df6c54..8def7c2 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -35,7 +35,7 @@ packages: name: cached_network_image url: "https://pub.dartlang.org" source: hosted - version: "3.2.1" + version: "3.2.0" cached_network_image_platform_interface: dependency: transitive description: @@ -98,7 +98,7 @@ packages: name: collection url: "https://pub.dartlang.org" source: hosted - version: "1.16.0" + version: "1.15.0" crypto: dependency: transitive description: @@ -126,14 +126,14 @@ packages: name: fake_async url: "https://pub.dartlang.org" source: hosted - version: "1.3.0" + version: "1.2.0" ffi: dependency: transitive description: name: ffi url: "https://pub.dartlang.org" source: hosted - version: "2.0.1" + version: "1.2.1" file: dependency: transitive description: @@ -274,7 +274,7 @@ packages: name: js url: "https://pub.dartlang.org" source: hosted - version: "0.6.4" + version: "0.6.3" matcher: dependency: transitive description: @@ -288,7 +288,7 @@ packages: name: material_color_utilities url: "https://pub.dartlang.org" source: hosted - version: "0.1.4" + version: "0.1.3" meta: dependency: transitive description: @@ -323,7 +323,7 @@ packages: name: path url: "https://pub.dartlang.org" source: hosted - version: "1.8.1" + version: "1.8.0" path_drawing: dependency: transitive description: @@ -386,7 +386,7 @@ packages: name: path_provider_windows url: "https://pub.dartlang.org" source: hosted - version: "2.1.3" + version: "2.0.7" pedantic: dependency: transitive description: @@ -400,7 +400,7 @@ packages: name: petitparser url: "https://pub.dartlang.org" source: hosted - version: "5.0.0" + version: "4.4.0" platform: dependency: transitive description: @@ -517,14 +517,14 @@ packages: name: source_span url: "https://pub.dartlang.org" source: hosted - version: "1.8.2" + version: "1.8.1" sqflite: dependency: transitive description: name: sqflite url: "https://pub.dartlang.org" source: hosted - version: "2.0.3+1" + version: "2.0.2+1" sqflite_common: dependency: transitive description: @@ -573,21 +573,21 @@ packages: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.4.9" + version: "0.4.8" tuple: dependency: transitive description: name: tuple url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "2.0.1" typed_data: dependency: transitive description: name: typed_data url: "https://pub.dartlang.org" source: hosted - version: "1.3.1" + version: "1.3.0" url_launcher: dependency: "direct main" description: @@ -657,7 +657,7 @@ packages: name: vector_math url: "https://pub.dartlang.org" source: hosted - version: "2.1.2" + version: "2.1.1" video_player: dependency: transitive description: @@ -678,7 +678,7 @@ packages: name: video_player_avfoundation url: "https://pub.dartlang.org" source: hosted - version: "2.3.6" + version: "2.3.7" video_player_platform_interface: dependency: transitive description: @@ -727,7 +727,7 @@ packages: name: wakelock_windows url: "https://pub.dartlang.org" source: hosted - version: "0.2.1" + version: "0.2.0" webview_flutter: dependency: transitive description: @@ -741,7 +741,7 @@ packages: name: webview_flutter_android url: "https://pub.dartlang.org" source: hosted - version: "2.10.3" + version: "2.8.14" webview_flutter_platform_interface: dependency: transitive description: @@ -755,14 +755,14 @@ packages: name: webview_flutter_wkwebview url: "https://pub.dartlang.org" source: hosted - version: "2.9.5" + version: "2.7.5" win32: dependency: transitive description: name: win32 url: "https://pub.dartlang.org" source: hosted - version: "3.0.0" + version: "2.5.2" xdg_directories: dependency: transitive description: @@ -776,7 +776,7 @@ packages: name: xml url: "https://pub.dartlang.org" source: hosted - version: "5.4.1" + version: "5.3.1" yaml: dependency: transitive description: @@ -785,5 +785,5 @@ packages: source: hosted version: "3.1.1" sdks: - dart: ">=2.17.0 <3.0.0" - flutter: ">=3.0.0" + dart: ">=2.16.0 <3.0.0" + flutter: ">=2.10.0" From fe971be325f52979de5c20c8464375e2e81747cc Mon Sep 17 00:00:00 2001 From: Deepshikha Sinha Date: Mon, 10 Oct 2022 22:42:56 +0530 Subject: [PATCH 2/2] Fixed depreciation in cloud.dart --- lib/screen/cloud.dart | 2 +- lib/widgets/cloud_carousel.dart | 25 ++++++++++++++++--------- 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/lib/screen/cloud.dart b/lib/screen/cloud.dart index b0afb49..de79c66 100644 --- a/lib/screen/cloud.dart +++ b/lib/screen/cloud.dart @@ -110,7 +110,7 @@ class _CloudPageState extends State { children: [ GenreTitle( title: bookTypesList[index], - link: categoryLinks[index], + link: categoryLinks[index].toString(), ), BooksHorizontal( genreURL: 'https://api.npoint.io/46e15ce2ed98a569637a', diff --git a/lib/widgets/cloud_carousel.dart b/lib/widgets/cloud_carousel.dart index f6e8101..cc88ea0 100644 --- a/lib/widgets/cloud_carousel.dart +++ b/lib/widgets/cloud_carousel.dart @@ -32,15 +32,22 @@ final List bookTypesList = [ 'Open Electives' ]; -final List categoryLinks = [ - "https://drive.google.com/drive/folders/1TOxyPEmb8l9VvNAa1IycT7rBHIp2x_Wd?usp=sharing", //Novels - "https://drive.google.com/drive/folders/1VYASsgV_Ods_EyHiKd_Sm7qjE1gyNpnU?usp=sharing", //Programming - "https://drive.google.com/drive/folders/15pTBbGVUdA0dTGFQI7QpfQWaXDQsr6cy?usp=sharing", //Core - "https://drive.google.com/drive/folders/1R34YagE19rLI31yMRQo4G-UnvHRRBmgn?usp=sharing", //GATE - "https://drive.google.com/drive/folders/1mZSAyhN7BNX51g9V4if-6P1NWyFqtCmm?usp=sharing", //GRE - "https://drive.google.com/drive/folders/18u9EqfPqZ7t9z9RL49WL1ebeW51t_eF-?usp=sharing", //HULM +final List categoryLinks = [ + Uri.parse( + "https://drive.google.com/drive/folders/1TOxyPEmb8l9VvNAa1IycT7rBHIp2x_Wd?usp=sharing"), //Novels + Uri.parse( + "https://drive.google.com/drive/folders/1VYASsgV_Ods_EyHiKd_Sm7qjE1gyNpnU?usp=sharing"), //Programming + Uri.parse( + "https://drive.google.com/drive/folders/15pTBbGVUdA0dTGFQI7QpfQWaXDQsr6cy?usp=sharing"), //Core + Uri.parse( + "https://drive.google.com/drive/folders/1R34YagE19rLI31yMRQo4G-UnvHRRBmgn?usp=sharing"), //GATE + Uri.parse( + "https://drive.google.com/drive/folders/1mZSAyhN7BNX51g9V4if-6P1NWyFqtCmm?usp=sharing"), //GRE + Uri.parse( + "https://drive.google.com/drive/folders/18u9EqfPqZ7t9z9RL49WL1ebeW51t_eF-?usp=sharing"), //HULM //Online Courses - "https://drive.google.com/drive/folders/1-FPXGNsfx7jcpLksfqqyo_7KA0KeOBi9?usp=sharing", //Open Electives + Uri.parse( + "https://drive.google.com/drive/folders/1-FPXGNsfx7jcpLksfqqyo_7KA0KeOBi9?usp=sharing"), //Open Electives ]; List slidingImages(double height) { @@ -49,7 +56,7 @@ List slidingImages(double height) { widgetList.add( GestureDetector( onTap: () { - launch(categoryLinks[i]); + launchUrl(categoryLinks[i]); }, child: Container( width: 250,