-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
39f15a2
commit 5c34ede
Showing
63 changed files
with
897 additions
and
769 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<background android:drawable="@color/ic_launcher_background"/> | ||
<foreground android:drawable="@drawable/ic_launcher_foreground"/> | ||
</adaptive-icon> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<resources> | ||
<color name="ic_launcher_background">#ffffff</color> | ||
</resources> |
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file modified
BIN
+207 KB
(2000%)
ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+463 Bytes
(260%)
ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+1.52 KB
(480%)
ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+2.84 KB
(750%)
ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+966 Bytes
(440%)
ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+2.68 KB
(690%)
ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+4.87 KB
(810%)
ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+1.52 KB
(480%)
ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+4.43 KB
(870%)
ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+7.98 KB
(1000%)
ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Binary file modified
BIN
+7.98 KB
(1000%)
ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Oops, something went wrong.
Binary file modified
BIN
+14.6 KB
(990%)
ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Binary file modified
BIN
+3.82 KB
(610%)
ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Oops, something went wrong.
Binary file modified
BIN
+11.3 KB
(1000%)
ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Oops, something went wrong.
Binary file modified
BIN
+13.1 KB
(1000%)
ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:stepn/MapScreen.dart'; | ||
|
||
import 'forms/data/formsContollers.dart'; | ||
|
||
class DoneScreen extends StatelessWidget { | ||
const DoneScreen({super.key}); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
// Clear form after sending request to API | ||
FormsControllers.clearForm(); | ||
|
||
return Scaffold( | ||
body: Center( | ||
child: Column( | ||
mainAxisAlignment: MainAxisAlignment.center, | ||
children: [ | ||
const Image(image: AssetImage("assets/done_icon.webp"),height: 300,width: 300,), | ||
const Text("طلبك وصلنا, هنتواصل معاك في أسرع وقت",style: TextStyle(fontSize: 20),), | ||
const SizedBox(height: 20,), | ||
ElevatedButton(onPressed: () { | ||
Navigator.of(context).pushAndRemoveUntil( | ||
MaterialPageRoute(builder: (context) => const MapScreen()), | ||
(Route<dynamic> route) => false, | ||
); | ||
}, child: const Text("القائمة الرئيسية")) | ||
], | ||
), | ||
), | ||
); | ||
} | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:permission_handler/permission_handler.dart'; | ||
import 'package:stepn/MapScreen.dart'; | ||
|
||
// Helper class to handle location permission | ||
class LocationPermissionHandler { | ||
static Future<bool> requestLocationPermission() async { | ||
// Check if the location permission is already granted | ||
var status = await Permission.location.status; | ||
if (status == PermissionStatus.granted) { | ||
return true; // Permission already granted | ||
} | ||
|
||
// If the permission has been denied or restricted, request it | ||
if (status.isDenied || status.isRestricted) { | ||
status = await Permission.location.request(); | ||
} | ||
|
||
// Return true if the permission is granted after requesting, otherwise return false | ||
return status == PermissionStatus.granted; | ||
} | ||
} | ||
|
||
// Welcome screen widget | ||
class WelcomeScreen extends StatefulWidget { | ||
const WelcomeScreen({Key? key}) : super(key: key); | ||
|
||
@override | ||
State<WelcomeScreen> createState() => _WelcomeScreenState(); | ||
} | ||
|
||
class _WelcomeScreenState extends State<WelcomeScreen> { | ||
@override | ||
Widget build(BuildContext context) { | ||
return Directionality( | ||
textDirection: TextDirection.rtl, | ||
child: Scaffold( | ||
appBar: AppBar( | ||
title: const Text('أهلا بيك في تطبيق استبن', | ||
style: TextStyle( | ||
fontWeight: FontWeight.bold, | ||
fontSize: 30, | ||
fontFamily: 'Roboto')), | ||
), | ||
body: Builder( | ||
builder: (context) => Column( | ||
mainAxisAlignment: MainAxisAlignment.center, | ||
children: [ | ||
const Image( | ||
image: AssetImage("assets/welcome_icon.webp"), | ||
width: 300, | ||
height: 300, | ||
), | ||
const Text( | ||
"أهلا بيك في تطبيق أستبن ، بنقدملك خدمات متكاملة لعربيتك وحل مشاكلها.و علشان نقدر نساعدك محتاجين تسمحلنا نعرف مكانك.", | ||
style: TextStyle(fontSize: 22), | ||
textAlign: TextAlign.center, | ||
), | ||
const SizedBox( | ||
height: 20, | ||
), | ||
ElevatedButton( | ||
style: ElevatedButton.styleFrom( | ||
padding: const EdgeInsets.symmetric( | ||
horizontal: 20, vertical: 10)), | ||
onPressed: () async { | ||
// Request location permission | ||
bool isPermissionGranted = | ||
await LocationPermissionHandler.requestLocationPermission(); | ||
|
||
if (isPermissionGranted) { | ||
// If permission is granted, navigate to the home screen | ||
navigateHome(); | ||
} else { | ||
// If permission is denied, show a snack bar | ||
ScaffoldMessenger.of(context).showSnackBar( | ||
const SnackBar( | ||
content: Text('تم رفض إذن الموقع'), | ||
duration: Duration(seconds: 3), | ||
), | ||
); | ||
} | ||
}, | ||
child: const Text( | ||
'السماح بالوصول للموقع', | ||
style: TextStyle(fontSize: 20), | ||
), | ||
), | ||
], | ||
), | ||
), | ||
), | ||
); | ||
} | ||
|
||
// Function to navigate to the home screen | ||
void navigateHome() { | ||
Navigator.pushReplacement( | ||
context, MaterialPageRoute(builder: (context) => const MapScreen())); | ||
} | ||
} |
Oops, something went wrong.