diff --git a/lib/common/my_container.dart b/lib/common/widgets/my_container.dart similarity index 100% rename from lib/common/my_container.dart rename to lib/common/widgets/my_container.dart diff --git a/lib/common/my_text_field.dart b/lib/common/widgets/my_text_field.dart similarity index 81% rename from lib/common/my_text_field.dart rename to lib/common/widgets/my_text_field.dart index 35c12ca..96f0456 100644 --- a/lib/common/my_text_field.dart +++ b/lib/common/widgets/my_text_field.dart @@ -6,13 +6,23 @@ import 'package:flutter/material.dart'; class MyTextField extends StatelessWidget { final String? hintText; final bool obscureText; - const MyTextField({super.key, this.hintText, required this.obscureText}); + final String? errorText; + final TextEditingController? controller; + + const MyTextField({ + super.key, + this.hintText, + required this.obscureText, + this.controller, + this.errorText + }); @override Widget build(BuildContext context) { return Padding( padding: const EdgeInsets.symmetric(horizontal: 35), child: TextField( + controller: controller, obscureText: obscureText, decoration: InputDecoration( enabledBorder: OutlineInputBorder( @@ -20,8 +30,9 @@ class MyTextField extends StatelessWidget { borderSide: BorderSide( color: Colors.white, width: 0 - ) + ), ), + errorText: errorText, focusedBorder: OutlineInputBorder( borderRadius: BorderRadius.circular(10), borderSide: BorderSide( diff --git a/lib/data/local storage/secure_storage.dart b/lib/data/local storage/secure_storage.dart new file mode 100644 index 0000000..7dceb37 --- /dev/null +++ b/lib/data/local storage/secure_storage.dart @@ -0,0 +1,19 @@ +// ignore_for_file: prefer_const_constructors + +import 'package:flutter_secure_storage/flutter_secure_storage.dart'; +import 'dart:developer' as developer; + +class SecureStorage { + final FlutterSecureStorage storage = FlutterSecureStorage(); + + writeSecureData(String key, value) async{ + await storage.write(key: key, value: value); + } + + readSecureData(String key) async{ + String value = await storage.read(key: key) ?? 'No data found!'; + developer.log('Data read from secure storage: $value'); + + } + +} \ No newline at end of file diff --git a/lib/main.dart b/lib/main.dart index 634cf86..b870a6a 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -1,6 +1,7 @@ // ignore_for_file: prefer_const_constructors import 'package:auth_screen_ui_challenge/core/configs/theme/app_theme.dart'; +import 'package:auth_screen_ui_challenge/presentation/home%20screen/pages/home.dart'; import 'package:auth_screen_ui_challenge/presentation/registration&login/login/pages/login.dart'; import 'package:auth_screen_ui_challenge/presentation/registration&login/sign%20up/pages/sign_up.dart'; import 'package:auth_screen_ui_challenge/presentation/welcome%20screen/pages/welcome_screen.dart'; @@ -21,7 +22,8 @@ class MyApp extends StatelessWidget { home: WelcomeScreen(), routes: { '/login': (context) => const Login(), - '/register': (context) => const SignUp() + '/register': (context) => const SignUp(), + '/home': (context) => const Home() }, ); } diff --git a/lib/presentation/home screen/pages/home.dart b/lib/presentation/home screen/pages/home.dart new file mode 100644 index 0000000..cc70613 --- /dev/null +++ b/lib/presentation/home screen/pages/home.dart @@ -0,0 +1,36 @@ +// ignore_for_file: prefer_const_constructors + +import 'package:auth_screen_ui_challenge/core/configs/theme/app_colors.dart'; +import 'package:flutter/material.dart'; + +class Home extends StatelessWidget { + const Home({super.key}); + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + title: Text( + 'Home', + style: TextStyle( + color: Colors.white + ), + ), + centerTitle: true, + backgroundColor: AppColors.primary, + ), + body: Center( + child: Text( + 'you\'ve logged in successfuly:)', + style: TextStyle( + fontSize: 30, + fontFamily: 'Poppins', + fontWeight: FontWeight.w600, + color: Colors.black87 + ), + textAlign: TextAlign.center, + ), + ), + ); + } +} \ No newline at end of file diff --git a/lib/presentation/registration&login/login/API/login_api.dart b/lib/presentation/registration&login/login/API/login_api.dart new file mode 100644 index 0000000..1f903cd --- /dev/null +++ b/lib/presentation/registration&login/login/API/login_api.dart @@ -0,0 +1,69 @@ +// ignore_for_file: use_build_context_synchronously, prefer_const_constructors, prefer_const_literals_to_create_immutables + +import 'dart:developer' as developer; +import 'package:auth_screen_ui_challenge/core/configs/theme/app_colors.dart'; +import 'package:auth_screen_ui_challenge/data/local%20storage/secure_storage.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:http/http.dart'; + +class LoginApi { + final SecureStorage secureStorage = SecureStorage(); + + static Future login(String email, password, BuildContext context) async{ + + try{ + Response response = await post( + Uri.parse('https://reqres.in/api/login'), + body: { + 'email': email, + 'password': password + } + ); + + if(response.statusCode == 200){ + final String token = response.body; + SecureStorage().writeSecureData('auth_token', token); + SecureStorage().readSecureData('auth_token'); + + + return Navigator.of(context).pushNamedAndRemoveUntil( + '/home', + (route) => false + ); + }else{ + return showDialog( + context: context, + builder: (context) => CupertinoAlertDialog( + title: Text('Login Failed'), + content: Text('The email or password is incorrect'), + actions: [ + CupertinoDialogAction( + onPressed: () => Navigator.of(context).pushNamedAndRemoveUntil( + '/register', + (route) => false + ), + textStyle: TextStyle( + color: Colors.red + ), + child: Text('Register'), + ), + CupertinoDialogAction( + textStyle: TextStyle( + color: AppColors.primary + ), + child: Text('Try again'), + onPressed: () => Navigator.of(context).pop(), + ), + ], + ) + ); + } + + }catch(e){ + developer.log(e.toString()); + } + return null; + } + +} \ No newline at end of file diff --git a/lib/presentation/registration&login/login/pages/login.dart b/lib/presentation/registration&login/login/pages/login.dart index b1a3117..14f6283 100644 --- a/lib/presentation/registration&login/login/pages/login.dart +++ b/lib/presentation/registration&login/login/pages/login.dart @@ -1,8 +1,9 @@ // ignore_for_file: prefer_const_constructors, prefer_const_literals_to_create_immutables -import 'package:auth_screen_ui_challenge/common/my_container.dart'; -import 'package:auth_screen_ui_challenge/common/my_text_field.dart'; +import 'package:auth_screen_ui_challenge/common/widgets/my_container.dart'; +import 'package:auth_screen_ui_challenge/common/widgets/my_text_field.dart'; import 'package:auth_screen_ui_challenge/core/configs/theme/app_colors.dart'; +import 'package:auth_screen_ui_challenge/presentation/registration&login/login/API/login_api.dart'; import 'package:flutter/material.dart'; class Login extends StatefulWidget { @@ -13,6 +14,23 @@ class Login extends StatefulWidget { } class _LoginState extends State { + late TextEditingController emailController; + late TextEditingController passwordController; + + @override + void initState() { + emailController = TextEditingController(); + passwordController = TextEditingController(); + super.initState(); + } + + @override + void dispose() { + emailController.dispose(); + passwordController.dispose(); + super.dispose(); + } + @override Widget build(BuildContext context) { return Scaffold( @@ -76,6 +94,7 @@ class _LoginState extends State { SizedBox(height: 65,), MyTextField( + controller: emailController, hintText: 'Email', obscureText: false, ), @@ -83,6 +102,7 @@ class _LoginState extends State { SizedBox(height: 25,), MyTextField( + controller: passwordController, hintText: 'Password', obscureText: true, ), @@ -115,7 +135,9 @@ class _LoginState extends State { Padding( padding: const EdgeInsets.symmetric(horizontal: 35), child: ElevatedButton( - onPressed: (){}, + onPressed: () async{ + LoginApi.login(emailController.text.toString(), passwordController.text.toString(), context); + }, child:Padding( padding: const EdgeInsets.symmetric(horizontal: 113, vertical: 12), child: Text( diff --git a/lib/presentation/registration&login/sign up/API/sign_up_api.dart b/lib/presentation/registration&login/sign up/API/sign_up_api.dart new file mode 100644 index 0000000..33fa4dc --- /dev/null +++ b/lib/presentation/registration&login/sign up/API/sign_up_api.dart @@ -0,0 +1,66 @@ +// ignore_for_file: empty_catches, unused_local_variable +// ignore_for_file: use_build_context_synchronously, prefer_const_constructors, prefer_const_literals_to_create_immutables + +import 'package:auth_screen_ui_challenge/core/configs/theme/app_colors.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:http/http.dart'; +import 'dart:developer' as developer; + +class SignUpApi { + + static Future signUp(String email, password, BuildContext context) async{ + + try{ + Response response = await post( + Uri.parse('https://reqres.in/api/register'), + body: { + 'email': email, + 'password': password + } + ); + + if(response.statusCode == 200){ + return showDialog( + context: context, + builder: (context) => CupertinoAlertDialog( + title: Text('Registration is done'), + content: Text('go to login page and login to your account'), + actions: [ + CupertinoDialogAction( + onPressed: () => Navigator.of(context).pushNamedAndRemoveUntil( + '/login', + (route) => false + ), + textStyle: TextStyle( + color: AppColors.primary + ), + child: Text('Login'), + ), + ], + ) + ); + }else{ + return showDialog( + context: context, + builder: (context) => CupertinoAlertDialog( + title: Text('account doesn\'t exist'), + content: Text('the email or the password are uncorrect'), + actions: [ + CupertinoDialogAction( + textStyle: TextStyle( + color: AppColors.primary + ), + child: Text('Try again'), + onPressed: () => Navigator.of(context).pop(), + ), + ], + ) + ); + } + }catch(e){ + developer.log(e.toString()); + } + return null; + } +} \ No newline at end of file diff --git a/lib/presentation/registration&login/sign up/pages/sign_up.dart b/lib/presentation/registration&login/sign up/pages/sign_up.dart index 1e2e04c..9012bf7 100644 --- a/lib/presentation/registration&login/sign up/pages/sign_up.dart +++ b/lib/presentation/registration&login/sign up/pages/sign_up.dart @@ -1,8 +1,9 @@ // ignore_for_file: prefer_const_constructors, prefer_const_literals_to_create_immutables -import 'package:auth_screen_ui_challenge/common/my_container.dart'; -import 'package:auth_screen_ui_challenge/common/my_text_field.dart'; +import 'package:auth_screen_ui_challenge/common/widgets/my_container.dart'; +import 'package:auth_screen_ui_challenge/common/widgets/my_text_field.dart'; import 'package:auth_screen_ui_challenge/core/configs/theme/app_colors.dart'; +import 'package:auth_screen_ui_challenge/presentation/registration&login/sign%20up/API/sign_up_api.dart'; import 'package:flutter/material.dart'; class SignUp extends StatefulWidget { @@ -13,6 +14,28 @@ class SignUp extends StatefulWidget { } class _SignUpState extends State { + + late TextEditingController emailController; + late TextEditingController passwordController; + late TextEditingController confirmController; + late bool isCorrect = false; + + @override + void initState() { + emailController = TextEditingController(); + passwordController = TextEditingController(); + confirmController = TextEditingController(); + super.initState(); + } + + @override + void dispose() { + emailController.dispose(); + passwordController.dispose(); + confirmController.dispose(); + super.dispose(); + } + @override Widget build(BuildContext context) { return Scaffold( @@ -76,6 +99,7 @@ class _SignUpState extends State { SizedBox(height: 65,), MyTextField( + controller: emailController, hintText: 'Email', obscureText: false, ), @@ -83,6 +107,7 @@ class _SignUpState extends State { SizedBox(height: 25,), MyTextField( + controller: passwordController, hintText: 'Password', obscureText: true, ), @@ -90,6 +115,8 @@ class _SignUpState extends State { SizedBox(height: 25,), MyTextField( + controller: confirmController, + errorText: isCorrect ? 'your input doesn\'t match your password' : null , hintText: 'Confirm Password', obscureText: true, ), @@ -99,7 +126,16 @@ class _SignUpState extends State { Padding( padding: const EdgeInsets.symmetric(horizontal: 35), child: ElevatedButton( - onPressed: (){}, + onPressed: () async{ + setState(() { + if(confirmController.text == passwordController.text){ + isCorrect = false; + }else{ + isCorrect = true; + } + }); + await SignUpApi.signUp(emailController.text.toString(), passwordController.text.toString(), context); + }, child:Padding( padding: const EdgeInsets.symmetric(horizontal: 108, vertical: 12), child: Text( diff --git a/lib/presentation/welcome screen/pages/welcome_screen.dart b/lib/presentation/welcome screen/pages/welcome_screen.dart index 7afb660..00ad61c 100644 --- a/lib/presentation/welcome screen/pages/welcome_screen.dart +++ b/lib/presentation/welcome screen/pages/welcome_screen.dart @@ -37,107 +37,109 @@ class _WelcomeScreenState extends State { Widget _buildFg(){ return SafeArea( - child: Padding( - padding: const EdgeInsets.symmetric(vertical: 15), - child: Column( - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Image.asset( - 'assets/welcome image.png', - height: 422, - width: 385, - ), - - SizedBox(height: 20,), - - Text( - 'Discover Your', - style: TextStyle( - color: AppColors.primary, - fontWeight: FontWeight.w600, - fontSize: 35, - fontFamily: 'Poppins' + child: SingleChildScrollView( + child: Padding( + padding: const EdgeInsets.symmetric(vertical: 15), + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Image.asset( + 'assets/welcome image.png', + height: 422, + width: 385, ), - ), - Text( - ' Dream Job here', - style: TextStyle( - color: AppColors.primary, - fontWeight: FontWeight.w600, - fontSize: 35, - fontFamily: 'Poppins' + + SizedBox(height: 20,), + + Text( + 'Discover Your', + style: TextStyle( + color: AppColors.primary, + fontWeight: FontWeight.w600, + fontSize: 35, + fontFamily: 'Poppins' + ), ), - ), - - SizedBox(height: 20,), - - Padding( - padding: const EdgeInsets.symmetric(horizontal: 35), - child: Text( - 'Explore all the existing job roles based on your interest and study major', + Text( + ' Dream Job here', style: TextStyle( - color: AppColors.text, - fontWeight: FontWeight.w400, - fontSize: 13.5, + color: AppColors.primary, + fontWeight: FontWeight.w600, + fontSize: 35, fontFamily: 'Poppins' ), - textAlign: TextAlign.center, ), - ), - - SizedBox(height: 90,), - - Padding( - padding: const EdgeInsets.symmetric(horizontal: 40), - child: Row( - children: [ - ElevatedButton( - onPressed: (){ - Navigator.of(context).pushNamedAndRemoveUntil( - '/login', - (route) => false - ); - }, - child: Padding( - padding: const EdgeInsets.symmetric(horizontal: 23, vertical: 13), - child: Text( - 'Login', - style: TextStyle( - fontSize: 20, - fontWeight: FontWeight.w600, - fontFamily: 'Poppins', - color: Colors.white - ), - ), - ) - ), - - SizedBox(width: 25,), - - TextButton( - onPressed: (){ - Navigator.of(context).pushNamedAndRemoveUntil( - '/register', - (route) => false - ); - }, - child: Padding( - padding: const EdgeInsets.symmetric(horizontal: 23), - child: Text( - 'Register', - style: TextStyle( - fontSize: 20, - fontWeight: FontWeight.w600, - fontFamily: 'Poppins', - color: Colors.black87 - ), - ), - ) + + SizedBox(height: 20,), + + Padding( + padding: const EdgeInsets.symmetric(horizontal: 35), + child: Text( + 'Explore all the existing job roles based on your interest and study major', + style: TextStyle( + color: AppColors.text, + fontWeight: FontWeight.w400, + fontSize: 13.5, + fontFamily: 'Poppins' ), - ], + textAlign: TextAlign.center, + ), ), - ) - ], + + SizedBox(height: 90,), + + Padding( + padding: const EdgeInsets.symmetric(horizontal: 40), + child: Row( + children: [ + ElevatedButton( + onPressed: (){ + Navigator.of(context).pushNamedAndRemoveUntil( + '/login', + (route) => false + ); + }, + child: Padding( + padding: const EdgeInsets.symmetric(horizontal: 23, vertical: 13), + child: Text( + 'Login', + style: TextStyle( + fontSize: 20, + fontWeight: FontWeight.w600, + fontFamily: 'Poppins', + color: Colors.white + ), + ), + ) + ), + + SizedBox(width: 25,), + + TextButton( + onPressed: (){ + Navigator.of(context).pushNamedAndRemoveUntil( + '/register', + (route) => false + ); + }, + child: Padding( + padding: const EdgeInsets.symmetric(horizontal: 23), + child: Text( + 'Register', + style: TextStyle( + fontSize: 20, + fontWeight: FontWeight.w600, + fontFamily: 'Poppins', + color: Colors.black87 + ), + ), + ) + ), + ], + ), + ) + ], + ), ), ), ); diff --git a/linux/flutter/generated_plugin_registrant.cc b/linux/flutter/generated_plugin_registrant.cc index e71a16d..d0e7f79 100644 --- a/linux/flutter/generated_plugin_registrant.cc +++ b/linux/flutter/generated_plugin_registrant.cc @@ -6,6 +6,10 @@ #include "generated_plugin_registrant.h" +#include void fl_register_plugins(FlPluginRegistry* registry) { + g_autoptr(FlPluginRegistrar) flutter_secure_storage_linux_registrar = + fl_plugin_registry_get_registrar_for_plugin(registry, "FlutterSecureStorageLinuxPlugin"); + flutter_secure_storage_linux_plugin_register_with_registrar(flutter_secure_storage_linux_registrar); } diff --git a/linux/flutter/generated_plugins.cmake b/linux/flutter/generated_plugins.cmake index 2e1de87..b29e9ba 100644 --- a/linux/flutter/generated_plugins.cmake +++ b/linux/flutter/generated_plugins.cmake @@ -3,6 +3,7 @@ # list(APPEND FLUTTER_PLUGIN_LIST + flutter_secure_storage_linux ) list(APPEND FLUTTER_FFI_PLUGIN_LIST diff --git a/macos/Flutter/GeneratedPluginRegistrant.swift b/macos/Flutter/GeneratedPluginRegistrant.swift index cccf817..15a1671 100644 --- a/macos/Flutter/GeneratedPluginRegistrant.swift +++ b/macos/Flutter/GeneratedPluginRegistrant.swift @@ -5,6 +5,10 @@ import FlutterMacOS import Foundation +import flutter_secure_storage_macos +import path_provider_foundation func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { + FlutterSecureStoragePlugin.register(with: registry.registrar(forPlugin: "FlutterSecureStoragePlugin")) + PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) } diff --git a/pubspec.lock b/pubspec.lock index b9fd799..e9d7dc5 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -57,6 +57,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.3.1" + ffi: + dependency: transitive + description: + name: ffi + sha256: "16ed7b077ef01ad6170a3d0c57caa4a112a38d7a2ed5602e0aca9ca6f3d98da6" + url: "https://pub.dev" + source: hosted + version: "2.1.3" flutter: dependency: "direct main" description: flutter @@ -70,11 +78,88 @@ packages: url: "https://pub.dev" source: hosted version: "4.0.0" + flutter_secure_storage: + dependency: "direct main" + description: + name: flutter_secure_storage + sha256: "165164745e6afb5c0e3e3fcc72a012fb9e58496fb26ffb92cf22e16a821e85d0" + url: "https://pub.dev" + source: hosted + version: "9.2.2" + flutter_secure_storage_linux: + dependency: transitive + description: + name: flutter_secure_storage_linux + sha256: "4d91bfc23047422cbcd73ac684bc169859ee766482517c22172c86596bf1464b" + url: "https://pub.dev" + source: hosted + version: "1.2.1" + flutter_secure_storage_macos: + dependency: transitive + description: + name: flutter_secure_storage_macos + sha256: "1693ab11121a5f925bbea0be725abfcfbbcf36c1e29e571f84a0c0f436147a81" + url: "https://pub.dev" + source: hosted + version: "3.1.2" + flutter_secure_storage_platform_interface: + dependency: transitive + description: + name: flutter_secure_storage_platform_interface + sha256: cf91ad32ce5adef6fba4d736a542baca9daf3beac4db2d04be350b87f69ac4a8 + url: "https://pub.dev" + source: hosted + version: "1.1.2" + flutter_secure_storage_web: + dependency: transitive + description: + name: flutter_secure_storage_web + sha256: f4ebff989b4f07b2656fb16b47852c0aab9fed9b4ec1c70103368337bc1886a9 + url: "https://pub.dev" + source: hosted + version: "1.2.1" + flutter_secure_storage_windows: + dependency: transitive + description: + name: flutter_secure_storage_windows + sha256: b20b07cb5ed4ed74fc567b78a72936203f587eba460af1df11281c9326cd3709 + url: "https://pub.dev" + source: hosted + version: "3.1.2" flutter_test: dependency: "direct dev" description: flutter source: sdk version: "0.0.0" + flutter_web_plugins: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" + http: + dependency: "direct main" + description: + name: http + sha256: b9c29a161230ee03d3ccf545097fccd9b87a5264228c5d348202e0f0c28f9010 + url: "https://pub.dev" + source: hosted + version: "1.2.2" + http_parser: + dependency: transitive + description: + name: http_parser + sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b" + url: "https://pub.dev" + source: hosted + version: "4.0.2" + js: + dependency: transitive + description: + name: js + sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3 + url: "https://pub.dev" + source: hosted + version: "0.6.7" leak_tracker: dependency: transitive description: @@ -139,6 +224,70 @@ packages: url: "https://pub.dev" source: hosted version: "1.9.0" + path_provider: + dependency: transitive + description: + name: path_provider + sha256: fec0d61223fba3154d87759e3cc27fe2c8dc498f6386c6d6fc80d1afdd1bf378 + url: "https://pub.dev" + source: hosted + version: "2.1.4" + path_provider_android: + dependency: transitive + description: + name: path_provider_android + sha256: "6f01f8e37ec30b07bc424b4deabac37cacb1bc7e2e515ad74486039918a37eb7" + url: "https://pub.dev" + source: hosted + version: "2.2.10" + path_provider_foundation: + dependency: transitive + description: + name: path_provider_foundation + sha256: f234384a3fdd67f989b4d54a5d73ca2a6c422fa55ae694381ae0f4375cd1ea16 + url: "https://pub.dev" + source: hosted + version: "2.4.0" + path_provider_linux: + dependency: transitive + description: + name: path_provider_linux + sha256: f7a1fe3a634fe7734c8d3f2766ad746ae2a2884abe22e241a8b301bf5cac3279 + url: "https://pub.dev" + source: hosted + version: "2.2.1" + path_provider_platform_interface: + dependency: transitive + description: + name: path_provider_platform_interface + sha256: "88f5779f72ba699763fa3a3b06aa4bf6de76c8e5de842cf6f29e2e06476c2334" + url: "https://pub.dev" + source: hosted + version: "2.1.2" + path_provider_windows: + dependency: transitive + description: + name: path_provider_windows + sha256: bd6f00dbd873bfb70d0761682da2b3a2c2fccc2b9e84c495821639601d81afe7 + url: "https://pub.dev" + source: hosted + version: "2.3.0" + platform: + dependency: transitive + description: + name: platform + sha256: "9b71283fc13df574056616011fb138fd3b793ea47cc509c189a6c3fa5f8a1a65" + url: "https://pub.dev" + source: hosted + version: "3.1.5" + plugin_platform_interface: + dependency: transitive + description: + name: plugin_platform_interface + sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02" + url: "https://pub.dev" + source: hosted + version: "2.1.8" sky_engine: dependency: transitive description: flutter @@ -192,6 +341,14 @@ packages: url: "https://pub.dev" source: hosted version: "0.7.2" + typed_data: + dependency: transitive + description: + name: typed_data + sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c + url: "https://pub.dev" + source: hosted + version: "1.3.2" vector_math: dependency: transitive description: @@ -208,6 +365,30 @@ packages: url: "https://pub.dev" source: hosted version: "14.2.5" + web: + dependency: transitive + description: + name: web + sha256: cd3543bd5798f6ad290ea73d210f423502e71900302dde696f8bff84bf89a1cb + url: "https://pub.dev" + source: hosted + version: "1.1.0" + win32: + dependency: transitive + description: + name: win32 + sha256: "68d1e89a91ed61ad9c370f9f8b6effed9ae5e0ede22a270bdfa6daf79fc2290a" + url: "https://pub.dev" + source: hosted + version: "5.5.4" + xdg_directories: + dependency: transitive + description: + name: xdg_directories + sha256: faea9dee56b520b55a566385b84f2e8de55e7496104adada9962e0bd11bcff1d + url: "https://pub.dev" + source: hosted + version: "1.0.4" sdks: dart: ">=3.5.3 <4.0.0" - flutter: ">=3.18.0-18.0.pre.54" + flutter: ">=3.22.0" diff --git a/pubspec.yaml b/pubspec.yaml index 7fbb0c3..17da1c4 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -35,6 +35,8 @@ dependencies: # The following adds the Cupertino Icons font to your application. # Use with the CupertinoIcons class for iOS style icons. cupertino_icons: ^1.0.8 + http: ^1.2.2 + flutter_secure_storage: ^9.2.2 dev_dependencies: flutter_test: diff --git a/windows/flutter/generated_plugin_registrant.cc b/windows/flutter/generated_plugin_registrant.cc index 8b6d468..0c50753 100644 --- a/windows/flutter/generated_plugin_registrant.cc +++ b/windows/flutter/generated_plugin_registrant.cc @@ -6,6 +6,9 @@ #include "generated_plugin_registrant.h" +#include void RegisterPlugins(flutter::PluginRegistry* registry) { + FlutterSecureStorageWindowsPluginRegisterWithRegistrar( + registry->GetRegistrarForPlugin("FlutterSecureStorageWindowsPlugin")); } diff --git a/windows/flutter/generated_plugins.cmake b/windows/flutter/generated_plugins.cmake index b93c4c3..4fc759c 100644 --- a/windows/flutter/generated_plugins.cmake +++ b/windows/flutter/generated_plugins.cmake @@ -3,6 +3,7 @@ # list(APPEND FLUTTER_PLUGIN_LIST + flutter_secure_storage_windows ) list(APPEND FLUTTER_FFI_PLUGIN_LIST