mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-10 07:07:19 +00:00
access management design revamp, responsiveness and buttons
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:syncrow_web/pages/common/buttons/default_button.dart';
|
||||
import 'package:syncrow_web/utils/extension/build_context_x.dart';
|
||||
import 'package:syncrow_web/utils/style.dart';
|
||||
import 'package:syncrow_web/utils/color_manager.dart';
|
||||
|
||||
@ -23,14 +24,18 @@ class SearchResetButtons extends StatelessWidget {
|
||||
const SizedBox(height: 25),
|
||||
Center(
|
||||
child: Container(
|
||||
height: 43,
|
||||
height: 35,
|
||||
width: 100,
|
||||
decoration: containerDecoration,
|
||||
child: Center(
|
||||
child: DefaultButton(
|
||||
onPressed: onSearch,
|
||||
borderRadius: 9,
|
||||
child: const Text('Search'),
|
||||
child: Text(
|
||||
'Search',
|
||||
style: context.textTheme.titleSmall!
|
||||
.copyWith(color: Colors.white, fontSize: 12),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
@ -44,21 +49,19 @@ class SearchResetButtons extends StatelessWidget {
|
||||
const SizedBox(height: 25),
|
||||
Center(
|
||||
child: Container(
|
||||
height: 43,
|
||||
height: 35,
|
||||
width: 100,
|
||||
decoration: containerDecoration,
|
||||
child: Center(
|
||||
child: DefaultButton(
|
||||
backgroundColor: ColorsManager.whiteColors,
|
||||
borderRadius: 9,
|
||||
onPressed: onReset,
|
||||
child: Text(
|
||||
'Reset',
|
||||
style: Theme.of(context)
|
||||
.textTheme
|
||||
.bodySmall!
|
||||
.copyWith(color: Colors.black),
|
||||
style: context.textTheme.titleSmall!
|
||||
.copyWith(color: Colors.black, fontSize: 12),
|
||||
),
|
||||
onPressed: onReset,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -36,7 +36,10 @@ class DateTimeWebWidget extends StatelessWidget {
|
||||
if (isRequired)
|
||||
Text(
|
||||
'* ',
|
||||
style: Theme.of(context).textTheme.bodyMedium!.copyWith(color: Colors.red),
|
||||
style: Theme.of(context)
|
||||
.textTheme
|
||||
.bodyMedium!
|
||||
.copyWith(color: Colors.red),
|
||||
),
|
||||
Text(
|
||||
title,
|
||||
@ -51,8 +54,9 @@ class DateTimeWebWidget extends StatelessWidget {
|
||||
height: 8,
|
||||
),
|
||||
Container(
|
||||
height: size.height * 0.055,
|
||||
padding: const EdgeInsets.only(top: 10, bottom: 10, right: 30, left: 10),
|
||||
height: size.height * 0.056,
|
||||
padding:
|
||||
const EdgeInsets.only(top: 10, bottom: 10, right: 30, left: 10),
|
||||
decoration: containerDecoration,
|
||||
child: FittedBox(
|
||||
child: Column(
|
||||
@ -65,10 +69,13 @@ class DateTimeWebWidget extends StatelessWidget {
|
||||
child: FittedBox(
|
||||
child: Text(
|
||||
firstString,
|
||||
style: Theme.of(context).textTheme.bodySmall!.copyWith(
|
||||
color: ColorsManager.grayColor,
|
||||
fontSize: 12,
|
||||
fontWeight: FontWeight.w400),
|
||||
style: Theme.of(context)
|
||||
.textTheme
|
||||
.bodySmall!
|
||||
.copyWith(
|
||||
color: ColorsManager.grayColor,
|
||||
fontSize: 12,
|
||||
fontWeight: FontWeight.w400),
|
||||
),
|
||||
)),
|
||||
const SizedBox(
|
||||
@ -83,10 +90,13 @@ class DateTimeWebWidget extends StatelessWidget {
|
||||
child: FittedBox(
|
||||
child: Text(
|
||||
secondString,
|
||||
style: Theme.of(context).textTheme.bodySmall!.copyWith(
|
||||
color: ColorsManager.grayColor,
|
||||
fontSize: 12,
|
||||
fontWeight: FontWeight.w400),
|
||||
style: Theme.of(context)
|
||||
.textTheme
|
||||
.bodySmall!
|
||||
.copyWith(
|
||||
color: ColorsManager.grayColor,
|
||||
fontSize: 12,
|
||||
fontWeight: FontWeight.w400),
|
||||
),
|
||||
)),
|
||||
const SizedBox(
|
||||
|
@ -8,7 +8,7 @@ class StatefulTextField extends StatefulWidget {
|
||||
this.hintText = 'Please enter',
|
||||
required this.width,
|
||||
this.elevation = 0,
|
||||
required this.controller, // Add the controller
|
||||
required this.controller,
|
||||
});
|
||||
|
||||
final String title;
|
||||
@ -59,7 +59,8 @@ class CustomTextField extends StatelessWidget {
|
||||
Text(
|
||||
title,
|
||||
style: context.textTheme.bodyMedium!.copyWith(
|
||||
fontWeight: FontWeight.w600,
|
||||
fontSize: 13,
|
||||
fontWeight: FontWeight.w400,
|
||||
color: const Color(0xff000000),
|
||||
),
|
||||
),
|
||||
@ -79,6 +80,7 @@ class CustomTextField extends StatelessWidget {
|
||||
style: const TextStyle(color: Colors.black),
|
||||
decoration: InputDecoration(
|
||||
hintText: hintText,
|
||||
hintStyle: const TextStyle(fontSize: 12),
|
||||
contentPadding:
|
||||
const EdgeInsets.symmetric(horizontal: 12, vertical: 10),
|
||||
border: InputBorder.none,
|
||||
|
@ -1,5 +1,6 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:syncrow_web/utils/color_manager.dart';
|
||||
import 'package:syncrow_web/utils/extension/build_context_x.dart';
|
||||
import 'package:syncrow_web/utils/style.dart';
|
||||
|
||||
class CustomWebTextField extends StatelessWidget {
|
||||
@ -11,6 +12,7 @@ class CustomWebTextField extends StatelessWidget {
|
||||
this.description,
|
||||
this.validator,
|
||||
this.hintText,
|
||||
this.height,
|
||||
});
|
||||
|
||||
final bool isRequired;
|
||||
@ -19,6 +21,7 @@ class CustomWebTextField extends StatelessWidget {
|
||||
final TextEditingController? controller;
|
||||
final String? Function(String?)? validator;
|
||||
final String? hintText;
|
||||
final double? height;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@ -66,6 +69,7 @@ class CustomWebTextField extends StatelessWidget {
|
||||
height: 7,
|
||||
),
|
||||
Container(
|
||||
height: height ?? 35,
|
||||
decoration: containerDecoration
|
||||
.copyWith(color: const Color(0xFFF5F6F7), boxShadow: [
|
||||
BoxShadow(
|
||||
@ -80,9 +84,9 @@ class CustomWebTextField extends StatelessWidget {
|
||||
controller: controller,
|
||||
style: const TextStyle(color: Colors.black),
|
||||
decoration: textBoxDecoration()!.copyWith(
|
||||
errorStyle:
|
||||
const TextStyle(height: 0), // Hide the error text space
|
||||
|
||||
errorStyle: const TextStyle(height: 0),
|
||||
hintStyle: context.textTheme.titleSmall!
|
||||
.copyWith(color: Colors.grey, fontSize: 12),
|
||||
hintText: hintText ?? 'Please enter'),
|
||||
),
|
||||
),
|
||||
|
Reference in New Issue
Block a user