Dashboard screen changes

master
Sneha 8 hours ago
parent 63f62f5e78
commit 353cf86985

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

@ -1,6 +1,13 @@
import 'dart:convert';
import 'dart:io';
import 'package:flutter_secure_storage/flutter_secure_storage.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:image_picker/image_picker.dart';
import 'package:supplier_new/common/settings.dart'; import 'package:supplier_new/common/settings.dart';
import '../login/login.dart';
class DashboardScreen extends StatefulWidget { class DashboardScreen extends StatefulWidget {
const DashboardScreen({super.key}); const DashboardScreen({super.key});
@ -9,11 +16,673 @@ class DashboardScreen extends StatefulWidget {
} }
class _DashboardScreenState extends State<DashboardScreen> { class _DashboardScreenState extends State<DashboardScreen> {
int _currentIndex = 0;
final ImagePicker _picker = ImagePicker();
final storage = FlutterSecureStorage(
aOptions: AndroidOptions(
resetOnError: true,
encryptedSharedPreferences: true,
),
);
final GlobalKey<ScaffoldState> _scaffoldKey = GlobalKey<ScaffoldState>();
// Define a list of widgets for each screen
final List<Widget> _screens = [
HomeScreen(),
HomeScreen(),
HomeScreen(),
HomeScreen(),
HomeScreen(),
];
// List of bottom navigation bar items
final List<BottomNavigationBarItem> _bottomNavItems = [
BottomNavigationBarItem(
icon:Padding(
padding: EdgeInsets.fromLTRB(0,5,0,0), // Adjust height to control spacing
child:ImageIcon(AssetImage('images/homeBottomIcon.png')),),
// Replace with your image path
label: "Home",
),
BottomNavigationBarItem(
icon: Padding(
padding: EdgeInsets.fromLTRB(0,5,0,0), // Adjust height to control spacing
child: ImageIcon(AssetImage('images/ordersBottomIcon.png')),
),
label: "Orders",
),
BottomNavigationBarItem(
icon: Padding(
padding: EdgeInsets.fromLTRB(0,5,0,0), // Adjust height to control spacing
child: ImageIcon(AssetImage('images/plansBottomIcon.png')),
), // Replace with your image path
label: "Plans",
),
BottomNavigationBarItem(
icon: Padding(
padding: EdgeInsets.fromLTRB(0,5,0,0), // Adjust height to control spacing
child:ImageIcon(AssetImage('images/resourcesBottomIcon.png')),),
// Replace with your image path
label: "Resources",
),
BottomNavigationBarItem(
icon:Padding(
padding: EdgeInsets.fromLTRB(0,5,0,0), // Adjust height to control spacing
child:ImageIcon(AssetImage('images/financialsBottomIcon.png')),),
// Replace with your image path
label: "Financials",
),
];
void _onItemTapped(int index) {
setState(() {
_currentIndex = index;
});
}
Future pickImageFromGallery() async {
try {
final image = await _picker.pickImage(source: ImageSource.gallery);
if (image == null) return;
final imageTemp = File(image.path);
AppSettings.preLoaderDialog(context);
bool isOnline = await AppSettings.internetConnectivity();
if(isOnline) {
var res = await AppSettings.uploadrofileImageHTTPNew(image);
print(jsonDecode(res));
Navigator.of(context, rootNavigator: true).pop();
setState(() {
AppSettings.profilePictureUrl = jsonDecode(res)['picture'];
});
AppSettings.saveData('profile', jsonDecode(res)['picture'], 'STRING');
}
else{
Navigator.of(context, rootNavigator: true).pop();
AppSettings.longFailedToast('Please check interent');
}
} on PlatformException catch (e) {
Navigator.of(context, rootNavigator: true).pop();
AppSettings.longFailedToast('Failed to pick image: $e');
}
}
Future takeImageFromCamera() async {
try {
final image = await _picker.pickImage(source: ImageSource.camera);
if (image == null) return;
final imageTemp = File(image.path);
AppSettings.preLoaderDialog(context);
bool isOnline = await AppSettings.internetConnectivity();
if(isOnline){
var res = await AppSettings.uploadrofileImageHTTPNew(image);
print(jsonDecode(res));
Navigator.of(context, rootNavigator: true).pop();
setState(() {
AppSettings.profilePictureUrl = jsonDecode(res)['picture'];
});
AppSettings.saveData('profile', jsonDecode(res)['picture'], 'STRING');
}
else{
Navigator.of(context, rootNavigator: true).pop();
AppSettings.longFailedToast('Please check interent');
}
} on PlatformException catch (e) {
Navigator.of(context, rootNavigator: true).pop();
AppSettings.longFailedToast('Failed to pick image: $e');
}
}
showLogoutAlertDialog(context) {
return showDialog(
context: context,
barrierDismissible: false,
builder: (BuildContext context) {
return StatefulBuilder(
builder: (BuildContext context, StateSetter setState) {
return AlertDialog(
backgroundColor: Color(0XFFFFFFFF),// Set your desired background color
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(12), // Optional: Rounded corners
),
title: Center(child: Text('Logout?',style:fontTextStyle(16,Color(0XFF101214),FontWeight.w700)),),
actions: <Widget>[
Center(
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
Expanded(child: GestureDetector(
onTap: (){
Navigator.of(context).pop();
},
child: Container(
decoration: BoxDecoration(
shape: BoxShape.rectangle,
color: Color(0XFFFFFFFF),
border: Border.all(
width: 1,
color: Color(0XFF1D7AFC)),
borderRadius: BorderRadius.circular(
12,
)),
alignment: Alignment.center,
child: Visibility(
visible: true,
child: Padding(
padding: EdgeInsets.fromLTRB(16,12,16,12),
child: Text(
'Cancel',
style: fontTextStyle(
12,
Color(0XFF1D7AFC),
FontWeight.w600)),
),
),
),
),),
SizedBox(width:MediaQuery.of(context).size.width * .016,),
Expanded(child: GestureDetector(
onTap: ()async{
await storage.deleteAll();
await Navigator.pushAndRemoveUntil(
context,
MaterialPageRoute(builder: (context) => Login()),
(Route<dynamic> route) => false,
);
},
child: Container(
decoration: BoxDecoration(
shape: BoxShape.rectangle,
color: Color(0XFFE2483D),
border: Border.all(
width: 1,
color: Color(0XFFE2483D)),
borderRadius: BorderRadius.circular(
12,
)),
alignment: Alignment.center,
child: Visibility(
visible: true,
child: Padding(
padding: EdgeInsets.fromLTRB(16,12,16,12),
child: Text(
'Logout',
style: fontTextStyle(
12,
Color(0XFFFFFFFF),
FontWeight.w600)),
),
),
)
),)
],
),
),
]);
});
});
}
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return WillPopScope(
appBar:AppSettings.appBar('Dashboard'), onWillPop: () async {
if (_scaffoldKey.currentState?.isDrawerOpen ?? false) {
// If the drawer is open, close it
_scaffoldKey.currentState?.openEndDrawer();
return false; // Prevent the default back action (exit the app)
}
else if (_currentIndex == 2) {
final shouldPop = await showDialog<bool>(
context: context,
builder: (context) {
return AlertDialog(
backgroundColor: Color(0XFFFFFFFF),// Set your desired background color
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(12), // Optional: Rounded corners
),
title: Center(child: Text('Do you want to exit app?',style:fontTextStyle(16,Color(0XFF101214),FontWeight.w700)),),
actionsAlignment: MainAxisAlignment.spaceBetween,
actions: [
Center(
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
Expanded(child: GestureDetector(
onTap: (){
Navigator.of(context).pop(false);
},
child: Container(
decoration: BoxDecoration(
shape: BoxShape.rectangle,
color: Color(0XFFFFFFFF),
border: Border.all(
width: 1,
color: Color(0XFF1D7AFC)),
borderRadius: BorderRadius.circular(
12,
)),
alignment: Alignment.center,
child: Visibility(
visible: true,
child: Padding(
padding: EdgeInsets.fromLTRB(16,12,16,12),
child: Text(
'Cancel',
style: fontTextStyle(
12,
Color(0XFF1D7AFC),
FontWeight.w600)),
),
),
),
),),
SizedBox(width:MediaQuery.of(context).size.width * .016,),
Expanded(child: GestureDetector(
onTap: ()async{
SystemNavigator.pop();
},
child: Container(
decoration: BoxDecoration(
shape: BoxShape.rectangle,
color: Color(0XFF1D7AFC),
border: Border.all(
width: 1,
color: Color(0XFF1D7AFC)),
borderRadius: BorderRadius.circular(
12,
)),
alignment: Alignment.center,
child: Visibility(
visible: true,
child: Padding(
padding: EdgeInsets.fromLTRB(16,12,16,12),
child: Text(
'Confirm',
style: fontTextStyle(
12,
Color(0XFFFFFFFF),
FontWeight.w600)),
),
),
)
),)
],
),
),
],
);
},
);
return shouldPop!;
}
else {
setState(() {
_currentIndex = 2;
});
return false;
}
},
child: Scaffold(
key: _scaffoldKey,
backgroundColor: Colors.white,
appBar: AppBar(
backgroundColor: Colors.white,
elevation: 0,
scrolledUnderElevation: 0,
title: Text(_currentIndex==2?'Aquinto':_currentIndex==0?'History':_currentIndex==1?'Usage':_currentIndex==3?'Water Levels':'Resources',style: fontTextStyle(14,Color(0XFF2A2A2A),FontWeight.w500),),
iconTheme: IconThemeData(color: Color(0XFF2A2A2A)),
actions: [
Row(
children: [
Padding(padding: EdgeInsets.fromLTRB(10,10,0,10),
child: IconButton(
icon: Image(
image: AssetImage('images/calendar_appbar.png')
),
onPressed: (){
},
),
),
Padding(padding: EdgeInsets.fromLTRB(0,10,10,10),
child: IconButton(
icon: Image.asset(
'images/notification_appbar.png', // Example URL image
),
onPressed: (){
},
),
)
],
)
],
leading: IconButton(
icon: Icon(Icons.menu),
onPressed: () {
_scaffoldKey.currentState?.openDrawer();
},
),
),
drawer: Drawer(
width: MediaQuery.of(context).size.width,
backgroundColor: Colors.white,
child: Padding(
padding: EdgeInsets.all(8),
child: Container(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start,
children: [
SizedBox(height:MediaQuery.of(context).size.height * .05,),
Row(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start,
children: [
/* GestureDetector(
onTap: (){
Navigator.of(context).pop(true);
},
child: Image.asset('images/appbar_backbutton.png',height: 25,width: 25,color: Color(0XFF2A2A2A),),
),*/
SizedBox(width:MediaQuery.of(context).size.width * .04,),
Text(
'Menu',
style: fontTextStyle(14,Color(0XFF2A2A2A),FontWeight.w500),
),
],
),
SizedBox(height:MediaQuery.of(context).size.height * .016,),
Padding( padding: EdgeInsets.all(16),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start,
children: [
/*CircleAvatar(
radius: 50, // Adjust the size of the circle
backgroundColor: Colors.grey[200],
backgroundImage:AppSettings.profilePictureUrl !=
'' &&
AppSettings.profilePictureUrl !=
'null'?NetworkImage(AppSettings
.profilePictureUrl) as ImageProvider: AssetImage('images/profile_pic.png',), // Your profile image
),*/
AppSettings.loginType.toString().toLowerCase()=='user'?
GestureDetector(
onTap: () {
/*Navigator.push(
context,
new MaterialPageRoute(
builder: (__) => new ImageZoomPage(
imageName: 'Profile',
imageDetails: AppSettings.profilePictureUrl)));*/
},
child: Stack(
alignment: Alignment.center, // Centers the stack's children
children: [
// CircleAvatar background
ClipOval(
child: Container(
height: 100, // Ensure the container's height is the same as the profile image
width: 100,
decoration: BoxDecoration(
color: Colors.transparent,
shape: BoxShape.circle, // Makes the container circular
image: DecorationImage(
image: (AppSettings.profilePictureUrl !=
'' &&
AppSettings.profilePictureUrl !=
'null')
? NetworkImage(AppSettings.profilePictureUrl)
as ImageProvider
: AssetImage(
"images/profile_pic.png"), // picked file
fit: BoxFit.cover)),
),
),
// Positioned image on top of CircleAvatar
Positioned(
bottom: 0, // Adjust position as needed
right: 0, // Adjust position as needed
child: Container(
width: 30,
height: 30,
decoration: BoxDecoration(
boxShadow: [
BoxShadow(
color: Colors.black.withOpacity(0.3),
blurRadius: 4,
offset: Offset(0, 2), // Shadow to make the edit icon pop
),
],
shape: BoxShape.circle,
color: Colors.white, // Background for the overlay
),
child: GestureDetector(
onTap: (){
showModalBottomSheet<void>(
context: context,
builder: (BuildContext context) {
return SizedBox(
height: 200,
child: Center(
child: Row(
mainAxisAlignment:
MainAxisAlignment.center,
children: <Widget>[
GestureDetector(
child: Icon(
Icons.camera_alt_outlined,
size: 100,
color: primaryColor,
),
onTap: () async {
await takeImageFromCamera();
Navigator.pop(context);
},
),
SizedBox(
width: MediaQuery.of(context)
.size
.width *
.20,
),
GestureDetector(
child: Icon(
Icons.photo,
size: 100,
color: primaryColor,
),
onTap: () async {
await pickImageFromGallery();
Navigator.pop(context);
},
),
],
),
),
);
});
},
child: Image.asset(
'images/edit_profile.png', // Ensure the image path is correct
fit: BoxFit.cover,
),
),
),
),
],
),
):ClipOval(
child: Container(
height: 100, // Ensure the container's height is the same as the profile image
width: 100,
decoration: BoxDecoration(
color: Colors.transparent,
shape: BoxShape.circle, // Makes the container circular
image: DecorationImage(
image: (AssetImage(
"images/profile_pic.png")), // picked file
fit: BoxFit.contain)),
),
),
SizedBox(height:MediaQuery.of(context).size.height * .016,),
Text(
AppSettings.userName,
style: fontTextStyle(20,Color(0XFF2A2A2A),FontWeight.w500),
),
Visibility(
visible:AppSettings.loginType.toString().toLowerCase()=='user',
child: Text(
AppSettings.email,
style: fontTextStyle(14,Color(0XFF2A2A2A),FontWeight.w400),
),),
Text(
AppSettings.phoneNumber,
style: fontTextStyle(14,Color(0XFF2A2A2A),FontWeight.w400),
),
],
),),
SizedBox(height:MediaQuery.of(context).size.height * .024,),
ListTile(
title: Row(
children: [
Image(
image: const AssetImage('images/logout_drawer.png'),
height: 25,
width: 25,
fit: BoxFit.fill),
SizedBox(width:MediaQuery.of(context).size.width * .04,),
Text('Logout', style: fontTextStyle(16,Color(0XFFE2483D),FontWeight.w400),),
],
),
onTap: () {
showLogoutAlertDialog(context);
},
),
],
),
),
)
),
body:
_screens[_currentIndex],
/*_body(),,*/
bottomNavigationBar: Padding(
padding:EdgeInsets.fromLTRB(0, 0, 0, 0) ,
child: BottomNavigationBar(
backgroundColor: Color(0XFFFFFFFF),
items: _bottomNavItems,
selectedItemColor: primaryColor, // Color of selected icon and text
unselectedItemColor: Color(0XFF939495), // Color of unselected icon and text
selectedLabelStyle: fontTextStyleHeight(10,primaryColor,FontWeight.w400,MediaQuery.of(context).size.height * .0032,),
unselectedLabelStyle: fontTextStyleHeight(10,Color(0XFF939495),FontWeight.w400,MediaQuery.of(context).size.height * .0032,),
currentIndex: _currentIndex,
onTap: _onItemTapped,
/*onTap: (index) {
switch (index) {
case 0:
Navigator.push(
context,
MaterialPageRoute(builder: (context) => Resources()),
);
break;
case 1:
Navigator.push(
context,
MaterialPageRoute(builder: (context) => TankLevels()),
);
break;
case 3:
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => Consumption()),
);
break;
case 4:
Navigator.push(
context,
MaterialPageRoute(builder: (context) => SupplierManagementDashboard()),
);
break;
}
},*/
type: BottomNavigationBarType
.fixed, // Ensures all 6 items are visible
),
)
));
}
}
class HomeScreen extends StatefulWidget {
const HomeScreen({super.key});
@override
State<HomeScreen> createState() => _HomeScreenState();
}
class _HomeScreenState extends State<HomeScreen> {
@override
Widget build(BuildContext context) {
return SingleChildScrollView(
child: Padding(
padding: EdgeInsets.all(10),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start,
children: [
Text(
"Hello! Welcome to ${AppSettings.buildingName}",
style: fontTextStyle(16,Color(0XFF2A2A2A),FontWeight.w600),
),
SizedBox(height:MediaQuery.of(context).size.height * .03,),
],
)
),
); );
} }
} }
// Screens for each bottom navigation item

@ -22,6 +22,28 @@ TextStyle fontTextStyle(double fontSize,Color fontColor,FontWeight weight) {
); );
} }
TextStyle fontTextStyleHeight(double fontSize,Color fontColor,FontWeight weight,double height) {
return GoogleFonts.inter(
textStyle: TextStyle(
fontSize: fontSize,
fontWeight: weight,
color:fontColor,
height: height
),
);
}
TextStyle fontTextStyleUnderline(double fontSize,Color fontColor,FontWeight weight) {
return GoogleFonts.inter(
textStyle: TextStyle(
fontSize: fontSize,
fontWeight: weight,
color:fontColor,
decoration: TextDecoration.underline,
),
);
}
InputDecoration textFormFieldDecoration(IconData icon,var text){ InputDecoration textFormFieldDecoration(IconData icon,var text){
return InputDecoration( return InputDecoration(
counterText: '', counterText: '',
@ -51,6 +73,36 @@ InputDecoration textFormFieldDecoration(IconData icon,var text){
); );
} }
InputDecoration textFormFieldDecorationHintText(IconData icon,var text){
return InputDecoration(
counterText: '',
filled: false,
fillColor: Colors.white,
/*prefixIcon: Icon(
icon,
color: Colors.white,
),*/
border: OutlineInputBorder(
borderRadius: BorderRadius.circular(15.0),
borderSide: BorderSide(color: greyColor,
width: 1, )),
focusedBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(15.0),
borderSide: BorderSide(color: Color(0XFF8270DB),width: 2,),
),
enabledBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(15.0),
borderSide: BorderSide(color: greyColor),
),
hintText: text,
hintStyle:fontTextStyle(14,Color(0XFF7E7F80),FontWeight.w400),
/* TextStyle(color: greyColor, fontWeight: FontWeight.bold //<-- SEE HERE
),*/
);
}
TextStyle PreloaderText() { TextStyle PreloaderText() {
return TextStyle(color:primaryColor); return TextStyle(color:primaryColor);
} }
@ -76,13 +128,15 @@ class AppSettings{
static String customerIdsign = ''; static String customerIdsign = '';
static String profileImage = ''; static String profileImage = '';
static String preloadText = 'Please wait'; static String preloadText = 'Please wait';
static String profilePictureUrl = '';
static String host = 'http://armintaaqua.com:3000/api/'; static String host = 'http://armintaaqua.com:3000/api/';
static String loginUrl = host + 'supplierlogin'; static String loginUrl = host + 'supplierlogin';
static String signUpUrl = host + 'suppliers';
static String forgotPasswordUrl = host + 'forgotpassword'; static String forgotPasswordUrl = host + 'forgotpassword';
static String resetTokenUrl = host + 'reset_token'; static String resetTokenUrl = host + 'reset_token';
static String verifyPhnUrl = host + 'phone'; static String verifyPhnUrl = host + 'phone';
static String uploadPicUrl = host + 'uploads-user';
// Shared preferences save,get and clear data // Shared preferences save,get and clear data
@ -181,6 +235,24 @@ class AppSettings{
} }
} }
static Future<bool> signUp(payload) async {
var response = await http.post(Uri.parse(signUpUrl),
body: json.encode(payload),
headers: {'Content-type': 'application/json'});
if (response.statusCode == 200) {
try {
var _response = json.decode(response.body);
return true;
} catch (e) {
// display error toast
return false;
}
} else {
return false;
}
}
static Future<bool> resetToken() async { static Future<bool> resetToken() async {
var uri = Uri.parse(resetTokenUrl + '/' + customerId); var uri = Uri.parse(resetTokenUrl + '/' + customerId);
@ -259,6 +331,15 @@ class AppSettings{
} }
} }
static Future<String> uploadrofileImageHTTPNew(file) async {
var request = http.MultipartRequest(
'POST', Uri.parse(uploadPicUrl + '/' + customerId));
request.files.add(await http.MultipartFile.fromPath('picture', file.path));
var res = await request.send();
var response = await http.Response.fromStream(res);
return response.body;
}
/*Apis ends here*/ /*Apis ends here*/

@ -84,7 +84,7 @@ class _OtpscreenState extends State<Otpscreen> {
return SizedBox( return SizedBox(
width: 50, width: 50,
child: TextFormField( child: TextFormField(
cursorColor:Color(0XFF1D7AFC), cursorColor:primaryColor,
controller: _controllers[index], controller: _controllers[index],
focusNode: index == 0 ? _focusNode : null, focusNode: index == 0 ? _focusNode : null,
maxLength: 1, maxLength: 1,
@ -140,7 +140,7 @@ class _OtpscreenState extends State<Otpscreen> {
Navigator.push( Navigator.push(
context, context,
new MaterialPageRoute( new MaterialPageRoute(
builder: (__) => new PasswordTextBoxesScreen())); builder: (__) => new PasswordTextBoxesScreen(mobileNumber: widget.mobileNumber,)));
/* await Navigator.push( /* await Navigator.push(
context, context,
MaterialPageRoute( MaterialPageRoute(

@ -1,15 +1,191 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:supplier_new/common/settings.dart';
import 'package:supplier_new/signup/signup.dart';
class PasswordTextBoxesScreen extends StatefulWidget { class PasswordTextBoxesScreen extends StatefulWidget {
const PasswordTextBoxesScreen({super.key}); var mobileNumber;
PasswordTextBoxesScreen({
this.mobileNumber
});
@override @override
State<PasswordTextBoxesScreen> createState() => _PasswordTextBoxesScreenState(); State<PasswordTextBoxesScreen> createState() => _PasswordTextBoxesScreenState();
} }
class _PasswordTextBoxesScreenState extends State<PasswordTextBoxesScreen> { class _PasswordTextBoxesScreenState extends State<PasswordTextBoxesScreen> {
TextEditingController reEnterPasswordController = TextEditingController();
TextEditingController createPasswordController = TextEditingController();
bool isObscureText=true;
bool isObscureTextForReEnter=true;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return const Placeholder();
return Scaffold(
backgroundColor: Colors.white,
body: SingleChildScrollView(
child: Padding(
padding: EdgeInsets.all(24),
child: Column(
children: [
SizedBox(height: MediaQuery.of(context).size.height * .2),
Center(
child: Text("AQUICK SUPPLIER",
style: fontTextStyle(20, Color(0XFF515253), FontWeight.w800)),
),
SizedBox(height: MediaQuery.of(context).size.height * .05),
CircleAvatar(radius: 80, backgroundColor: Color(0XFFF3F1FB)),
SizedBox(height: MediaQuery.of(context).size.height * .05),
Center(
child: Text(
"Welcome to Aquick Supplier",
style: fontTextStyle(20, Color(0XFF343637), FontWeight.w700),
),
),
SizedBox(height: MediaQuery.of(context).size.height * .004),
Center(
child: Text(
"Sign up to be listed as a supplier, start deliveries and track orders",
style: fontTextStyle(12, Color(0XFF7E7F80), FontWeight.w400),
textAlign: TextAlign.center, // Keeps text centered in multiple lines
),
),
SizedBox(height:MediaQuery.of(context).size.height * .016,),
Container(
child: TextFormField(
cursorColor:Color(0XFF8270DB),
obscureText: isObscureText,
obscuringCharacter: '*',
controller: createPasswordController,
decoration: InputDecoration(
filled: false,
fillColor: Colors.white,
labelText: 'Create Password',
//prefixIcon: const Icon(Icons.lock, color: Colors.white,),
labelStyle: fontTextStyle(14,Color(0XFF7E7F80),FontWeight.w400),
border: OutlineInputBorder(
borderRadius: BorderRadius.circular(4.0),
borderSide: BorderSide(color: greyColor,
width: 1, )),
focusedBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(4.0),
borderSide: BorderSide(color: Color(0XFF8270DB),width: 2,),
),
enabledBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(4.0),
borderSide: BorderSide(color: greyColor),
),
suffixIcon: IconButton(
icon: isObscureText==true?Image.asset('images/eye_icon.png',color: Color(0XFF7E7F80),width: 16,height: 16,):Image.asset('images/open_eye.png',color:Color(0XFF7E7F80),width: 16,height: 16,),
/* Icon(
icon:Image.asset('assets/your_image.png'),
color: isObscureText==true?greyColor:primaryColor,
),*/
onPressed: () {
print("show password");
setState(() {
isObscureText = !isObscureText;
});
},
),
),
style: fontTextStyle(14,Color(0XFF2A2A2A),FontWeight.w400),
),
),
SizedBox(height:MediaQuery.of(context).size.height * .012,),
Container(
child: TextFormField(
cursorColor:Color(0XFF8270DB),
obscureText: isObscureTextForReEnter,
obscuringCharacter: '*',
controller: reEnterPasswordController,
decoration: InputDecoration(
filled: false,
fillColor: Colors.white,
labelText: 'Re Enter Password',
//prefixIcon: const Icon(Icons.lock, color: Colors.white,),
labelStyle: fontTextStyle(14,Color(0XFF7E7F80),FontWeight.w400),
border: OutlineInputBorder(
borderRadius: BorderRadius.circular(4.0),
borderSide: BorderSide(color: greyColor,
width: 1, )),
focusedBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(4.0),
borderSide: BorderSide(color: Color(0XFF8270DB),width: 2,),
),
enabledBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(4.0),
borderSide: BorderSide(color: greyColor),
),
suffixIcon: IconButton(
icon: isObscureTextForReEnter==true?Image.asset('images/eye_icon.png',color: Color(0XFF7E7F80),width: 16,height: 16,):Image.asset('images/open_eye.png',color:Color(0XFF7E7F80),width: 16,height: 16,),
/* Icon(
icon:Image.asset('assets/your_image.png'),
color: isObscureText==true?greyColor:primaryColor,
),*/
onPressed: () {
print("show password");
setState(() {
isObscureTextForReEnter = !isObscureTextForReEnter;
});
},
),
),
style: fontTextStyle(14,Color(0XFF2A2A2A),FontWeight.w400),
),
),
SizedBox(height: MediaQuery.of(context).size.height * .04),
Container(
width: double.infinity,
height: MediaQuery.of(context).size.height * .06,
child: ElevatedButton(
style: ElevatedButton.styleFrom(
foregroundColor: Colors.white,
backgroundColor: primaryColor,
shape: RoundedRectangleBorder(
borderRadius:
BorderRadius.circular(24.0), // Customize the radius
),
),
onPressed: () async{
String createPassword = createPasswordController.text.trim();
String reEnterPassword = reEnterPasswordController.text.trim();
if (createPassword.isEmpty || reEnterPassword.isEmpty) {
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(content: Text("Please fill both password fields")),
);
} else if (createPassword != reEnterPassword) {
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(content: Text("Passwords do not match")),
);
} else {
// Passwords match navigate to next page
Navigator.push(
context,
MaterialPageRoute(builder: (context) => SignUp(mobileNumber: widget.mobileNumber,password: createPasswordController.text,)), // replace with your next page
);
}
},
child: Text(
'Login',
style: fontTextStyle(14, Color(0XFFFFFFFF), FontWeight.w600),
),
)),
SizedBox(height: MediaQuery.of(context).size.height * .012),
],
),
),
)
);
} }
} }

@ -1,16 +1,50 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_secure_storage/flutter_secure_storage.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:supplier_new/signup/verification_screen.dart'; import 'package:supplier_new/signup/verification_screen.dart';
import '../common/settings.dart'; import '../common/settings.dart';
class SignUp extends StatefulWidget { class SignUp extends StatefulWidget {
const SignUp({super.key}); var mobileNumber;
var password;
SignUp({
this.mobileNumber,this.password
});
@override @override
State<SignUp> createState() => _SignUpState(); State<SignUp> createState() => _SignUpState();
} }
class _SignUpState extends State<SignUp> { class _SignUpState extends State<SignUp> {
final TextEditingController businessNameController = TextEditingController();
final TextEditingController registrationNumberController = TextEditingController();
final TextEditingController yearsInBusinessController = TextEditingController();
final TextEditingController contactNameController = TextEditingController();
final TextEditingController positionController = TextEditingController();
final TextEditingController mobileNumberController = TextEditingController();
final TextEditingController additionalMobileController = TextEditingController();
final TextEditingController emailController = TextEditingController();
final TextEditingController addressLine1Controller = TextEditingController();
final TextEditingController addressLine2Controller = TextEditingController();
final TextEditingController cityController = TextEditingController();
final TextEditingController stateController = TextEditingController();
final TextEditingController zipController = TextEditingController();
final storage = FlutterSecureStorage(
aOptions: AndroidOptions(
resetOnError: true,
encryptedSharedPreferences: true,
),
);
@override
void initState() {
super.initState();
mobileNumberController.text = widget.mobileNumber ?? '';
}
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
@ -53,9 +87,9 @@ class _SignUpState extends State<SignUp> {
), ),
const SizedBox(height: 10), const SizedBox(height: 10),
_buildTextField('Business Name *', 'Enter your Business Name'), _buildTextField('Business Name *', 'Enter your Business Name',businessNameController),
_buildTextField('Registration Number *', 'Business Registration Number'), _buildTextField('Registration Number *', 'Business Registration Number',registrationNumberController),
_buildTextField('Years in Business *', 'Years of operation'), _buildTextField('Years in Business *', 'Years of operation',yearsInBusinessController),
const SizedBox(height: 24), const SizedBox(height: 24),
Text( Text(
@ -64,11 +98,11 @@ class _SignUpState extends State<SignUp> {
), ),
const SizedBox(height: 10), const SizedBox(height: 10),
_buildTextField('Primary Contact Name *', 'Full Name'), _buildTextField('Primary Contact Name *', 'Full Name',contactNameController),
_buildTextField('Position/Title *', 'Job title'), _buildTextField('Position/Title *', 'Job title',positionController),
_buildTextField('Mobile Number *', 'Mobile Number'), _buildTextField('Mobile Number *', 'Mobile Number',mobileNumberController,readOnly: true),
_buildTextField('Additional Mobile Number', 'Alternate Number'), _buildTextField('Additional Mobile Number', 'Alternate Number',additionalMobileController),
_buildTextField('Email Address', 'Email Address'), _buildTextField('Email Address', 'Email Address',emailController),
const SizedBox(height: 24), const SizedBox(height: 24),
Text( Text(
@ -77,11 +111,11 @@ class _SignUpState extends State<SignUp> {
), ),
const SizedBox(height: 10), const SizedBox(height: 10),
_buildTextField('Address Line 1 *', '123 Main St'), _buildTextField('Address Line 1 *', '123 Main St',addressLine1Controller),
_buildTextField('Address Line 2(Optional)', 'Area'), _buildTextField('Address Line 2(Optional)', 'Area',addressLine2Controller),
_buildTextField('City *', 'City'), _buildTextField('City *', 'City',cityController),
_buildTextField('State/Province *', 'State'), _buildTextField('State/Province *', 'State',stateController),
_buildTextField('ZIP/Postal Code ', '12345'), _buildTextField('ZIP/Postal Code *', '12345',zipController),
const SizedBox(height: 10), const SizedBox(height: 10),
Padding( Padding(
@ -106,21 +140,94 @@ class _SignUpState extends State<SignUp> {
SizedBox( SizedBox(
width: double.infinity, width: double.infinity,
child: ElevatedButton( child: ElevatedButton(
onPressed: () { onPressed: () async{
// Submit logic goes here if (businessNameController.text != ''&&
Navigator.push( registrationNumberController.text != ''&&
context, yearsInBusinessController.text != ''&&
MaterialPageRoute(builder: (context) => VerificationScreen()), contactNameController.text != ''&&
); mobileNumberController.text != ''&&
positionController.text != ''&&
addressLine1Controller.text != ''&&
addressLine2Controller.text != ''&&
cityController.text != ''&&
stateController.text != ''&&
zipController.text != ''
) {
AppSettings.preLoaderDialog(context);
bool isOnline = await AppSettings.internetConnectivity();
if(isOnline){
SharedPreferences prefs = await SharedPreferences.getInstance();
String? fcmToken = prefs.getString('fcmToken');
var payload = new Map<String, dynamic>();
payload["suppliername"] = contactNameController.text.toString();
payload["phone"] = mobileNumberController.text.toString();
payload["alternativeContactNumber"] = additionalMobileController.text.toString();
payload["password"] = widget.password;
payload["emails"] = [
{"email": emailController.text.toString()}
];
payload["office_address"] = addressLine1Controller.text.toString();
payload["city"] = cityController.text.toString();
payload["state"] = stateController.text.toString();
payload["zip"] = zipController.text.toString();
payload["country"] = '';
payload["latitude"] = 0;
payload["longitude"] = 0;
payload["fcmId"] = fcmToken;
payload["description"] ='';
payload["bussinessname"] = businessNameController.text.toString();
payload["registration_number"] = registrationNumberController.text.toString();
payload["years_in_business"] = yearsInBusinessController.text.toString();
bool signinStatus = await AppSettings.signUp(payload);
try{
if (signinStatus) {
Navigator.of(context,rootNavigator: true).pop();
/* String token = AppSettings.accessToken;
await storage.write(key: 'authToken', value: token);*/
Navigator.push(
context,
MaterialPageRoute(builder: (context) => VerificationScreen()),
);
AppSettings.longSuccessToast("Logged in Successfully");
} else {
Navigator.of(context,rootNavigator: true).pop();
AppSettings.longFailedToast("Invalid details");
}
}
catch(exception){
Navigator.of(context,rootNavigator: true).pop();
print(exception);
}
}
else{
Navigator.of(context,rootNavigator: true).pop();
AppSettings.longFailedToast("Please Check internet");
}
}
else{
AppSettings.longFailedToast("Please enter valid details");
}
}, },
style: ElevatedButton.styleFrom( style: ElevatedButton.styleFrom(
backgroundColor: Colors.blueAccent, backgroundColor: primaryColor,
padding: const EdgeInsets.symmetric(vertical: 16), padding: const EdgeInsets.symmetric(vertical: 16),
), ),
child: Text( child: Text(
'Submit', 'Submit',
style: fontTextStyle(16, Colors.white, FontWeight.w600), style: fontTextStyle(16, Color(0XFFFFFFFF), FontWeight.w600),
), ),
), ),
), ),
@ -130,7 +237,7 @@ class _SignUpState extends State<SignUp> {
); );
} }
Widget _buildTextField(String label, String hint) { Widget _buildTextField(String label, String hint,TextEditingController controller, {bool readOnly = false}) {
return Column( return Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
@ -139,15 +246,13 @@ class _SignUpState extends State<SignUp> {
style: fontTextStyle(12, Color(0xFF2D2E30),FontWeight.w500), style: fontTextStyle(12, Color(0xFF2D2E30),FontWeight.w500),
), ),
const SizedBox(height: 6), const SizedBox(height: 6),
TextField( TextFormField(
decoration: InputDecoration( controller: controller,
hintText: hint, readOnly: readOnly,
hintStyle: fontTextStyle(13, Colors.grey.shade600, FontWeight.normal), textCapitalization: TextCapitalization.sentences,
border: OutlineInputBorder( style:fontTextStyle(14,Color(0XFF2A2A2A),FontWeight.w400),
borderRadius: BorderRadius.circular(8), cursorColor: Color(0XFF8270DB),
), decoration: textFormFieldDecorationHintText(Icons.phone,hint),
contentPadding: const EdgeInsets.symmetric(horizontal: 12, vertical: 14),
),
), ),
const SizedBox(height: 16), const SizedBox(height: 16),
], ],

@ -20,131 +20,134 @@ class _SignUpMobileNumberScreenState extends State<SignUpMobileNumberScreen> {
return Scaffold( return Scaffold(
backgroundColor: Colors.white, backgroundColor: Colors.white,
body: Padding( body: SingleChildScrollView(
padding: EdgeInsets.all(24), child: Padding(
child: Column( padding: EdgeInsets.all(24),
children: [ child: Column(
SizedBox(height: MediaQuery.of(context).size.height * .2), children: [
Center( SizedBox(height: MediaQuery.of(context).size.height * .2),
child: Text("AQUICK SUPPLIER", Center(
style: fontTextStyle(20, Color(0XFF515253), FontWeight.w800)), child: Text("AQUICK SUPPLIER",
), style: fontTextStyle(20, Color(0XFF515253), FontWeight.w800)),
SizedBox(height: MediaQuery.of(context).size.height * .05),
CircleAvatar(radius: 80, backgroundColor: Color(0XFFF3F1FB)),
SizedBox(height: MediaQuery.of(context).size.height * .05),
Center(
child: Text(
"Welcome to Aquick Supplier",
style: fontTextStyle(20, Color(0XFF343637), FontWeight.w700),
), ),
), SizedBox(height: MediaQuery.of(context).size.height * .05),
SizedBox(height: MediaQuery.of(context).size.height * .004), CircleAvatar(radius: 80, backgroundColor: Color(0XFFF3F1FB)),
Center( SizedBox(height: MediaQuery.of(context).size.height * .05),
child: Text( Center(
"Sign up to be listed as a supplier, start deliveries and track orders", child: Text(
style: fontTextStyle(12, Color(0XFF7E7F80), FontWeight.w400), "Welcome to Aquick Supplier",
textAlign: TextAlign.center, // Keeps text centered in multiple lines style: fontTextStyle(20, Color(0XFF343637), FontWeight.w700),
),
),
SizedBox(height: MediaQuery.of(context).size.height * .004),
Center(
child: Text(
"Sign up to be listed as a supplier, start deliveries and track orders",
style: fontTextStyle(12, Color(0XFF7E7F80), FontWeight.w400),
textAlign: TextAlign.center, // Keeps text centered in multiple lines
),
), ),
), SizedBox(height:MediaQuery.of(context).size.height * .016,),
SizedBox(height:MediaQuery.of(context).size.height * .016,), Container(
Container( child: TextFormField(
child: TextFormField( controller: mobileNumberController,
controller: mobileNumberController, keyboardType: TextInputType.number,
keyboardType: TextInputType.number, textCapitalization: TextCapitalization.sentences,
textCapitalization: TextCapitalization.sentences, maxLength: 10,
maxLength: 10, decoration: textFormFieldDecoration(Icons.phone,'Mobile Number'),
decoration: textFormFieldDecoration(Icons.phone,'Mobile Number'), style:fontTextStyle(14,Color(0XFF2A2A2A),FontWeight.w400),
style:fontTextStyle(14,Color(0XFF2A2A2A),FontWeight.w400), cursorColor: Color(0XFF8270DB),
cursorColor: Color(0XFF8270DB),
//TextStyle(color: Colors.black,fontWeight: FontWeight.bold),
//TextStyle(color: Colors.black,fontWeight: FontWeight.bold), ),
), ),
),
SizedBox(height: MediaQuery.of(context).size.height * .04), SizedBox(height: MediaQuery.of(context).size.height * .04),
Container( Container(
width: double.infinity, width: double.infinity,
height: MediaQuery.of(context).size.height * .06, height: MediaQuery.of(context).size.height * .06,
child: ElevatedButton( child: ElevatedButton(
style: ElevatedButton.styleFrom( style: ElevatedButton.styleFrom(
foregroundColor: Colors.white, foregroundColor: Colors.white,
backgroundColor: primaryColor, backgroundColor: primaryColor,
shape: RoundedRectangleBorder( shape: RoundedRectangleBorder(
borderRadius: borderRadius:
BorderRadius.circular(24.0), // Customize the radius BorderRadius.circular(24.0), // Customize the radius
),
), ),
), onPressed: () async{
onPressed: () async{ if(mobileNumberController.text.length>=10){
if(mobileNumberController.text.length>=10){
AppSettings.preLoaderDialog(context); AppSettings.preLoaderDialog(context);
bool isOnline = await AppSettings.internetConnectivity(); bool isOnline = await AppSettings.internetConnectivity();
if(isOnline){ if(isOnline){
var payload = new Map<String, dynamic>(); var payload = new Map<String, dynamic>();
payload["phone"] = mobileNumberController.text.toString(); payload["phone"] = mobileNumberController.text.toString();
bool forgotPwd = await AppSettings.getOtp(payload); bool forgotPwd = await AppSettings.getOtp(payload);
if(forgotPwd){ if(forgotPwd){
Navigator.of(context,rootNavigator: true).pop(); Navigator.of(context,rootNavigator: true).pop();
Navigator.push( Navigator.push(
context, context,
new MaterialPageRoute( new MaterialPageRoute(
builder: (__) => new Otpscreen(mobileNumber:mobileNumberController.text.toString()))); builder: (__) => new Otpscreen(mobileNumber:mobileNumberController.text.toString())));
}
else{
AppSettings.longFailedToast('Please enter valid registered mobile number');
}
} }
else{ else{
AppSettings.longFailedToast('Please enter valid registered mobile number'); Navigator.of(context,rootNavigator: true).pop();
AppSettings.longFailedToast("Please Check internet");
} }
}
else{
Navigator.of(context,rootNavigator: true).pop();
AppSettings.longFailedToast("Please Check internet");
}
} }
else{ else{
AppSettings.longFailedToast('Please enter 10 digits of mobile number'); AppSettings.longFailedToast('Please enter 10 digits of mobile number');
} }
},
child: Text(
'Continue',
style: fontTextStyle(14, Color(0XFFFFFFFF), FontWeight.w600),
),
)),
SizedBox(height: MediaQuery.of(context).size.height * .012),
Container(
width: double.infinity,
height: MediaQuery.of(context).size.height * .06,
child: ElevatedButton(
style: ElevatedButton.styleFrom(
foregroundColor: Color(0XFF757575),
backgroundColor: Colors.white,
shape: RoundedRectangleBorder(
borderRadius:
BorderRadius.circular(24.0), // Customize the radius
side: BorderSide(
color: Color(0XFF757575), // Border color
width: 1, // Border width
),
),
),
onPressed: () async {
Navigator.pop(context);
}, },
child: Text( child: Text(
'Continue', 'Back',
style: fontTextStyle(14, Color(0XFFFFFFFF), FontWeight.w600), style: fontTextStyle(14, Color(0XFF646566), FontWeight.w500),
), ),
)),
SizedBox(height: MediaQuery.of(context).size.height * .012),
Container(
width: double.infinity,
height: MediaQuery.of(context).size.height * .06,
child: ElevatedButton(
style: ElevatedButton.styleFrom(
foregroundColor: Color(0XFF757575),
backgroundColor: Colors.white,
shape: RoundedRectangleBorder(
borderRadius:
BorderRadius.circular(24.0), // Customize the radius
side: BorderSide(
color: Color(0XFF757575), // Border color
width: 1, // Border width
),
),
),
onPressed: () async {
// Your onPressed logic
},
child: Text(
'Back',
style: fontTextStyle(14, Color(0XFF646566), FontWeight.w500),
), ),
), )
) ],
], ),
), ),
)); )
);
} }
} }

@ -6,9 +6,13 @@
#include "generated_plugin_registrant.h" #include "generated_plugin_registrant.h"
#include <file_selector_linux/file_selector_plugin.h>
#include <flutter_secure_storage_linux/flutter_secure_storage_linux_plugin.h> #include <flutter_secure_storage_linux/flutter_secure_storage_linux_plugin.h>
void fl_register_plugins(FlPluginRegistry* registry) { void fl_register_plugins(FlPluginRegistry* registry) {
g_autoptr(FlPluginRegistrar) file_selector_linux_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "FileSelectorPlugin");
file_selector_plugin_register_with_registrar(file_selector_linux_registrar);
g_autoptr(FlPluginRegistrar) flutter_secure_storage_linux_registrar = g_autoptr(FlPluginRegistrar) flutter_secure_storage_linux_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "FlutterSecureStorageLinuxPlugin"); fl_plugin_registry_get_registrar_for_plugin(registry, "FlutterSecureStorageLinuxPlugin");
flutter_secure_storage_linux_plugin_register_with_registrar(flutter_secure_storage_linux_registrar); flutter_secure_storage_linux_plugin_register_with_registrar(flutter_secure_storage_linux_registrar);

@ -3,6 +3,7 @@
# #
list(APPEND FLUTTER_PLUGIN_LIST list(APPEND FLUTTER_PLUGIN_LIST
file_selector_linux
flutter_secure_storage_linux flutter_secure_storage_linux
) )

@ -5,6 +5,7 @@
import FlutterMacOS import FlutterMacOS
import Foundation import Foundation
import file_selector_macos
import firebase_core import firebase_core
import firebase_messaging import firebase_messaging
import flutter_secure_storage_macos import flutter_secure_storage_macos
@ -12,6 +13,7 @@ import path_provider_foundation
import shared_preferences_foundation import shared_preferences_foundation
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
FileSelectorPlugin.register(with: registry.registrar(forPlugin: "FileSelectorPlugin"))
FLTFirebaseCorePlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseCorePlugin")) FLTFirebaseCorePlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseCorePlugin"))
FLTFirebaseMessagingPlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseMessagingPlugin")) FLTFirebaseMessagingPlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseMessagingPlugin"))
FlutterSecureStoragePlugin.register(with: registry.registrar(forPlugin: "FlutterSecureStoragePlugin")) FlutterSecureStoragePlugin.register(with: registry.registrar(forPlugin: "FlutterSecureStoragePlugin"))

@ -49,6 +49,14 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.18.0" version: "1.18.0"
cross_file:
dependency: transitive
description:
name: cross_file
sha256: "7caf6a750a0c04effbb52a676dce9a4a592e10ad35c34d6d2d0e4811160d5670"
url: "https://pub.dev"
source: hosted
version: "0.3.4+2"
crypto: crypto:
dependency: transitive dependency: transitive
description: description:
@ -89,6 +97,38 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "7.0.1" version: "7.0.1"
file_selector_linux:
dependency: transitive
description:
name: file_selector_linux
sha256: "54cbbd957e1156d29548c7d9b9ec0c0ebb6de0a90452198683a7d23aed617a33"
url: "https://pub.dev"
source: hosted
version: "0.9.3+2"
file_selector_macos:
dependency: transitive
description:
name: file_selector_macos
sha256: "271ab9986df0c135d45c3cdb6bd0faa5db6f4976d3e4b437cf7d0f258d941bfc"
url: "https://pub.dev"
source: hosted
version: "0.9.4+2"
file_selector_platform_interface:
dependency: transitive
description:
name: file_selector_platform_interface
sha256: a3994c26f10378a039faa11de174d7b78eb8f79e4dd0af2a451410c1a5c3f66b
url: "https://pub.dev"
source: hosted
version: "2.6.2"
file_selector_windows:
dependency: transitive
description:
name: file_selector_windows
sha256: "320fcfb6f33caa90f0b58380489fc5ac05d99ee94b61aa96ec2bff0ba81d3c2b"
url: "https://pub.dev"
source: hosted
version: "0.9.3+4"
firebase_core: firebase_core:
dependency: transitive dependency: transitive
description: description:
@ -150,6 +190,14 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "3.0.2" version: "3.0.2"
flutter_plugin_android_lifecycle:
dependency: transitive
description:
name: flutter_plugin_android_lifecycle
sha256: "9ee02950848f61c4129af3d6ec84a1cfc0e47931abc746b03e7a3bc3e8ff6eda"
url: "https://pub.dev"
source: hosted
version: "2.0.22"
flutter_secure_storage: flutter_secure_storage:
dependency: "direct main" dependency: "direct main"
description: description:
@ -240,6 +288,70 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "4.0.2" version: "4.0.2"
image_picker:
dependency: "direct main"
description:
name: image_picker
sha256: "021834d9c0c3de46bf0fe40341fa07168407f694d9b2bb18d532dc1261867f7a"
url: "https://pub.dev"
source: hosted
version: "1.1.2"
image_picker_android:
dependency: transitive
description:
name: image_picker_android
sha256: "8c5abf0dcc24fe6e8e0b4a5c0b51a5cf30cefdf6407a3213dae61edc75a70f56"
url: "https://pub.dev"
source: hosted
version: "0.8.12+12"
image_picker_for_web:
dependency: transitive
description:
name: image_picker_for_web
sha256: "717eb042ab08c40767684327be06a5d8dbb341fe791d514e4b92c7bbe1b7bb83"
url: "https://pub.dev"
source: hosted
version: "3.0.6"
image_picker_ios:
dependency: transitive
description:
name: image_picker_ios
sha256: "05da758e67bc7839e886b3959848aa6b44ff123ab4b28f67891008afe8ef9100"
url: "https://pub.dev"
source: hosted
version: "0.8.12+2"
image_picker_linux:
dependency: transitive
description:
name: image_picker_linux
sha256: "34a65f6740df08bbbeb0a1abd8e6d32107941fd4868f67a507b25601651022c9"
url: "https://pub.dev"
source: hosted
version: "0.2.1+2"
image_picker_macos:
dependency: transitive
description:
name: image_picker_macos
sha256: "1b90ebbd9dcf98fb6c1d01427e49a55bd96b5d67b8c67cf955d60a5de74207c1"
url: "https://pub.dev"
source: hosted
version: "0.2.1+2"
image_picker_platform_interface:
dependency: transitive
description:
name: image_picker_platform_interface
sha256: "886d57f0be73c4b140004e78b9f28a8914a09e50c2d816bdd0520051a71236a0"
url: "https://pub.dev"
source: hosted
version: "2.10.1"
image_picker_windows:
dependency: transitive
description:
name: image_picker_windows
sha256: "6ad07afc4eb1bc25f3a01084d28520496c4a3bb0cb13685435838167c9dcedeb"
url: "https://pub.dev"
source: hosted
version: "0.2.1+1"
js: js:
dependency: transitive dependency: transitive
description: description:
@ -304,6 +416,14 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.12.0" version: "1.12.0"
mime:
dependency: transitive
description:
name: mime
sha256: "41a20518f0cb1256669420fdba0cd90d21561e560ac240f26ef8322e45bb7ed6"
url: "https://pub.dev"
source: hosted
version: "2.0.0"
path: path:
dependency: transitive dependency: transitive
description: description:

@ -19,6 +19,7 @@ dependencies:
fluttertoast: ^8.1.2 fluttertoast: ^8.1.2
flutter_secure_storage: ^9.0.0 flutter_secure_storage: ^9.0.0
firebase_messaging: ^14.9.1 firebase_messaging: ^14.9.1
image_picker: ^1.1.2
dev_dependencies: dev_dependencies:
flutter_test: flutter_test:

@ -6,10 +6,13 @@
#include "generated_plugin_registrant.h" #include "generated_plugin_registrant.h"
#include <file_selector_windows/file_selector_windows.h>
#include <firebase_core/firebase_core_plugin_c_api.h> #include <firebase_core/firebase_core_plugin_c_api.h>
#include <flutter_secure_storage_windows/flutter_secure_storage_windows_plugin.h> #include <flutter_secure_storage_windows/flutter_secure_storage_windows_plugin.h>
void RegisterPlugins(flutter::PluginRegistry* registry) { void RegisterPlugins(flutter::PluginRegistry* registry) {
FileSelectorWindowsRegisterWithRegistrar(
registry->GetRegistrarForPlugin("FileSelectorWindows"));
FirebaseCorePluginCApiRegisterWithRegistrar( FirebaseCorePluginCApiRegisterWithRegistrar(
registry->GetRegistrarForPlugin("FirebaseCorePluginCApi")); registry->GetRegistrarForPlugin("FirebaseCorePluginCApi"));
FlutterSecureStorageWindowsPluginRegisterWithRegistrar( FlutterSecureStorageWindowsPluginRegisterWithRegistrar(

@ -3,6 +3,7 @@
# #
list(APPEND FLUTTER_PLUGIN_LIST list(APPEND FLUTTER_PLUGIN_LIST
file_selector_windows
firebase_core firebase_core
flutter_secure_storage_windows flutter_secure_storage_windows
) )

Loading…
Cancel
Save