diff --git a/android/app/build.gradle b/android/app/build.gradle
index cb74372..ea6581c 100644
--- a/android/app/build.gradle
+++ b/android/app/build.gradle
@@ -11,12 +11,12 @@ android {
ndkVersion = flutter.ndkVersion
compileOptions {
- sourceCompatibility = JavaVersion.VERSION_1_8
- targetCompatibility = JavaVersion.VERSION_1_8
+ sourceCompatibility = JavaVersion.VERSION_17
+ targetCompatibility = JavaVersion.VERSION_17
}
kotlinOptions {
- jvmTarget = JavaVersion.VERSION_1_8
+ jvmTarget = JavaVersion.VERSION_17
}
defaultConfig {
diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml
index da9c61c..339c236 100644
--- a/android/app/src/main/AndroidManifest.xml
+++ b/android/app/src/main/AndroidManifest.xml
@@ -6,10 +6,11 @@
+
+ android:icon="@mipmap/ic_launcher">
runApp(const Login());
+
+class Login extends StatefulWidget {
+ const Login({super.key});
+
+ @override
+ State createState() => _LoginState();
+}
+
+class _LoginState extends State {
+ @override
+ void initState() {
+ initialize();
+ super.initState();
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ return MaterialApp(
+ initialRoute: '/',
+ routes: {
+ '/second': (context) => const screen2.Screen2(),
+ '/movements': (context) => const movements.Movements(),
+ '/transfert': (context) => const transfert.TransfertScreen(),
+ '/livraison': (context) => const livraison.LivraisonScreen(),
+ '/final': (context) => const final_page.Final(),
+ },
+ title: "Soft",
+ theme: ThemeData(
+ colorScheme: ColorScheme.fromSeed(seedColor: Colors.lightGreen),
+ useMaterial3: true,
+ primarySwatch: Colors.lightGreen),
+ home: LoginPage()
+ );
+ }
+}
+class LoginPage extends StatefulWidget{
+ const LoginPage({super.key});
+
+ @override
+ State createState() => _LoginPageState();
+}
+
+class _LoginPageState extends State {
+ Color? background = Colors.grey[900];
+ String username = "";
+
+ String pssw = "";
+
+ bool passwordVisible = false;
+
+ Color? fieldColor = Colors.grey[300];
+ bool changeTheme = false;
+
+ bool isLoading = false;
+ bool isaUser = false;
+ String errormssg = "";
+
+ final _uname = TextEditingController();
+
+ final _pssw = TextEditingController();
+
+ Transfert objTransfert = Transfert();
+ Livraison objLivraison = Livraison();
+
+ void authenticate() async{
+ setState(() {
+ isLoading = false;
+ errormssg = "";
+ });
+ isLoading = true;
+ bool isValidUser = await isUser(_uname.text, _pssw.text);
+ //bool isValidUser = true;
+ setState(() {
+ isLoading = false;
+ });
+
+ if (mounted && isValidUser) {
+ objTransfert.user = _uname.text;
+ objLivraison.user = _uname.text;
+ _uname.text = "";
+ _pssw.text = "";
+ Navigator.pushNamed(context, '/second',
+ arguments: screen2.ScreenTransition(backgroundColor: background, FieldColor: fieldColor,
+ changeThemes: changeTheme, objtransfert: objTransfert, objlivraison: objLivraison
+ )
+ );
+ }
+ else {
+ setState(() {
+ errormssg = "Utilisateur non existant !";
+ });
+ }
+ }
+
+ @override
+ Widget build(BuildContext context){
+ return
+ SizedBox(
+ width: double.infinity,
+ height: double.infinity,
+ child: Scaffold(
+ appBar: AppBar(title: Align(
+ alignment: Alignment.topRight,
+ child: IconButton(onPressed: (){
+ setState(() {
+ background = changeTheme ? Colors.grey[900] : Colors.white;
+ fieldColor = changeTheme ? Colors.grey[300] : Colors.black;
+ changeTheme = !changeTheme;
+ });}, icon: Icon(background == Colors.white ? Icons.dark_mode_outlined
+ : Icons.light_mode,), style: IconButton.styleFrom(
+ backgroundColor: Colors.lightGreen)),),
+ backgroundColor: background,
+ ),
+ resizeToAvoidBottomInset: true,
+ backgroundColor: background,
+ body: Container(
+ padding: const EdgeInsets.all(20.0),
+ margin: const EdgeInsets.all(20.0),
+ child: SingleChildScrollView(
+ child: Column(children: [
+ SizedBox(
+ height: 40.0,
+ ),
+ ClipRRect(
+ borderRadius: BorderRadius.circular(20),
+ child: Image.asset("assets/icon/drawer2.png",
+ fit: BoxFit.cover, width: 200, height: 200),
+ ),
+ SizedBox(
+ height: 25.0,
+ ),
+ Text(errormssg, style: TextStyle(color: Colors.red),),
+ SizedBox(height: 25,),
+ TextField(
+ style: TextStyle(color: fieldColor),
+ controller: _uname,
+ decoration: InputDecoration(
+ hintText: "Nom d'utilisateur...",
+ suffixIcon: Icon(Icons.person_2_rounded)),
+ cursorColor: Colors.amber,
+ cursorHeight: 15.0,
+ cursorWidth: 1.0,
+ ),
+ const SizedBox(height: 30.0),
+ TextField(
+ obscureText: !passwordVisible,
+ style: TextStyle(color: fieldColor),
+ controller: _pssw,
+ decoration: InputDecoration(
+ hintText: "Mot de passe...",
+ suffixIcon: IconButton(
+ icon: Icon(passwordVisible
+ ? Icons.visibility
+ : Icons.visibility_off),
+ onPressed: () {
+ setState(() {
+ passwordVisible = !passwordVisible;
+ });
+ },
+ )),
+ cursorColor: Colors.amber,
+ cursorHeight: 15.0,
+ cursorWidth: 1.0,
+ ),
+ const SizedBox(
+ height: 60.0,
+ ),
+ isLoading ? CircularProgressIndicator()
+ : ElevatedButton(onPressed: authenticate,
+ style: ElevatedButton.styleFrom(backgroundColor: Colors.lightGreen),
+ child: Text("Se connecter", style: TextStyle(color: Colors.black),),),
+
+ ])))),
+ );
+ }
+}
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json
index d0d98aa..d807305 100644
--- a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json
+++ b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json
@@ -1 +1,120 @@
-{"images":[{"size":"20x20","idiom":"iphone","filename":"Icon-App-20x20@2x.png","scale":"2x"},{"size":"20x20","idiom":"iphone","filename":"Icon-App-20x20@3x.png","scale":"3x"},{"size":"29x29","idiom":"iphone","filename":"Icon-App-29x29@1x.png","scale":"1x"},{"size":"29x29","idiom":"iphone","filename":"Icon-App-29x29@2x.png","scale":"2x"},{"size":"29x29","idiom":"iphone","filename":"Icon-App-29x29@3x.png","scale":"3x"},{"size":"40x40","idiom":"iphone","filename":"Icon-App-40x40@2x.png","scale":"2x"},{"size":"40x40","idiom":"iphone","filename":"Icon-App-40x40@3x.png","scale":"3x"},{"size":"57x57","idiom":"iphone","filename":"Icon-App-57x57@1x.png","scale":"1x"},{"size":"57x57","idiom":"iphone","filename":"Icon-App-57x57@2x.png","scale":"2x"},{"size":"60x60","idiom":"iphone","filename":"Icon-App-60x60@2x.png","scale":"2x"},{"size":"60x60","idiom":"iphone","filename":"Icon-App-60x60@3x.png","scale":"3x"},{"size":"20x20","idiom":"ipad","filename":"Icon-App-20x20@1x.png","scale":"1x"},{"size":"20x20","idiom":"ipad","filename":"Icon-App-20x20@2x.png","scale":"2x"},{"size":"29x29","idiom":"ipad","filename":"Icon-App-29x29@1x.png","scale":"1x"},{"size":"29x29","idiom":"ipad","filename":"Icon-App-29x29@2x.png","scale":"2x"},{"size":"40x40","idiom":"ipad","filename":"Icon-App-40x40@1x.png","scale":"1x"},{"size":"40x40","idiom":"ipad","filename":"Icon-App-40x40@2x.png","scale":"2x"},{"size":"50x50","idiom":"ipad","filename":"Icon-App-50x50@1x.png","scale":"1x"},{"size":"50x50","idiom":"ipad","filename":"Icon-App-50x50@2x.png","scale":"2x"},{"size":"72x72","idiom":"ipad","filename":"Icon-App-72x72@1x.png","scale":"1x"},{"size":"72x72","idiom":"ipad","filename":"Icon-App-72x72@2x.png","scale":"2x"},{"size":"76x76","idiom":"ipad","filename":"Icon-App-76x76@1x.png","scale":"1x"},{"size":"76x76","idiom":"ipad","filename":"Icon-App-76x76@2x.png","scale":"2x"},{"size":"83.5x83.5","idiom":"ipad","filename":"Icon-App-83.5x83.5@2x.png","scale":"2x"},{"size":"1024x1024","idiom":"ios-marketing","filename":"Icon-App-1024x1024@1x.png","scale":"1x"}],"info":{"version":1,"author":"xcode"}}
\ No newline at end of file
+{
+ "images": [
+ {
+ "filename": "Icon-App-20x20@2x.png",
+ "idiom": "universal",
+ "scale": "2x",
+ "size": "20x20",
+ "platform": "ios"
+ },
+ {
+ "filename": "Icon-App-20x20@3x.png",
+ "idiom": "universal",
+ "scale": "3x",
+ "size": "20x20",
+ "platform": "ios"
+ },
+ {
+ "filename": "Icon-App-29x29@2x.png",
+ "idiom": "universal",
+ "scale": "2x",
+ "size": "29x29",
+ "platform": "ios"
+ },
+ {
+ "filename": "Icon-App-29x29@3x.png",
+ "idiom": "universal",
+ "scale": "3x",
+ "size": "29x29",
+ "platform": "ios"
+ },
+ {
+ "filename": "Icon-App-38x38@2x.png",
+ "idiom": "universal",
+ "scale": "2x",
+ "size": "38x38",
+ "platform": "ios"
+ },
+ {
+ "filename": "Icon-App-38x38@3x.png",
+ "idiom": "universal",
+ "scale": "3x",
+ "size": "38x38",
+ "platform": "ios"
+ },
+ {
+ "filename": "Icon-App-40x40@2x.png",
+ "idiom": "universal",
+ "scale": "2x",
+ "size": "40x40",
+ "platform": "ios"
+ },
+ {
+ "filename": "Icon-App-40x40@3x.png",
+ "idiom": "universal",
+ "scale": "3x",
+ "size": "40x40",
+ "platform": "ios"
+ },
+ {
+ "filename": "Icon-App-60x60@2x.png",
+ "idiom": "universal",
+ "scale": "2x",
+ "size": "60x60",
+ "platform": "ios"
+ },
+ {
+ "filename": "Icon-App-60x60@3x.png",
+ "idiom": "universal",
+ "scale": "3x",
+ "size": "60x60",
+ "platform": "ios"
+ },
+ {
+ "filename": "Icon-App-64x64@2x.png",
+ "idiom": "universal",
+ "scale": "2x",
+ "size": "64x64",
+ "platform": "ios"
+ },
+ {
+ "filename": "Icon-App-64x64@3x.png",
+ "idiom": "universal",
+ "scale": "3x",
+ "size": "64x64",
+ "platform": "ios"
+ },
+ {
+ "filename": "Icon-App-68x68@2x.png",
+ "idiom": "universal",
+ "scale": "2x",
+ "size": "68x68",
+ "platform": "ios"
+ },
+ {
+ "filename": "Icon-App-76x76@2x.png",
+ "idiom": "universal",
+ "scale": "2x",
+ "size": "76x76",
+ "platform": "ios"
+ },
+ {
+ "filename": "Icon-App-83.5x83.5@2x.png",
+ "idiom": "universal",
+ "scale": "2x",
+ "size": "83.5x83.5",
+ "platform": "ios"
+ },
+ {
+ "filename": "Icon-App-1024x1024@1x.png",
+ "idiom": "universal",
+ "scale": "1x",
+ "size": "1024x1024",
+ "platform": "ios"
+ }
+ ],
+ "info": {
+ "author": "icons_launcher",
+ "version": 1
+ }
+}
\ No newline at end of file
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
index 74421c0..0622103 100644
Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
index 292eed9..75c6859 100644
Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
index ada6e18..f6df730 100644
Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
index f60c2fb..c5e25fb 100644
Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
index d376806..934b3de 100644
Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-38x38@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-38x38@2x.png
new file mode 100644
index 0000000..cdaa85c
Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-38x38@2x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-38x38@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-38x38@3x.png
new file mode 100644
index 0000000..251ae71
Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-38x38@3x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
index 0a04f40..be28c15 100644
Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
index ea63310..741536f 100644
Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
index ea63310..741536f 100644
Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
index 2e02c2b..79277de 100644
Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-64x64@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-64x64@2x.png
new file mode 100644
index 0000000..f35f306
Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-64x64@2x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-64x64@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-64x64@3x.png
new file mode 100644
index 0000000..fa922e9
Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-64x64@3x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-68x68@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-68x68@2x.png
new file mode 100644
index 0000000..25732b7
Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-68x68@2x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
index 53d3757..8fc51a2 100644
Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
index cfaa530..a31674b 100644
Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png differ
diff --git a/lib/custom_widgets.dart b/lib/custom_widgets.dart
index ae7dde9..e1b26b5 100644
--- a/lib/custom_widgets.dart
+++ b/lib/custom_widgets.dart
@@ -170,7 +170,6 @@ class _stockCentralSuivantState extends State {
setState(() {
newStock(index);
index += 1;
- print(transfert.objTransfert.stock_central_suivants);
});
}, style: ElevatedButton.styleFrom(backgroundColor: Colors.lightGreen),
child: Icon(Icons.add, color: Colors.black)),
@@ -179,8 +178,8 @@ class _stockCentralSuivantState extends State {
}
}
-Map oneBoucle = {};
-int count=1;
+List