dynamic_form_generator 0.0.1 copy "dynamic_form_generator: ^0.0.1" to clipboard
dynamic_form_generator: ^0.0.1 copied to clipboard

Creating dynamic form for Flutter package.

example/example.dart

import 'package:flutter/material.dart';
import 'package:dynamic_form_generator/dynamic_form_generator.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Dinamik Form Örneği',
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Dinamik Form Örneği'),
        ),
        body: Padding(
          padding: const EdgeInsets.all(16.0),
          child: DynamicFormGenerator(
            fields: const [
              [
                't:Adınız?required&hint=Adınızı girin&style={"color":"blue"}',
                't:Soyadınız?required&hint=Soyadınızı girin&style={"color":"green"}',
              ],
              'e:Email?required',
              'p:Şifre?required',
              'd:Cinsiyet=Erkek,Kadın,Diğer?required',
              'c:Kullanım koşullarını kabul ediyorum?required',
            ],
            onSubmit: (formData) {
              // Form gönderildiğinde yapılacak işlemler
              print('Form Verileri: $formData');
            },
            fieldDecoration: InputDecoration(
              filled: true,
              fillColor: Colors.grey[200],
              border: const OutlineInputBorder(),
            ),
            textStyle: const TextStyle(fontSize: 16),
          ),
        ),
      ),
    );
  }
}
1
likes
140
points
21
downloads

Publisher

verified publisheryeksoftware.com.tr

Weekly Downloads

Creating dynamic form for Flutter package.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on dynamic_form_generator