mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-10 15:17:31 +00:00
45 lines
1.5 KiB
Dart
45 lines
1.5 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'color_manager.dart';
|
|
|
|
InputDecoration? textBoxDecoration({bool suffixIcon = false}) => InputDecoration(
|
|
focusColor: ColorsManager.grayColor,
|
|
suffixIcon:suffixIcon? const Icon(Icons.search):null,
|
|
hintText: 'Search',
|
|
filled: true, // Enable background filling
|
|
fillColor: Colors.grey.shade200, // Set the background color
|
|
border: OutlineInputBorder(
|
|
borderRadius: BorderRadius.circular(8), // Add border radius
|
|
borderSide: BorderSide.none, // Remove the underline
|
|
),
|
|
enabledBorder: OutlineInputBorder(
|
|
borderRadius: BorderRadius.circular(8), // Add border radius
|
|
borderSide: BorderSide.none, // Remove the underline
|
|
),
|
|
focusedBorder: OutlineInputBorder(
|
|
borderRadius: BorderRadius.circular(8), // Add border radius
|
|
borderSide: BorderSide.none, // Remove the underline
|
|
),
|
|
errorBorder: OutlineInputBorder(
|
|
borderSide: BorderSide(color: Colors.red, width: 2),
|
|
borderRadius: BorderRadius.circular(8),
|
|
),
|
|
focusedErrorBorder: OutlineInputBorder(
|
|
borderSide: BorderSide(color: Colors.red, width: 2),
|
|
borderRadius: BorderRadius.circular(8),
|
|
),
|
|
);
|
|
|
|
|
|
|
|
Decoration containerDecoration = BoxDecoration(
|
|
boxShadow: [
|
|
BoxShadow(
|
|
color: Colors.grey.withOpacity(0.5),
|
|
spreadRadius: 5,
|
|
blurRadius: 8,
|
|
offset: Offset(0,
|
|
3), // changes position of shadow
|
|
),
|
|
],
|
|
color: ColorsManager.boxColor,
|
|
borderRadius: BorderRadius.all(Radius.circular(10))); |