mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2025-07-15 17:47:28 +00:00
fix bugs on create password
This commit is contained in:
@ -135,58 +135,81 @@ class CreateTemporaryPassword extends StatelessWidget {
|
|||||||
padding: const EdgeInsets.all(20),
|
padding: const EdgeInsets.all(20),
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
ListTile(
|
Row(
|
||||||
contentPadding: EdgeInsets.zero,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
leading: const BodyMedium(
|
|
||||||
text: 'Password Name',
|
children: [
|
||||||
fontWeight: FontWeight.normal,
|
Expanded(
|
||||||
),
|
child: Container(
|
||||||
trailing: SizedBox(
|
child: const BodyMedium(
|
||||||
width: MediaQuery.of(context).size.width / 2,
|
text: 'Password Name',
|
||||||
child: TextFormField(
|
fontWeight: FontWeight.normal,
|
||||||
controller:
|
),
|
||||||
BlocProvider.of<SmartDoorBloc>(context).passwordNameController,
|
),
|
||||||
decoration: const InputDecoration(hintText: 'Enter The Name'),
|
) ,
|
||||||
)),
|
SizedBox(
|
||||||
),
|
width: MediaQuery.of(context).size.width / 2.6,
|
||||||
|
child: TextFormField(
|
||||||
|
controller:
|
||||||
|
BlocProvider.of<SmartDoorBloc>(context).passwordNameController,
|
||||||
|
decoration: const InputDecoration(hintText: 'Enter The Name',hintStyle:
|
||||||
|
TextStyle(fontSize: 14,color: ColorsManager.textGray)),
|
||||||
|
)),],
|
||||||
|
), const Divider(color:ColorsManager.graysColor,),
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.all(10.0),
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
|
||||||
|
children: [
|
||||||
|
const Expanded(
|
||||||
|
child: BodyMedium(
|
||||||
|
text: 'Effective Time',
|
||||||
|
fontWeight: FontWeight.normal,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
width: MediaQuery.of(context).size.width / 4,
|
||||||
|
child: InkWell(
|
||||||
|
onTap: () {
|
||||||
|
BlocProvider.of<SmartDoorBloc>(context)..add(SelectTimeEvent(context: context, isEffective: true));
|
||||||
|
},
|
||||||
|
child: Text(
|
||||||
|
BlocProvider.of<SmartDoorBloc>(context).effectiveTime,style: TextStyle(fontSize: 14,color:BlocProvider.of<SmartDoorBloc>(context)
|
||||||
|
.expirationTime!='Select Time'?ColorsManager.blackColor:ColorsManager.textGray),),
|
||||||
|
)),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
const Divider(color:ColorsManager.graysColor,),
|
const Divider(color:ColorsManager.graysColor,),
|
||||||
ListTile(
|
Padding(
|
||||||
contentPadding: EdgeInsets.zero,
|
padding: const EdgeInsets.all(10.0),
|
||||||
leading: const BodyMedium(
|
child: Row(
|
||||||
text: 'Effective Time',
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
fontWeight: FontWeight.normal,
|
children: [
|
||||||
),
|
const Expanded(
|
||||||
trailing: SizedBox(
|
child: BodyMedium(
|
||||||
width: MediaQuery.of(context).size.width / 2,
|
text: 'Expiration Time',
|
||||||
child: InkWell(
|
fontWeight: FontWeight.normal,
|
||||||
onTap: () {
|
|
||||||
BlocProvider.of<SmartDoorBloc>(context)..add(SelectTimeEvent(context: context, isEffective: true));
|
|
||||||
// .selectTime(context, isEffective: true);
|
|
||||||
},
|
|
||||||
child: Text(
|
|
||||||
BlocProvider.of<SmartDoorBloc>(context).effectiveTime
|
|
||||||
),
|
),
|
||||||
)),
|
),
|
||||||
),
|
SizedBox(
|
||||||
const Divider(color:ColorsManager.graysColor,),
|
width: MediaQuery.of(context).size.width / 4,
|
||||||
ListTile(
|
|
||||||
contentPadding: EdgeInsets.zero,
|
|
||||||
leading: const BodyMedium(
|
|
||||||
text: 'Expiration Time',
|
|
||||||
fontWeight: FontWeight.normal,
|
|
||||||
),
|
|
||||||
trailing: SizedBox(
|
|
||||||
width: MediaQuery.of(context).size.width / 2,
|
|
||||||
child: SizedBox(
|
|
||||||
width: MediaQuery.of(context).size.width / 2,
|
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
BlocProvider.of<SmartDoorBloc>(context)..add(SelectTimeEvent(context: context, isEffective: false));
|
BlocProvider.of<SmartDoorBloc>(context)..add(SelectTimeEvent(context: context, isEffective: false));
|
||||||
},
|
},
|
||||||
child: Text(
|
child: Text(
|
||||||
BlocProvider.of<SmartDoorBloc>(context)
|
BlocProvider.of<SmartDoorBloc>(context)
|
||||||
.expirationTime),
|
.expirationTime,style: TextStyle(fontSize: 14,color:
|
||||||
)),
|
|
||||||
|
|
||||||
|
BlocProvider.of<SmartDoorBloc>(context)
|
||||||
|
.expirationTime!='Select Time'?ColorsManager.blackColor:ColorsManager.textGray),),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
@ -260,6 +283,7 @@ class CreateTemporaryPassword extends StatelessWidget {
|
|||||||
itemHeight: 40,
|
itemHeight: 40,
|
||||||
normalTextStyle: const TextStyle(
|
normalTextStyle: const TextStyle(
|
||||||
color: Colors.grey,
|
color: Colors.grey,
|
||||||
|
|
||||||
fontSize: 24,
|
fontSize: 24,
|
||||||
),
|
),
|
||||||
highlightedTextStyle: const TextStyle(
|
highlightedTextStyle: const TextStyle(
|
||||||
|
@ -23,4 +23,5 @@ abstract class ColorsManager {
|
|||||||
static const Color lightGreen = Color(0xFF00FF0A);
|
static const Color lightGreen = Color(0xFF00FF0A);
|
||||||
static const Color grayColor = Color(0xFF999999);
|
static const Color grayColor = Color(0xFF999999);
|
||||||
static const Color graysColor = Color(0xffEBEBEB);
|
static const Color graysColor = Color(0xffEBEBEB);
|
||||||
|
static const Color textGray = Color(0xffD5D5D5);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user