added new v5 style login screen
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import 'package:filcnaplo/theme/colors/colors.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_feather_icons/flutter_feather_icons.dart';
|
||||
|
||||
@@ -48,22 +49,40 @@ class _LoginInputState extends State<LoginInput> {
|
||||
return TextField(
|
||||
focusNode: widget.focusNode,
|
||||
controller: widget.controller,
|
||||
cursorColor: const Color(0xff20AC9B),
|
||||
cursorColor: AppColors.of(context).filc,
|
||||
textInputAction: TextInputAction.next,
|
||||
autofillHints: [autofill],
|
||||
obscureText: obscure,
|
||||
scrollPhysics: const BouncingScrollPhysics(),
|
||||
decoration: InputDecoration(
|
||||
fillColor: Colors.black.withOpacity(0.15),
|
||||
filled: true,
|
||||
enabledBorder: UnderlineInputBorder(
|
||||
// fillColor: Colors.black.withOpacity(0.15),
|
||||
filled: false,
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(12.0),
|
||||
borderSide: const BorderSide(width: 0, color: Colors.transparent),
|
||||
borderSide: BorderSide(
|
||||
width: 1,
|
||||
color: AppColors.of(context).inputBorder,
|
||||
),
|
||||
),
|
||||
focusedBorder: UnderlineInputBorder(
|
||||
// focusedBorder: UnderlineInputBorder(
|
||||
// borderRadius: BorderRadius.circular(12.0),
|
||||
// borderSide: const BorderSide(width: 0, color: Colors.transparent),
|
||||
// ),
|
||||
focusedBorder: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(12.0),
|
||||
borderSide: const BorderSide(width: 0, color: Colors.transparent),
|
||||
borderSide: BorderSide(
|
||||
width: 1,
|
||||
color: AppColors.of(context).filc,
|
||||
),
|
||||
),
|
||||
errorBorder: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(12.0),
|
||||
borderSide: const BorderSide(
|
||||
width: 1,
|
||||
color: Color(0xFFFF0000),
|
||||
),
|
||||
),
|
||||
contentPadding: const EdgeInsets.symmetric(horizontal: 16.0),
|
||||
suffixIconConstraints:
|
||||
const BoxConstraints(maxHeight: 42.0, maxWidth: 48.0),
|
||||
suffixIcon: widget.style == LoginInputStyle.password ||
|
||||
@@ -82,22 +101,28 @@ class _LoginInputState extends State<LoginInput> {
|
||||
if (widget.onClear != null) widget.onClear!();
|
||||
}
|
||||
},
|
||||
icon: Icon(
|
||||
widget.style == LoginInputStyle.password
|
||||
? obscure
|
||||
? FeatherIcons.eye
|
||||
: FeatherIcons.eyeOff
|
||||
: FeatherIcons.x,
|
||||
color: Colors.white),
|
||||
icon: widget.style == LoginInputStyle.password
|
||||
? Icon(
|
||||
obscure ? FeatherIcons.eye : FeatherIcons.eyeOff,
|
||||
color: AppColors.of(context).text.withOpacity(0.8),
|
||||
weight: 0.1,
|
||||
size: 18.0,
|
||||
)
|
||||
: Icon(
|
||||
FeatherIcons.x,
|
||||
color: AppColors.of(context).text.withOpacity(0.8),
|
||||
weight: 0.1,
|
||||
size: 20.0,
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
: null,
|
||||
),
|
||||
style: const TextStyle(
|
||||
style: TextStyle(
|
||||
fontSize: 14.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: Colors.white,
|
||||
color: AppColors.of(context).text.withOpacity(0.8),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user