Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updated flutter and java dependencies #2

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 37 additions & 2 deletions .metadata
Original file line number Diff line number Diff line change
Expand Up @@ -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'
4 changes: 2 additions & 2 deletions android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
buildscript {
ext.kotlin_version = '1.3.50'
ext.kotlin_version = '1.7.10'
repositories {
google()
mavenCentral()
Expand Down Expand Up @@ -31,6 +31,6 @@ subprojects {
project.evaluationDependsOn(':app')
}

task clean(type: Delete) {
tasks.register("clean", Delete) {
delete rootProject.buildDir
}
1 change: 1 addition & 0 deletions android/gradle.properties
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
38 changes: 21 additions & 17 deletions lib/checkSizePage.dart
Original file line number Diff line number Diff line change
@@ -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';
Expand All @@ -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<void> initializeControllerFuture;
Expand All @@ -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 <Widget>[
children: <Widget>[
Text('Step 1:',
style: TextStyle(fontWeight: FontWeight.bold)),
Text('Place an A4 size paper on the floor.'),
Expand Down Expand Up @@ -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,
)
],
Expand Down Expand Up @@ -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),
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -315,22 +319,22 @@ class _DisplaySizeScreenState extends State<DisplaySizeScreen> {
}

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,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Text(
res,
style: TextStyle(
style: const TextStyle(
fontWeight: FontWeight.bold,
),
),
DataTable(columns: <DataColumn>[
DataTable(columns: const <DataColumn>[
DataColumn(
label: Text(
'Unit',
Expand All @@ -346,32 +350,32 @@ class _DisplaySizeScreenState extends State<DisplaySizeScreen> {
], rows: <DataRow>[
DataRow(
cells: <DataCell>[
DataCell(Text('US')),
const DataCell(Text('US')),
DataCell(Text(getUS(size_cm).toString())),
],
),
DataRow(
cells: <DataCell>[
DataCell(Text('EURO')),
const DataCell(Text('EURO')),
DataCell(Text(getEURO(size_cm).toString())),
],
),
DataRow(
cells: <DataCell>[
DataCell(Text('UK')),
const DataCell(Text('UK')),
DataCell(Text(getUK(size_cm).toString())),
],
),
DataRow(
cells: <DataCell>[
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: () {
Expand Down
33 changes: 16 additions & 17 deletions lib/formPage.dart
Original file line number Diff line number Diff line change
@@ -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';
Expand All @@ -21,7 +20,7 @@ class _FormPageState extends State<FormPage> {
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('Survey'),
title: const Text('Survey'),
),
body: Padding(
padding: const EdgeInsets.all(8.0),
Expand All @@ -34,9 +33,9 @@ class _FormPageState extends State<FormPage> {
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,
Expand All @@ -51,10 +50,10 @@ class _FormPageState extends State<FormPage> {
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,
Expand All @@ -69,9 +68,9 @@ class _FormPageState extends State<FormPage> {
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,
Expand All @@ -86,12 +85,12 @@ class _FormPageState extends State<FormPage> {
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,
Expand All @@ -111,7 +110,7 @@ class _FormPageState extends State<FormPage> {
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.',
Expand All @@ -123,7 +122,7 @@ class _FormPageState extends State<FormPage> {
),
),
ElevatedButton(
child: Text('Submit response'),
child: const Text('Submit response'),
onPressed: () async {
// print('start');
// print(sliderValue1);
Expand All @@ -147,7 +146,7 @@ class _FormPageState extends State<FormPage> {
);
// return;
Route route = MaterialPageRoute(
builder: (context) => ThankYouPage(survey: false));
builder: (context) => const ThankYouPage(survey: false));
Navigator.pushReplacement(context, route);
}),
],
Expand Down
Loading