build method
Describes the part of the user interface represented by this widget.
The framework calls this method when this widget is inserted into the tree in a given BuildContext and when the dependencies of this widget change.
Implementation
@override
Widget build(BuildContext context) {
return Positioned(
left: 36,
top: 0,
bottom: 96,
child: Center(
child: Container(
padding: EdgeInsets.zero,
constraints: BoxConstraints(
minWidth: 100,
maxWidth: context.width - 72,
),
child: Center(
child: IntrinsicWidth(
child: ShaderMask(
blendMode: BlendMode.overlay,
shaderCallback: (bounds) {
return createShader(
colors: gradientColors[backgroundColorIndex],
width: context.width,
height: context.height,
);
},
child: TextField(
autofocus: true,
controller: controller,
textAlign: TextAlign.center,
style: GoogleFonts.getFont(
fontFamilyList[fontFamilyIndex],
).copyWith(
color: textColor,
fontSize: fontSize,
),
cursorColor: textColor,
minLines: 1,
keyboardType: TextInputType.multiline,
maxLines: null,
decoration: const InputDecoration(
fillColor: Colors.white,
filled: false,
border: UnderlineInputBorder(
borderSide: BorderSide(
color: Colors.transparent,
),
),
focusedBorder: UnderlineInputBorder(
borderSide: BorderSide(
color: Colors.transparent,
),
),
),
onChanged: onChanged,
onSubmitted: onSubmit,
),
),
),
),
),
),
);
}