Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Generated an apk file
  • Loading branch information
Shariq Khan committed May 9, 2022
1 parent e4c46fc commit 42096f1
Show file tree
Hide file tree
Showing 10 changed files with 247 additions and 82 deletions.
2 changes: 1 addition & 1 deletion android/app/google-services.json
Expand Up @@ -35,7 +35,7 @@
"client_id": "254789615258-qbpjmknq1u9473imrnnh2chlbcs6i2b1.apps.googleusercontent.com",
"client_type": 2,
"ios_info": {
"bundle_id": "com.huynh.listarFlutter"
"bundle_id": "safer-app"
}
}
]
Expand Down
3 changes: 2 additions & 1 deletion ios/Flutter/Release.xcconfig
@@ -1,2 +1,3 @@
#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
#include "Generated.xcconfig"
#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"
#include "Generated.xcconfig"
30 changes: 29 additions & 1 deletion ios/Podfile
@@ -1,5 +1,5 @@
# Uncomment this line to define a global platform for your project
# platform :ios, '9.0'
platform :ios, '12.0'

# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
Expand Down Expand Up @@ -27,6 +27,34 @@ require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelpe

flutter_ios_podfile_setup

def flutter_install_ios_plugin_pods(ios_application_path = nil)
ios_application_path ||= File.dirname(defined_in_file.realpath) if self.respond_to?(:defined_in_file)
raise 'Could not find iOS application path' unless ios_application_path

symlink_dir = File.expand_path('.symlinks', ios_application_path)
system('rm', '-rf', symlink_dir) # Avoid the complication of dependencies like FileUtils.

symlink_plugins_dir = File.expand_path('plugins', symlink_dir)
system('mkdir', '-p', symlink_plugins_dir)

plugins_file = File.join(ios_application_path, '..', '.flutter-plugins-dependencies')
plugin_pods = flutter_parse_plugins_file(plugins_file)
plugin_pods.each do |plugin_hash|
plugin_name = plugin_hash['name']
plugin_path = plugin_hash['path']
if (plugin_name && plugin_path)
symlink = File.join(symlink_plugins_dir, plugin_name)
File.symlink(plugin_path, symlink)

if plugin_name == 'flutter_ffmpeg'
pod 'flutter_ffmpeg/full-lts', :path => File.join('.symlinks', 'plugins', plugin_name, 'ios')
else
pod plugin_name, :path => File.join('.symlinks', 'plugins', plugin_name, 'ios')
end
end
end
end

target 'Runner' do
use_frameworks!
use_modular_headers!
Expand Down
2 changes: 1 addition & 1 deletion ios/Podfile.lock
Expand Up @@ -29,6 +29,6 @@ SPEC CHECKSUMS:
shared_preferences: af6bfa751691cdc24be3045c43ec037377ada40d
url_launcher: 6fef411d543ceb26efce54b05a0a40bfd74cbbef

PODFILE CHECKSUM: aafe91acc616949ddb318b77800a7f51bffa2a4c
PODFILE CHECKSUM: 502dac89f6d68f7e85233ab289bd04f9c79b8c93

COCOAPODS: 1.10.1
14 changes: 7 additions & 7 deletions ios/Runner.xcodeproj/project.pbxproj
Expand Up @@ -173,7 +173,7 @@
TargetAttributes = {
97C146ED1CF9000F007C117D = {
CreatedOnToolsVersion = 7.3.1;
DevelopmentTeam = 3C2ZJ87Z72;
DevelopmentTeam = 88X4S7R58M;
LastSwiftMigration = 0910;
};
};
Expand Down Expand Up @@ -376,7 +376,7 @@
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CURRENT_PROJECT_VERSION = 2;
DEVELOPMENT_TEAM = 3C2ZJ87Z72;
DEVELOPMENT_TEAM = 88X4S7R58M;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
Expand All @@ -390,7 +390,7 @@
"$(PROJECT_DIR)/Flutter",
);
MARKETING_VERSION = 1.0.3;
PRODUCT_BUNDLE_IDENTIFIER = com.huynh.listarFlutter;
PRODUCT_BUNDLE_IDENTIFIER = "safer-app";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_VERSION = 4.0;
Expand Down Expand Up @@ -513,7 +513,7 @@
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CURRENT_PROJECT_VERSION = 2;
DEVELOPMENT_TEAM = 3C2ZJ87Z72;
DEVELOPMENT_TEAM = 88X4S7R58M;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
Expand All @@ -527,7 +527,7 @@
"$(PROJECT_DIR)/Flutter",
);
MARKETING_VERSION = 1.0.3;
PRODUCT_BUNDLE_IDENTIFIER = com.huynh.listarFlutter;
PRODUCT_BUNDLE_IDENTIFIER = "safer-app";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
Expand All @@ -544,7 +544,7 @@
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CURRENT_PROJECT_VERSION = 2;
DEVELOPMENT_TEAM = 3C2ZJ87Z72;
DEVELOPMENT_TEAM = 88X4S7R58M;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
Expand All @@ -558,7 +558,7 @@
"$(PROJECT_DIR)/Flutter",
);
MARKETING_VERSION = 1.0.3;
PRODUCT_BUNDLE_IDENTIFIER = com.huynh.listarFlutter;
PRODUCT_BUNDLE_IDENTIFIER = "safer-app";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_VERSION = 4.0;
Expand Down
4 changes: 2 additions & 2 deletions ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1240"
LastUpgradeVersion = "1320"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down Expand Up @@ -40,7 +40,7 @@
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
buildConfiguration = "Release"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
Expand Down
2 changes: 1 addition & 1 deletion ios/Runner/GoogleService-Info.plist
Expand Up @@ -13,7 +13,7 @@
<key>PLIST_VERSION</key>
<string>1</string>
<key>BUNDLE_ID</key>
<string>com.huynh.listarFlutter</string>
<string>safer-app</string>
<key>PROJECT_ID</key>
<string>listarflutter</string>
<key>STORAGE_BUCKET</key>
Expand Down
5 changes: 1 addition & 4 deletions ios/Runner/Runner.entitlements
@@ -1,8 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>aps-environment</key>
<string>development</string>
</dict>
<dict/>
</plist>
65 changes: 43 additions & 22 deletions lib/screens/safer_main_menu/personal_risk.dart
@@ -1,5 +1,6 @@
import 'package:flutter/material.dart';
import 'package:flutter_spinbox/material.dart';
import 'package:http/http.dart' as http;
import 'package:listar_flutter/widgets/widget.dart';

class PersonalRisk extends StatefulWidget {
final String title;
Expand All @@ -13,6 +14,8 @@ class PersonalRisk extends StatefulWidget {
}

class _PersonalRiskState extends State<PersonalRisk> {
bool _loading = false;

List _specialNeeds = [];
List _priorFlooding = [];
List _priorDamages = [];
Expand Down Expand Up @@ -102,6 +105,29 @@ class _PersonalRiskState extends State<PersonalRisk> {
super.initState();
}

Future<List> senddata() async {
setState(() {
_loading = true;
});
final response = await http.post(
"https://stormassistance.research.uconn.edu/personal_risk.php",
body: {
"userId": "test",
"specialNeeds": _specialNeeds.join(", "),
"priorFlooding": _priorFlooding.join(", "),
"priorDamages": _priorDamages.join(", "),
"priorDangers": _priorDangers.join(", "),
"priorOutage": _priorOutage.join(", "),
"safePlaces": _safePlace.join(", "),
"resAvailable": _doYouHave.join(", "),
"riskScore":
"${_riskScore.values.reduce((sum, element) => sum + element)}",
});
setState(() {
_loading = false;
});
}

@override
Widget build(BuildContext context) {
return Scaffold(
Expand All @@ -113,27 +139,6 @@ class _PersonalRiskState extends State<PersonalRisk> {
),
body: ListView(
children: <Widget>[
Card(
clipBehavior: Clip.antiAlias,
child: Column(
children: [
Padding(
padding: const EdgeInsets.all(8),
),
ListTile(
title: RichText(
text: TextSpan(
style: TextStyle(
color: Colors.black, fontSize: 20, fontFamily: 'Raleway'),
text:
'Your Risk Score: ${_riskScore.values.reduce((sum, element) => sum + element)}',
))),
Padding(
padding: const EdgeInsets.all(8),
),
],
),
),
Card(
clipBehavior: Clip.antiAlias,
child: Column(
Expand Down Expand Up @@ -569,6 +574,22 @@ class _PersonalRiskState extends State<PersonalRisk> {
],
),
),
Padding(
padding: EdgeInsets.only(
left: 20,
right: 20,
top: 15,
bottom: 15,
),
child: AppButton(
onPressed: () {
senddata();
},
loading: _loading,
disableTouchWhenLoading: true,
text: 'Submit',
),
)
],
),
);
Expand Down

0 comments on commit 42096f1

Please sign in to comment.