creat new MIH form wdget
This commit is contained in:
parent
6f1b9bb8c8
commit
a32c91b831
1 changed files with 27 additions and 0 deletions
|
|
@ -0,0 +1,27 @@
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
class MihForm extends StatefulWidget {
|
||||||
|
final GlobalKey<FormState> formKey;
|
||||||
|
final List<Widget> formFields;
|
||||||
|
const MihForm({
|
||||||
|
super.key,
|
||||||
|
required this.formKey,
|
||||||
|
required this.formFields,
|
||||||
|
});
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<MihForm> createState() => _MihFormState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _MihFormState extends State<MihForm> {
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Form(
|
||||||
|
key: widget.formKey,
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: widget.formFields,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue