textField method
Implementation
Widget textField(BuildContext context) {
if (Theme.of(context).platform == TargetPlatform.iOS) {
return CupertinoTextField(
focusNode: textNode,
controller: textController,
keyboardAppearance: MediaQuery.of(context).platformBrightness,
padding: const EdgeInsets.all(12),
placeholderStyle: TextStyle(
decoration: TextDecoration.none,
color: Colors.white54,
),
placeholder: viewer!.customizer.replyPlaceholder,
decoration: BoxDecoration(),
maxLines: 1,
style: TextStyle(
decoration: TextDecoration.none,
color: Colors.white,
),
onSubmitted: (String message) {
viewer!.onStoryReplied?.call(
viewerController: viewerController,
storyID: viewerController!.currentStory.id,
message: message,
);
},
);
} else {
return Material(
color: Colors.transparent,
child: TextField(
focusNode: textNode,
controller: textController,
keyboardAppearance: MediaQuery.of(context).platformBrightness,
decoration: InputDecoration(
contentPadding: const EdgeInsets.all(14),
border: InputBorder.none,
helperStyle: TextStyle(
decoration: TextDecoration.none,
color: Colors.white60,
),
hintStyle: TextStyle(
decoration: TextDecoration.none,
color: Colors.white54,
),
hintText: viewer!.customizer.replyPlaceholder,
),
maxLines: 1,
style: TextStyle(
decoration: TextDecoration.none,
color: Colors.white,
),
onSubmitted: (String message) {
viewer!.onStoryReplied?.call(
viewerController: viewerController,
storyID: viewerController!.currentStory.id,
message: message,
);
},
),
);
}
}