Compare commits

..

No commits in common. "8f9453cdead12e92f29cdb8548601dbf67284452" and "7981a02996f9667fc7d4a8c72d299d34fb547a34" have entirely different histories.

47 changed files with 459 additions and 684 deletions

View File

@ -1,5 +0,0 @@
{
"recommendations": [
"dart-code.dart-code"
]
}

View File

@ -359,7 +359,7 @@
"id": "otherpostal_14", "id": "otherpostal_14",
"depid": "", "depid": "",
"widget": "text", "widget": "text",
"input": "number", "input": "Hubli",
"validation": "validation":
{ {
"isRequired": true "isRequired": true

View File

@ -21,6 +21,6 @@
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
<string>1.0</string> <string>1.0</string>
<key>MinimumOSVersion</key> <key>MinimumOSVersion</key>
<string>12.0</string> <string>11.0</string>
</dict> </dict>
</plist> </plist>

View File

@ -1,5 +1,5 @@
# Uncomment this line to define a global platform for your project # Uncomment this line to define a global platform for your project
# platform :ios, '12.0' # platform :ios, '11.0'
# CocoaPods analytics sends network stats synchronously affecting flutter build latency. # CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true' ENV['COCOAPODS_DISABLE_STATS'] = 'true'

View File

@ -41,11 +41,11 @@ PODS:
- DKImagePickerController/PhotoGallery - DKImagePickerController/PhotoGallery
- Flutter - Flutter
- Flutter (1.0.0) - Flutter (1.0.0)
- flutter_inappwebview_ios (0.0.1): - flutter_inappwebview (0.0.1):
- Flutter - Flutter
- flutter_inappwebview_ios/Core (= 0.0.1) - flutter_inappwebview/Core (= 0.0.1)
- OrderedSet (~> 5.0) - OrderedSet (~> 5.0)
- flutter_inappwebview_ios/Core (0.0.1): - flutter_inappwebview/Core (0.0.1):
- Flutter - Flutter
- OrderedSet (~> 5.0) - OrderedSet (~> 5.0)
- image_picker_ios (0.0.1): - image_picker_ios (0.0.1):
@ -56,7 +56,7 @@ PODS:
- path_provider_foundation (0.0.1): - path_provider_foundation (0.0.1):
- Flutter - Flutter
- FlutterMacOS - FlutterMacOS
- permission_handler_apple (9.3.0): - permission_handler_apple (9.1.1):
- Flutter - Flutter
- ReachabilitySwift (5.0.0) - ReachabilitySwift (5.0.0)
- SDWebImage (5.18.3): - SDWebImage (5.18.3):
@ -75,7 +75,7 @@ DEPENDENCIES:
- device_info_plus (from `.symlinks/plugins/device_info_plus/ios`) - device_info_plus (from `.symlinks/plugins/device_info_plus/ios`)
- file_picker (from `.symlinks/plugins/file_picker/ios`) - file_picker (from `.symlinks/plugins/file_picker/ios`)
- Flutter (from `Flutter`) - Flutter (from `Flutter`)
- flutter_inappwebview_ios (from `.symlinks/plugins/flutter_inappwebview_ios/ios`) - flutter_inappwebview (from `.symlinks/plugins/flutter_inappwebview/ios`)
- image_picker_ios (from `.symlinks/plugins/image_picker_ios/ios`) - image_picker_ios (from `.symlinks/plugins/image_picker_ios/ios`)
- package_info_plus (from `.symlinks/plugins/package_info_plus/ios`) - package_info_plus (from `.symlinks/plugins/package_info_plus/ios`)
- path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`) - path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`)
@ -103,8 +103,8 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/file_picker/ios" :path: ".symlinks/plugins/file_picker/ios"
Flutter: Flutter:
:path: Flutter :path: Flutter
flutter_inappwebview_ios: flutter_inappwebview:
:path: ".symlinks/plugins/flutter_inappwebview_ios/ios" :path: ".symlinks/plugins/flutter_inappwebview/ios"
image_picker_ios: image_picker_ios:
:path: ".symlinks/plugins/image_picker_ios/ios" :path: ".symlinks/plugins/image_picker_ios/ios"
package_info_plus: package_info_plus:
@ -125,19 +125,19 @@ SPEC CHECKSUMS:
DKImagePickerController: b512c28220a2b8ac7419f21c491fc8534b7601ac DKImagePickerController: b512c28220a2b8ac7419f21c491fc8534b7601ac
DKPhotoGallery: fdfad5125a9fdda9cc57df834d49df790dbb4179 DKPhotoGallery: fdfad5125a9fdda9cc57df834d49df790dbb4179
file_picker: 15fd9539e4eb735dc54bae8c0534a7a9511a03de file_picker: 15fd9539e4eb735dc54bae8c0534a7a9511a03de
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7 Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
flutter_inappwebview_ios: 97215cf7d4677db55df76782dbd2930c5e1c1ea0 flutter_inappwebview: 50b55a88f5dddadc9e741a7caf72f378116e2156
image_picker_ios: 4a8aadfbb6dc30ad5141a2ce3832af9214a705b5 image_picker_ios: 4a8aadfbb6dc30ad5141a2ce3832af9214a705b5
OrderedSet: aaeb196f7fef5a9edf55d89760da9176ad40b93c OrderedSet: aaeb196f7fef5a9edf55d89760da9176ad40b93c
package_info_plus: fd030dabf36271f146f1f3beacd48f564b0f17f7 package_info_plus: fd030dabf36271f146f1f3beacd48f564b0f17f7
path_provider_foundation: 29f094ae23ebbca9d3d0cec13889cd9060c0e943 path_provider_foundation: 29f094ae23ebbca9d3d0cec13889cd9060c0e943
permission_handler_apple: 9878588469a2b0d0fc1e048d9f43605f92e6cec2 permission_handler_apple: e76247795d700c14ea09e3a2d8855d41ee80a2e6
ReachabilitySwift: 985039c6f7b23a1da463388634119492ff86c825 ReachabilitySwift: 985039c6f7b23a1da463388634119492ff86c825
SDWebImage: 96e0c18ef14010b7485210e92fac888587ebb958 SDWebImage: 96e0c18ef14010b7485210e92fac888587ebb958
shared_preferences_foundation: 5b919d13b803cadd15ed2dc053125c68730e5126 shared_preferences_foundation: 5b919d13b803cadd15ed2dc053125c68730e5126
SwiftyGif: 93a1cc87bf3a51916001cf8f3d63835fb64c819f SwiftyGif: 93a1cc87bf3a51916001cf8f3d63835fb64c819f
url_launcher_ios: 6116280ddcfe98ab8820085d8d76ae7449447586 url_launcher_ios: 08a3dfac5fb39e8759aeb0abbd5d9480f30fc8b4
PODFILE CHECKSUM: 1f2049aaadd90d3176a1c2f862da9789fc056fe6 PODFILE CHECKSUM: 108feb553cebadca4bc232556afce4dd4c21da4c
COCOAPODS: 1.14.3 COCOAPODS: 1.12.1

View File

@ -198,7 +198,6 @@
9705A1C41CF9048500538489 /* Embed Frameworks */, 9705A1C41CF9048500538489 /* Embed Frameworks */,
3B06AD1E1E4923F5004D2608 /* Thin Binary */, 3B06AD1E1E4923F5004D2608 /* Thin Binary */,
A15ED1C91FF7A51D13A38E8F /* [CP] Embed Pods Frameworks */, A15ED1C91FF7A51D13A38E8F /* [CP] Embed Pods Frameworks */,
701E8BE6E35B06026EA76D58 /* [CP] Copy Pods Resources */,
); );
buildRules = ( buildRules = (
); );
@ -215,7 +214,7 @@
97C146E61CF9000F007C117D /* Project object */ = { 97C146E61CF9000F007C117D /* Project object */ = {
isa = PBXProject; isa = PBXProject;
attributes = { attributes = {
LastUpgradeCheck = 1510; LastUpgradeCheck = 1430;
ORGANIZATIONNAME = ""; ORGANIZATIONNAME = "";
TargetAttributes = { TargetAttributes = {
331C8080294A63A400263BE5 = { 331C8080294A63A400263BE5 = {
@ -307,23 +306,6 @@
shellPath = /bin/sh; shellPath = /bin/sh;
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
}; };
701E8BE6E35B06026EA76D58 /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-input-files.xcfilelist",
);
name = "[CP] Copy Pods Resources";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-output-files.xcfilelist",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n";
showEnvVarsInLog = 0;
};
9740EEB61CF901F6004384FC /* Run Script */ = { 9740EEB61CF901F6004384FC /* Run Script */ = {
isa = PBXShellScriptBuildPhase; isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1; alwaysOutOfDate = 1;
@ -469,7 +451,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES; GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 12.0; IPHONEOS_DEPLOYMENT_TARGET = 11.0;
MTL_ENABLE_DEBUG_INFO = NO; MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos; SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos; SUPPORTED_PLATFORMS = iphoneos;
@ -597,7 +579,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES; GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 12.0; IPHONEOS_DEPLOYMENT_TARGET = 11.0;
MTL_ENABLE_DEBUG_INFO = YES; MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES; ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos; SDKROOT = iphoneos;
@ -646,7 +628,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES; GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 12.0; IPHONEOS_DEPLOYMENT_TARGET = 11.0;
MTL_ENABLE_DEBUG_INFO = NO; MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos; SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos; SUPPORTED_PLATFORMS = iphoneos;

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<Scheme <Scheme
LastUpgradeVersion = "1510" LastUpgradeVersion = "1430"
version = "1.3"> version = "1.3">
<BuildAction <BuildAction
parallelizeBuildables = "YES" parallelizeBuildables = "YES"

View File

@ -1,10 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="22505" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="BYZ-38-t0r"> <document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10117" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r">
<device id="retina6_12" orientation="portrait" appearance="light"/>
<dependencies> <dependencies>
<deployment identifier="iOS"/> <deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22504"/> <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies> </dependencies>
<scenes> <scenes>
<!--Flutter View Controller--> <!--Flutter View Controller-->
@ -16,14 +14,13 @@
<viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/> <viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
</layoutGuides> </layoutGuides>
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC"> <view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
<rect key="frame" x="0.0" y="0.0" width="393" height="852"/> <rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
</view> </view>
</viewController> </viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/> <placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
</objects> </objects>
<point key="canvasLocation" x="-26" y="-76"/>
</scene> </scene>
</scenes> </scenes>
</document> </document>

View File

@ -64,8 +64,5 @@
<true/> <true/>
<key>UIFileSharingEnabled</key> <key>UIFileSharingEnabled</key>
<true/> <true/>
<key>FLTEnableImpeller</key>
<false />
</dict> </dict>
</plist> </plist>

View File

@ -1,10 +1,14 @@
import 'dart:async'; import 'dart:async';
import 'dart:convert';
import 'dart:io';
import 'package:flutter/foundation.dart'; import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_inappwebview/flutter_inappwebview.dart'; import 'package:flutter_inappwebview/flutter_inappwebview.dart';
import 'package:hive_flutter/hive_flutter.dart'; import 'package:hive_flutter/hive_flutter.dart';
import 'package:path_provider/path_provider.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:pwa_ios/model/interaction_config_data.dart'; import 'package:pwa_ios/model/interaction_config_data.dart';
import 'package:pwa_ios/model/interaction_data.dart'; import 'package:pwa_ios/model/interaction_data.dart';
@ -25,6 +29,7 @@ import 'package:pwa_ios/views/home_screen.dart';
import 'package:pwa_ios/views/konectarpage.dart'; import 'package:pwa_ios/views/konectarpage.dart';
import 'package:pwa_ios/views/login.dart'; import 'package:pwa_ios/views/login.dart';
import 'package:shared_preferences/shared_preferences.dart'; import 'package:shared_preferences/shared_preferences.dart';
import 'package:permission_handler/permission_handler.dart';
import 'package:openid_client/openid_client.dart'; import 'package:openid_client/openid_client.dart';
import 'package:flutter_web_plugins/url_strategy.dart'; import 'package:flutter_web_plugins/url_strategy.dart';
import 'package:internet_connection_checker/internet_connection_checker.dart'; import 'package:internet_connection_checker/internet_connection_checker.dart';
@ -87,8 +92,9 @@ Future main() async {
Hive.registerAdapter(MultipleSectionListAdapter()); Hive.registerAdapter(MultipleSectionListAdapter());
Hive.registerAdapter(SaveAdapter()); Hive.registerAdapter(SaveAdapter());
Hive.registerAdapter(SaveInteractionFormJsonAdapter()); Hive.registerAdapter(SaveInteractionFormJsonAdapter());
await Hive.openBox<SaveInteraction>('InteractionDataBox'); // await Hive.openBox('InteractionDataBox');
await Hive.openBox<UserData>("UserDataBox"); // await Hive.openBox<UserData>("UserDataBox");
//await Hive.openBox('InteractionConfigDataBox');
await Hive.openBox<InteractionConfigData>('InteractionConfigDataBox'); await Hive.openBox<InteractionConfigData>('InteractionConfigDataBox');
// final ConfigDataProvider configDataProvider = ConfigDataProvider(); // final ConfigDataProvider configDataProvider = ConfigDataProvider();
@ -103,10 +109,11 @@ Future main() async {
// print(json.toString()); // print(json.toString());
// await MockApiCall().postFormData(json).then((value) async { // await MockApiCall().postFormData(json).then((value) async {
// await configDataProvider.initConfigUIData().then((value) { // await configDataProvider.initConfigUIData().then((value) {
activateTimer(); // // activateTimer();
// }); // });
// }); // });
// await configDataProvider.initConfigUIData(); await configDataProvider.initConfigUIData();
// activateTimer();
// await provider.initConfigUIData(); // await provider.initConfigUIData();
if (!kIsWeb && if (!kIsWeb &&
@ -134,13 +141,10 @@ Future main() async {
// credential = await authenticate(client, scopes: scopes); // credential = await authenticate(client, scopes: scopes);
// userInfo = await credential!.getUserInfo(); // userInfo = await credential!.getUserInfo();
//runApp(const MyApp()); //runApp(const MyApp());
// activateTimer(); SharedPreferences.getInstance().then((instance) {
SharedPreferences.getInstance().then((instance) async {
//StorageService().sharedPreferencesInstance = instance; //StorageService().sharedPreferencesInstance = instance;
bool isloggedIn = instance.getBool('isloggedin') ?? false; bool isloggedIn = instance.getBool('isloggedin') ?? false;
if (!isloggedIn) {
await configDataProvider.initConfigUIData();
}
runApp( runApp(
MultiProvider( MultiProvider(
providers: [ providers: [
@ -162,14 +166,14 @@ Future main() async {
builder: (context, snapshot) { builder: (context, snapshot) {
print("Data_is : $snapshot"); print("Data_is : $snapshot");
if (snapshot.connectionState == ConnectionState.waiting) { if (snapshot.connectionState == ConnectionState.waiting) {
return const CircularProgressIndicator(); return CircularProgressIndicator();
} else if (snapshot.hasError) { } else if (snapshot.hasError) {
return Text('Error: ${snapshot.error}'); return Text('Error: ${snapshot.error}');
} else { } else {
final isLoggedIn = snapshot.data ?? false; final isLoggedIn = snapshot.data ?? false;
print("isLoggedIn_is : $isLoggedIn"); print("isLoggedIn_is : $isLoggedIn");
return isLoggedIn ? const HomeScreen() : const LoginScreen(); return isLoggedIn ? HomeScreen() : LoginScreen();
} }
}, },
), //userInfo != null ? const Home() : OpenidScreen(credential: credential,), ), //userInfo != null ? const Home() : OpenidScreen(credential: credential,),
@ -187,37 +191,22 @@ cancelTimer() {
activateTimer() { activateTimer() {
mytimer = Timer.periodic(const Duration(minutes: 5), (timer) async { mytimer = Timer.periodic(const Duration(minutes: 5), (timer) async {
if (await InternetConnectionChecker().hasConnection) {
//code to run on every 2 minutes 5 seconds //code to run on every 2 minutes 5 seconds
print("timer started ");
final ConfigDataProvider configDataProvider = ConfigDataProvider(); final ConfigDataProvider configDataProvider = ConfigDataProvider();
final InteractionProvider viewInteractionProvider = InteractionProvider(); final ViewInteractionProvider viewInteractionProvider =
if (await checkRecordsAvailable()) { ViewInteractionProvider();
String jsonstr = await formJsonForSync(); List<SaveInteraction> savedList =
await viewInteractionProvider.getAllRecords();
await MockApiCall().postSavedData(jsonstr).then((value) async { SendSavedDataJson json = SendSavedDataJson(data: savedList);
await deleteRecords(); print(json.toString());
await configDataProvider.initConfigUIData().then((value) async { await MockApiCall().postFormData(json).then((value) async {
await viewInteractionProvider.initConfigData().then((value) { await configDataProvider.initConfigUIData().then((value) {
activateTimer(); // activateTimer();
});
print("ended");
}); });
}); });
} else {
await configDataProvider.initConfigUIData().then((value) async {
await viewInteractionProvider.initConfigData().then((value) {
activateTimer();
});
print("ended");
});
}
}
print("Interval called 2 mins"); print("Interval called 2 mins");
}); });
print("timer"); print("timer");
print(mytimer?.isActive); print(mytimer?.isActive);
} }
@ -283,10 +272,10 @@ class _HomeState extends State<Home> with WidgetsBindingObserver {
// Navigator.of(context).pushReplacement(MaterialPageRoute(builder: (context) => MyApp())); // Navigator.of(context).pushReplacement(MaterialPageRoute(builder: (context) => MyApp()));
Navigator.push( Navigator.push(
context, context,
MaterialPageRoute(builder: (context) => const MyApp()) MaterialPageRoute(builder: (context) => const MyApp()),
); );
}, },
child: const Text('click'), child: Text('click'),
), ),
), ),
), ),
@ -295,7 +284,7 @@ class _HomeState extends State<Home> with WidgetsBindingObserver {
@override @override
void dispose() { void dispose() {
// Hive.close(); Hive.close();
super.dispose(); super.dispose();
} }
} }

View File

@ -19,7 +19,7 @@ class UIDataResponse {
success: json["success"], success: json["success"],
message: json["message"], message: json["message"],
formFields: List<FormFieldData>.from( formFields: List<FormFieldData>.from(
json["data"].map((x) => FormFieldData.fromJson(x))), json["form-fields"].map((x) => FormFieldData.fromJson(x))),
); );
Map<String, dynamic> toJson() => { Map<String, dynamic> toJson() => {

View File

@ -6,6 +6,7 @@ import 'dart:convert';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:hive_flutter/hive_flutter.dart'; import 'package:hive_flutter/hive_flutter.dart';
import 'package:pwa_ios/model/json_form_data.dart';
part 'interaction_data.g.dart'; part 'interaction_data.g.dart';
// InteractionResultData welcomeFromJson(String str) => // InteractionResultData welcomeFromJson(String str) =>

View File

@ -6,6 +6,7 @@ import 'dart:convert';
import 'package:hive_flutter/hive_flutter.dart'; import 'package:hive_flutter/hive_flutter.dart';
import 'package:pwa_ios/model/interaction_data.dart'; import 'package:pwa_ios/model/interaction_data.dart';
import 'package:pwa_ios/model/json_form_data.dart';
part 'save_interaction.g.dart'; part 'save_interaction.g.dart';
SaveInteraction welcomeFromJson(String str) => SaveInteraction welcomeFromJson(String str) =>

View File

@ -44,9 +44,8 @@ class _LoginPageState extends State<LoginPage> {
Future<Client> getClient() async { Future<Client> getClient() async {
var uri = Uri.parse(keycloakUri); var uri = Uri.parse(keycloakUri);
if (!kIsWeb && Platform.isAndroid) { if (!kIsWeb && Platform.isAndroid)
uri = uri.replace(host: 'sso.konectar.io'); uri = uri.replace(host: 'sso.konectar.io');
}
var clientId = 'appwildcard'; var clientId = 'appwildcard';
var issuer = await Issuer.discover(uri); var issuer = await Issuer.discover(uri);

View File

@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
import 'package:hive/hive.dart'; import 'package:hive/hive.dart';
import 'package:pwa_ios/model/interaction_config_data.dart'; import 'package:pwa_ios/model/interaction_config_data.dart';
import 'package:pwa_ios/model/save_interaction.dart';
class HiveDataRepository extends ChangeNotifier { class HiveDataRepository extends ChangeNotifier {
Box<InteractionConfigData> _hiveBox; // Use the correct type for your Hive box Box<InteractionConfigData> _hiveBox; // Use the correct type for your Hive box

View File

@ -15,7 +15,7 @@ final kPwaHost = kPwaUri.host;
final notificationUri = final notificationUri =
WebUri('https://cardio-staging.konectar.io/notifications/'); WebUri('https://cardio-staging.konectar.io/notifications/');
const String publicKey = final String publicKey =
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyZWYiOiIxZTIxMTkyZS1jYTkyLTRlNDktYjY5Zi0yM2YzZTdiOWY1ODAiLCJhbm9uX2tleSI6ImVkZTgzYjg3LTljNGUtNDcyYS04MGEzLTQxNGU1NjE1YWExMSIsImlhdCI6MTY5NTk5MDY2NiwiZXhwIjoxNzI3NTQ4MjY2LCJpc3MiOiJodHRwczovL2J1aWxkd2l0aHRoZXRhLmNvbSJ9.nFjrMCr2swrkN9-JTqZOqsSOdUgJpH0LiRBFBpe2ceA"; "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyZWYiOiIxZTIxMTkyZS1jYTkyLTRlNDktYjY5Zi0yM2YzZTdiOWY1ODAiLCJhbm9uX2tleSI6ImVkZTgzYjg3LTljNGUtNDcyYS04MGEzLTQxNGU1NjE1YWExMSIsImlhdCI6MTY5NTk5MDY2NiwiZXhwIjoxNzI3NTQ4MjY2LCJpc3MiOiJodHRwczovL2J1aWxkd2l0aHRoZXRhLmNvbSJ9.nFjrMCr2swrkN9-JTqZOqsSOdUgJpH0LiRBFBpe2ceA";
// Custom HTML Error Page. // Custom HTML Error Page.

View File

@ -6,7 +6,7 @@ import 'package:dio/dio.dart';
class FileUpload { class FileUpload {
Future<bool> uploadFileAndJsonData( Future<bool> uploadFileAndJsonData(
{required File empFace, required String empCode}) async { {required File empFace, required String empCode}) async {
const url = 'My API URL'; final url = 'My API URL';
try { try {
var formData = FormData.fromMap({ var formData = FormData.fromMap({
"files": [ "files": [

View File

@ -6,6 +6,7 @@ import 'package:dio/dio.dart';
import 'package:dio/io.dart'; import 'package:dio/io.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:http_mock_adapter/http_mock_adapter.dart'; import 'package:http_mock_adapter/http_mock_adapter.dart';
import 'package:path_provider/path_provider.dart';
import 'package:pwa_ios/model/interaction_config_data.dart'; import 'package:pwa_ios/model/interaction_config_data.dart';
class MockApiCall { class MockApiCall {
@ -31,13 +32,14 @@ class MockApiCall {
// ), // ),
// ); // );
// Send a GET request to "https://example.com" using Dio // Send a GET request to "https://example.com" using Dio
final response = await dio.get('https://passvault.konectar.io/forms'); final response =
await dio.get('http://192.168.2.64/konectar-app/public/forms');
//UIDataResponse dataResponse = UIDataResponse.fromJson(response.data); UIDataResponse dataResponse = UIDataResponse.fromJson(response.data);
// The response should contain the mock data we registered // The response should contain the mock data we registered
print("response"); print("response");
print(response.data); print(response.data);
return response.data; return dataResponse;
} }
Future<dynamic> postConfigData(var jsonObj) async { Future<dynamic> postConfigData(var jsonObj) async {
@ -117,10 +119,9 @@ class MockApiCall {
print(response.data); // {messa print(response.data); // {messa
} }
Future<dynamic> postSavedData(var jsonObj) async { Future<dynamic> postSavedData(var jsonObj, String filepath) async {
// final dio = Dio(BaseOptions()); // final dio = Dio(BaseOptions());
final dio = Dio(); final dio = Dio();
// ignore: deprecated_member_use
(dio.httpClientAdapter as IOHttpClientAdapter).onHttpClientCreate = (dio.httpClientAdapter as IOHttpClientAdapter).onHttpClientCreate =
(HttpClient client) { (HttpClient client) {
client.badCertificateCallback = client.badCertificateCallback =
@ -152,15 +153,9 @@ class MockApiCall {
// }); // });
// Send a GET request to "https://example.com" using Dio // Send a GET request to "https://example.com" using Dio
final response = await dio.get(
// Or create `Dio` with a `BaseOptions` instance. 'http://192.168.2.64/konectar-app/public/push_data',
final options = Options( data: jsonObj);
sendTimeout: const Duration(seconds: 15),
receiveTimeout: const Duration(seconds: 15),
);
final response = await dio.get('https://passvault.konectar.io/push_data',
options: options, data: jsonObj);
//UIDataResponse dataResponse = UIDataResponse.fromJson(response.data); //UIDataResponse dataResponse = UIDataResponse.fromJson(response.data);
// The response should contain the mock data we registered // The response should contain the mock data we registered
@ -171,7 +166,7 @@ class MockApiCall {
Future<bool> uploadFileAndJsonData(var jsonObj) async { Future<bool> uploadFileAndJsonData(var jsonObj) async {
// {required File empFace, required String empCode} // {required File empFace, required String empCode}
const url = 'http://192.168.2.64/konectar-app/public/push_data'; final url = 'http://192.168.2.64/konectar-app/public/push_data';
try { try {
var formData = FormData.fromMap({ var formData = FormData.fromMap({
"files": [ "files": [

View File

@ -1,13 +0,0 @@
import 'package:flutter/foundation.dart';
import 'package:hive_flutter/hive_flutter.dart';
class HiveRepository extends ChangeNotifier {
static Future<Box<dynamic>> openHive(String boxname) async {
var connectionBox = Hive.box<dynamic>(boxname);
if (!connectionBox.isOpen) {
connectionBox = await Hive.openBox<dynamic>(boxname);
}
return connectionBox;
}
}

View File

@ -3,10 +3,6 @@ import 'dart:io';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:connectivity_plus/connectivity_plus.dart'; import 'package:connectivity_plus/connectivity_plus.dart';
import 'package:hive_flutter/hive_flutter.dart'; import 'package:hive_flutter/hive_flutter.dart';
import 'package:pwa_ios/model/json_form_data.dart';
import 'package:pwa_ios/model/save_interaction.dart';
import 'package:pwa_ios/viewmodel/interactionprovider.dart';
import 'package:pwa_ios/viewmodel/viewinteractionprovider.dart';
import 'package:shared_preferences/shared_preferences.dart'; import 'package:shared_preferences/shared_preferences.dart';
Future<bool> isNetworkAvailable() async { Future<bool> isNetworkAvailable() async {
@ -48,36 +44,6 @@ bool get isTablet {
return logicalShortestSide > 600; return logicalShortestSide > 600;
} }
Future<String> formJsonForSync() async {
final provider = ViewInteractionProvider();
final prov = InteractionProvider();
List<SaveInteractionFormJson> senSavedList = [];
List<SaveInteraction> savedList = await provider.getAllRecords();
for (var obj in savedList) {
senSavedList.add(prov.formJson(obj));
}
SendSaveJson jsonData = SendSaveJson(savedList: senSavedList);
DataJson dataJson = DataJson(sendSaveJson: jsonData);
String jsonstr = saveFormJsonToJson(jsonData);
print(jsonstr);
return jsonstr;
}
Future<bool> checkRecordsAvailable() async {
final provider = ViewInteractionProvider();
List<SaveInteraction> savedList = await provider.getAllRecords();
return savedList.isNotEmpty;
}
deleteRecords() async {
final provider = ViewInteractionProvider();
List<SaveInteraction> savedList = await provider.getAllRecords();
for (var obj in savedList) {
provider.deleteRecord(obj);
}
}
Future<int> getNextAutoIncrementValue() async { Future<int> getNextAutoIncrementValue() async {
var counterBox = await Hive.openBox<int>('counterBox'); var counterBox = await Hive.openBox<int>('counterBox');
if (!counterBox.containsKey('counter')) { if (!counterBox.containsKey('counter')) {

View File

@ -1,27 +1,28 @@
import 'dart:convert';
import 'dart:ffi';
import 'dart:io';
import 'package:flutter/foundation.dart'; import 'package:flutter/foundation.dart';
import 'package:flutter/services.dart';
import 'package:hive_flutter/hive_flutter.dart'; import 'package:hive_flutter/hive_flutter.dart';
import 'package:path_provider/path_provider.dart';
import 'package:pwa_ios/model/interaction_config_data.dart'; import 'package:pwa_ios/model/interaction_config_data.dart';
import 'package:pwa_ios/model/interaction_data.dart'; import 'package:pwa_ios/model/interaction_data.dart';
import 'package:pwa_ios/utils/mockapi.dart'; import 'package:pwa_ios/utils/mockapi.dart';
import 'package:pwa_ios/utils/util.dart'; import 'package:pwa_ios/utils/util.dart';
import 'package:internet_connection_checker/internet_connection_checker.dart'; import 'package:permission_handler/permission_handler.dart';
import 'package:file_picker/file_picker.dart';
class ConfigDataProvider extends ChangeNotifier { class ConfigDataProvider extends ChangeNotifier {
Future<void> initConfigUIData() async { Future<void> initConfigUIData() async {
// dynamic jsonResult = await MockApiCall().getConfigData();
List<InteractionConfigData> interactionConfigData = []; List<InteractionConfigData> interactionConfigData = [];
// interactionConfigData = await fetchInteactionConfigData(); // interactionConfigData = await fetchInteactionConfigData();
//interactionConfigData = fetchInteactionUIConfigData(jsonResult); //interactionConfigData = fetchInteactionUIConfigData(jsonResult);
if (await InternetConnectionChecker().hasConnection) {
interactionConfigData = await fetchLocalInteactionConfigData(); interactionConfigData = await fetchLocalInteactionConfigData();
var box = Hive.box<InteractionConfigData>('InteractionConfigDataBox'); var box =
await Hive.openBox<InteractionConfigData>('InteractionConfigDataBox');
if (!box.isOpen) {
box = await Hive.openBox<InteractionConfigData>(
'InteractionConfigDataBox');
}
if (box.isEmpty) { if (box.isEmpty) {
for (InteractionConfigData data in interactionConfigData) { for (InteractionConfigData data in interactionConfigData) {
box.put(await getNextAutoIncrementValue(), data); box.put(await getNextAutoIncrementValue(), data);
@ -33,14 +34,13 @@ class ConfigDataProvider extends ChangeNotifier {
box.put(await getNextAutoIncrementValue(), data); box.put(await getNextAutoIncrementValue(), data);
} }
} }
}
notifyListeners(); notifyListeners();
} }
Future<List<InteractionConfigData>> fetchLocalInteactionConfigData() async { Future<List<InteractionConfigData>> fetchLocalInteactionConfigData() async {
// dynamic jsonResult = jsonDecode( dynamic jsonResult = jsonDecode(
// await rootBundle.loadString("assets/images/interactiondata.json")); await rootBundle.loadString("assets/images/interactiondata.json"));
dynamic jsonResult = await MockApiCall().getConfigData();
// dynamic jsonResultc2 = jsonDecode( // dynamic jsonResultc2 = jsonDecode(
// await rootBundle.loadString("assets/images/interactiondatac2.json")); // await rootBundle.loadString("assets/images/interactiondatac2.json"));
// // for (var value in jsonResult) { // // for (var value in jsonResult) {
@ -50,15 +50,14 @@ class ConfigDataProvider extends ChangeNotifier {
// dynamic jsonResult2 = jsonDecode( // dynamic jsonResult2 = jsonDecode(
// await rootBundle.loadString("assets/images/interactionform.json")); // await rootBundle.loadString("assets/images/interactionform.json"));
// dynamic jsonResult2c2 = jsonDecode( dynamic jsonResult2c2 = jsonDecode(
// await rootBundle.loadString("assets/images/newconfigdata.json")); await rootBundle.loadString("assets/images/newconfigdata.json"));
List<InteractionConfigData> interactionConfigData = []; List<InteractionConfigData> interactionConfigData = [];
// for (var value in jsonResult) { // for (var value in jsonResult) {
// InteractionResultData interactionConfig = // InteractionResultData interactionConfig =
// InteractionResultData.fromJson(jsonResult2); // InteractionResultData.fromJson(jsonResult2);
ResponseData responseData = ResponseDataFromJson(jsonResult); ResponseData responseData = ResponseDataFromJson(jsonResult2c2);
for (InteractionResultData obj in responseData.data) { for (InteractionResultData obj in responseData.data) {
// InteractionResultData interactionConfigc2 = // InteractionResultData interactionConfigc2 =
// InteractionResultData.fromJson(obj); // InteractionResultData.fromJson(obj);

View File

@ -1,8 +1,12 @@
import 'dart:convert'; import 'dart:convert';
import 'dart:io';
import 'package:dio/dio.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:hive_flutter/hive_flutter.dart'; import 'package:hive_flutter/hive_flutter.dart';
import 'package:provider/provider.dart';
import 'package:pwa_ios/model/interaction_config_data.dart'; import 'package:pwa_ios/model/interaction_config_data.dart';
import 'package:pwa_ios/model/interaction_data.dart'; import 'package:pwa_ios/model/interaction_data.dart';
@ -11,6 +15,7 @@ import 'package:pwa_ios/model/json_form_data.dart';
import 'package:pwa_ios/model/location_model.dart'; import 'package:pwa_ios/model/location_model.dart';
import 'package:pwa_ios/model/save_interaction.dart'; import 'package:pwa_ios/model/save_interaction.dart';
import 'package:pwa_ios/repository/hive_repository.dart'; import 'package:pwa_ios/repository/hive_repository.dart';
import 'package:pwa_ios/utils/mockapi.dart';
import '../utils/util.dart'; import '../utils/util.dart';
@ -45,16 +50,10 @@ class InteractionProvider extends ChangeNotifier {
initConfigData() async { initConfigData() async {
_hiveprovider.openHiveBox(); _hiveprovider.openHiveBox();
intConfigDataList = _hiveprovider.getAllDataFromHive(); intConfigDataList = _hiveprovider.getAllDataFromHive();
notifyListeners();
} }
Future<void> getRecords() async { Future<void> getRecords() async {
var box = Hive.box<SaveInteraction>('InteractionDataBox'); var box = await Hive.openBox<SaveInteraction>('InteractionDataBox');
if (!box.isOpen) {
box = await Hive.openBox<SaveInteraction>('InteractionDataBox');
}
savedList = box.values.toList(); savedList = box.values.toList();
notifyListeners(); notifyListeners();
} }
@ -65,7 +64,7 @@ class InteractionProvider extends ChangeNotifier {
// intConfigDataList = _hiveprovider.getAllDataFromHive(); // intConfigDataList = _hiveprovider.getAllDataFromHive();
dynamic jsonResult = jsonDecode( dynamic jsonResult = jsonDecode(
await rootBundle.loadString("assets/images/interactiondata.json")); await rootBundle.loadString("assets/images/interactiondata.json"));
await initConfigData();
InteractionConfigData interactionConfigData = intConfigDataList[index]; InteractionConfigData interactionConfigData = intConfigDataList[index];
intId = intConfigDataList[index].id; intId = intConfigDataList[index].id;
intName = intConfigDataList[index].name; intName = intConfigDataList[index].name;
@ -166,7 +165,6 @@ class InteractionProvider extends ChangeNotifier {
// } // }
String getDataValue(String widgetId, String id) { String getDataValue(String widgetId, String id) {
print("issue *************");
if (id != "") { if (id != "") {
List<InputClass> list = []; List<InputClass> list = [];
String value = ' '; String value = ' ';
@ -347,9 +345,9 @@ class InteractionProvider extends ChangeNotifier {
} else if (sectionItem.widget == InteractionWidget.CHECKBOX) { } else if (sectionItem.widget == InteractionWidget.CHECKBOX) {
List<InputClass> list = sectionItem.inputList!; List<InputClass> list = sectionItem.inputList!;
if (list.isNotEmpty) { if (list.isNotEmpty) {
for (var element in sectionItem.inputList!) { sectionItem.inputList!.forEach((element) {
element.ischecked = false; element.ischecked = false;
} });
} }
// sectionItem.value = list[0].id; // sectionItem.value = list[0].id;
// sectionItem.selectedValue!.add(list[0].id); // sectionItem.selectedValue!.add(list[0].id);
@ -604,15 +602,11 @@ class InteractionProvider extends ChangeNotifier {
form: form, form: form,
intId: intId ?? "id", intId: intId ?? "id",
intName: intName ?? "name"); intName: intName ?? "name");
var box = Hive.box<SaveInteraction>('InteractionDataBox');
if (!box.isOpen) { final box = await Hive.openBox<SaveInteraction>('InteractionDataBox');
box = await Hive.openBox<SaveInteraction>('InteractionDataBox');
}
await box.put(await getNextAutoIncrementValue(), data); await box.put(await getNextAutoIncrementValue(), data);
// box.close(); box.close();
await getRecords();
return generateId; return generateId;
// await MockApiCall().postFormData(data); // await MockApiCall().postFormData(data);
// await prov.addOfflineData(data); // await prov.addOfflineData(data);
@ -647,10 +641,10 @@ class InteractionProvider extends ChangeNotifier {
List<SectionList> sectionList, List<SectionList> multipleList) { List<SectionList> sectionList, List<SectionList> multipleList) {
List<List<MultipleSectionList>> list = []; List<List<MultipleSectionList>> list = [];
List<List<MultipleSectionList>> listing = []; List<List<MultipleSectionList>> listing = [];
List<MultipleSectionList> secList = getModifiedList(sectionList); List<MultipleSectionList> _secList = getModifiedList(sectionList);
List<MultipleSectionList> multipleList0 = getModifiedList(multipleList); List<MultipleSectionList> _multipleList = getModifiedList(multipleList);
list.add(secList); list.add(_secList);
listing.add(secList); listing.add(_secList);
// List<SectionList> listing = []; // List<SectionList> listing = [];
if (multipleList.isNotEmpty) { if (multipleList.isNotEmpty) {
final releaseDateMap = multipleList.groupBy((m) => m.gid); final releaseDateMap = multipleList.groupBy((m) => m.gid);
@ -663,7 +657,7 @@ class InteractionProvider extends ChangeNotifier {
for (var item in mulList) { for (var item in mulList) {
listing.add(getModifiedList(item)); listing.add(getModifiedList(item));
} }
listing.add(secList); listing.add(_secList);
list = [...listing]; list = [...listing];
//}); //});

View File

@ -1,5 +1,6 @@
import 'package:flutter/foundation.dart'; import 'package:flutter/foundation.dart';
import 'package:hive_flutter/hive_flutter.dart'; import 'package:hive_flutter/hive_flutter.dart';
import 'package:pwa_ios/model/save_interaction.dart';
import 'package:pwa_ios/model/userdata_model.dart'; import 'package:pwa_ios/model/userdata_model.dart';
class LoginProvider extends ChangeNotifier { class LoginProvider extends ChangeNotifier {

View File

@ -1,9 +1,12 @@
import 'dart:convert'; import 'dart:convert';
import 'dart:io';
import 'package:dio/dio.dart'; import 'package:dio/dio.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:hive_flutter/hive_flutter.dart'; import 'package:hive_flutter/hive_flutter.dart';
import 'package:provider/provider.dart';
import 'package:pwa_ios/model/interaction_config_data.dart'; import 'package:pwa_ios/model/interaction_config_data.dart';
import 'package:pwa_ios/model/interaction_data.dart'; import 'package:pwa_ios/model/interaction_data.dart';
@ -12,8 +15,10 @@ import 'package:pwa_ios/model/json_form_data.dart';
import 'package:pwa_ios/model/location_model.dart'; import 'package:pwa_ios/model/location_model.dart';
import 'package:pwa_ios/model/save_interaction.dart'; import 'package:pwa_ios/model/save_interaction.dart';
import 'package:pwa_ios/repository/hive_repository.dart'; import 'package:pwa_ios/repository/hive_repository.dart';
import 'package:pwa_ios/utils/mockapi.dart';
import 'package:pwa_ios/viewmodel/interactionprovider.dart'; import 'package:pwa_ios/viewmodel/interactionprovider.dart';
import '../utils/util.dart';
class ViewInteractionProvider extends ChangeNotifier { class ViewInteractionProvider extends ChangeNotifier {
List<FormFieldData> interactionReponseList = []; List<FormFieldData> interactionReponseList = [];
@ -361,8 +366,8 @@ class ViewInteractionProvider extends ChangeNotifier {
int i = 0; int i = 0;
for (var obj in interactionReponseList) { for (var obj in interactionReponseList) {
if (multiple && obj.multipleList != null) { if (multiple && obj.multipleList != null) {
i = obj.multipleList!.indexWhere((element) => i = obj.multipleList!
element.id == sectionItem.id && element.gid == sectionItem.gid); .indexWhere((element) => element.id == sectionItem.id);
if (i != -1) { if (i != -1) {
obj.multipleList![i].value = value; obj.multipleList![i].value = value;
obj.multipleList![i].tempselectedValue = []; obj.multipleList![i].tempselectedValue = [];
@ -385,7 +390,7 @@ class ViewInteractionProvider extends ChangeNotifier {
Future<void> disposeValues() async { Future<void> disposeValues() async {
print("dispose called"); print("dispose called");
// await _hiveprovider.closeHiveBox(); await _hiveprovider.closeHiveBox();
for (var obj in interactionReponseList) { for (var obj in interactionReponseList) {
obj.multipleList!.clear(); obj.multipleList!.clear();
// for (var obj2 in obj.sectionList) { // for (var obj2 in obj.sectionList) {
@ -401,8 +406,8 @@ class ViewInteractionProvider extends ChangeNotifier {
int i = 0; int i = 0;
for (var obj in interactionReponseList) { for (var obj in interactionReponseList) {
if (multiple && obj.multipleList != null) { if (multiple && obj.multipleList != null) {
i = obj.multipleList!.indexWhere((element) => i = obj.multipleList!
element.id == sectionItem.id && element.gid == sectionItem.gid); .indexWhere((element) => element.id == sectionItem.id);
if (i != -1) { if (i != -1) {
obj.multipleList![i].value = value; obj.multipleList![i].value = value;
obj.multipleList![i].selectedValue!.add(value); obj.multipleList![i].selectedValue!.add(value);
@ -423,8 +428,8 @@ class ViewInteractionProvider extends ChangeNotifier {
int i = 0; int i = 0;
for (var obj in interactionReponseList) { for (var obj in interactionReponseList) {
if (multiple && obj.multipleList != null) { if (multiple && obj.multipleList != null) {
i = obj.multipleList!.indexWhere((element) => i = obj.multipleList!
element.id == sectionItem.id && element.gid == sectionItem.gid); .indexWhere((element) => element.id == sectionItem.id);
if (i != -1) { if (i != -1) {
obj.multipleList![i].value = value; obj.multipleList![i].value = value;
obj.multipleList![i].tempselectedValue = []; obj.multipleList![i].tempselectedValue = [];
@ -566,8 +571,8 @@ class ViewInteractionProvider extends ChangeNotifier {
int index2 = 0; int index2 = 0;
for (var obj in interactionReponseList) { for (var obj in interactionReponseList) {
if (multiple && obj.multipleList != null) { if (multiple && obj.multipleList != null) {
index2 = obj.multipleList!.indexWhere((element) => index2 = obj.multipleList!
element.id == sectionItem.id && element.gid == sectionItem.gid); .indexWhere((element) => element.id == sectionItem.id);
if (index2 != -1) { if (index2 != -1) {
obj.multipleList![index2].value = sectionItem.inputList![index].id; obj.multipleList![index2].value = sectionItem.inputList![index].id;
obj.multipleList![index2].selectedValue! obj.multipleList![index2].selectedValue!
@ -722,18 +727,16 @@ class ViewInteractionProvider extends ChangeNotifier {
intId: saveInteraction.intId, intId: saveInteraction.intId,
intName: saveInteraction.intName, intName: saveInteraction.intName,
); );
var box = Hive.box<SaveInteraction>('InteractionDataBox');
if (!box.isOpen) { var box = await Hive.openBox<SaveInteraction>('InteractionDataBox');
box = await Hive.openBox<SaveInteraction>('InteractionDataBox'); // box.put(await getNextAutoIncrementValue(), data);
}
int index = int index =
box.values.toList().indexWhere((element) => element.id == data.id); box.values.toList().indexWhere((element) => element.id == data.id);
box.putAt(index, data); box.putAt(index, data);
await getRecords(saveInteraction.form!); await getRecords(saveInteraction.form!);
// box.close(); box.close();
// await MockApiCall().postFormData(data); // await MockApiCall().postFormData(data);
} }
@ -749,7 +752,7 @@ class ViewInteractionProvider extends ChangeNotifier {
}); });
box.delete(deleteKey); box.delete(deleteKey);
await getRecords(saveInteraction.form!); await getRecords(saveInteraction.form!);
//box.close(); box.close();
} }
List<MultipleSectionList> getModifiedList(List<SectionList> sectionList) { List<MultipleSectionList> getModifiedList(List<SectionList> sectionList) {

View File

@ -1,9 +1,15 @@
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:pwa_ios/utils/apicall.dart'; import 'package:pwa_ios/utils/apicall.dart';
import 'package:pwa_ios/main.dart';
import 'package:pwa_ios/views/interaction_module/interaction_screen.dart';
import 'package:pwa_ios/views/interaction_module/interactionlistscreen.dart'; import 'package:pwa_ios/views/interaction_module/interactionlistscreen.dart';
import 'package:pwa_ios/views/konectarpage.dart'; import 'package:pwa_ios/views/konectarpage.dart';
import 'package:pwa_ios/views/notification_screen.dart';
import 'package:pwa_ios/views/notifications.dart'; import 'package:pwa_ios/views/notifications.dart';
import 'package:pwa_ios/views/profile.dart'; import 'package:pwa_ios/views/profile.dart';
import 'package:pwa_ios/views/webview_example.dart';
class HomeScreen extends StatefulWidget { class HomeScreen extends StatefulWidget {
const HomeScreen({super.key}); const HomeScreen({super.key});
@ -41,14 +47,14 @@ class _HomeScreenState extends State<HomeScreen> {
type: BottomNavigationBarType.fixed, type: BottomNavigationBarType.fixed,
currentIndex: _selectedIndex, currentIndex: _selectedIndex,
//backgroundColor: Color.fromARGB(255, 35, 79, 150), //backgroundColor: Color.fromARGB(255, 35, 79, 150),
selectedItemColor: const Color.fromARGB(255, 35, 79, 150), selectedItemColor: Color.fromARGB(255, 35, 79, 150),
unselectedItemColor: const Color.fromARGB(255, 153, 153, 163), unselectedItemColor: Color.fromARGB(255, 153, 153, 163),
iconSize: 40, iconSize: 40,
onTap: _onItemTapped, onTap: _onItemTapped,
elevation: 1, elevation: 1,
items: <BottomNavigationBarItem>[ items: <BottomNavigationBarItem>[
BottomNavigationBarItem( BottomNavigationBarItem(
icon: SizedBox( icon: Container(
width: 30, width: 30,
height: 30, height: 30,
child: Image.asset( child: Image.asset(
@ -56,15 +62,15 @@ class _HomeScreenState extends State<HomeScreen> {
), ),
), ),
label: 'Konectar', label: 'Konectar',
backgroundColor: const Color.fromARGB(255, 168, 170, 173)), backgroundColor: Color.fromARGB(255, 168, 170, 173)),
const BottomNavigationBarItem( // const BottomNavigationBarItem(
icon: Icon( // icon: Icon(
Icons.notifications, // Icons.notifications,
size: 30, // size: 30,
), // ),
label: 'frappe', // label: 'Notifications',
backgroundColor: Colors.blue, // backgroundColor: Colors.blue,
), // ),
const BottomNavigationBarItem( const BottomNavigationBarItem(
icon: Icon( icon: Icon(
Icons.edit_document, Icons.edit_document,
@ -85,8 +91,6 @@ class _HomeScreenState extends State<HomeScreen> {
body: _selectedIndex == 0 body: _selectedIndex == 0
? const MyApp() ? const MyApp()
: _selectedIndex == 1 : _selectedIndex == 1
? const NotificationsScreen()
: _selectedIndex == 2
? const InteractionListScreen() ? const InteractionListScreen()
: const ProfileScreen(), : const ProfileScreen(),
); );

View File

@ -1,13 +1,13 @@
import 'dart:convert'; import 'dart:convert';
import 'dart:io'; import 'dart:io';
import 'package:dio/dio.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:intl/intl.dart'; import 'package:intl/intl.dart';
import 'package:path_provider/path_provider.dart'; import 'package:path_provider/path_provider.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:dropdown_button2/dropdown_button2.dart'; import 'package:dropdown_button2/dropdown_button2.dart';
import 'package:pwa_ios/main.dart';
import 'package:pwa_ios/model/interaction_data.dart'; import 'package:pwa_ios/model/interaction_data.dart';
import 'package:pwa_ios/model/save_interaction.dart'; import 'package:pwa_ios/model/save_interaction.dart';
import 'package:pwa_ios/utils/util.dart'; import 'package:pwa_ios/utils/util.dart';
@ -56,9 +56,6 @@ class _EditInteractionScreenState extends State<EditInteractionScreen> {
void initState() { void initState() {
WidgetsBinding.instance.addPostFrameCallback((timeStamp) { WidgetsBinding.instance.addPostFrameCallback((timeStamp) {
// initConfig(); // initConfig();
if (mytimer!.isActive) {
cancelTimer();
}
init(); init();
}); });
@ -98,7 +95,7 @@ class _EditInteractionScreenState extends State<EditInteractionScreen> {
//resizeToAvoidBottomInset: false, //resizeToAvoidBottomInset: false,
appBar: AppBar( appBar: AppBar(
title: Text( title: Text(
widget.saveInteraction.id, '${widget.saveInteraction.id}',
style: TextStyle( style: TextStyle(
fontSize: isTablet ? 22 : 14, color: Colors.white), fontSize: isTablet ? 22 : 14, color: Colors.white),
), ),
@ -338,10 +335,7 @@ class _EditInteractionScreenState extends State<EditInteractionScreen> {
}) { }) {
switch (widgetData) { switch (widgetData) {
case InteractionWidget.CHECKBOX: case InteractionWidget.CHECKBOX:
return (sectionItem.inputList!.length >= 5) return buildCheckbox(sectionItem, item.sectionName, provider, multiple);
? customMultiselectDropdown(
sectionItem, provider, sectionItem.inputList!, multiple)
: buildCheckbox(sectionItem, item.sectionName, provider, multiple);
case InteractionWidget.AUTOCOMPLETE: case InteractionWidget.AUTOCOMPLETE:
return customAutoCompletedropdown( return customAutoCompletedropdown(
@ -351,10 +345,7 @@ class _EditInteractionScreenState extends State<EditInteractionScreen> {
return customMultiselectDropdown(sectionItem, provider, list, multiple); return customMultiselectDropdown(sectionItem, provider, list, multiple);
case InteractionWidget.RADIO: case InteractionWidget.RADIO:
return (sectionItem.inputList!.length >= 5) return buildRadio(sectionItem, provider);
? customdropdown(
sectionItem, provider, sectionItem.inputList!, multiple)
: buildRadio(sectionItem, provider);
case InteractionWidget.LABEL: case InteractionWidget.LABEL:
return Text(sectionItem.input!); return Text(sectionItem.input!);
@ -425,8 +416,8 @@ class _EditInteractionScreenState extends State<EditInteractionScreen> {
maxchars: int.parse(sectionItem.chars ?? "0"), maxchars: int.parse(sectionItem.chars ?? "0"),
controller: sectionItem.controller!, controller: sectionItem.controller!,
labelText: sectionItem.name, labelText: sectionItem.name,
// maxlines: 4, maxlines: 4,
// minlines: 3, minlines: 3,
onChanged: (val) { onChanged: (val) {
sectionItem.selectedValue = []; sectionItem.selectedValue = [];
setState(() {}); setState(() {});
@ -443,7 +434,7 @@ class _EditInteractionScreenState extends State<EditInteractionScreen> {
controller: sectionItem.controller!, controller: sectionItem.controller!,
inputType: sectionItem.input == "number" inputType: sectionItem.input == "number"
? TextInputType.number ? TextInputType.number
: TextInputType.name, : TextInputType.none,
labelText: sectionItem.name, labelText: sectionItem.name,
onChanged: (val) { onChanged: (val) {
sectionItem.selectedValue = []; sectionItem.selectedValue = [];
@ -468,8 +459,8 @@ class _EditInteractionScreenState extends State<EditInteractionScreen> {
border: OutlineInputBorder( border: OutlineInputBorder(
borderRadius: BorderRadius.circular(10.0), borderRadius: BorderRadius.circular(10.0),
), ),
labelStyle: const TextStyle(fontSize: 16), labelStyle: TextStyle(fontSize: 16),
suffixIcon: const Icon(Icons.calendar_today), //icon of text field suffixIcon: Icon(Icons.calendar_today), //icon of text field
labelText: "Enter Date" //label text of field labelText: "Enter Date" //label text of field
), ),
readOnly: true, //set it true, so that user will not able to edit text readOnly: true, //set it true, so that user will not able to edit text
@ -512,13 +503,13 @@ class _EditInteractionScreenState extends State<EditInteractionScreen> {
CustomButton( CustomButton(
backgroundColor: Colors.green.shade900, backgroundColor: Colors.green.shade900,
onPressed: () async { onPressed: () async {
// if (textFieldsValidation(provider).isEmpty) { if (textFieldsValidation(provider).isEmpty) {
await provider.saveJsonObject(context, await provider.saveJsonObject(context,
widget.saveInteraction.intId, widget.saveInteraction); widget.saveInteraction.intId, widget.saveInteraction);
showAlertDialog(context, widget.saveInteraction.id); showAlertDialog(context, widget.saveInteraction.id!);
// } else { } else {
// _displaySnackBar(textFieldsValidation(provider)); _displaySnackBar(textFieldsValidation(provider));
// } }
}, },
textColor: Colors.white, textColor: Colors.white,
title: "Update", title: "Update",
@ -559,7 +550,7 @@ class _EditInteractionScreenState extends State<EditInteractionScreen> {
}); });
}, },
), ),
Text(value.name), Text('${value.name}'),
], ],
), ),
], ],
@ -587,7 +578,7 @@ class _EditInteractionScreenState extends State<EditInteractionScreen> {
//setState(() {}); //setState(() {});
}, },
), ),
Text(value.name), Text('${value.name}'),
], ],
), ),
], ],
@ -623,7 +614,7 @@ class _EditInteractionScreenState extends State<EditInteractionScreen> {
), ),
hint: Text( hint: Text(
'Select ${sectionItem.name}', 'Select ${sectionItem.name}',
style: const TextStyle(fontSize: 14), style: TextStyle(fontSize: 14),
), ),
items: list items: list
.map((item) => DropdownMenuItem<InputClass>( .map((item) => DropdownMenuItem<InputClass>(
@ -919,8 +910,8 @@ class _EditInteractionScreenState extends State<EditInteractionScreen> {
int listIndex) { int listIndex) {
return Padding( return Padding(
padding: isTablet padding: isTablet
? const EdgeInsets.only(left: 8.0) ? EdgeInsets.only(left: 8.0)
: const EdgeInsets.only(left: 12.0, right: 12.0), : EdgeInsets.only(left: 12.0, right: 12.0),
child: GridView.count( child: GridView.count(
physics: const NeverScrollableScrollPhysics(), physics: const NeverScrollableScrollPhysics(),
crossAxisCount: context.responsive<int>( crossAxisCount: context.responsive<int>(
@ -1038,7 +1029,7 @@ class _EditInteractionScreenState extends State<EditInteractionScreen> {
const EdgeInsets.only(left: 3.0, top: 5), const EdgeInsets.only(left: 3.0, top: 5),
child: CustomButton( child: CustomButton(
backgroundColor: backgroundColor:
const Color.fromARGB(255, 233, 75, 75), Color.fromARGB(255, 233, 75, 75),
onPressed: () { onPressed: () {
provider.deleteMultipleRows( provider.deleteMultipleRows(
sectionItem.gid!, sectionItem.gid!,
@ -1094,7 +1085,7 @@ class _EditInteractionScreenState extends State<EditInteractionScreen> {
final snackBar = SnackBar( final snackBar = SnackBar(
content: Text( content: Text(
msg, msg,
style: const TextStyle(fontSize: 20.0, fontWeight: FontWeight.bold), style: TextStyle(fontSize: 20.0, fontWeight: FontWeight.bold),
)); ));
ScaffoldMessenger.of(context).showSnackBar(snackBar); ScaffoldMessenger.of(context).showSnackBar(snackBar);
//scaffoldKeyLogin.currentState!.showSnackBar(snackBar); //scaffoldKeyLogin.currentState!.showSnackBar(snackBar);
@ -1125,7 +1116,7 @@ class _EditInteractionScreenState extends State<EditInteractionScreen> {
print("see the converted directory path $convertedDirectoryPath"); print("see the converted directory path $convertedDirectoryPath");
newPath = "$convertedDirectoryPath/konectar/files"; newPath = convertedDirectoryPath + "/konectar/files";
print("new path :$newPath"); print("new path :$newPath");
directory = Directory(newPath); directory = Directory(newPath);
if (!await directory.exists()) { if (!await directory.exists()) {
@ -1163,7 +1154,7 @@ class _EditInteractionScreenState extends State<EditInteractionScreen> {
// ViewInteractionProvider provider = // ViewInteractionProvider provider =
// Provider.of<ViewInteractionProvider>(context, listen: false); // Provider.of<ViewInteractionProvider>(context, listen: false);
Widget cancelButton = TextButton( Widget cancelButton = TextButton(
child: const Text("Ok"), child: Text("Ok"),
onPressed: () async { onPressed: () async {
Navigator.of(context).pop(); Navigator.of(context).pop();
Navigator.of(context).pop(); Navigator.of(context).pop();
@ -1194,7 +1185,7 @@ class _EditInteractionScreenState extends State<EditInteractionScreen> {
// ViewInteractionProvider provider = // ViewInteractionProvider provider =
// Provider.of<ViewInteractionProvider>(context, listen: false); // Provider.of<ViewInteractionProvider>(context, listen: false);
Widget cancelButton = TextButton( Widget cancelButton = TextButton(
child: const Text("Upload"), child: Text("Upload"),
onPressed: () async { onPressed: () async {
Navigator.of(context).pop(); Navigator.of(context).pop();
sectionItem.selectedValue = []; sectionItem.selectedValue = [];
@ -1204,7 +1195,7 @@ class _EditInteractionScreenState extends State<EditInteractionScreen> {
}, },
); );
Widget okButton = TextButton( Widget okButton = TextButton(
child: const Text("Cancel"), child: Text("Cancel"),
onPressed: () async { onPressed: () async {
Navigator.of(context).pop(); Navigator.of(context).pop();
}, },
@ -1214,7 +1205,7 @@ class _EditInteractionScreenState extends State<EditInteractionScreen> {
title: const Text(""), title: const Text(""),
content: Text( content: Text(
"Following File(s) $files uploaded .Do you still want to upload files ?", "Following File(s) $files uploaded .Do you still want to upload files ?",
style: const TextStyle(fontSize: 15), style: TextStyle(fontSize: 15),
), ),
actions: [cancelButton, okButton], actions: [cancelButton, okButton],
); );

View File

@ -1,15 +1,17 @@
import 'dart:convert'; import 'dart:convert';
import 'dart:io'; import 'dart:io';
import 'package:dio/dio.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:intl/intl.dart'; import 'package:intl/intl.dart';
import 'package:path_provider/path_provider.dart'; import 'package:path_provider/path_provider.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:dropdown_button2/dropdown_button2.dart'; import 'package:dropdown_button2/dropdown_button2.dart';
import 'package:pwa_ios/main.dart';
import 'package:pwa_ios/model/interaction_data.dart'; import 'package:pwa_ios/model/interaction_data.dart';
import 'package:pwa_ios/utils/mockapi.dart';
import 'package:pwa_ios/utils/util.dart'; import 'package:pwa_ios/utils/util.dart';
import 'package:pwa_ios/viewmodel/configprovider.dart';
import 'package:pwa_ios/viewmodel/interactionprovider.dart'; import 'package:pwa_ios/viewmodel/interactionprovider.dart';
import 'package:pwa_ios/widgets/custombutton.dart'; import 'package:pwa_ios/widgets/custombutton.dart';
import 'package:pwa_ios/widgets/customrangeslider.dart'; import 'package:pwa_ios/widgets/customrangeslider.dart';
@ -39,9 +41,6 @@ class _InteractionScreenState extends State<InteractionScreen> {
@override @override
void initState() { void initState() {
WidgetsBinding.instance.addPostFrameCallback((timeStamp) { WidgetsBinding.instance.addPostFrameCallback((timeStamp) {
if (mytimer!.isActive) {
cancelTimer();
}
init(); init();
}); });
@ -217,10 +216,7 @@ class _InteractionScreenState extends State<InteractionScreen> {
'add' 'add'
? const SizedBox.shrink() ? const SizedBox.shrink()
: Text( : Text(
sectionItem.validation! '${sectionItem.name}:*',
.isRequired
? '${sectionItem.name}:*'
: '${sectionItem.name}:',
style: TextStyle( style: TextStyle(
color: Colors color: Colors
.orange.shade800, .orange.shade800,
@ -296,10 +292,7 @@ class _InteractionScreenState extends State<InteractionScreen> {
}) { }) {
switch (widgetData) { switch (widgetData) {
case InteractionWidget.CHECKBOX: case InteractionWidget.CHECKBOX:
return (sectionItem.inputList!.length >= 5) return buildCheckbox(sectionItem, item.sectionName, provider, multiple);
? customMultiselectDropdown(
sectionItem, provider, sectionItem.inputList!, multiple)
: buildCheckbox(sectionItem, item.sectionName, provider, multiple);
case InteractionWidget.AUTOCOMPLETE: case InteractionWidget.AUTOCOMPLETE:
return customAutoCompletedropdown( return customAutoCompletedropdown(
@ -309,10 +302,7 @@ class _InteractionScreenState extends State<InteractionScreen> {
return customMultiselectDropdown(sectionItem, provider, list, multiple); return customMultiselectDropdown(sectionItem, provider, list, multiple);
case InteractionWidget.RADIO: case InteractionWidget.RADIO:
return (sectionItem.inputList!.length >= 5) return buildRadio(sectionItem, provider);
? customdropdown(
sectionItem, provider, sectionItem.inputList!, multiple)
: buildRadio(sectionItem, provider);
case InteractionWidget.LABEL: case InteractionWidget.LABEL:
return Text(sectionItem.input!); return Text(sectionItem.input!);
@ -382,8 +372,8 @@ class _InteractionScreenState extends State<InteractionScreen> {
maxchars: int.parse(sectionItem.validation!.chars ?? "0"), maxchars: int.parse(sectionItem.validation!.chars ?? "0"),
controller: sectionItem.controller!, controller: sectionItem.controller!,
labelText: sectionItem.name, labelText: sectionItem.name,
// maxlines: 8, maxlines: 4,
//minlines: 4, minlines: 3,
onChanged: (val) { onChanged: (val) {
sectionItem.selectedValue = []; sectionItem.selectedValue = [];
setState(() {}); setState(() {});
@ -398,7 +388,7 @@ class _InteractionScreenState extends State<InteractionScreen> {
child: InteractionTextField( child: InteractionTextField(
inputType: sectionItem.input == "number" inputType: sectionItem.input == "number"
? TextInputType.number ? TextInputType.number
: TextInputType.name, : TextInputType.none,
maxchars: int.parse(sectionItem.chars ?? "0"), maxchars: int.parse(sectionItem.chars ?? "0"),
controller: sectionItem.controller!, controller: sectionItem.controller!,
labelText: sectionItem.name, labelText: sectionItem.name,
@ -547,7 +537,7 @@ class _InteractionScreenState extends State<InteractionScreen> {
}); });
}, },
), ),
Text(value.name), Text('${value.name}'),
], ],
), ),
], ],
@ -575,7 +565,7 @@ class _InteractionScreenState extends State<InteractionScreen> {
//setState(() {}); //setState(() {});
}, },
), ),
Text(value.name), Text('${value.name}'),
], ],
), ),
], ],
@ -611,7 +601,7 @@ class _InteractionScreenState extends State<InteractionScreen> {
), ),
hint: Text( hint: Text(
'Select ${sectionItem.name}', 'Select ${sectionItem.name}',
style: const TextStyle(fontSize: 14), style: TextStyle(fontSize: 14),
), ),
items: list items: list
.map((item) => DropdownMenuItem<InputClass>( .map((item) => DropdownMenuItem<InputClass>(
@ -676,7 +666,6 @@ class _InteractionScreenState extends State<InteractionScreen> {
// if (list.isEmpty) { // if (list.isEmpty) {
// print("list is empty"); // print("list is empty");
list = sectionItem.inputList!; list = sectionItem.inputList!;
print("***Autocomplete list ${list[0].name}");
//} //}
//InputClass selectedObj = list[0]; //InputClass selectedObj = list[0];
return SizedBox( return SizedBox(
@ -910,8 +899,8 @@ class _InteractionScreenState extends State<InteractionScreen> {
int listIndex) { int listIndex) {
return Padding( return Padding(
padding: isTablet padding: isTablet
? const EdgeInsets.only(left: 8.0) ? EdgeInsets.only(left: 8.0)
: const EdgeInsets.only(left: 12.0, right: 12.0), : EdgeInsets.only(left: 12.0, right: 12.0),
child: GridView.count( child: GridView.count(
physics: const NeverScrollableScrollPhysics(), physics: const NeverScrollableScrollPhysics(),
crossAxisCount: context.responsive<int>( crossAxisCount: context.responsive<int>(
@ -991,7 +980,7 @@ class _InteractionScreenState extends State<InteractionScreen> {
), ),
Text( Text(
sectionItem.selectedValue!.isNotEmpty sectionItem.selectedValue!.isNotEmpty
? sectionItem.selectedValue!.isNotEmpty ? sectionItem.selectedValue!.length > 0
? 'File uploaded' ? 'File uploaded'
: "Files Uploaded" : "Files Uploaded"
: 'No file uploaded', : 'No file uploaded',
@ -1024,7 +1013,7 @@ class _InteractionScreenState extends State<InteractionScreen> {
const EdgeInsets.only(left: 3.0, top: 5), const EdgeInsets.only(left: 3.0, top: 5),
child: CustomButton( child: CustomButton(
backgroundColor: backgroundColor:
const Color.fromARGB(255, 233, 75, 75), Color.fromARGB(255, 233, 75, 75),
onPressed: () { onPressed: () {
provider.deleteMultipleRows( provider.deleteMultipleRows(
sectionItem.gid!, sectionItem.gid!,
@ -1057,35 +1046,22 @@ class _InteractionScreenState extends State<InteractionScreen> {
); );
} }
String fieldsValidation(InteractionProvider provider) { String textFieldsValidation(InteractionProvider provider) {
List<SectionList> secList = provider.sectionList if (provider.sectionList
.where((element) => element.validation!.isRequired = true) .any((element) => element.controller!.text.isEmpty)) {
.toList(); return 'Fields cannot be empty';
if (secList.any((element) => element.selectedValue!.isEmpty)) { }
if (provider.textEditingControllerList.isNotEmpty) {
if (provider.validateTextFields()) {
return 'Fields cannot be empty'; return 'Fields cannot be empty';
} }
return '';
} }
String textFieldsValidation(InteractionProvider provider) { if (provider.multipletextEditingControllerList.isNotEmpty) {
// if (provider.sectionList if (provider.validateMultipleRows()) {
// .any((element) => element.widget == InteractionWidget.TEXT)) { return 'Fields cannot be empty';
// if (provider.sectionList }
// .any((element) => element.controller!.text.isEmpty)) { }
// return 'Fields cannot be empty';
// }
// if (provider.textEditingControllerList.isNotEmpty) {
// if (provider.validateTextFields()) {
// return 'Fields cannot be empty';
// }
// }
// if (provider.multipletextEditingControllerList.isNotEmpty) {
// if (provider.validateMultipleRows()) {
// return 'Fields cannot be empty';
// }
// }
// }
return ''; return '';
} }
@ -1094,7 +1070,7 @@ class _InteractionScreenState extends State<InteractionScreen> {
final snackBar = SnackBar( final snackBar = SnackBar(
content: Text( content: Text(
msg, msg,
style: const TextStyle(fontSize: 20.0, fontWeight: FontWeight.bold), style: TextStyle(fontSize: 20.0, fontWeight: FontWeight.bold),
)); ));
ScaffoldMessenger.of(context).showSnackBar(snackBar); ScaffoldMessenger.of(context).showSnackBar(snackBar);
//scaffoldKeyLogin.currentState!.showSnackBar(snackBar); //scaffoldKeyLogin.currentState!.showSnackBar(snackBar);
@ -1125,7 +1101,7 @@ class _InteractionScreenState extends State<InteractionScreen> {
print("see the converted directory path $convertedDirectoryPath"); print("see the converted directory path $convertedDirectoryPath");
newPath = "$convertedDirectoryPath/konectar/files"; newPath = convertedDirectoryPath + "/konectar/files";
print("new path :$newPath"); print("new path :$newPath");
directory = Directory(newPath); directory = Directory(newPath);
if (!await directory.exists()) { if (!await directory.exists()) {
@ -1155,7 +1131,7 @@ class _InteractionScreenState extends State<InteractionScreen> {
// ViewInteractionProvider provider = // ViewInteractionProvider provider =
// Provider.of<ViewInteractionProvider>(context, listen: false); // Provider.of<ViewInteractionProvider>(context, listen: false);
Widget cancelButton = TextButton( Widget cancelButton = TextButton(
child: const Text("Ok"), child: Text("Ok"),
onPressed: () async { onPressed: () async {
Navigator.of(context).pop(); Navigator.of(context).pop();
Navigator.of(context).pop(); Navigator.of(context).pop();

View File

@ -1,9 +1,9 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:pwa_ios/main.dart';
import 'package:pwa_ios/model/save_interaction.dart'; import 'package:pwa_ios/model/save_interaction.dart';
import 'package:pwa_ios/utils/util.dart'; import 'package:pwa_ios/utils/util.dart';
import 'package:pwa_ios/viewmodel/interactionprovider.dart'; import 'package:pwa_ios/viewmodel/interactionprovider.dart';
import 'package:pwa_ios/viewmodel/viewinteractionprovider.dart';
import 'package:pwa_ios/views/interaction_module/interaction_screen.dart'; import 'package:pwa_ios/views/interaction_module/interaction_screen.dart';
import 'package:pwa_ios/views/interaction_module/view_forms_list.dart'; import 'package:pwa_ios/views/interaction_module/view_forms_list.dart';
@ -19,9 +19,6 @@ class _InteractionListScreenState extends State<InteractionListScreen> {
@override @override
void initState() { void initState() {
WidgetsBinding.instance.addPostFrameCallback((timeStamp) { WidgetsBinding.instance.addPostFrameCallback((timeStamp) {
if (!mytimer!.isActive) {
activateTimer();
}
init(); init();
}); });
@ -35,9 +32,8 @@ class _InteractionListScreenState extends State<InteractionListScreen> {
setState(() {}); setState(() {});
} }
Future<int> getCount(String form, InteractionProvider provider) async { int getCount(String form, InteractionProvider provider) {
await provider.getRecords(); provider.getRecords();
return provider.savedList.where((element) => element.form == form).length; return provider.savedList.where((element) => element.form == form).length;
} }
@ -67,7 +63,7 @@ class _InteractionListScreenState extends State<InteractionListScreen> {
title: Row( title: Row(
children: [ children: [
Text( Text(
provider.intConfigDataList[index].name, 'Interaction-form${(index + 1).toString()}',
), ),
const SizedBox( const SizedBox(
width: 20, width: 20,
@ -80,9 +76,8 @@ class _InteractionListScreenState extends State<InteractionListScreen> {
builder: (BuildContext context) => builder: (BuildContext context) =>
InteractionScreen( InteractionScreen(
index: index, index: index,
form: provider form:
.intConfigDataList[index] 'Interaction-form${(index + 1).toString()}',
.name,
))); )));
}, },
icon: const Icon( icon: const Icon(
@ -95,38 +90,32 @@ class _InteractionListScreenState extends State<InteractionListScreen> {
), ),
trailing: provider.savedList.indexWhere((element) => trailing: provider.savedList.indexWhere((element) =>
element.form == element.form ==
provider.intConfigDataList[index].name) != 'Interaction-form${(index + 1).toString()}') !=
-1 -1
? InkWell( ? InkWell(
onTap: () { onTap: () {
if (getCount( if (getCount(
provider 'Interaction-form${(index + 1).toString()}',
.intConfigDataList[index].name,
provider) != provider) !=
0) { 0) {
List<SaveInteraction> sendsavedList = List<SaveInteraction> sendsavedList = provider
provider
.savedList .savedList
.where((element) => .where((element) =>
element.form == element.form ==
provider 'Interaction-form${(index + 1).toString()}')
.intConfigDataList[index]
.name)
.toList(); .toList();
Navigator.push( Navigator.push(
context, context,
MaterialPageRoute( MaterialPageRoute(
builder: (BuildContext context) => builder: (BuildContext context) =>
SavedFormListScreen( SavedFormListScreen(
formname: provider formname:
.intConfigDataList[ 'Interaction-form${(index + 1).toString()}',
index]
.name,
))); )));
} }
}, },
child: Text( child: Text(
"${provider.savedList.where((element) => element.form == provider.intConfigDataList[index].name).length} record(s) saved", "${getCount('Interaction-form${(index + 1).toString()}', provider).toString()} record(s) saved",
style: TextStyle( style: TextStyle(
fontSize: isTablet ? 18.0 : 14, fontSize: isTablet ? 18.0 : 14,
color: Colors.blue.shade900), color: Colors.blue.shade900),
@ -140,8 +129,8 @@ class _InteractionListScreenState extends State<InteractionListScreen> {
builder: (BuildContext context) => builder: (BuildContext context) =>
InteractionScreen( InteractionScreen(
index: index, index: index,
form: provider form:
.intConfigDataList[index].name, 'Interaction-form${(index + 1).toString()}',
))); )));
}, },
), ),

View File

@ -2,8 +2,10 @@ import 'package:flutter/material.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:pwa_ios/model/save_interaction.dart'; import 'package:pwa_ios/model/save_interaction.dart';
import 'package:pwa_ios/utils/util.dart'; import 'package:pwa_ios/utils/util.dart';
import 'package:pwa_ios/viewmodel/interactionprovider.dart';
import 'package:pwa_ios/viewmodel/viewinteractionprovider.dart'; import 'package:pwa_ios/viewmodel/viewinteractionprovider.dart';
import 'package:pwa_ios/views/interaction_module/edit_interaction_screen.dart'; import 'package:pwa_ios/views/interaction_module/edit_interaction_screen.dart';
import 'package:pwa_ios/views/interaction_module/interaction_screen.dart';
import 'package:pwa_ios/views/interaction_module/view_interaction_screen.dart'; import 'package:pwa_ios/views/interaction_module/view_interaction_screen.dart';
class SavedFormListScreen extends StatefulWidget { class SavedFormListScreen extends StatefulWidget {
@ -71,7 +73,7 @@ class _SavedFormListScreenState extends State<SavedFormListScreen> {
//style: TextStyle(fontStyle: FontStyle.italic), //style: TextStyle(fontStyle: FontStyle.italic),
), ),
title: Text( title: Text(
provider.savedList[index].id, '${provider.savedList[index].id}',
), ),
trailing: SizedBox( trailing: SizedBox(
width: 150, width: 150,
@ -153,7 +155,7 @@ class _SavedFormListScreenState extends State<SavedFormListScreen> {
ViewInteractionProvider provider = ViewInteractionProvider provider =
Provider.of<ViewInteractionProvider>(context, listen: false); Provider.of<ViewInteractionProvider>(context, listen: false);
Widget cancelButton = TextButton( Widget cancelButton = TextButton(
child: const Text("YES"), child: Text("YES"),
onPressed: () async { onPressed: () async {
await provider.deleteRecord(saveInteraction).then((value) { await provider.deleteRecord(saveInteraction).then((value) {
_displaySnackBar("Deleted sucessfully!"); _displaySnackBar("Deleted sucessfully!");
@ -162,7 +164,7 @@ class _SavedFormListScreenState extends State<SavedFormListScreen> {
}, },
); );
Widget continueButton = TextButton( Widget continueButton = TextButton(
child: const Text("NO"), child: Text("NO"),
onPressed: () { onPressed: () {
Navigator.of(context).pop(); Navigator.of(context).pop();
}, },
@ -191,7 +193,7 @@ class _SavedFormListScreenState extends State<SavedFormListScreen> {
final snackBar = SnackBar( final snackBar = SnackBar(
content: Text( content: Text(
msg, msg,
style: const TextStyle(fontSize: 20.0, fontWeight: FontWeight.bold), style: TextStyle(fontSize: 20.0, fontWeight: FontWeight.bold),
)); ));
ScaffoldMessenger.of(context).showSnackBar(snackBar); ScaffoldMessenger.of(context).showSnackBar(snackBar);
//scaffoldKeyLogin.currentState!.showSnackBar(snackBar); //scaffoldKeyLogin.currentState!.showSnackBar(snackBar);

View File

@ -1,11 +1,19 @@
import 'dart:convert';
import 'dart:io';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:intl/intl.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:dropdown_button2/dropdown_button2.dart';
import 'package:pwa_ios/model/interaction_data.dart'; import 'package:pwa_ios/model/interaction_data.dart';
import 'package:pwa_ios/model/save_interaction.dart'; import 'package:pwa_ios/model/save_interaction.dart';
import 'package:pwa_ios/utils/util.dart'; import 'package:pwa_ios/utils/util.dart';
import 'package:pwa_ios/viewmodel/interactionprovider.dart'; import 'package:pwa_ios/viewmodel/interactionprovider.dart';
import 'package:pwa_ios/widgets/custombutton.dart'; import 'package:pwa_ios/widgets/custombutton.dart';
import 'package:pwa_ios/widgets/customrangeslider.dart';
import 'package:pwa_ios/widgets/interatciontextfield.dart';
import 'package:file_picker/file_picker.dart';
import 'package:pwa_ios/widgets/responsive_ext.dart'; import 'package:pwa_ios/widgets/responsive_ext.dart';
class ViewInteractionScreen extends StatefulWidget { class ViewInteractionScreen extends StatefulWidget {
@ -54,7 +62,7 @@ class _ViewInteractionScreenState extends State<ViewInteractionScreen> {
//resizeToAvoidBottomInset: false, //resizeToAvoidBottomInset: false,
appBar: AppBar( appBar: AppBar(
title: Text( title: Text(
widget.saveInteraction.id, '${widget.saveInteraction.id}',
style: TextStyle( style: TextStyle(
fontSize: isTablet ? 22 : 14, color: Colors.white), fontSize: isTablet ? 22 : 14, color: Colors.white),
), ),
@ -254,24 +262,19 @@ class _ViewInteractionScreenState extends State<ViewInteractionScreen> {
}) { }) {
switch (widgetData) { switch (widgetData) {
case InteractionWidget.CHECKBOX: case InteractionWidget.CHECKBOX:
return (sectionItem.inputList!.length >= 5) return Text(
? Text(sectionItem.selectedValue.toString()) "${provider.getDataValue(sectionItem.id, sectionItem.selectedValue!.last)}");
: Text(
provider.getDataValue(sectionItem.id, sectionItem.selectedValue!.last));
case InteractionWidget.AUTOCOMPLETE: case InteractionWidget.AUTOCOMPLETE:
return Text( return Text(
provider.getDataValue(sectionItem.id, sectionItem.selectedValue!.last)); "${provider.getDataValue(sectionItem.id, sectionItem.selectedValue!.last)}");
case InteractionWidget.MULTISELECT: case InteractionWidget.MULTISELECT:
return Text(sectionItem.selectedValue.toString()); return Text("${sectionItem.selectedValue.toString()}");
case InteractionWidget.RADIO: case InteractionWidget.RADIO:
return (sectionItem.inputList!.length >= 5) return Text(
? Text( "${provider.getDataValue(sectionItem.id, sectionItem.selectedValue!.last)}");
sectionItem.selectedValue!.isNotEmpty ? provider.getDataValue(sectionItem.id, sectionItem.selectedValue!.last) : " ")
: Text(
provider.getDataValue(sectionItem.id, sectionItem.selectedValue!.last));
case InteractionWidget.LABEL: case InteractionWidget.LABEL:
return Text(sectionItem.input!); return Text(sectionItem.input!);
@ -282,19 +285,17 @@ class _ViewInteractionScreenState extends State<ViewInteractionScreen> {
: " "); : " ");
case InteractionWidget.TEXT: case InteractionWidget.TEXT:
return Text(sectionItem.selectedValue!.isNotEmpty return Text(sectionItem.selectedValue!.last);
? sectionItem.selectedValue!.last.toString()
: " ");
case InteractionWidget.BUTTON: case InteractionWidget.BUTTON:
return sectionItem.input == "chooseFile" return sectionItem.input == "chooseFile"
? sectionItem.selectedValue!.isNotEmpty ? sectionItem.selectedValue!.isNotEmpty
? const Text("File Uploaded") ? Text("File Uploaded")
: const Text(" ") : Text(" ")
: const Text(" "); : Text(" ");
default: default:
return Text( return Text(
sectionItem.selectedValue!.isNotEmpty ? provider.getDataValue(sectionItem.id, sectionItem.selectedValue!.last) : " "); "${sectionItem.selectedValue!.isNotEmpty ? provider.getDataValue(sectionItem.id, sectionItem.selectedValue!.last) : " "}");
} }
} }
@ -354,8 +355,8 @@ class _ViewInteractionScreenState extends State<ViewInteractionScreen> {
int listIndex) { int listIndex) {
return Padding( return Padding(
padding: isTablet padding: isTablet
? const EdgeInsets.only(left: 22.0) ? EdgeInsets.only(left: 22.0)
: const EdgeInsets.only(left: 12.0, right: 12.0), : EdgeInsets.only(left: 12.0, right: 12.0),
child: GridView.count( child: GridView.count(
physics: const NeverScrollableScrollPhysics(), physics: const NeverScrollableScrollPhysics(),
crossAxisCount: context.responsive<int>( crossAxisCount: context.responsive<int>(
@ -440,7 +441,7 @@ class _ViewInteractionScreenState extends State<ViewInteractionScreen> {
final snackBar = SnackBar( final snackBar = SnackBar(
content: Text( content: Text(
msg, msg,
style: const TextStyle(fontSize: 20.0, fontWeight: FontWeight.bold), style: TextStyle(fontSize: 20.0, fontWeight: FontWeight.bold),
)); ));
ScaffoldMessenger.of(context).showSnackBar(snackBar); ScaffoldMessenger.of(context).showSnackBar(snackBar);
//scaffoldKeyLogin.currentState!.showSnackBar(snackBar); //scaffoldKeyLogin.currentState!.showSnackBar(snackBar);

View File

@ -1,16 +1,24 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'dart:async'; import 'dart:async';
import 'dart:collection'; import 'dart:collection';
import 'dart:io';
import 'package:flutter/foundation.dart'; import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter_inappwebview/flutter_inappwebview.dart'; import 'package:flutter_inappwebview/flutter_inappwebview.dart';
import 'package:pwa_ios/utils/apicall.dart';
import 'package:pwa_ios/utils/constants.dart'; import 'package:pwa_ios/utils/constants.dart';
import 'package:pwa_ios/views/home_screen.dart';
import 'package:pwa_ios/views/login.dart'; import 'package:pwa_ios/views/login.dart';
import 'package:pwa_ios/utils/util.dart'; import 'package:pwa_ios/utils/util.dart';
import 'package:pwa_ios/views/webview_example.dart';
import 'package:pwa_ios/widgets/webview_popup.dart'; import 'package:pwa_ios/widgets/webview_popup.dart';
import 'package:shared_preferences/shared_preferences.dart'; import 'package:shared_preferences/shared_preferences.dart';
import 'package:url_launcher/url_launcher.dart'; import 'package:url_launcher/url_launcher.dart';
import 'dart:ui' as ui;
import 'package:internet_connection_checker/internet_connection_checker.dart'; import 'package:internet_connection_checker/internet_connection_checker.dart';
import 'package:openid_client/openid_client.dart';
import 'package:flutter_web_plugins/url_strategy.dart';
class MyApp extends StatefulWidget { class MyApp extends StatefulWidget {
const MyApp({Key? key}) : super(key: key); const MyApp({Key? key}) : super(key: key);
@ -140,11 +148,11 @@ class _MyAppState extends State<MyApp> with WidgetsBindingObserver {
children: <Widget>[ children: <Widget>[
Expanded( Expanded(
child: FutureBuilder<bool>( child: FutureBuilder<bool>(
future: InternetConnectionChecker().hasConnection, future: isNetworkAvailable(),
builder: (context, snapshot) { builder: (context, snapshot) {
if (!snapshot.hasData) { if (!snapshot.hasData) {
print("no data******"); print("no data******");
return const Text("No internet connectivity!"); return Text("No internet connectivity!");
} }
final bool networkAvailable = snapshot.data ?? false; final bool networkAvailable = snapshot.data ?? false;
@ -174,10 +182,10 @@ class _MyAppState extends State<MyApp> with WidgetsBindingObserver {
valueListenable: isLoading, valueListenable: isLoading,
builder: (context, value, child) { builder: (context, value, child) {
return isLoading.value return isLoading.value
? const CircularProgressIndicator() ? CircularProgressIndicator()
: Center( : Center(
child: Container( child: Container(
child: const Text( child: Text(
"No internet connectivity!"), "No internet connectivity!"),
), ),
); );
@ -333,8 +341,7 @@ class _MyAppState extends State<MyApp> with WidgetsBindingObserver {
)); ));
} }
if (await InternetConnectionChecker() if (await isNetworkAvailable() &&
.hasConnection &&
!(await isPWAInstalled())) { !(await isPWAInstalled())) {
// if network is available and this is the first timeß // if network is available and this is the first timeß
setPWAInstalled(); setPWAInstalled();
@ -345,8 +352,7 @@ class _MyAppState extends State<MyApp> with WidgetsBindingObserver {
final isForMainFrame = final isForMainFrame =
request.isForMainFrame ?? true; request.isForMainFrame ?? true;
if (isForMainFrame && if (isForMainFrame &&
!(await InternetConnectionChecker() !(await isNetworkAvailable())) {
.hasConnection)) {
if (!(await isPWAInstalled())) { if (!(await isPWAInstalled())) {
await controller.loadData( await controller.loadData(
data: kHTMLErrorPageNotInstalled); data: kHTMLErrorPageNotInstalled);
@ -405,7 +411,7 @@ class _MyAppState extends State<MyApp> with WidgetsBindingObserver {
], ],
) )
: Container( : Container(
child: const Text("No internet"), child: Text("No internet"),
); );
}, },
), ),

View File

@ -1,3 +1,4 @@
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:pwa_ios/model/userdata_model.dart'; import 'package:pwa_ios/model/userdata_model.dart';
@ -101,7 +102,7 @@ class _LoginScreenState extends State<LoginScreen> {
width: isTablet ? 160 : 80, width: isTablet ? 160 : 80,
height: isTablet ? 160 : 80, height: isTablet ? 160 : 80,
child: CircleAvatar( child: CircleAvatar(
backgroundColor: const Color.fromARGB(255, 126, 134, 147), backgroundColor: Color.fromARGB(255, 126, 134, 147),
child: Icon( child: Icon(
Icons.person, Icons.person,
size: isTablet ? 120 : 60, size: isTablet ? 120 : 60,
@ -133,20 +134,10 @@ class _LoginScreenState extends State<LoginScreen> {
// Color.fromARGB(255, 214, 217, 223), // Color.fromARGB(255, 214, 217, 223),
// ], // ],
// )), // )),
child: _buildform(),
padding: EdgeInsets.symmetric( padding: EdgeInsets.symmetric(
horizontal: 30, horizontal: 30,
vertical: orientation == Orientation.portrait ? 20 : 0), vertical: orientation == Orientation.portrait ? 20 : 0),
// decoration: const BoxDecoration(
// gradient: LinearGradient(
// begin: Alignment.topRight,
// end: Alignment.bottomLeft,
// colors: [
// Color.fromARGB(255, 126, 134, 147),
// Color.fromARGB(255, 193, 198, 209),
// Color.fromARGB(255, 214, 217, 223),
// ],
// )),
child: _buildform(),
), ),
) )
]; ];

View File

@ -1,3 +1,4 @@
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
class NotificationCustomScreen extends StatefulWidget { class NotificationCustomScreen extends StatefulWidget {
@ -87,8 +88,8 @@ class _NotificationCustomScreenState extends State<NotificationCustomScreen> {
return MaterialApp( return MaterialApp(
home: Scaffold( home: Scaffold(
appBar: AppBar( appBar: AppBar(
title: const Text('Notifications'), title: Text('Notifications'),
backgroundColor: const Color.fromARGB(255, 11, 60, 144), backgroundColor: Color.fromARGB(255, 11, 60, 144),
), ),
body: Padding( body: Padding(
padding: const EdgeInsets.all(20.0), padding: const EdgeInsets.all(20.0),
@ -169,28 +170,28 @@ class _NotificationCustomScreenState extends State<NotificationCustomScreen> {
padding: const EdgeInsets.all(8.0), padding: const EdgeInsets.all(8.0),
child: Text( child: Text(
item['Start date']!, item['Start date']!,
style: const TextStyle(fontSize: 18.0), style: TextStyle(fontSize: 18.0),
), ),
), ),
Padding( Padding(
padding: const EdgeInsets.all(8.0), padding: const EdgeInsets.all(8.0),
child: Text( child: Text(
item['End date']!, item['End date']!,
style: const TextStyle(fontSize: 18.0), style: TextStyle(fontSize: 18.0),
), ),
), ),
Padding( Padding(
padding: const EdgeInsets.all(8.0), padding: const EdgeInsets.all(8.0),
child: Text( child: Text(
item['notification']!, item['notification']!,
style: const TextStyle(fontSize: 18.0), style: TextStyle(fontSize: 18.0),
), ),
), ),
Padding( Padding(
padding: const EdgeInsets.all(8.0), padding: const EdgeInsets.all(8.0),
child: Text( child: Text(
item['createdby']!, item['createdby']!,
style: const TextStyle(fontSize: 18.0), style: TextStyle(fontSize: 18.0),
), ),
), ),
]) ])
@ -200,7 +201,7 @@ class _NotificationCustomScreenState extends State<NotificationCustomScreen> {
), ),
), ),
floatingActionButton: FloatingActionButton( floatingActionButton: FloatingActionButton(
backgroundColor: const Color.fromARGB(255, 11, 60, 144), backgroundColor: Color.fromARGB(255, 11, 60, 144),
onPressed: () { onPressed: () {
setState(() { setState(() {
// Update the list of table data rows // Update the list of table data rows
@ -228,7 +229,7 @@ class _NotificationCustomScreenState extends State<NotificationCustomScreen> {
]; ];
}); });
}, },
child: const Icon(Icons.refresh), child: Icon(Icons.refresh),
), ),
), ),
); );

View File

@ -3,6 +3,7 @@ import 'dart:convert';
import 'package:pwa_ios/utils/apicall.dart'; import 'package:pwa_ios/utils/apicall.dart';
import 'package:shared_preferences/shared_preferences.dart'; import 'package:shared_preferences/shared_preferences.dart';
import 'package:theta/theta.dart';
import 'package:url_launcher/url_launcher.dart'; import 'package:url_launcher/url_launcher.dart';
import 'package:flutter/foundation.dart'; import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -209,33 +210,29 @@ class _NotificationsScreenState extends State<NotificationsScreen>
return null; return null;
}, },
initialUrlRequest: URLRequest( initialUrlRequest: token.isNotEmpty
url: WebUri("http://192.168.2.109:8001/forms/new"), ? URLRequest(
), url: WebUri(
"https://cardio-staging.konectar.io/notifications/"),
// token.isNotEmpty headers: {
// ? URLRequest( "rows": "10",
// url: WebUri( "page": "1",
// "https://cardio-staging.konectar.io/notifications/"), "sidx": "name",
// headers: { "sord": "desc"
// "rows": "10", },
// "page": "1", method: "POST")
// "sidx": "name", : URLRequest(
// "sord": "desc" url: kPwaUri,
// }, headers: {
// method: "POST") "key": key,
// : URLRequest( "email": email,
// url: kPwaUri, "name": name,
// headers: { "key":
// "key": key, "\$2a\$08\$XeBs/kLqAESRk/jWyNVsyeCjoOvxEmDT7/TK5xkLn23FJ/.5B5beK",
// "email": email, // // "email": "scheepu@tikamobile.com",
// "name": name, // // "name": "scheepu",
// "key": },
// "\$2a\$08\$XeBs/kLqAESRk/jWyNVsyeCjoOvxEmDT7/TK5xkLn23FJ/.5B5beK", method: "GET"),
// // // "email": "scheepu@tikamobile.com",
// // // "name": "scheepu",
// },
// method: "GET"),
//cachePolicy: cachePolicy), //cachePolicy: cachePolicy),
onReceivedServerTrustAuthRequest: onReceivedServerTrustAuthRequest:

View File

@ -1,4 +1,5 @@
import 'dart:convert'; import 'dart:convert';
import 'dart:developer';
import 'dart:io'; import 'dart:io';
import 'package:flutter/foundation.dart'; import 'package:flutter/foundation.dart';
@ -7,12 +8,19 @@ import 'package:flutter/services.dart';
import 'package:image_picker/image_picker.dart'; import 'package:image_picker/image_picker.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:pwa_ios/main.dart'; import 'package:pwa_ios/main.dart';
import 'package:pwa_ios/model/interaction_data.dart';
import 'package:pwa_ios/model/json_form_data.dart';
import 'package:pwa_ios/model/save_interaction.dart';
import 'package:pwa_ios/model/userdata_model.dart'; import 'package:pwa_ios/model/userdata_model.dart';
import 'package:pwa_ios/utils/apicall.dart';
import 'package:pwa_ios/utils/mockapi.dart'; import 'package:pwa_ios/utils/mockapi.dart';
import 'package:pwa_ios/utils/sessionmanager.dart'; import 'package:pwa_ios/utils/sessionmanager.dart';
import 'package:pwa_ios/utils/util.dart'; import 'package:pwa_ios/utils/util.dart';
import 'package:pwa_ios/viewmodel/configprovider.dart'; import 'package:pwa_ios/viewmodel/configprovider.dart';
import 'package:pwa_ios/viewmodel/interactionprovider.dart';
import 'package:pwa_ios/viewmodel/loginprovider.dart'; import 'package:pwa_ios/viewmodel/loginprovider.dart';
import 'package:pwa_ios/viewmodel/viewinteractionprovider.dart';
import 'package:pwa_ios/views/login.dart';
import 'package:pwa_ios/utils/validations.dart'; import 'package:pwa_ios/utils/validations.dart';
import 'package:pwa_ios/widgets/custombutton.dart'; import 'package:pwa_ios/widgets/custombutton.dart';
import 'package:pwa_ios/widgets/customtextfield.dart'; import 'package:pwa_ios/widgets/customtextfield.dart';
@ -194,56 +202,44 @@ class _ProfileScreenState extends State<ProfileScreen> {
CustomButton( CustomButton(
backgroundColor: Colors.grey.shade300, backgroundColor: Colors.grey.shade300,
onPressed: () async { onPressed: () async {
cancelTimer(); //cancelTimer();
bool result =
if (await InternetConnectionChecker().hasConnection) { await InternetConnectionChecker().hasConnection;
if (result == true) {
showLoaderDialog(context); showLoaderDialog(context);
final ConfigDataProvider configDataProvider =
ConfigDataProvider();
// ignore: use_build_context_synchronously // ignore: use_build_context_synchronously
// final provider = Provider.of<ViewInteractionProvider>( final provider = Provider.of<ViewInteractionProvider>(
// context, context,
// listen: false); listen: false);
// final prov = Provider.of<InteractionProvider>(context, final prov = Provider.of<InteractionProvider>(context,
// listen: false); listen: false);
// List<SaveInteractionFormJson> senSavedList = []; List<SaveInteractionFormJson> senSavedList = [];
// List<SaveInteraction> savedList = List<SaveInteraction> savedList =
// await provider.getAllRecords(); await provider.getAllRecords();
// for (var obj in savedList) { for (var obj in savedList) {
// senSavedList.add(prov.formJson(obj)); senSavedList.add(prov.formJson(obj));
// } }
// SendSaveJson jsonData = SendSaveJson jsonData =
// SendSaveJson(savedList: senSavedList); SendSaveJson(savedList: senSavedList);
// DataJson dataJson = DataJson(sendSaveJson: jsonData); DataJson dataJson = DataJson(sendSaveJson: jsonData);
// String jsonstr = saveFormJsonToJson(jsonData); String jsonstr = saveFormJsonToJson(jsonData);
// print(jsonstr); print(jsonstr);
if (await checkRecordsAvailable()) { String jsonDataEncoded =
String jsonstr = await formJsonForSync(); saveInteractionFormJsonToJson(dataJson);
print(jsonDataEncoded);
var result =
await MockApiCall().postSavedData(jsonstr);
var result = await MockApiCall().postSavedData(
jsonstr,
"/Users/aissel/Library/Developer/CoreSimulator/Devices/1E435121-7E65-45C6-9E0B-411C8B9915F5/data/Containers/Data/Application/4B7EDC75-F376-4A21-A1E4-2A621BCCBD13/Documents/konectar/files/Flutter Questionaire.pdf");
if (result != null) { if (result != null) {
Navigator.pop(context); Navigator.pop(context);
await deleteRecords();
await configDataProvider
.initConfigUIData()
.then((value) {});
_displaySnackBar('Data synced sucessfully!'); _displaySnackBar('Data synced sucessfully!');
} else { } else {
Navigator.pop(context); Navigator.pop(context);
_displaySnackBar('Something went wrong!'); _displaySnackBar('Something went wrong!');
} }
} else {
Navigator.pop(context);
_displaySnackBar('No records to sync!');
}
} else {
_displaySnackBar('No Internet Connectivity!');
} }
}, },
textColor: Colors.black, textColor: Colors.black,
@ -277,7 +273,7 @@ class _ProfileScreenState extends State<ProfileScreen> {
const CircularProgressIndicator(), const CircularProgressIndicator(),
Container( Container(
margin: const EdgeInsets.only(left: 7), margin: const EdgeInsets.only(left: 7),
child: const Text("Syncing...")), child: Text("Syncing...")),
], ],
), ),
); );
@ -480,7 +476,7 @@ class _ProfileScreenState extends State<ProfileScreen> {
showAlertDialog(BuildContext context) { showAlertDialog(BuildContext context) {
// set up the buttons // set up the buttons
Widget cancelButton = TextButton( Widget cancelButton = TextButton(
child: const Text("Gallery"), child: Text("Gallery"),
onPressed: () async { onPressed: () async {
await _getFromGallery(); await _getFromGallery();
setState(() {}); setState(() {});
@ -488,7 +484,7 @@ class _ProfileScreenState extends State<ProfileScreen> {
}, },
); );
Widget continueButton = TextButton( Widget continueButton = TextButton(
child: const Text("Camera"), child: Text("Camera"),
onPressed: () async { onPressed: () async {
await _getFromCamera(); await _getFromCamera();
setState(() {}); setState(() {});
@ -498,8 +494,8 @@ class _ProfileScreenState extends State<ProfileScreen> {
// set up the AlertDialog // set up the AlertDialog
AlertDialog alert = AlertDialog( AlertDialog alert = AlertDialog(
title: const Text(""), title: Text(""),
content: const Text("Profile photo"), content: Text("Profile photo"),
actions: [ actions: [
cancelButton, cancelButton,
continueButton, continueButton,
@ -518,7 +514,7 @@ class _ProfileScreenState extends State<ProfileScreen> {
showDeleteProfileAlertDialog(BuildContext context) { showDeleteProfileAlertDialog(BuildContext context) {
// set up the buttons // set up the buttons
Widget cancelButton = TextButton( Widget cancelButton = TextButton(
child: const Text("YES"), child: Text("YES"),
onPressed: () async { onPressed: () async {
await provider.deleteUserData().then((value) async { await provider.deleteUserData().then((value) async {
await SessionManager().clearSession().then((value) { await SessionManager().clearSession().then((value) {
@ -530,7 +526,7 @@ class _ProfileScreenState extends State<ProfileScreen> {
}, },
); );
Widget continueButton = TextButton( Widget continueButton = TextButton(
child: const Text("NO"), child: Text("NO"),
onPressed: () { onPressed: () {
Navigator.of(context).pop(); Navigator.of(context).pop();
}, },

View File

@ -1,5 +1,6 @@
import 'dart:collection'; import 'dart:collection';
import 'package:flutter/cupertino.dart';
import 'package:flutter/foundation.dart'; import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_inappwebview/flutter_inappwebview.dart'; import 'package:flutter_inappwebview/flutter_inappwebview.dart';

View File

@ -1,3 +1,4 @@
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
class CustomButton extends StatelessWidget { class CustomButton extends StatelessWidget {

View File

@ -1,3 +1,4 @@
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:pwa_ios/utils/util.dart'; import 'package:pwa_ios/utils/util.dart';
@ -18,9 +19,7 @@ class CustomRangeSlider extends StatelessWidget {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Column( return Column(
children: [ children: [
SizedBox( Slider(
height: isTablet ? 40 : 40,
child: Slider(
activeColor: const Color(0xFF2b9af3), activeColor: const Color(0xFF2b9af3),
onChanged: onChanged, onChanged: onChanged,
min: min ?? 10.0, min: min ?? 10.0,
@ -29,9 +28,8 @@ class CustomRangeSlider extends StatelessWidget {
divisions: 48, divisions: 48,
value: sliderPos, value: sliderPos,
), ),
),
SizedBox( SizedBox(
height: isTablet ? 1 : 1, height: isTablet ? 2 : 1,
), ),
Text( Text(
"Range: ${sliderPos.toInt()}", "Range: ${sliderPos.toInt()}",

View File

@ -1,15 +0,0 @@
import 'package:flutter/material.dart';
class customWidgets extends StatefulWidget {
const customWidgets({super.key});
@override
State<customWidgets> createState() => _customWidgetsState();
}
class _customWidgetsState extends State<customWidgets> {
@override
Widget build(BuildContext context) {
return Container();
}
}

View File

@ -37,7 +37,7 @@ class InteractionTextField extends StatelessWidget {
onTap: () {}, onTap: () {},
maxLines: maxlines ?? 1, maxLines: maxlines ?? 1,
minLines: minlines, minLines: minlines,
keyboardType: inputType ?? TextInputType.name, keyboardType: inputType ?? TextInputType.none,
onChanged: (value) { onChanged: (value) {
onChanged(value); onChanged(value);
}, },

View File

@ -8,7 +8,7 @@ import Foundation
import connectivity_plus import connectivity_plus
import device_info_plus import device_info_plus
import file_selector_macos import file_selector_macos
import flutter_inappwebview_macos import flutter_inappwebview
import package_info_plus import package_info_plus
import path_provider_foundation import path_provider_foundation
import shared_preferences_foundation import shared_preferences_foundation

View File

@ -74,4 +74,4 @@ SPEC CHECKSUMS:
PODFILE CHECKSUM: 236401fc2c932af29a9fcf0e97baeeb2d750d367 PODFILE CHECKSUM: 236401fc2c932af29a9fcf0e97baeeb2d750d367
COCOAPODS: 1.14.3 COCOAPODS: 1.12.1

View File

@ -259,7 +259,7 @@
isa = PBXProject; isa = PBXProject;
attributes = { attributes = {
LastSwiftUpdateCheck = 0920; LastSwiftUpdateCheck = 0920;
LastUpgradeCheck = 1430; LastUpgradeCheck = 1300;
ORGANIZATIONNAME = ""; ORGANIZATIONNAME = "";
TargetAttributes = { TargetAttributes = {
331C80D4294CF70F00263BE5 = { 331C80D4294CF70F00263BE5 = {

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<Scheme <Scheme
LastUpgradeVersion = "1430" LastUpgradeVersion = "1300"
version = "1.3"> version = "1.3">
<BuildAction <BuildAction
parallelizeBuildables = "YES" parallelizeBuildables = "YES"

View File

@ -117,10 +117,10 @@ packages:
dependency: "direct main" dependency: "direct main"
description: description:
name: build_runner name: build_runner
sha256: "3ac61a79bfb6f6cc11f693591063a7f19a7af628dc52f141743edac5c16e8c22" sha256: "10c6bcdbf9d049a0b666702cf1cee4ddfdc38f02a19d35ae392863b47519848b"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.4.9" version: "2.4.6"
build_runner_core: build_runner_core:
dependency: transitive dependency: transitive
description: description:
@ -237,10 +237,10 @@ packages:
dependency: "direct main" dependency: "direct main"
description: description:
name: cupertino_icons name: cupertino_icons
sha256: d57953e10f9f8327ce64a508a355f0b1ec902193f66288e8cb5070e7c47eeb2d sha256: e35129dc44c9118cee2a5603506d823bab99c68393879edb440e0090d07586be
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.0.6" version: "1.0.5"
dart_style: dart_style:
dependency: transitive dependency: transitive
description: description:
@ -293,10 +293,10 @@ packages:
dependency: "direct main" dependency: "direct main"
description: description:
name: dio name: dio
sha256: "0978e9a3e45305a80a7210dbeaf79d6ee8bee33f70c8e542dc654c952070217f" sha256: ce75a1b40947fea0a0e16ce73337122a86762e38b982e1ccb909daa3b9bc4197
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "5.4.2+1" version: "5.3.2"
dropdown_button2: dropdown_button2:
dependency: "direct dev" dependency: "direct dev"
description: description:
@ -373,10 +373,10 @@ packages:
dependency: "direct dev" dependency: "direct dev"
description: description:
name: file_picker name: file_picker
sha256: "1bbf65dd997458a08b531042ec3794112a6c39c07c37ff22113d2e7e4f81d4e4" sha256: "4e42aacde3b993c5947467ab640882c56947d9d27342a5b6f2895b23956954a6"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "6.2.1" version: "6.1.1"
file_selector_linux: file_selector_linux:
dependency: transitive dependency: transitive
description: description:
@ -434,66 +434,26 @@ packages:
dependency: "direct dev" dependency: "direct dev"
description: description:
name: flutter_inappwebview name: flutter_inappwebview
sha256: "3e9a443a18ecef966fb930c3a76ca5ab6a7aafc0c7b5e14a4a850cf107b09959" sha256: fad1f2740ff4b5b7da378a639f54beeb9d787b6339c89a9de00494d92372c0bb
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "6.0.0" version: "6.0.0-beta.24+1"
flutter_inappwebview_android:
dependency: transitive
description:
name: flutter_inappwebview_android
sha256: d247f6ed417f1f8c364612fa05a2ecba7f775c8d0c044c1d3b9ee33a6515c421
url: "https://pub.dev"
source: hosted
version: "1.0.13"
flutter_inappwebview_internal_annotations: flutter_inappwebview_internal_annotations:
dependency: transitive dependency: transitive
description: description:
name: flutter_inappwebview_internal_annotations name: flutter_inappwebview_internal_annotations
sha256: "5f80fd30e208ddded7dbbcd0d569e7995f9f63d45ea3f548d8dd4c0b473fb4c8" sha256: "064a8ccbc76217dcd3b0fd6c6ea6f549e69b2849a0233b5bb46af9632c3ce2ff"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.1.1" version: "1.1.0"
flutter_inappwebview_ios:
dependency: transitive
description:
name: flutter_inappwebview_ios
sha256: f363577208b97b10b319cd0c428555cd8493e88b468019a8c5635a0e4312bd0f
url: "https://pub.dev"
source: hosted
version: "1.0.13"
flutter_inappwebview_macos:
dependency: transitive
description:
name: flutter_inappwebview_macos
sha256: b55b9e506c549ce88e26580351d2c71d54f4825901666bd6cfa4be9415bb2636
url: "https://pub.dev"
source: hosted
version: "1.0.11"
flutter_inappwebview_platform_interface:
dependency: transitive
description:
name: flutter_inappwebview_platform_interface
sha256: "545fd4c25a07d2775f7d5af05a979b2cac4fbf79393b0a7f5d33ba39ba4f6187"
url: "https://pub.dev"
source: hosted
version: "1.0.10"
flutter_inappwebview_web:
dependency: transitive
description:
name: flutter_inappwebview_web
sha256: d8c680abfb6fec71609a700199635d38a744df0febd5544c5a020bd73de8ee07
url: "https://pub.dev"
source: hosted
version: "1.0.8"
flutter_lints: flutter_lints:
dependency: "direct dev" dependency: "direct dev"
description: description:
name: flutter_lints name: flutter_lints
sha256: a25a15ebbdfc33ab1cd26c63a6ee519df92338a9c10f122adda92938253bef04 sha256: "2118df84ef0c3ca93f96123a616ae8540879991b8b57af2f81b76a7ada49b2a4"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.0.3" version: "2.0.2"
flutter_plugin_android_lifecycle: flutter_plugin_android_lifecycle:
dependency: transitive dependency: transitive
description: description:
@ -514,10 +474,10 @@ packages:
dependency: "direct main" dependency: "direct main"
description: description:
name: flutter_svg name: flutter_svg
sha256: d39e7f95621fc84376bc0f7d504f05c3a41488c562f4a8ad410569127507402c sha256: "8c5d68a82add3ca76d792f058b186a0599414f279f00ece4830b9b231b570338"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.0.9" version: "2.0.7"
flutter_test: flutter_test:
dependency: "direct dev" dependency: "direct dev"
description: flutter description: flutter
@ -588,10 +548,10 @@ packages:
dependency: "direct dev" dependency: "direct dev"
description: description:
name: go_router name: go_router
sha256: e1a30a66d734f9e498b1b6522d6a75ded28242bad2359a9158df38a1c30bcf1f sha256: b3cadd2cd59a4103fd5f6bc572ca75111264698784e927aa471921c3477d5475
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "10.2.0" version: "10.0.0"
google_fonts: google_fonts:
dependency: transitive dependency: transitive
description: description:
@ -644,10 +604,10 @@ packages:
dependency: "direct main" dependency: "direct main"
description: description:
name: http_mock_adapter name: http_mock_adapter
sha256: "46399c78bd4a0af071978edd8c502d7aeeed73b5fb9860bca86b5ed647a63c1b" sha256: "07e78a5b64410ff8404aee2f8889ebff08def0c752b85a3945dec2029a6e1110"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.6.1" version: "0.6.0"
http_multi_server: http_multi_server:
dependency: transitive dependency: transitive
description: description:
@ -668,10 +628,10 @@ packages:
dependency: "direct main" dependency: "direct main"
description: description:
name: image_picker name: image_picker
sha256: "26222b01a0c9a2c8fe02fc90b8208bd3325da5ed1f4a2acabf75939031ac0bdd" sha256: "7d7f2768df2a8b0a3cefa5ef4f84636121987d403130e70b17ef7e2cf650ba84"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.0.7" version: "1.0.4"
image_picker_android: image_picker_android:
dependency: transitive dependency: transitive
description: description:
@ -776,30 +736,6 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "4.8.1" version: "4.8.1"
leak_tracker:
dependency: transitive
description:
name: leak_tracker
sha256: "78eb209deea09858f5269f5a5b02be4049535f568c07b275096836f01ea323fa"
url: "https://pub.dev"
source: hosted
version: "10.0.0"
leak_tracker_flutter_testing:
dependency: transitive
description:
name: leak_tracker_flutter_testing
sha256: b46c5e37c19120a8a01918cfaf293547f47269f7cb4b0058f21531c2465d6ef0
url: "https://pub.dev"
source: hosted
version: "2.0.1"
leak_tracker_testing:
dependency: transitive
description:
name: leak_tracker_testing
sha256: a597f72a664dbd293f3bfc51f9ba69816f84dcd403cdac7066cb3f6003f3ab47
url: "https://pub.dev"
source: hosted
version: "2.0.1"
light_logger: light_logger:
dependency: transitive dependency: transitive
description: description:
@ -852,18 +788,18 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: matcher name: matcher
sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.12.16+1" version: "0.12.16"
material_color_utilities: material_color_utilities:
dependency: transitive dependency: transitive
description: description:
name: material_color_utilities name: material_color_utilities
sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.8.0" version: "0.5.0"
material_design_icons_flutter: material_design_icons_flutter:
dependency: transitive dependency: transitive
description: description:
@ -876,10 +812,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: meta name: meta
sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04 sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.11.0" version: "1.10.0"
mime: mime:
dependency: transitive dependency: transitive
description: description:
@ -908,10 +844,10 @@ packages:
dependency: "direct dev" dependency: "direct dev"
description: description:
name: openid_client name: openid_client
sha256: "043878e907b7a1b460b54fb7b3b27b101cf70d4ac28b32a2db87ae67dbaed611" sha256: "514c0ba645b81029c28999831a70cb055dda1a3bc60be759a04d2556f60ec960"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.4.8" version: "0.4.7"
package_config: package_config:
dependency: transitive dependency: transitive
description: description:
@ -940,10 +876,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: path name: path
sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.9.0" version: "1.8.3"
path_parsing: path_parsing:
dependency: transitive dependency: transitive
description: description:
@ -956,10 +892,10 @@ packages:
dependency: "direct main" dependency: "direct main"
description: description:
name: path_provider name: path_provider
sha256: b27217933eeeba8ff24845c34003b003b2b22151de3c908d0e679e8fe1aa078b sha256: a1aa8aaa2542a6bc57e381f132af822420216c80d4781f7aa085ca3229208aaa
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.1.2" version: "2.1.1"
path_provider_android: path_provider_android:
dependency: transitive dependency: transitive
description: description:
@ -1004,50 +940,50 @@ packages:
dependency: "direct dev" dependency: "direct dev"
description: description:
name: permission_handler name: permission_handler
sha256: "18bf33f7fefbd812f37e72091a15575e72d5318854877e0e4035a24ac1113ecb" sha256: "860c6b871c94c78e202dc69546d4d8fd84bd59faeb36f8fb9888668a53ff4f78"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "11.3.1" version: "11.1.0"
permission_handler_android: permission_handler_android:
dependency: transitive dependency: transitive
description: description:
name: permission_handler_android name: permission_handler_android
sha256: "1acac6bae58144b442f11e66621c062aead9c99841093c38f5bcdcc24c1c3474" sha256: "2f1bec180ee2f5665c22faada971a8f024761f632e93ddc23310487df52dcfa6"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "12.0.5" version: "12.0.1"
permission_handler_apple: permission_handler_apple:
dependency: transitive dependency: transitive
description: description:
name: permission_handler_apple name: permission_handler_apple
sha256: e9ad66020b89ff1b63908f247c2c6f931c6e62699b756ef8b3c4569350cd8662 sha256: "1a816084338ada8d574b1cb48390e6e8b19305d5120fe3a37c98825bacc78306"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "9.4.4" version: "9.2.0"
permission_handler_html: permission_handler_html:
dependency: transitive dependency: transitive
description: description:
name: permission_handler_html name: permission_handler_html
sha256: "54bf176b90f6eddd4ece307e2c06cf977fb3973719c35a93b85cc7093eb6070d" sha256: "11b762a8c123dced6461933a88ea1edbbe036078c3f9f41b08886e678e7864df"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.1.1" version: "0.1.0+2"
permission_handler_platform_interface: permission_handler_platform_interface:
dependency: transitive dependency: transitive
description: description:
name: permission_handler_platform_interface name: permission_handler_platform_interface
sha256: "48d4fcf201a1dad93ee869ab0d4101d084f49136ec82a8a06ed9cfeacab9fd20" sha256: d87349312f7eaf6ce0adaf668daf700ac5b06af84338bd8b8574dfbd93ffe1a1
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "4.2.1" version: "4.0.2"
permission_handler_windows: permission_handler_windows:
dependency: transitive dependency: transitive
description: description:
name: permission_handler_windows name: permission_handler_windows
sha256: "1a790728016f79a41216d88672dbc5df30e686e811ad4e698bfc51f76ad91f1e" sha256: "1e8640c1e39121128da6b816d236e714d2cf17fac5a105dd6acdd3403a628004"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.2.1" version: "0.2.0"
petitparser: petitparser:
dependency: transitive dependency: transitive
description: description:
@ -1068,10 +1004,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: plugin_platform_interface name: plugin_platform_interface
sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02" sha256: "43798d895c929056255600343db8f049921cbec94d31ec87f1dc5c16c01935dd"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.1.8" version: "2.1.5"
pointycastle: pointycastle:
dependency: transitive dependency: transitive
description: description:
@ -1092,10 +1028,10 @@ packages:
dependency: "direct main" dependency: "direct main"
description: description:
name: provider name: provider
sha256: c8a055ee5ce3fd98d6fc872478b03823ffdb448699c6ebdbbc71d59b596fd48c sha256: cdbe7530b12ecd9eb455bdaa2fcb8d4dad22e80b8afb4798b41479d5ce26847f
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "6.1.2" version: "6.0.5"
pub_semver: pub_semver:
dependency: transitive dependency: transitive
description: description:
@ -1132,18 +1068,18 @@ packages:
dependency: "direct main" dependency: "direct main"
description: description:
name: riverpod name: riverpod
sha256: f21b32ffd26a36555e501b04f4a5dca43ed59e16343f1a30c13632b2351dfa4d sha256: a600120d6f213a9922860eea1abc32597436edd5b2c4e73b91410f8c2af67d22
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.5.1" version: "2.4.0"
shared_preferences: shared_preferences:
dependency: "direct main" dependency: "direct main"
description: description:
name: shared_preferences name: shared_preferences
sha256: "81429e4481e1ccfb51ede496e916348668fd0921627779233bd24cc3ff6abd02" sha256: "0344316c947ffeb3a529eac929e1978fcd37c26be4e8468628bac399365a3ca1"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.2.2" version: "2.2.0"
shared_preferences_android: shared_preferences_android:
dependency: transitive dependency: transitive
description: description:
@ -1361,66 +1297,66 @@ packages:
dependency: "direct dev" dependency: "direct dev"
description: description:
name: url_launcher name: url_launcher
sha256: "0ecc004c62fd3ed36a2ffcbe0dd9700aee63bd7532d0b642a488b1ec310f492e" sha256: "781bd58a1eb16069412365c98597726cd8810ae27435f04b3b4d3a470bacd61e"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "6.2.5" version: "6.1.12"
url_launcher_android: url_launcher_android:
dependency: transitive dependency: transitive
description: description:
name: url_launcher_android name: url_launcher_android
sha256: d4ed0711849dd8e33eb2dd69c25db0d0d3fdc37e0a62e629fe32f57a22db2745 sha256: "78cb6dea3e93148615109e58e42c35d1ffbf5ef66c44add673d0ab75f12ff3af"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "6.3.0" version: "6.0.37"
url_launcher_ios: url_launcher_ios:
dependency: transitive dependency: transitive
description: description:
name: url_launcher_ios name: url_launcher_ios
sha256: "9149d493b075ed740901f3ee844a38a00b33116c7c5c10d7fb27df8987fb51d5" sha256: "9af7ea73259886b92199f9e42c116072f05ff9bea2dcb339ab935dfc957392c2"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "6.2.5" version: "6.1.4"
url_launcher_linux: url_launcher_linux:
dependency: transitive dependency: transitive
description: description:
name: url_launcher_linux name: url_launcher_linux
sha256: ab360eb661f8879369acac07b6bb3ff09d9471155357da8443fd5d3cf7363811 sha256: "207f4ddda99b95b4d4868320a352d374b0b7e05eefad95a4a26f57da413443f5"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "3.1.1" version: "3.0.5"
url_launcher_macos: url_launcher_macos:
dependency: transitive dependency: transitive
description: description:
name: url_launcher_macos name: url_launcher_macos
sha256: b7244901ea3cf489c5335bdacda07264a6e960b1c1b1a9f91e4bc371d9e68234 sha256: "1c4fdc0bfea61a70792ce97157e5cc17260f61abbe4f39354513f39ec6fd73b1"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "3.1.0" version: "3.0.6"
url_launcher_platform_interface: url_launcher_platform_interface:
dependency: transitive dependency: transitive
description: description:
name: url_launcher_platform_interface name: url_launcher_platform_interface
sha256: "552f8a1e663569be95a8190206a38187b531910283c3e982193e4f2733f01029" sha256: bfdfa402f1f3298637d71ca8ecfe840b4696698213d5346e9d12d4ab647ee2ea
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.3.2" version: "2.1.3"
url_launcher_web: url_launcher_web:
dependency: transitive dependency: transitive
description: description:
name: url_launcher_web name: url_launcher_web
sha256: "3692a459204a33e04bc94f5fb91158faf4f2c8903281ddd82915adecdb1a901d" sha256: cc26720eefe98c1b71d85f9dc7ef0cada5132617046369d9dc296b3ecaa5cbb4
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.3.0" version: "2.0.18"
url_launcher_windows: url_launcher_windows:
dependency: transitive dependency: transitive
description: description:
name: url_launcher_windows name: url_launcher_windows
sha256: ecf9725510600aa2bb6d7ddabe16357691b6d2805f66216a97d1b881e21beff7 sha256: "7967065dd2b5fccc18c653b97958fdf839c5478c28e767c61ee879f4e7882422"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "3.1.1" version: "3.0.7"
uuid: uuid:
dependency: transitive dependency: transitive
description: description:
@ -1433,26 +1369,26 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: vector_graphics name: vector_graphics
sha256: "4ac59808bbfca6da38c99f415ff2d3a5d7ca0a6b4809c71d9cf30fba5daf9752" sha256: "670f6e07aca990b4a2bcdc08a784193c4ccdd1932620244c3a86bb72a0eac67f"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.1.10+1" version: "1.1.7"
vector_graphics_codec: vector_graphics_codec:
dependency: transitive dependency: transitive
description: description:
name: vector_graphics_codec name: vector_graphics_codec
sha256: f3247e7ab0ec77dc759263e68394990edc608fb2b480b80db8aa86ed09279e33 sha256: "7451721781d967db9933b63f5733b1c4533022c0ba373a01bdd79d1a5457f69f"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.1.10+1" version: "1.1.7"
vector_graphics_compiler: vector_graphics_compiler:
dependency: transitive dependency: transitive
description: description:
name: vector_graphics_compiler name: vector_graphics_compiler
sha256: "18489bdd8850de3dd7ca8a34e0c446f719ec63e2bab2e7a8cc66a9028dd76c5a" sha256: "80a13c613c8bde758b1464a1755a7b3a8f2b6cec61fbf0f5a53c94c30f03ba2e"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.1.10+1" version: "1.1.7"
vector_math: vector_math:
dependency: transitive dependency: transitive
description: description:
@ -1461,14 +1397,6 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.1.4" version: "2.1.4"
vm_service:
dependency: transitive
description:
name: vm_service
sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957
url: "https://pub.dev"
source: hosted
version: "13.0.0"
watcher: watcher:
dependency: transitive dependency: transitive
description: description:
@ -1481,10 +1409,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: web name: web
sha256: "97da13628db363c635202ad97068d47c5b8aa555808e7a9411963c533b449b27" sha256: afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.5.1" version: "0.3.0"
web_socket_channel: web_socket_channel:
dependency: transitive dependency: transitive
description: description:
@ -1542,5 +1470,5 @@ packages:
source: hosted source: hosted
version: "3.1.2" version: "3.1.2"
sdks: sdks:
dart: ">=3.3.0 <4.0.0" dart: ">=3.2.0-194.0.dev <4.0.0"
flutter: ">=3.19.0" flutter: ">=3.16.0"

View File

@ -67,7 +67,7 @@ dev_dependencies:
# activated in the `analysis_options.yaml` file located at the root of your # activated in the `analysis_options.yaml` file located at the root of your
# package. See that file for information about deactivating specific lint # package. See that file for information about deactivating specific lint
# rules and activating additional ones. # rules and activating additional ones.
flutter_lints: ^2.0.3 flutter_lints: ^2.0.0
# For information on the generic Dart part of this file, see the # For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec # following page: https://dart.dev/tools/pub/pubspec

View File

@ -8,6 +8,7 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart'; import 'package:flutter_test/flutter_test.dart';
import 'package:pwa_ios/main.dart';
import 'package:pwa_ios/views/konectarpage.dart'; import 'package:pwa_ios/views/konectarpage.dart';
void main() { void main() {