Skip to content

Commit

Permalink
Resolve Git issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Arunbalaji001 committed Jun 10, 2022
1 parent de9e93b commit 6cac722
Show file tree
Hide file tree
Showing 28 changed files with 2,017 additions and 1,272 deletions.
@@ -1,83 +1,94 @@
import 'package:flutter/material.dart';
import 'package:getwidget/shape/gf_textfield_shape.dart';

class GfFormFieldDecoration extends InputDecoration {
const GfFormFieldDecoration(
{required this.context,
required this.shape,
required this.bgfilled,
this.bgcolor,
this.editingBorderColor,
this.idleBorderColor,
this.borderRadius,
this.textColor,
this.radius,
this.borderWidth,
this.gfprefixIcon,
this.hinttext,
this.fieldPadding});

final Color? editingBorderColor;
final Color? textColor;
final double? radius;
final GFTextFieldShape shape;
final Color? idleBorderColor;
final BuildContext context;
final double? borderWidth;
final Widget? gfprefixIcon;
final double? borderRadius;
final String? hinttext;
final bool bgfilled;
final Color? bgcolor;
final EdgeInsets? fieldPadding;
class GfFormFieldDecoration extends InputDecoration{


const GfFormFieldDecoration({
required this.context,
required this.shape,
required this.bgfilled,
this.bgcolor,
this.editingBorderColor,
this.idleBorderColor,
this.borderRadius,
this.textColor,
this.radius,
this.borderWidth,
this.gfprefixIcon,
this.hinttext,
this.fieldPadding
});

final Color? editingBorderColor;
final Color? textColor;
final double? radius;
final GFTextFieldShape shape;
final Color? idleBorderColor;
final BuildContext context;
final double? borderWidth;
final Widget? gfprefixIcon;
final double? borderRadius;
final String? hinttext;
final bool bgfilled;
final Color? bgcolor;
final EdgeInsets? fieldPadding;

@override
InputBorder get errorBorder => OutlineInputBorder(
borderSide: BorderSide(
color: Colors.red.shade800,
width: borderWidth ?? 0,
),
borderRadius: getradius(shape),
);

@override
InputBorder get errorBorder =>
OutlineInputBorder(
borderSide: BorderSide(
color: Colors.red.shade800,
width: borderWidth??0,
),
borderRadius: getradius(shape),
);

@override
InputBorder get focusedErrorBorder => OutlineInputBorder(
InputBorder get focusedErrorBorder =>
OutlineInputBorder(
borderSide: BorderSide(
color: Colors.red,
width: borderWidth ?? 0,
width: borderWidth??0,
),
borderRadius: getradius(shape),
);
@override
InputBorder get focusedBorder => OutlineInputBorder(
@override
InputBorder get focusedBorder =>
OutlineInputBorder(
borderSide: BorderSide(
color: editingBorderColor ?? Theme.of(context).primaryColor,
width: borderWidth ?? 0,
color: editingBorderColor??Theme.of(context).primaryColor,
width: borderWidth??0,
),
borderRadius: getradius(shape),
);

@override
InputBorder get enabledBorder =>
OutlineInputBorder(
borderSide: BorderSide(
color: editingBorderColor??Theme.of(context).primaryColor,
width: borderWidth??0,
),
borderRadius: getradius(shape),
);
@override
InputBorder get enabledBorder => OutlineInputBorder(
borderSide: BorderSide(
color: editingBorderColor ?? Theme.of(context).primaryColor,
width: borderWidth ?? 0,
),
borderRadius: getradius(shape),
);
@override
InputBorder get border => OutlineInputBorder(
InputBorder get border =>
OutlineInputBorder(
borderSide: BorderSide(
color: editingBorderColor ?? Theme.of(context).primaryColor,
width: borderWidth ?? 0,
color: editingBorderColor??Theme.of(context).primaryColor,
width: borderWidth??0,
),
borderRadius: getradius(shape),
);
@override
InputBorder get disabledBorder => OutlineInputBorder(
InputBorder get disabledBorder =>
OutlineInputBorder(
borderSide: BorderSide(
color: editingBorderColor ?? Theme.of(context).primaryColor,
width: borderWidth ?? 0,
color: editingBorderColor??Theme.of(context).primaryColor,
width: borderWidth??0,
),
borderRadius: getradius(shape),
);
Expand All @@ -95,22 +106,21 @@ class GfFormFieldDecoration extends InputDecoration {
Color? get fillColor => bgcolor;

@override
EdgeInsets get contentPadding =>
fieldPadding ?? const EdgeInsets.symmetric(horizontal: 4, vertical: 4);
EdgeInsets get contentPadding =>fieldPadding??const EdgeInsets.symmetric(horizontal: 4,vertical: 4);

BorderRadius getradius(GFTextFieldShape shape) {
double radius = 0;
switch (shape) {
BorderRadius getradius(GFTextFieldShape shape){
double radius=0;
switch (shape){
case GFTextFieldShape.pills:
radius = 50;
radius=50;
break;
case GFTextFieldShape.roundedsquare:
radius = borderRadius ?? 0;
radius=borderRadius??0;
break;
case GFTextFieldShape.square:
radius = 0;
radius=0;
break;
}
return BorderRadius.circular(radius);
}
}
}

0 comments on commit 6cac722

Please sign in to comment.