From 985f16be414aa349289323cf43b9a21917dd03db Mon Sep 17 00:00:00 2001 From: omkar273 Date: Mon, 8 Jan 2024 13:48:37 +0530 Subject: [PATCH] updated flutter and java dependencies --- .metadata | 39 ++- android/build.gradle | 4 +- android/gradle.properties | 1 + .../gradle/wrapper/gradle-wrapper.properties | 2 +- lib/checkSizePage.dart | 38 +-- lib/formPage.dart | 33 ++- lib/main.dart | 46 ++-- lib/submitPage.dart | 11 +- lib/thankYouPage.dart | 24 +- lib/virtualTryOnPage.dart | 37 ++- pubspec.lock | 234 +++++++++++------- pubspec.yaml | 12 +- test/widget_test.dart | 30 --- 13 files changed, 291 insertions(+), 220 deletions(-) delete mode 100644 test/widget_test.dart diff --git a/.metadata b/.metadata index fd70cab..3e6e02a 100644 --- a/.metadata +++ b/.metadata @@ -4,7 +4,42 @@ # This file should be version controlled and should not be manually edited. version: - revision: 77d935af4db863f6abd0b9c31c7e6df2a13de57b - channel: stable + revision: "78666c8dc57e9f7548ca9f8dd0740fbf0c658dc9" + channel: "stable" project_type: app + +# Tracks metadata for the flutter migrate command +migration: + platforms: + - platform: root + create_revision: 78666c8dc57e9f7548ca9f8dd0740fbf0c658dc9 + base_revision: 78666c8dc57e9f7548ca9f8dd0740fbf0c658dc9 + - platform: android + create_revision: 78666c8dc57e9f7548ca9f8dd0740fbf0c658dc9 + base_revision: 78666c8dc57e9f7548ca9f8dd0740fbf0c658dc9 + - platform: ios + create_revision: 78666c8dc57e9f7548ca9f8dd0740fbf0c658dc9 + base_revision: 78666c8dc57e9f7548ca9f8dd0740fbf0c658dc9 + - platform: linux + create_revision: 78666c8dc57e9f7548ca9f8dd0740fbf0c658dc9 + base_revision: 78666c8dc57e9f7548ca9f8dd0740fbf0c658dc9 + - platform: macos + create_revision: 78666c8dc57e9f7548ca9f8dd0740fbf0c658dc9 + base_revision: 78666c8dc57e9f7548ca9f8dd0740fbf0c658dc9 + - platform: web + create_revision: 78666c8dc57e9f7548ca9f8dd0740fbf0c658dc9 + base_revision: 78666c8dc57e9f7548ca9f8dd0740fbf0c658dc9 + - platform: windows + create_revision: 78666c8dc57e9f7548ca9f8dd0740fbf0c658dc9 + base_revision: 78666c8dc57e9f7548ca9f8dd0740fbf0c658dc9 + + # User provided section + + # List of Local paths (relative to this file) that should be + # ignored by the migrate tool. + # + # Files that are not part of the templates will be ignored by default. + unmanaged_files: + - 'lib/main.dart' + - 'ios/Runner.xcodeproj/project.pbxproj' diff --git a/android/build.gradle b/android/build.gradle index 98d3ad1..ce159cb 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -1,5 +1,5 @@ buildscript { - ext.kotlin_version = '1.3.50' + ext.kotlin_version = '1.7.10' repositories { google() mavenCentral() @@ -31,6 +31,6 @@ subprojects { project.evaluationDependsOn(':app') } -task clean(type: Delete) { +tasks.register("clean", Delete) { delete rootProject.buildDir } diff --git a/android/gradle.properties b/android/gradle.properties index 94adc3a..69a3773 100644 --- a/android/gradle.properties +++ b/android/gradle.properties @@ -1,3 +1,4 @@ org.gradle.jvmargs=-Xmx1536M android.useAndroidX=true android.enableJetifier=true +org.gradle.jvmargs=--add-opens java.base/java.io=ALL-UNNAMED diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties index bc6a58a..cfe88f6 100644 --- a/android/gradle/wrapper/gradle-wrapper.properties +++ b/android/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.1-all.zip diff --git a/lib/checkSizePage.dart b/lib/checkSizePage.dart index 2e75a79..2946bbd 100644 --- a/lib/checkSizePage.dart +++ b/lib/checkSizePage.dart @@ -1,3 +1,5 @@ +// ignore_for_file: depend_on_referenced_packages, no_leading_underscores_for_local_identifiers, file_names, use_build_context_synchronously, avoid_print, no_logic_in_create_state + import 'dart:io'; import 'package:http/http.dart'; import 'dart:convert'; @@ -8,6 +10,7 @@ import 'dart:async'; import 'package:camera/camera.dart'; import 'package:http_parser/http_parser.dart'; +// ignore: must_be_immutable class CheckSizePage extends StatelessWidget { CameraController? controller; Future initializeControllerFuture; @@ -26,9 +29,9 @@ class CheckSizePage extends StatelessWidget { builder: (BuildContext context) { return AlertDialog( title: const Text('Guide to using the module'), - content: SingleChildScrollView( + content: const SingleChildScrollView( child: ListBody( - children: const [ + children: [ Text('Step 1:', style: TextStyle(fontWeight: FontWeight.bold)), Text('Place an A4 size paper on the floor.'), @@ -65,20 +68,20 @@ class CheckSizePage extends StatelessWidget { return Scaffold( appBar: AppBar( - title: Text('Get your foot size'), + title: const Text('Get your foot size'), actions: [ Center( child: TextButton( - child: Text( + onPressed: _showMyDialog, + child: const Text( 'Help', style: TextStyle( color: Colors.white, ), ), - onPressed: _showMyDialog, ), ), - SizedBox( + const SizedBox( width: 20, ) ], @@ -140,7 +143,7 @@ class DisplayPictureScreen extends StatelessWidget { appBar: AppBar(title: const Text('Display the Picture')), // The image is stored as a file on the device. Use the `Image.file` // constructor with the given path to display the image. - body: Container( + body: SizedBox( height: double.infinity, child: Image.file( File(imagePath), @@ -179,6 +182,7 @@ class DisplayPictureScreen extends StatelessWidget { } } +// ignore: must_be_immutable class DisplaySizeScreen extends StatefulWidget { late String imagePath; DisplaySizeScreen({Key? key, required this.imagePath}) : super(key: key); @@ -315,10 +319,10 @@ class _DisplaySizeScreenState extends State { } return Scaffold( - appBar: AppBar(title: Text('Calculated foot size')), + appBar: AppBar(title: const Text('Calculated foot size')), body: Center( child: loading - ? CircularProgressIndicator() + ? const CircularProgressIndicator() : Center( child: Column( mainAxisAlignment: MainAxisAlignment.center, @@ -326,11 +330,11 @@ class _DisplaySizeScreenState extends State { children: [ Text( res, - style: TextStyle( + style: const TextStyle( fontWeight: FontWeight.bold, ), ), - DataTable(columns: [ + DataTable(columns: const [ DataColumn( label: Text( 'Unit', @@ -346,32 +350,32 @@ class _DisplaySizeScreenState extends State { ], rows: [ DataRow( cells: [ - DataCell(Text('US')), + const DataCell(Text('US')), DataCell(Text(getUS(size_cm).toString())), ], ), DataRow( cells: [ - DataCell(Text('EURO')), + const DataCell(Text('EURO')), DataCell(Text(getEURO(size_cm).toString())), ], ), DataRow( cells: [ - DataCell(Text('UK')), + const DataCell(Text('UK')), DataCell(Text(getUK(size_cm).toString())), ], ), DataRow( cells: [ - DataCell(Text('cm')), + const DataCell(Text('cm')), DataCell(Text(size_cm.toStringAsFixed(2).toString())), ], ), ]), - SizedBox(height: 16.0), + const SizedBox(height: 16.0), ElevatedButton( - child: Text( + child: const Text( 'Done', ), onPressed: () { diff --git a/lib/formPage.dart b/lib/formPage.dart index 1daf109..1790b82 100644 --- a/lib/formPage.dart +++ b/lib/formPage.dart @@ -1,4 +1,3 @@ -import 'package:dio/dio.dart' as dio; import 'package:flutter/material.dart'; import 'package:http/http.dart'; import 'package:virtual_try_on/thankYouPage.dart'; @@ -21,7 +20,7 @@ class _FormPageState extends State { Widget build(BuildContext context) { return Scaffold( appBar: AppBar( - title: Text('Survey'), + title: const Text('Survey'), ), body: Padding( padding: const EdgeInsets.all(8.0), @@ -34,9 +33,9 @@ class _FormPageState extends State { mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.center, children: [ - SizedBox(height: 8.0), - Text('How satisfied are you with the experience?'), - SizedBox(height: 8.0), + const SizedBox(height: 8.0), + const Text('How satisfied are you with the experience?'), + const SizedBox(height: 8.0), Slider( value: sliderValue1, min: 0, @@ -51,10 +50,10 @@ class _FormPageState extends State { inactiveColor: Theme.of(context).colorScheme.secondary.withAlpha(50), ), - SizedBox(height: 8.0), - Text( + const SizedBox(height: 8.0), + const Text( 'How intutive was the experience for a first time user?'), - SizedBox(height: 8.0), + const SizedBox(height: 8.0), Slider( value: sliderValue2, min: 0, @@ -69,9 +68,9 @@ class _FormPageState extends State { inactiveColor: Theme.of(context).colorScheme.secondary.withAlpha(50), ), - SizedBox(height: 8.0), - Text('How likely are you to recommend this to someone?'), - SizedBox(height: 8.0), + const SizedBox(height: 8.0), + const Text('How likely are you to recommend this to someone?'), + const SizedBox(height: 8.0), Slider( value: sliderValue3, min: 0, @@ -86,12 +85,12 @@ class _FormPageState extends State { inactiveColor: Theme.of(context).colorScheme.secondary.withAlpha(50), ), - SizedBox(height: 8.0), - Text( + const SizedBox(height: 8.0), + const Text( 'How much do you prefer this over a traditional ecommerce experience?', textAlign: TextAlign.center, ), - SizedBox(height: 8.0), + const SizedBox(height: 8.0), Slider( value: sliderValue4, min: 0, @@ -111,7 +110,7 @@ class _FormPageState extends State { child: TextField( controller: feedback_controller, maxLines: 5, - decoration: InputDecoration( + decoration: const InputDecoration( border: OutlineInputBorder(), hintText: 'Do you have any other feedback? Feel free to add that here.', @@ -123,7 +122,7 @@ class _FormPageState extends State { ), ), ElevatedButton( - child: Text('Submit response'), + child: const Text('Submit response'), onPressed: () async { // print('start'); // print(sliderValue1); @@ -147,7 +146,7 @@ class _FormPageState extends State { ); // return; Route route = MaterialPageRoute( - builder: (context) => ThankYouPage(survey: false)); + builder: (context) => const ThankYouPage(survey: false)); Navigator.pushReplacement(context, route); }), ], diff --git a/lib/main.dart b/lib/main.dart index 90950f3..f1dbf1e 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -10,10 +10,12 @@ Future main() async { WidgetsFlutterBinding.ensureInitialized(); cameras = await availableCameras(); - runApp(CameraApp()); + runApp(const CameraApp()); } class CameraApp extends StatefulWidget { + const CameraApp({Key? key}) : super(key: key); + @override _CameraAppState createState() => _CameraAppState(); } @@ -53,19 +55,19 @@ class _CameraAppState extends State { // primarySwatch: Colors.grey, // fontFamily: 'Poppins', fontFamily: 'Inter', - primaryColor: Color(0xFF001E1D), - canvasColor: Color(0xFFE9E4E5), - appBarTheme: AppBarTheme( + primaryColor: const Color(0xFF001E1D), + canvasColor: const Color(0xFFE9E4E5), + appBarTheme: const AppBarTheme( backgroundColor: Color(0xFF001E1D), ), - buttonTheme: ButtonThemeData( + buttonTheme: const ButtonThemeData( buttonColor: Color(0xFF001E1D), ), elevatedButtonTheme: ElevatedButtonThemeData( style: ButtonStyle( backgroundColor: - MaterialStateProperty.all(Color(0xFF001E1D)), - fixedSize: MaterialStateProperty.all(Size(200, 70)), + MaterialStateProperty.all(const Color(0xFF001E1D)), + fixedSize: MaterialStateProperty.all(const Size(200, 70)), shape: MaterialStateProperty.all( RoundedRectangleBorder( borderRadius: BorderRadius.circular(50))), @@ -74,14 +76,14 @@ class _CameraAppState extends State { outlinedButtonTheme: OutlinedButtonThemeData( style: ButtonStyle( backgroundColor: MaterialStateProperty.all(Colors.white), - side: MaterialStateProperty.all(BorderSide( + side: MaterialStateProperty.all(const BorderSide( width: 1, // color: Color(0xFF001E1D), color: Colors.transparent, )), foregroundColor: - MaterialStateProperty.all(Color(0xFF001E1D)), - fixedSize: MaterialStateProperty.all(Size(200, 70)), + MaterialStateProperty.all(const Color(0xFF001E1D)), + fixedSize: MaterialStateProperty.all(const Size(200, 70)), shape: MaterialStateProperty.all( RoundedRectangleBorder( borderRadius: BorderRadius.circular(50), @@ -90,7 +92,7 @@ class _CameraAppState extends State { ), ), colorScheme: ColorScheme.fromSwatch().copyWith( - secondary: Color(0xFFD96566), + secondary: const Color(0xFFD96566), ), ), // home: MyHomePage(title: 'Virtual try on', controller: controller), @@ -121,15 +123,19 @@ class MyHomePage extends StatefulWidget { Future initializeControllerFuture; @override - State createState() => - _MyHomePageState(controller, initializeControllerFuture); + State createState() => _MyHomePageState(); } class _MyHomePageState extends State { CameraController? controller; - Future initializeControllerFuture; - _MyHomePageState(CameraController? this.controller, - Future this.initializeControllerFuture); + late Future initializeControllerFuture; + + @override + void initState() { + super.initState(); + controller = widget.controller; + initializeControllerFuture = widget.initializeControllerFuture; + } @override Widget build(BuildContext context) { @@ -148,13 +154,13 @@ class _MyHomePageState extends State { padding: const EdgeInsets.all(8.0), child: RichText( text: TextSpan( - style: TextStyle( + style: const TextStyle( fontSize: 60, fontWeight: FontWeight.w400, color: Colors.black, ), children: [ - TextSpan(text: 'A new and improved '), + const TextSpan(text: 'A new and improved '), TextSpan( text: 'shopping ', style: TextStyle( @@ -162,7 +168,7 @@ class _MyHomePageState extends State { color: Theme.of(context).colorScheme.secondary, ), ), - TextSpan(text: 'experience.'), + const TextSpan(text: 'experience.'), ], )) // child: Text( @@ -196,7 +202,7 @@ class _MyHomePageState extends State { }, child: const Text("Check size"), ), - SizedBox( + const SizedBox( height: 10, ), ElevatedButton( diff --git a/lib/submitPage.dart b/lib/submitPage.dart index 80ca473..1dd3c2e 100644 --- a/lib/submitPage.dart +++ b/lib/submitPage.dart @@ -1,7 +1,6 @@ import 'package:camera/camera.dart'; import 'package:flutter/material.dart'; import 'package:virtual_try_on/checkSizePage.dart'; -import 'package:virtual_try_on/formPage.dart'; import 'package:virtual_try_on/thankYouPage.dart'; class SubmitPage extends StatelessWidget { @@ -16,7 +15,7 @@ class SubmitPage extends StatelessWidget { @override Widget build(BuildContext context) { return Scaffold( - appBar: AppBar(title: Text('Submit page'), actions: [ + appBar: AppBar(title: const Text('Submit page'), actions: [ TextButton( onPressed: () { Navigator.push( @@ -27,10 +26,10 @@ class SubmitPage extends StatelessWidget { initializeControllerFuture: initializeControllerFuture)), ); }, - child: Text('Check size'), style: ButtonStyle( foregroundColor: MaterialStateProperty.all(Colors.white), ), + child: const Text('Check size'), ) ]), body: Padding( @@ -38,7 +37,7 @@ class SubmitPage extends StatelessWidget { child: Column( crossAxisAlignment: CrossAxisAlignment.stretch, children: [ - Expanded( + const Expanded( child: SingleChildScrollView( child: Column( mainAxisAlignment: MainAxisAlignment.start, @@ -84,12 +83,12 @@ class SubmitPage extends StatelessWidget { ), ), ElevatedButton( - child: Text('Place order'), + child: const Text('Place order'), onPressed: () { Navigator.push( context, MaterialPageRoute( - builder: (context) => ThankYouPage(survey: true)), + builder: (context) => const ThankYouPage(survey: true)), ); }), ], diff --git a/lib/thankYouPage.dart b/lib/thankYouPage.dart index 31eeec8..3eeebe8 100644 --- a/lib/thankYouPage.dart +++ b/lib/thankYouPage.dart @@ -1,3 +1,5 @@ +// ignore_for_file: file_names + import 'package:flutter/material.dart'; import 'package:virtual_try_on/formPage.dart'; @@ -14,7 +16,7 @@ class _ThankYouPageState extends State { Widget build(BuildContext context) { if (widget.survey) { return Scaffold( - appBar: AppBar(title: Text('Thank you')), + appBar: AppBar(title: const Text('Thank you')), body: Center( child: Padding( padding: const EdgeInsets.all(8.0), @@ -22,7 +24,7 @@ class _ThankYouPageState extends State { mainAxisAlignment: MainAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.stretch, children: [ - Center( + const Center( child: Text( 'Thank you for shopping with us.', style: TextStyle( @@ -31,25 +33,25 @@ class _ThankYouPageState extends State { ), ), ), - SizedBox( + const SizedBox( height: 16, ), ElevatedButton( onPressed: () { Navigator.push( context, - MaterialPageRoute(builder: (context) => FormPage()), + MaterialPageRoute(builder: (context) => const FormPage()), ); }, - child: Text('Take a survey'), + child: const Text('Take a survey'), ), - SizedBox(height: 8.0), + const SizedBox(height: 8.0), OutlinedButton( onPressed: () { Navigator.of(context).pushNamedAndRemoveUntil( '/home', (Route route) => false); }, - child: Text('Back to home page'), + child: const Text('Back to home page'), ) ], ), @@ -58,7 +60,7 @@ class _ThankYouPageState extends State { ); } else { return Scaffold( - appBar: AppBar(title: Text('Thank you')), + appBar: AppBar(title: const Text('Thank you')), body: Padding( padding: const EdgeInsets.all(8.0), child: Center( @@ -66,7 +68,7 @@ class _ThankYouPageState extends State { mainAxisAlignment: MainAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.stretch, children: [ - Center( + const Center( child: Text( 'Thank you for taking the survey.', style: TextStyle( @@ -75,7 +77,7 @@ class _ThankYouPageState extends State { ), ), ), - SizedBox( + const SizedBox( height: 16, ), ElevatedButton( @@ -83,7 +85,7 @@ class _ThankYouPageState extends State { Navigator.of(context).pushNamedAndRemoveUntil( '/home', (Route route) => false); }, - child: Text('Back to home page'), + child: const Text('Back to home page'), ) ], ), diff --git a/lib/virtualTryOnPage.dart b/lib/virtualTryOnPage.dart index 12ac726..9577614 100644 --- a/lib/virtualTryOnPage.dart +++ b/lib/virtualTryOnPage.dart @@ -1,11 +1,11 @@ +// ignore_for_file: must_be_immutable + import 'package:flutter/material.dart'; import 'dart:async'; import 'package:camera/camera.dart'; import 'package:virtual_try_on/submitPage.dart'; import 'package:url_launcher/url_launcher.dart'; -import 'formPage.dart'; - class VirtualTryOnPage extends StatefulWidget { CameraController? controller; Future initializeControllerFuture; @@ -37,9 +37,9 @@ class _VirtualTryOnPageState extends State { builder: (BuildContext context) { return AlertDialog( title: const Text('Guide to using the module'), - content: SingleChildScrollView( + content: const SingleChildScrollView( child: ListBody( - children: const [ + children: [ Text('Step 1:', style: TextStyle(fontWeight: FontWeight.bold)), Text( @@ -72,22 +72,22 @@ class _VirtualTryOnPageState extends State { return Scaffold( appBar: AppBar( - title: Text('Virtual try on'), + title: const Text('Virtual try on'), actions: [ Center( child: Row( children: [ TextButton( - child: Text( + onPressed: _showMyDialog, + child: const Text( 'Help', style: TextStyle( color: Colors.white, ), ), - onPressed: _showMyDialog, ), TextButton( - child: Text( + child: const Text( 'Proceed', style: TextStyle( color: Colors.white, @@ -108,7 +108,7 @@ class _VirtualTryOnPageState extends State { ], ), ), - SizedBox( + const SizedBox( width: 20, ) ], @@ -126,12 +126,10 @@ class _VirtualTryOnPageState extends State { mainAxisAlignment: MainAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center, children: [ - Image( - image: AssetImage( - 'assets/shoe' + (selected).toString() + '.png')), - SizedBox(height: 32.0), + Image(image: AssetImage('assets/shoe$selected.png')), + const SizedBox(height: 32.0), OutlinedButton( - child: Text('Try AR filter'), + child: const Text('Try AR filter'), onPressed: () { _launchURL(snapchat_urls[selected - 1]); }, @@ -141,7 +139,7 @@ class _VirtualTryOnPageState extends State { ), Align( alignment: Alignment.bottomCenter, - child: Container( + child: SizedBox( height: 120.0, // color: Colors.red, child: ListView( @@ -168,15 +166,14 @@ class _VirtualTryOnPageState extends State { // child: Center(child: Text("Shoe ${index + 1}")), child: Center( child: Image( - image: AssetImage('assets/shoe' + - (index + 1).toString() + - '.png'))), + image: + AssetImage('assets/shoe${index + 1}.png'))), ), ), ); return Card( // color: Colors.blue[index * 100], - child: Container( + child: SizedBox( width: 100.0, height: 100.0, child: Center(child: Text("Shoe ${index + 1}")), @@ -193,5 +190,5 @@ class _VirtualTryOnPageState extends State { } void _launchURL(_url) async { - if (!await launch(_url)) throw 'Could not launch $_url'; + if (!await launchUrl(_url)) throw 'Could not launch $_url'; } diff --git a/pubspec.lock b/pubspec.lock index 58fcf82..f20ddc4 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -5,93 +5,122 @@ packages: dependency: transitive description: name: async - url: "https://pub.dartlang.org" + sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" + url: "https://pub.dev" source: hosted - version: "2.8.2" + version: "2.11.0" boolean_selector: dependency: transitive description: name: boolean_selector - url: "https://pub.dartlang.org" + sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" + url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.1" camera: dependency: "direct main" description: name: camera - url: "https://pub.dartlang.org" + sha256: f3813a634fd1350a9d2a78ee70e5b247cebedc9c58a24560992620e57a8a5600 + url: "https://pub.dev" + source: hosted + version: "0.10.5+8" + camera_android: + dependency: transitive + description: + name: camera_android + sha256: "351429510121d179b9aac5a2e8cb525c3cd6c39f4d709c5f72dfb21726e52371" + url: "https://pub.dev" + source: hosted + version: "0.10.8+16" + camera_avfoundation: + dependency: transitive + description: + name: camera_avfoundation + sha256: "1408600aa45faad05c518afccaabcd58419412ab67755a405b2ddce4f93fa120" + url: "https://pub.dev" source: hosted - version: "0.9.4+11" + version: "0.9.13+9" camera_platform_interface: dependency: transitive description: name: camera_platform_interface - url: "https://pub.dartlang.org" + sha256: fdb8b7a40c3564ce2967273445707d58cbff91bc2fa129e8de80af8cc501e793 + url: "https://pub.dev" source: hosted - version: "2.1.5" + version: "2.7.1" camera_web: dependency: transitive description: name: camera_web - url: "https://pub.dartlang.org" + sha256: f18ccfb33b2a7c49a52ad5aa3f07330b7422faaecbdfd9b9fe8e51182f6ad67d + url: "https://pub.dev" source: hosted - version: "0.2.1+1" + version: "0.3.2+4" characters: dependency: transitive description: name: characters - url: "https://pub.dartlang.org" + sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" + url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.3.0" charcode: dependency: transitive description: name: charcode - url: "https://pub.dartlang.org" + sha256: fb98c0f6d12c920a02ee2d998da788bca066ca5f148492b7085ee23372b12306 + url: "https://pub.dev" source: hosted version: "1.3.1" clock: dependency: transitive description: name: clock - url: "https://pub.dartlang.org" + sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf + url: "https://pub.dev" source: hosted - version: "1.1.0" + version: "1.1.1" collection: dependency: transitive description: name: collection - url: "https://pub.dartlang.org" + sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a + url: "https://pub.dev" source: hosted - version: "1.15.0" + version: "1.18.0" cross_file: dependency: transitive description: name: cross_file - url: "https://pub.dartlang.org" + sha256: "552ffd2f851d4314958e6265452af1891959e00cd32b6d17452c5b836e27a0fa" + url: "https://pub.dev" source: hosted version: "0.3.2" cupertino_icons: dependency: "direct main" description: name: cupertino_icons - url: "https://pub.dartlang.org" + sha256: d57953e10f9f8327ce64a508a355f0b1ec902193f66288e8cb5070e7c47eeb2d + url: "https://pub.dev" source: hosted - version: "1.0.4" + version: "1.0.6" dio: dependency: "direct main" description: name: dio - url: "https://pub.dartlang.org" + sha256: "797e1e341c3dd2f69f2dad42564a6feff3bfb87187d05abb93b9609e6f1645c3" + url: "https://pub.dev" source: hosted - version: "4.0.6" + version: "5.4.0" fake_async: dependency: transitive description: name: fake_async - url: "https://pub.dartlang.org" + sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" + url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.3.1" flutter: dependency: "direct main" description: flutter @@ -101,14 +130,16 @@ packages: dependency: "direct dev" description: name: flutter_lints - url: "https://pub.dartlang.org" + sha256: e2a421b7e59244faef694ba7b30562e489c2b489866e505074eb005cd7060db7 + url: "https://pub.dev" source: hosted - version: "1.0.4" + version: "3.0.1" flutter_plugin_android_lifecycle: dependency: transitive description: name: flutter_plugin_android_lifecycle - url: "https://pub.dartlang.org" + sha256: "5c574d21b98ec92adab05ead10afd2b13ff5856c7ca79696edb338a9dd8ed387" + url: "https://pub.dev" source: hosted version: "2.0.5" flutter_test: @@ -125,72 +156,74 @@ packages: dependency: "direct main" description: name: http - url: "https://pub.dartlang.org" + sha256: d4872660c46d929f6b8a9ef4e7a7eff7e49bbf0c4ec3f385ee32df5119175139 + url: "https://pub.dev" source: hosted - version: "0.13.4" + version: "1.1.2" http_parser: dependency: transitive description: name: http_parser - url: "https://pub.dartlang.org" + sha256: e362d639ba3bc07d5a71faebb98cde68c05bfbcfbbb444b60b6f60bb67719185 + url: "https://pub.dev" source: hosted version: "4.0.0" js: dependency: transitive description: name: js - url: "https://pub.dartlang.org" + sha256: d9bdfd70d828eeb352390f81b18d6a354ef2044aa28ef25682079797fa7cd174 + url: "https://pub.dev" source: hosted version: "0.6.3" lints: dependency: transitive description: name: lints - url: "https://pub.dartlang.org" + sha256: cbf8d4b858bb0134ef3ef87841abdf8d63bfc255c266b7bf6b39daa1085c4290 + url: "https://pub.dev" source: hosted - version: "1.0.1" + version: "3.0.0" matcher: dependency: transitive description: name: matcher - url: "https://pub.dartlang.org" + sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e" + url: "https://pub.dev" + source: hosted + version: "0.12.16" + material_color_utilities: + dependency: transitive + description: + name: material_color_utilities + sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41" + url: "https://pub.dev" source: hosted - version: "0.12.11" + version: "0.5.0" meta: dependency: transitive description: name: meta - url: "https://pub.dartlang.org" + sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e + url: "https://pub.dev" source: hosted - version: "1.7.0" + version: "1.10.0" path: dependency: transitive description: name: path - url: "https://pub.dartlang.org" - source: hosted - version: "1.8.0" - pedantic: - dependency: transitive - description: - name: pedantic - url: "https://pub.dartlang.org" + sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" + url: "https://pub.dev" source: hosted - version: "1.11.1" + version: "1.8.3" plugin_platform_interface: dependency: transitive description: name: plugin_platform_interface - url: "https://pub.dartlang.org" + sha256: "075f927ebbab4262ace8d0b283929ac5410c0ac4e7fc123c76429564facfb757" + url: "https://pub.dev" source: hosted version: "2.1.2" - quiver: - dependency: transitive - description: - name: quiver - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.1+1" sky_engine: dependency: transitive description: flutter @@ -200,121 +233,146 @@ packages: dependency: transitive description: name: source_span - url: "https://pub.dartlang.org" + sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" + url: "https://pub.dev" source: hosted - version: "1.8.1" + version: "1.10.0" stack_trace: dependency: transitive description: name: stack_trace - url: "https://pub.dartlang.org" + sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" + url: "https://pub.dev" source: hosted - version: "1.10.0" + version: "1.11.1" stream_channel: dependency: transitive description: name: stream_channel - url: "https://pub.dartlang.org" + sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 + url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.2" stream_transform: dependency: transitive description: name: stream_transform - url: "https://pub.dartlang.org" + sha256: ed464977cb26a1f41537e177e190c67223dbd9f4f683489b6ab2e5d211ec564e + url: "https://pub.dev" source: hosted version: "2.0.0" string_scanner: dependency: transitive description: name: string_scanner - url: "https://pub.dartlang.org" + sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" + url: "https://pub.dev" source: hosted - version: "1.1.0" + version: "1.2.0" term_glyph: dependency: transitive description: name: term_glyph - url: "https://pub.dartlang.org" + sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 + url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.2.1" test_api: dependency: transitive description: name: test_api - url: "https://pub.dartlang.org" + sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" + url: "https://pub.dev" source: hosted - version: "0.4.3" + version: "0.6.1" typed_data: dependency: transitive description: name: typed_data - url: "https://pub.dartlang.org" + sha256: "53bdf7e979cfbf3e28987552fd72f637e63f3c8724c9e56d9246942dc2fa36ee" + url: "https://pub.dev" source: hosted version: "1.3.0" url_launcher: dependency: "direct main" description: name: url_launcher - url: "https://pub.dartlang.org" + sha256: e9aa5ea75c84cf46b3db4eea212523591211c3cf2e13099ee4ec147f54201c86 + url: "https://pub.dev" source: hosted - version: "6.0.20" + version: "6.2.2" url_launcher_android: dependency: transitive description: name: url_launcher_android - url: "https://pub.dartlang.org" + sha256: c0766a55ab42cefaa728cabc951e82919ab41a3a4fee0aaa96176ca82da8cc51 + url: "https://pub.dev" source: hosted - version: "6.0.15" + version: "6.2.1" url_launcher_ios: dependency: transitive description: name: url_launcher_ios - url: "https://pub.dartlang.org" + sha256: "46b81e3109cbb2d6b81702ad3077540789a3e74e22795eb9f0b7d494dbaa72ea" + url: "https://pub.dev" source: hosted - version: "6.0.15" + version: "6.2.2" url_launcher_linux: dependency: transitive description: name: url_launcher_linux - url: "https://pub.dartlang.org" + sha256: ab360eb661f8879369acac07b6bb3ff09d9471155357da8443fd5d3cf7363811 + url: "https://pub.dev" source: hosted - version: "3.0.0" + version: "3.1.1" url_launcher_macos: dependency: transitive description: name: url_launcher_macos - url: "https://pub.dartlang.org" + sha256: b7244901ea3cf489c5335bdacda07264a6e960b1c1b1a9f91e4bc371d9e68234 + url: "https://pub.dev" source: hosted - version: "3.0.0" + version: "3.1.0" url_launcher_platform_interface: dependency: transitive description: name: url_launcher_platform_interface - url: "https://pub.dartlang.org" + sha256: "4aca1e060978e19b2998ee28503f40b5ba6226819c2b5e3e4d1821e8ccd92198" + url: "https://pub.dev" source: hosted - version: "2.0.5" + version: "2.3.0" url_launcher_web: dependency: transitive description: name: url_launcher_web - url: "https://pub.dartlang.org" + sha256: fff0932192afeedf63cdd50ecbb1bc825d31aed259f02bb8dba0f3b729a5e88b + url: "https://pub.dev" source: hosted - version: "2.0.6" + version: "2.2.3" url_launcher_windows: dependency: transitive description: name: url_launcher_windows - url: "https://pub.dartlang.org" + sha256: ecf9725510600aa2bb6d7ddabe16357691b6d2805f66216a97d1b881e21beff7 + url: "https://pub.dev" source: hosted - version: "3.0.0" + version: "3.1.1" vector_math: dependency: transitive description: name: vector_math - url: "https://pub.dartlang.org" + sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" + url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "2.1.4" + web: + dependency: transitive + description: + name: web + sha256: afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152 + url: "https://pub.dev" + source: hosted + version: "0.3.0" sdks: - dart: ">=2.15.1 <3.0.0" - flutter: ">=2.8.0" + dart: ">=3.2.0 <4.0.0" + flutter: ">=3.16.0" diff --git a/pubspec.yaml b/pubspec.yaml index c640390..d2dd6f0 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -29,16 +29,16 @@ environment: dependencies: flutter: sdk: flutter - camera: ^0.9.4+2 + camera: ^0.10.5+8 # flutter_unity_widget: ^2020.3.25 # The following adds the Cupertino Icons font to your application. # Use with the CupertinoIcons class for iOS style icons. - cupertino_icons: ^1.0.2 - dio: ^4.0.6 - http: ^0.13.4 - url_launcher: ^6.0.20 + cupertino_icons: ^1.0.6 + dio: ^5.4.0 + http: ^1.1.2 + url_launcher: ^6.2.2 dev_dependencies: flutter_test: @@ -49,7 +49,7 @@ dev_dependencies: # activated in the `analysis_options.yaml` file located at the root of your # package. See that file for information about deactivating specific lint # rules and activating additional ones. - flutter_lints: ^1.0.0 + flutter_lints: ^3.0.1 # For information on the generic Dart part of this file, see the # following page: https://dart.dev/tools/pub/pubspec diff --git a/test/widget_test.dart b/test/widget_test.dart deleted file mode 100644 index 6db332c..0000000 --- a/test/widget_test.dart +++ /dev/null @@ -1,30 +0,0 @@ -// This is a basic Flutter widget test. -// -// To perform an interaction with a widget in your test, use the WidgetTester -// utility that Flutter provides. For example, you can send tap and scroll -// gestures. You can also use WidgetTester to find child widgets in the widget -// tree, read text, and verify that the values of widget properties are correct. - -import 'package:flutter/material.dart'; -import 'package:flutter_test/flutter_test.dart'; - -import 'package:virtual_try_on/main.dart'; - -void main() { - testWidgets('Counter increments smoke test', (WidgetTester tester) async { - // Build our app and trigger a frame. - await tester.pumpWidget(const MyApp()); - - // Verify that our counter starts at 0. - expect(find.text('0'), findsOneWidget); - expect(find.text('1'), findsNothing); - - // Tap the '+' icon and trigger a frame. - await tester.tap(find.byIcon(Icons.add)); - await tester.pump(); - - // Verify that our counter has incremented. - expect(find.text('0'), findsNothing); - expect(find.text('1'), findsOneWidget); - }); -}