mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-10 07:07:19 +00:00
visitor password
This commit is contained in:
67
lib/pages/common/custom_web_textfield.dart
Normal file
67
lib/pages/common/custom_web_textfield.dart
Normal file
@ -0,0 +1,67 @@
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:syncrow_web/utils/color_manager.dart';
|
||||
import 'package:syncrow_web/utils/style.dart';
|
||||
class CustomWebTextField extends StatelessWidget {
|
||||
const CustomWebTextField({
|
||||
super.key,
|
||||
required this.isRequired,
|
||||
required this.textFieldName,
|
||||
required this.controller,
|
||||
this.description,
|
||||
});
|
||||
|
||||
final bool isRequired;
|
||||
final String textFieldName;
|
||||
final String? description;
|
||||
final TextEditingController? controller;
|
||||
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
if(isRequired)
|
||||
Row(
|
||||
children: [
|
||||
Text(
|
||||
'* ',
|
||||
style: Theme.of(context)
|
||||
.textTheme
|
||||
.bodyMedium!
|
||||
.copyWith(color: Colors.red),
|
||||
),
|
||||
Text(textFieldName),
|
||||
],
|
||||
),
|
||||
Text(
|
||||
description??'', // ' The password will be sent to the visitor’s email address.',
|
||||
style: Theme.of(context)
|
||||
.textTheme
|
||||
.bodySmall!
|
||||
.copyWith(
|
||||
fontSize: 9,
|
||||
fontWeight: FontWeight.w400,
|
||||
color: ColorsManager.textGray),
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 7,),
|
||||
Container(
|
||||
decoration: containerDecoration,
|
||||
child: TextFormField(
|
||||
controller: controller,
|
||||
style: const TextStyle(color: Colors.black),
|
||||
decoration: textBoxDecoration()!
|
||||
.copyWith(hintText: 'Please enter'),
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
74
lib/pages/common/date_time_widget.dart
Normal file
74
lib/pages/common/date_time_widget.dart
Normal file
@ -0,0 +1,74 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
import 'package:syncrow_web/utils/constants/assets.dart';
|
||||
import 'package:syncrow_web/utils/style.dart';
|
||||
|
||||
class DateTimeWebWidget extends StatelessWidget {
|
||||
const DateTimeWebWidget({
|
||||
super.key,
|
||||
required this.size,
|
||||
required this.isRequired,
|
||||
required this.title,
|
||||
required this.startTime,
|
||||
required this.endTime,
|
||||
required this.firstString,
|
||||
required this.secondString,
|
||||
});
|
||||
|
||||
final Size size;
|
||||
final String title;
|
||||
final bool isRequired;
|
||||
final String firstString;
|
||||
final String secondString;
|
||||
final Function()? startTime;
|
||||
final Function()? endTime;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
if(isRequired)
|
||||
Text(
|
||||
'* ',
|
||||
style: Theme.of(context)
|
||||
.textTheme
|
||||
.bodyMedium!
|
||||
.copyWith(color: Colors.red),
|
||||
),
|
||||
Text(title??''),
|
||||
],
|
||||
),
|
||||
SizedBox(height: 8,),
|
||||
Container(
|
||||
width: size.width * 0.25,
|
||||
padding: EdgeInsets.all(10),
|
||||
decoration: containerDecoration,
|
||||
child: Column(
|
||||
children: [
|
||||
Row(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
InkWell(
|
||||
onTap: startTime,
|
||||
child: Text(firstString)
|
||||
),
|
||||
const Icon(Icons.arrow_right_alt),
|
||||
InkWell(
|
||||
onTap:endTime,
|
||||
child: Text(secondString)),
|
||||
SvgPicture.asset(
|
||||
Assets.calendarIcon,
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
)),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user