Last updated:
0 purchases
form conversation
Form Conversation #
Overview #
A package to create forms in conversation format.
Screenshots #
Usage #
To use it, just create a widget and implement FormConversation passing a controller FormController and the form Items.
import 'package:form_conversation/form_conversation.dart';
class MyApp extends StatelessWidget {
const MyApp({super.key});
final FormController controller = FormController();
@override
Widget build(BuildContext context) {
return FormConversation(
controller: controller,
formItems: [
FormMessage(
text: 'Olá! 😃',
delay: 1000,
),
FormMessage(
text: 'Que bom ver você aqui!',
),
FormAction(
tag: 'name',
name: 'Nome',
text: 'Digite seu nome',
edit: true,
builder: (context, tag, edit) {
return FormTextFieldAndButton(
tag: tag,
edit: edit,
hintText: 'Digite seu nome',
autovalidateMode: AutovalidateMode.onUserInteraction,
validator: (value) {
if (value != null && value.length <= 3) {
return '';
}
return null;
},
formController: controller,
);
},
),
]
);
}
}
copied to clipboard
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.