Commit eaeaa7c6 by Ramesh Babu Puvvadi

few changes

parent c62a2345
...@@ -90,5 +90,4 @@ flutter { ...@@ -90,5 +90,4 @@ flutter {
dependencies { dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'com.android.support:multidex:1.0.3' implementation 'com.android.support:multidex:1.0.3'
} }
...@@ -15,4 +15,7 @@ ...@@ -15,4 +15,7 @@
<style name="NormalTheme" parent="@android:style/Theme.Light.NoTitleBar"> <style name="NormalTheme" parent="@android:style/Theme.Light.NoTitleBar">
<item name="android:windowBackground">?android:colorBackground</item> <item name="android:windowBackground">?android:colorBackground</item>
</style> </style>
<style name="AppTheme" parent="@android:style/Theme.DeviceDefault">
<item name="android:windowSwipeToDismiss">true</item>
</style>
</resources> </resources>
...@@ -167,7 +167,7 @@ SPEC CHECKSUMS: ...@@ -167,7 +167,7 @@ SPEC CHECKSUMS:
FirebaseInstallations: cae95cab0f965ce05b805189de1d4c70b11c76fb FirebaseInstallations: cae95cab0f965ce05b805189de1d4c70b11c76fb
FirebaseMessaging: 0c0ae1eb722ef0c07f7801e5ded8dccd1357d6d4 FirebaseMessaging: 0c0ae1eb722ef0c07f7801e5ded8dccd1357d6d4
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854 Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
flutter_inappwebview: acd4fc0f012cefd09015000c241137d82f01ba62 flutter_inappwebview: 3d32228f1304635e7c028b0d4252937730bbc6cf
flutter_sms: 91ce41530f55c85d6524d82307a5d555844c086a flutter_sms: 91ce41530f55c85d6524d82307a5d555844c086a
GoogleDataTransport: 54dee9d48d14580407f8f5fbf2f496e92437a2f2 GoogleDataTransport: 54dee9d48d14580407f8f5fbf2f496e92437a2f2
GoogleUtilities: 13e2c67ede716b8741c7989e26893d151b2b2084 GoogleUtilities: 13e2c67ede716b8741c7989e26893d151b2b2084
......
...@@ -211,7 +211,7 @@ ...@@ -211,7 +211,7 @@
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
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\n";
}; };
9740EEB61CF901F6004384FC /* Run Script */ = { 9740EEB61CF901F6004384FC /* Run Script */ = {
isa = PBXShellScriptBuildPhase; isa = PBXShellScriptBuildPhase;
...@@ -341,7 +341,7 @@ ...@@ -341,7 +341,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 = 11.0; IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = NO; MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos; SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos; SUPPORTED_PLATFORMS = iphoneos;
...@@ -358,16 +358,17 @@ ...@@ -358,16 +358,17 @@
CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; CURRENT_PROJECT_VERSION = 5;
DEVELOPMENT_TEAM = AX549G5V4E; DEVELOPMENT_TEAM = 26J2TYD7PU;
ENABLE_BITCODE = NO; ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist; INFOPLIST_FILE = Runner/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = storemonitor; INFOPLIST_KEY_CFBundleDisplayName = storemonitor;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
LD_RUNPATH_SEARCH_PATHS = ( LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)", "$(inherited)",
"@executable_path/Frameworks", "@executable_path/Frameworks",
); );
PRODUCT_BUNDLE_IDENTIFIER = com.sopt.storemonitorapp; PRODUCT_BUNDLE_IDENTIFIER = com.sopt.storemonito;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = ""; PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
...@@ -423,7 +424,7 @@ ...@@ -423,7 +424,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 = 11.0; IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = YES; MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES; ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos; SDKROOT = iphoneos;
...@@ -472,7 +473,7 @@ ...@@ -472,7 +473,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 = 11.0; IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = NO; MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos; SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos; SUPPORTED_PLATFORMS = iphoneos;
...@@ -491,16 +492,17 @@ ...@@ -491,16 +492,17 @@
CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; CURRENT_PROJECT_VERSION = 5;
DEVELOPMENT_TEAM = AX549G5V4E; DEVELOPMENT_TEAM = 26J2TYD7PU;
ENABLE_BITCODE = NO; ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist; INFOPLIST_FILE = Runner/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = storemonitor; INFOPLIST_KEY_CFBundleDisplayName = storemonitor;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
LD_RUNPATH_SEARCH_PATHS = ( LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)", "$(inherited)",
"@executable_path/Frameworks", "@executable_path/Frameworks",
); );
PRODUCT_BUNDLE_IDENTIFIER = com.sopt.storemonitorapp; PRODUCT_BUNDLE_IDENTIFIER = com.sopt.storemonito;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = ""; PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
...@@ -518,16 +520,17 @@ ...@@ -518,16 +520,17 @@
CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; CURRENT_PROJECT_VERSION = 5;
DEVELOPMENT_TEAM = AX549G5V4E; DEVELOPMENT_TEAM = 26J2TYD7PU;
ENABLE_BITCODE = NO; ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist; INFOPLIST_FILE = Runner/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = storemonitor; INFOPLIST_KEY_CFBundleDisplayName = storemonitor;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
LD_RUNPATH_SEARCH_PATHS = ( LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)", "$(inherited)",
"@executable_path/Frameworks", "@executable_path/Frameworks",
); );
PRODUCT_BUNDLE_IDENTIFIER = com.sopt.storemonitorapp; PRODUCT_BUNDLE_IDENTIFIER = com.sopt.storemonito;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = ""; PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
......
...@@ -2,65 +2,59 @@ ...@@ -2,65 +2,59 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0"> <plist version="1.0">
<dict> <dict>
<key>CADisableMinimumFrameDurationOnPhone</key> <key>CADisableMinimumFrameDurationOnPhone</key>
<true/> <true/>
<key>CFBundleDevelopmentRegion</key> <key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string> <string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleDisplayName</key> <key>CFBundleDisplayName</key>
<string>Store Monitor</string> <string>Store Monitor</string>
<key>CFBundleExecutable</key> <key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string> <string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key> <key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string> <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key> <key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string> <string>6.0</string>
<key>CFBundleName</key> <key>CFBundleName</key>
<string>Store Monitor</string> <string>Store Monitor</string>
<key>CFBundlePackageType</key> <key>CFBundlePackageType</key>
<string>APPL</string> <string>APPL</string>
<key>CFBundleShortVersionString</key> <key>CFBundleShortVersionString</key>
<string>$(FLUTTER_BUILD_NAME)</string> <string>$(FLUTTER_BUILD_NAME)</string>
<key>CFBundleSignature</key> <key>CFBundleSignature</key>
<string>????</string> <string>????</string>
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
<string>$(FLUTTER_BUILD_NUMBER)</string> <string>$(FLUTTER_BUILD_NUMBER)</string>
<key>NSCameraUsageDescription</key> <key>FirebaseAppDelegateProxyEnabled</key>
<string>Camera access is required to capture</string> <false/>
<key>NSMicrophoneUsageDescription</key> <key>LSRequiresIPhoneOS</key>
<string>Microphone access is required to dial a call</string> <true/>
<key>NSPhotoLibraryUsageDescription</key> <key>NSAppTransportSecurity</key>
<string>This app requires access to the photo library</string> <dict>
<key>LSRequiresIPhoneOS</key> <key>NSAllowsArbitraryLoads</key>
<true/> <true/>
<key>UIApplicationSupportsIndirectInputEvents</key> </dict>
<true/> <key>NSCameraUsageDescription</key>
<key>UILaunchStoryboardName</key> <string>Camera access is required to capture</string>
<string>LaunchScreen</string> <key>NSMicrophoneUsageDescription</key>
<key>UIMainStoryboardFile</key> <string>Microphone access is required to dial a call</string>
<string>Main</string> <key>NSPhotoLibraryUsageDescription</key>
<key>UISupportedInterfaceOrientations</key> <string>This app requires access to the photo library</string>
<array> <key>REVERSED_CLIENT_ID</key>
<string>UIInterfaceOrientationLandscapeLeft</string> <string>d6689d068c6b4290aba903</string>
<string>UIInterfaceOrientationLandscapeRight</string> <key>UIApplicationSupportsIndirectInputEvents</key>
<string>UIInterfaceOrientationPortrait</string> <true/>
<string>UIInterfaceOrientationPortraitUpsideDown</string> <key>UILaunchStoryboardName</key>
</array> <string>LaunchScreen</string>
<key>UIViewControllerBasedStatusBarAppearance</key> <key>UIMainStoryboardFile</key>
<false/> <string>Main</string>
<key>UISupportedInterfaceOrientations</key>
<!-- Firebase configurations --> <array>
<key>FirebaseAppDelegateProxyEnabled</key> <string>UIInterfaceOrientationLandscapeLeft</string>
<false/> <string>UIInterfaceOrientationLandscapeRight</string>
<string>UIInterfaceOrientationPortrait</string>
<!-- Replace with your own reversed client ID --> <string>UIInterfaceOrientationPortraitUpsideDown</string>
<key>REVERSED_CLIENT_ID</key> </array>
<string>d6689d068c6b4290aba903</string> <key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
</dict> </dict>
</plist> </plist>
...@@ -10,13 +10,14 @@ import 'Constants.dart'; ...@@ -10,13 +10,14 @@ import 'Constants.dart';
class CheckRegistration extends StatefulWidget { class CheckRegistration extends StatefulWidget {
String message; String message;
CheckRegistration({super.key, required this.message}); CheckRegistration({super.key, required this.message});
@override @override
State<CheckRegistration> createState() => _CheckRegistration(); State<CheckRegistration> createState() => _CheckRegistration();
} }
class _CheckRegistration extends State<CheckRegistration> { class _CheckRegistration extends State<CheckRegistration> {
final TextEditingController _empId = TextEditingController(); final TextEditingController _empId = TextEditingController();
late final ImagePicker _picker = ImagePicker(); late final ImagePicker _picker = ImagePicker();
XFile? image; XFile? image;
File? newVideoFile; File? newVideoFile;
var store = ''; var store = '';
...@@ -134,7 +135,8 @@ class _CheckRegistration extends State<CheckRegistration> { ...@@ -134,7 +135,8 @@ class _CheckRegistration extends State<CheckRegistration> {
}); });
if (Platform.isAndroid) { if (Platform.isAndroid) {
image = await _picker.pickVideo( image = await _picker.pickVideo(
source: ImageSource.camera, preferredCameraDevice: CameraDevice.rear); source: ImageSource.camera,
preferredCameraDevice: CameraDevice.rear);
} else { } else {
image = await _picker.pickVideo( image = await _picker.pickVideo(
source: ImageSource.camera, source: ImageSource.camera,
...@@ -151,14 +153,10 @@ class _CheckRegistration extends State<CheckRegistration> { ...@@ -151,14 +153,10 @@ class _CheckRegistration extends State<CheckRegistration> {
Map<String, dynamic> responseMap = jsonDecode(response); Map<String, dynamic> responseMap = jsonDecode(response);
//String res = response; //String res = response;
//bool isEqual = jsonEncode(jsonDecode(response)) == jsonEncode(jsonDecode('{message: VideoUploaded, status: Success}')); //bool isEqual = jsonEncode(jsonDecode(response)) == jsonEncode(jsonDecode('{message: VideoUploaded, status: Success}'));
String message = "$responseMap"; String message = "$responseMap";
// Extract the status value from the message
// Extract the status value from the message
String status = message.split('status:').last.split('}').first.trim(); String status = message.split('status:').last.split('}').first.trim();
print(status); print(status);
if (status == 'Success') { if (status == 'Success') {
Navigator.pop(context); Navigator.pop(context);
file.delete(); file.delete();
...@@ -173,7 +171,6 @@ class _CheckRegistration extends State<CheckRegistration> { ...@@ -173,7 +171,6 @@ class _CheckRegistration extends State<CheckRegistration> {
file.delete(); file.delete();
//Navigator.of(context).pop(); //Navigator.of(context).pop();
} }
if (kDebugMode) { if (kDebugMode) {
print(responseMap); print(responseMap);
} }
...@@ -183,7 +180,8 @@ class _CheckRegistration extends State<CheckRegistration> { ...@@ -183,7 +180,8 @@ class _CheckRegistration extends State<CheckRegistration> {
void getValidReg(String text) async { void getValidReg(String text) async {
var data = await RemoteData().getValidEmp(text); var data = await RemoteData().getValidEmp(text);
if (data.statusCode != 200) { if (data.statusCode != 200) {
Constants('Review', data.statusCode.toString()).showAlertDialog(context, false); Constants('Review', data.statusCode.toString())
.showAlertDialog(context, false);
return; return;
} }
Map<String, dynamic> responseMap = jsonDecode(data.body); Map<String, dynamic> responseMap = jsonDecode(data.body);
......
...@@ -129,9 +129,9 @@ class Constants { ...@@ -129,9 +129,9 @@ class Constants {
); );
static Future<void> showAlertDialog1(BuildContext context) async { static Future<void> showAlertDialog1(BuildContext context) async {
AlertDialog alert = AlertDialog( AlertDialog alert = const AlertDialog(
content: Row( content: Row(
children: const [ children: [
CircularProgressIndicator(), CircularProgressIndicator(),
], ],
), ),
......
...@@ -141,209 +141,410 @@ class _FootFall extends State<FootFall> { ...@@ -141,209 +141,410 @@ class _FootFall extends State<FootFall> {
), ),
], ],
), ),
body: FutureBuilder<Foot?>( body: GestureDetector(
future: _futureFoot, onForcePressUpdate: (details) {
builder: (context, snapshot) { print('force press update');
if (snapshot.connectionState == ConnectionState.waiting) { },
return const Center( onHorizontalDragStart: (details) {
child: CircularProgressIndicator( print('force press start');
color: Color.fromARGB(255, 173, 57, 230))); },
} else if (snapshot.hasData) { onHorizontalDragDown: (details) {
final foot = snapshot.data!; print('force press down');
return SingleChildScrollView(
child: Container( //if (details.globalPosition.direction > 0) {
margin: const EdgeInsets.fromLTRB(15, 0, 15, 0), // print('force press down1$details');
child: Column( //}
mainAxisAlignment: MainAxisAlignment.start, //if (details.globalPosition.direction < 0) {
children: [ // print('force press down$details');
const SizedBox( //}
width: 10, //Navigator.of(context).pop();
height: 10, },
), child: FutureBuilder<Foot?>(
Container( future: _futureFoot,
padding: const EdgeInsets.symmetric(horizontal: 10.0), builder: (context, snapshot) {
decoration: BoxDecoration( if (snapshot.connectionState == ConnectionState.waiting) {
border: Border.all(color: Colors.grey), return const Center(
borderRadius: BorderRadius.circular(5.0), child: CircularProgressIndicator(
), color: Color.fromARGB(255, 173, 57, 230)));
child: DropdownButtonHideUnderline( } else if (snapshot.hasData) {
child: DropdownButton<String>( final foot = snapshot.data!;
menuMaxHeight: return SingleChildScrollView(
Constants.getDropdownItemHeight(context), child: Container(
value: selectedDropdownItem, margin: const EdgeInsets.fromLTRB(15, 0, 15, 0),
onChanged: (newValue) { child: Column(
setState(() { mainAxisAlignment: MainAxisAlignment.start,
selectedDropdownItem = newValue; children: [
_futureFoot = getData( const SizedBox(
selectedDropdownItem!, width: 10,
'none', height: 10,
);
});
},
items: storesList?.map((item) {
return DropdownMenuItem<String>(
value: item,
child: Text(item),
);
}).toList(),
icon: const Icon(Icons.arrow_drop_down),
isExpanded: true,
),
), ),
), Container(
const SizedBox( padding: const EdgeInsets.symmetric(horizontal: 10.0),
height: 10, decoration: BoxDecoration(
width: 1, border: Border.all(color: Colors.grey),
),
TextFormField(
controller: _dateTime,
onTap: () => '',
decoration: InputDecoration(
contentPadding: const EdgeInsets.symmetric(
vertical: 15, horizontal: 10),
isDense: true,
hintText: 'Select date',
border: OutlineInputBorder(
borderRadius: BorderRadius.circular(5.0), borderRadius: BorderRadius.circular(5.0),
), ),
suffixIcon: IconButton( child: DropdownButtonHideUnderline(
icon: Image.asset( child: DropdownButton<String>(
'assets/images/date_icon.png', menuMaxHeight:
width: 24, Constants.getDropdownItemHeight(context),
height: 24, value: selectedDropdownItem,
onChanged: (newValue) {
setState(() {
selectedDropdownItem = newValue;
_futureFoot = getData(
selectedDropdownItem!,
'none',
);
});
},
items: storesList?.map((item) {
return DropdownMenuItem<String>(
value: item,
child: Text(item),
);
}).toList(),
icon: const Icon(Icons.arrow_drop_down),
isExpanded: true,
), ),
onPressed: () => _selectDate(context),
), ),
), ),
), const SizedBox(
const SizedBox( height: 10,
height: 10, width: 1,
width: 1, ),
), TextFormField(
const Row( controller: _dateTime,
mainAxisAlignment: MainAxisAlignment.start, onTap: () => '',
children: [ decoration: InputDecoration(
Text('Store Footfall', contentPadding: const EdgeInsets.symmetric(
textAlign: TextAlign.left, vertical: 15, horizontal: 10),
style: Constants.headerfontStyle), isDense: true,
], hintText: 'Select date',
), border: OutlineInputBorder(
const SizedBox( borderRadius: BorderRadius.circular(5.0),
width: 0, ),
height: 3, suffixIcon: IconButton(
), icon: Image.asset(
Row( 'assets/images/date_icon.png',
mainAxisAlignment: MainAxisAlignment.start, width: 24,
children: [ height: 24,
Container( ),
height: 2, onPressed: () => _selectDate(context),
width: 40, ),
color: const Color.fromARGB(255, 170, 57, 230),
), ),
], ),
), const SizedBox(
const SizedBox( height: 10,
height: 10, width: 1,
width: 1, ),
), const Row(
Row( mainAxisAlignment: MainAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [
children: [ Text('Store Footfall',
Expanded( textAlign: TextAlign.left,
child: Container( style: Constants.headerfontStyle),
width: double.infinity, ],
decoration: BoxDecoration( ),
gradient: const LinearGradient( const SizedBox(
begin: Alignment.bottomLeft, width: 0,
end: Alignment.bottomCenter, height: 3,
colors: [ ),
Color(0xFFfd680e), Row(
Color(0xFFf1245f), mainAxisAlignment: MainAxisAlignment.start,
//Color(0xFFC2185B), children: [
], Container(
height: 2,
width: 40,
color: const Color.fromARGB(255, 170, 57, 230),
),
],
),
const SizedBox(
height: 10,
width: 1,
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Expanded(
child: Container(
width: double.infinity,
decoration: BoxDecoration(
gradient: const LinearGradient(
begin: Alignment.bottomLeft,
end: Alignment.bottomCenter,
colors: [
Color(0xFFfd680e),
Color(0xFFf1245f),
//Color(0xFFC2185B),
],
),
borderRadius: BorderRadius.circular(4),
), ),
borderRadius: BorderRadius.circular(4), child: Column(
), children: [
child: Column( Row(
children: [ children: [
Row( Column(
children: [ children: [
Column( Container(
children: [ padding: const EdgeInsets.all(1),
Container( child: Image.asset(
padding: const EdgeInsets.all(1), 'assets/images/people.png',
child: Image.asset( width: 50,
'assets/images/people.png', height: 50,
width: 50, ),
height: 50,
), ),
), Container(
Container( padding: const EdgeInsets.fromLTRB(
padding: const EdgeInsets.fromLTRB( 10, 10, 0, 20),
10, 10, 0, 20), child: const Center(
child: const Center( child: Text(
child: Text( 'FOOTFALL',
'FOOTFALL', style:
style: Constants.buttonsfontStyle, Constants.buttonsfontStyle,
),
), ),
), ),
],
),
const SizedBox(
width: 3,
height: 3,
),
Column(
children: [
Container(
padding: const EdgeInsets.fromLTRB(
10, 0, 0, 20),
child: Image.asset(
'assets/images/footfall_icon.png',
width: 50,
height: 50,
),
),
Container(
padding: const EdgeInsets.fromLTRB(
10, 0, 0, 0),
child: Center(
child: Text(
'${foot.fadults! + foot.fkids! + foot.fteens! + foot.madults! + foot.mkids! + foot.mteens!}',
style: Constants
.footfallheaderfontStyle,
//textAlign: TextAlign.right,
),
),
),
Container(
//padding: const EdgeInsets.all(3),
padding: const EdgeInsets.fromLTRB(
10, 0, 0, 2),
child: const Center(
child: Text(
'Members',
style:
Constants.footfallfontStyle,
),
),
),
],
),
],
),
],
),
),
),
const SizedBox(
width: 5,
height: 1,
),
Expanded(
child: Container(
width: MediaQuery.of(context).size.width / 2.3,
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(5.0),
boxShadow: [
BoxShadow(
color: Colors.grey.withOpacity(0.5),
spreadRadius: 2,
blurRadius: 5,
offset: const Offset(0, 2),
),
],
),
child: Column(
children: [
const SizedBox(
width: 1,
height: 7,
),
const Row(
mainAxisAlignment:
MainAxisAlignment.spaceEvenly,
children: [
SizedBox(
width: 30,
height: 1,
),
Expanded(
child: Text(
'Adults',
textAlign: TextAlign.center,
style: Constants.listitems,
), ),
], ),
), Expanded(
const SizedBox( child: Text(
width: 3, 'Kids',
height: 3, textAlign: TextAlign.center,
), style: Constants.listitems,
Column( ),
children: [ ),
Container( ],
padding: const EdgeInsets.fromLTRB( ),
10, 0, 0, 20), const SizedBox(
child: Image.asset( height: 8,
'assets/images/footfall_icon.png', width: 2,
width: 50, ),
height: 50, const Divider(
height: 2,
thickness: 1,
color: Colors.grey,
indent: 5,
endIndent: 5,
),
const SizedBox(
height: 5,
width: 2,
),
Row(
mainAxisAlignment:
MainAxisAlignment.spaceEvenly,
children: [
Image.asset(
'assets/images/men.png',
width: 25,
height: 25,
),
const SizedBox(
width: 8,
height: 1,
),
Expanded(
child: Text(
foot.madults.toString(),
textAlign: TextAlign.center,
style: const TextStyle(
fontWeight: FontWeight.bold,
color: Color.fromARGB(
255, 63, 123, 173)),
),
),
Expanded(
child: Text(
foot.mkids.toString(),
textAlign: TextAlign.center,
style: const TextStyle(
color: Color.fromARGB(
255, 63, 123, 173),
fontWeight: FontWeight.bold,
), ),
), ),
Container( ),
padding: const EdgeInsets.fromLTRB( // Expanded(
10, 0, 0, 0), // child: Text(
child: Center( // foot.mteens.toString(),
child: Text( // textAlign: TextAlign.center,
'${foot.fadults! + foot.fkids! + foot.fteens! + foot.madults! + foot.mkids! + foot.mteens!}', // style: const TextStyle(
style: Constants // color:
.footfallheaderfontStyle, // Color.fromARGB(255, 63, 123, 173),
//textAlign: TextAlign.right, // fontWeight: FontWeight.bold,
), // ),
// ),
// ),
],
),
const SizedBox(
height: 10,
width: 2,
),
const Divider(
height: 5,
thickness: 1,
color: Colors.grey,
indent: 5,
endIndent: 5,
),
const SizedBox(
height: 8,
width: 2,
),
Row(
mainAxisAlignment:
MainAxisAlignment.spaceEvenly,
children: [
Image.asset(
'assets/images/woman.png',
width: 25,
height: 25,
),
const SizedBox(
width: 5,
height: 1,
),
Expanded(
child: Text(
foot.fadults.toString(),
textAlign: TextAlign.center,
style: const TextStyle(
color: Color.fromARGB(
255, 235, 25, 42),
fontWeight: FontWeight.bold,
), ),
), ),
Container( ),
//padding: const EdgeInsets.all(3), Expanded(
padding: const EdgeInsets.fromLTRB( child: Text(
10, 0, 0, 2), foot.fkids.toString(),
child: const Center( textAlign: TextAlign.center,
child: Text( style: const TextStyle(
'Members', color: Color.fromARGB(
style: 255, 235, 25, 42),
Constants.footfallfontStyle, fontWeight: FontWeight.bold,
),
), ),
), ),
], ),
), // Expanded(
], // child: Text(
), // foot.fteens.toString(),
], // textAlign: TextAlign.center,
// style: const TextStyle(
// color: Color.fromARGB(255, 235, 25, 42),
// fontWeight: FontWeight.bold,
// ),
// ),
// ),
],
),
const SizedBox(
width: 1,
height: 10,
),
],
),
), ),
), ),
), ],
const SizedBox( ),
width: 5, const SizedBox(height: 16),
height: 1, SizedBox(
), width: MediaQuery.of(context).size.width,
Expanded( height: 350,
child: Container( child: Container(
width: MediaQuery.of(context).size.width / 2.3, margin: const EdgeInsets.fromLTRB(0, 10, 0, 10),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: Colors.white,
borderRadius: BorderRadius.circular(5.0), borderRadius: BorderRadius.circular(5.0),
...@@ -357,348 +558,167 @@ class _FootFall extends State<FootFall> { ...@@ -357,348 +558,167 @@ class _FootFall extends State<FootFall> {
], ],
), ),
child: Column( child: Column(
//crossAxisAlignment: CrossAxisAlignment.stretch,
mainAxisAlignment: MainAxisAlignment.start,
children: [ children: [
const SizedBox( const SizedBox(
width: 1, width: 0,
height: 7, height: 10,
),
const Row(
mainAxisAlignment:
MainAxisAlignment.spaceEvenly,
children: [
SizedBox(
width: 30,
height: 1,
),
Expanded(
child: Text(
'Adults',
textAlign: TextAlign.center,
style: Constants.listitems,
),
),
Expanded(
child: Text(
'Kids',
textAlign: TextAlign.center,
style: Constants.listitems,
),
),
],
),
const SizedBox(
height: 8,
width: 2,
), ),
const Divider( Row(
height: 2, mainAxisAlignment: MainAxisAlignment.start,
thickness: 1, children: const [
color: Colors.grey, Text('Hourly Customer Trend',
indent: 5, textAlign: TextAlign.left,
endIndent: 5, style: Constants.headerfontStyle),
]
.map((e) => Padding(
padding:
const EdgeInsets.only(left: 10),
child: e))
.toList(),
), ),
const SizedBox( const SizedBox(
height: 5, width: 0,
width: 2, height: 3,
), ),
Row( Row(
mainAxisAlignment: mainAxisAlignment: MainAxisAlignment.start,
MainAxisAlignment.spaceEvenly,
children: [ children: [
Image.asset( Container(
'assets/images/men.png', height: 2,
width: 25, width: 40,
height: 25, color: const Color.fromARGB(
255, 170, 57, 230),
), ),
const SizedBox( ]
width: 8, .map((e) => Padding(
height: 1, padding:
), const EdgeInsets.only(left: 10),
Expanded( child: e))
child: Text( .toList(),
foot.madults.toString(), ),
textAlign: TextAlign.center, const SizedBox(
style: const TextStyle( height: 8,
fontWeight: FontWeight.bold, ),
color: Color.fromARGB( Center(
255, 63, 123, 173)), child: SizedBox(
), width: MediaQuery.of(context).size.width,
), height: 280,
Expanded( child: InAppWebView(
child: Text( initialData: InAppWebViewInitialData(
foot.mkids.toString(), data: foot.hourlygraph ?? ""),
textAlign: TextAlign.center, initialOptions: InAppWebViewGroupOptions(
style: const TextStyle( crossPlatform: InAppWebViewOptions(
color: // enable other options if needed
Color.fromARGB(255, 63, 123, 173), //supportZoom: false,
fontWeight: FontWeight.bold, ),
),
), ),
), ),
// Expanded( ),
// child: Text(
// foot.mteens.toString(),
// textAlign: TextAlign.center,
// style: const TextStyle(
// color:
// Color.fromARGB(255, 63, 123, 173),
// fontWeight: FontWeight.bold,
// ),
// ),
// ),
],
), ),
],
)),
),
SizedBox(
width: MediaQuery.of(context).size.width,
height: 350,
child: Container(
//margin: const EdgeInsets.all(5.0),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(5.0),
boxShadow: [
BoxShadow(
color: Colors.grey.withOpacity(0.5),
spreadRadius: 2,
blurRadius: 5,
offset: const Offset(0, 2),
),
],
),
child: Column(
children: [
const SizedBox( const SizedBox(
width: 0,
height: 10, height: 10,
width: 2,
), ),
const Divider( Row(
height: 5, mainAxisAlignment: MainAxisAlignment.start,
thickness: 1, children: [
color: Colors.grey, const Text('Gender Breakup',
indent: 5, textAlign: TextAlign.left,
endIndent: 5, style: Constants.headerfontStyle)
]
.map((e) => Padding(
padding:
const EdgeInsets.only(left: 10),
child: e))
.toList(),
), ),
const SizedBox( const SizedBox(
height: 8, width: 0,
width: 2, height: 3,
), ),
Row( Row(
mainAxisAlignment: mainAxisAlignment: MainAxisAlignment.start,
MainAxisAlignment.spaceEvenly,
children: [ children: [
Image.asset( Container(
'assets/images/woman.png', height: 2,
width: 25, width: 40,
height: 25, color: const Color.fromARGB(
), 255, 170, 57, 230),
const SizedBox(
width: 5,
height: 1,
),
Expanded(
child: Text(
foot.fadults.toString(),
textAlign: TextAlign.center,
style: const TextStyle(
color:
Color.fromARGB(255, 235, 25, 42),
fontWeight: FontWeight.bold,
),
),
),
Expanded(
child: Text(
foot.fkids.toString(),
textAlign: TextAlign.center,
style: const TextStyle(
color:
Color.fromARGB(255, 235, 25, 42),
fontWeight: FontWeight.bold,
),
),
), ),
// Expanded( ]
// child: Text( .map((e) => Padding(
// foot.fteens.toString(), padding:
// textAlign: TextAlign.center, const EdgeInsets.only(left: 10),
// style: const TextStyle( child: e))
// color: Color.fromARGB(255, 235, 25, 42), .toList(),
// fontWeight: FontWeight.bold,
// ),
// ),
// ),
],
), ),
const SizedBox( const SizedBox(
width: 1, height: 8,
height: 10,
),
],
),
),
),
],
),
const SizedBox(height: 16),
SizedBox(
width: MediaQuery.of(context).size.width,
height: 350,
child: Container(
margin: const EdgeInsets.fromLTRB(0, 10, 0, 10),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(5.0),
boxShadow: [
BoxShadow(
color: Colors.grey.withOpacity(0.5),
spreadRadius: 2,
blurRadius: 5,
offset: const Offset(0, 2),
),
],
),
child: Column(
//crossAxisAlignment: CrossAxisAlignment.stretch,
mainAxisAlignment: MainAxisAlignment.start,
children: [
const SizedBox(
width: 0,
height: 10,
),
Row(
mainAxisAlignment: MainAxisAlignment.start,
children: const [
Text('Hourly Customer Trend',
textAlign: TextAlign.left,
style: Constants.headerfontStyle),
]
.map((e) => Padding(
padding:
const EdgeInsets.only(left: 10),
child: e))
.toList(),
),
const SizedBox(
width: 0,
height: 3,
),
Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
Container(
height: 2,
width: 40,
color:
const Color.fromARGB(255, 170, 57, 230),
),
]
.map((e) => Padding(
padding:
const EdgeInsets.only(left: 10),
child: e))
.toList(),
),
const SizedBox(
height: 8,
),
Center(
child: SizedBox(
width: MediaQuery.of(context).size.width,
height: 280,
child: InAppWebView(
initialData: InAppWebViewInitialData(
data: foot.hourlygraph ?? ""),
initialOptions: InAppWebViewGroupOptions(
crossPlatform: InAppWebViewOptions(
// enable other options if needed
//supportZoom: false,
),
),
),
), ),
), Center(
], child: SizedBox(
)), width: MediaQuery.of(context).size.width,
), height: 280,
SizedBox( child: InAppWebView(
width: MediaQuery.of(context).size.width, initialData: InAppWebViewInitialData(
height: 350, data: foot.genderhourlygraph ?? ""),
child: Container( initialOptions: InAppWebViewGroupOptions(
//margin: const EdgeInsets.all(5.0), crossPlatform: InAppWebViewOptions(
decoration: BoxDecoration( // enable options that are common to both platforms
color: Colors.white, //supportZoom: false,
borderRadius: BorderRadius.circular(5.0), ),
boxShadow: [ android: AndroidInAppWebViewOptions(
BoxShadow( // enable Android-specific options if needed
color: Colors.grey.withOpacity(0.5), supportMultipleWindows: true,
spreadRadius: 2, ),
blurRadius: 5, ios: IOSInAppWebViewOptions(
offset: const Offset(0, 2), // enable iOS-specific options if needed
), allowsInlineMediaPlayback: true,
],
),
child: Column(
children: [
const SizedBox(
width: 0,
height: 10,
),
Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
const Text('Gender Breakup',
textAlign: TextAlign.left,
style: Constants.headerfontStyle)
]
.map((e) => Padding(
padding:
const EdgeInsets.only(left: 10),
child: e))
.toList(),
),
const SizedBox(
width: 0,
height: 3,
),
Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
Container(
height: 2,
width: 40,
color:
const Color.fromARGB(255, 170, 57, 230),
),
]
.map((e) => Padding(
padding:
const EdgeInsets.only(left: 10),
child: e))
.toList(),
),
const SizedBox(
height: 8,
),
Center(
child: SizedBox(
width: MediaQuery.of(context).size.width,
height: 280,
child: InAppWebView(
initialData: InAppWebViewInitialData(
data: foot.genderhourlygraph ?? ""),
initialOptions: InAppWebViewGroupOptions(
crossPlatform: InAppWebViewOptions(
// enable options that are common to both platforms
//supportZoom: false, //supportZoom: false,
), ),
android: AndroidInAppWebViewOptions(
// enable Android-specific options if needed
supportMultipleWindows: true,
),
ios: IOSInAppWebViewOptions(
// enable iOS-specific options if needed
allowsInlineMediaPlayback: true,
//supportZoom: false,
), ),
), ),
), ),
), ),
), Container()
Container() ],
], )),
)), ),
), ],
], ),
), ),
), );
); } else if (snapshot.hasError) {
} else if (snapshot.hasError) { return Center(child: Text("Error: ${snapshot.error}"));
return Center(child: Text("Error: ${snapshot.error}")); } else {
} else { return const Center(child: Text("No data"));
return const Center(child: Text("No data")); }
} },
}, ),
), ),
); );
} }
......
...@@ -133,13 +133,25 @@ class _Home extends State<Home> { ...@@ -133,13 +133,25 @@ class _Home extends State<Home> {
), ),
body: SingleChildScrollView( body: SingleChildScrollView(
child: GestureDetector( child: GestureDetector(
onHorizontalDragUpdate: (dragDetail) { onForcePressUpdate: (details) {
print('Testing'); print('force press update');
if (dragDetail.delta.direction > 0) {
Navigator.pop(context);
print('Hitted =====>');
}
}, },
onHorizontalDragStart: (details) {
print('force press start');
},
onHorizontalDragDown: (details) {
print('force press down');
//Navigator.pop(context);
},
// onHorizontalDragUpdate: (dragDetail) {
// print('Testing');
// if (dragDetail.delta.direction > 0) {
// Navigator.pop(context);
// print('Hitted =====>');
// }
// },
child: Container( child: Container(
margin: const EdgeInsets.all(12.0), margin: const EdgeInsets.all(12.0),
child: Column( child: Column(
......
...@@ -442,7 +442,7 @@ class _CustomDialogState extends State<CustomDialog> { ...@@ -442,7 +442,7 @@ class _CustomDialogState extends State<CustomDialog> {
print(userId); print(userId);
print(_textFieldController1.text); print(_textFieldController1.text);
print(_textFieldController2.text); print(_textFieldController2.text);
//Navigator.pop(context); //tor.Navigapop(context);
String res = await RemoteData().getChangePassword( String res = await RemoteData().getChangePassword(
_textFieldController1.text, _textFieldController1.text,
......
...@@ -2,8 +2,6 @@ import 'dart:io'; ...@@ -2,8 +2,6 @@ import 'dart:io';
import 'package:firebase_core/firebase_core.dart'; import 'package:firebase_core/firebase_core.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:storemonitor/FirebaseApi.dart'; import 'package:storemonitor/FirebaseApi.dart';
//import 'package:media_kit/media_kit.dart';
//import 'Screens/MyHomePage.dart';
import 'Screens/SplashScreen.dart'; import 'Screens/SplashScreen.dart';
Future<void> main() async { Future<void> main() async {
...@@ -12,8 +10,9 @@ Future<void> main() async { ...@@ -12,8 +10,9 @@ Future<void> main() async {
await Firebase.initializeApp(); await Firebase.initializeApp();
await FirebaseApi().initNotifications(); await FirebaseApi().initNotifications();
} }
runApp(const MaterialApp( runApp(const MaterialApp(
debugShowCheckedModeBanner: false, debugShowCheckedModeBanner: false,
home: SplashScreen(), home: SplashScreen(),
)); )
);
} }
...@@ -282,10 +282,10 @@ packages: ...@@ -282,10 +282,10 @@ packages:
dependency: "direct main" dependency: "direct main"
description: description:
name: flutter_inappwebview name: flutter_inappwebview
sha256: f73505c792cf083d5566e1a94002311be497d984b5607f25be36d685cf6361cf sha256: d198297060d116b94048301ee6749cd2e7d03c1f2689783f52d210a6b7aba350
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "5.7.2+3" version: "5.8.0"
flutter_launcher_icons: flutter_launcher_icons:
dependency: "direct main" dependency: "direct main"
description: description:
......
name: storemonitor name: storemonitor
description: A new Flutter project. description: A new Flutter project.
publish_to: 'none' publish_to: 'none'
version: 1.0.4+4 version: 1.0.5+5
environment: environment:
sdk: '>=2.18.4 <3.0.0' sdk: '>=2.18.4 <3.0.0'
...@@ -23,7 +23,8 @@ dependencies: ...@@ -23,7 +23,8 @@ dependencies:
#aws_s3_upload: ^1.5.0 #aws_s3_upload: ^1.5.0
# //flutter_webview_plugin: ^0.4.0 # //flutter_webview_plugin: ^0.4.0
webview_flutter: ^4.2.4 webview_flutter: ^4.2.4
flutter_inappwebview: ^5.7.2+3 flutter_inappwebview: ^5.8.0
#flutter_html: ^0.11.1 #flutter_html: ^0.11.1
http_parser: ^4.0.0 http_parser: ^4.0.0
#amazon_cognito_identity_dart_2: ^1.0.3 #amazon_cognito_identity_dart_2: ^1.0.3
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment