auto_fill_flutter 0.1.3
auto_fill_flutter: ^0.1.3 copied to clipboard
A Flutter package to auto-fill forms with Faker or AI-powered values. Supports text, images, dropdowns, and debug-only filler actions.
example/lib/main.dart
import 'package:flutter/material.dart';
import 'package:auto_fill_flutter/autofill_helper.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(title: const Text("Auto Fill Example")),
body: const Padding(
padding: EdgeInsets.all(16.0),
child: AutoFillDemoForm(),
),
),
);
}
}
class AutoFillDemoForm extends StatefulWidget {
const AutoFillDemoForm({super.key});
@override
State<AutoFillDemoForm> createState() => _AutoFillDemoFormState();
}
class _AutoFillDemoFormState extends State<AutoFillDemoForm> {
final nameController = TextEditingController();
final bioController = TextEditingController();
@override
Widget build(BuildContext context) {
return Column(
children: [
TextField(
controller: nameController,
decoration: const InputDecoration(labelText: "Name"),
),
TextField(
controller: bioController,
decoration: const InputDecoration(labelText: "Bio"),
),
const SizedBox(height: 20),
// 👇 Debug-only button to fake-fill fields
FakeFillerAction(
fields: {
nameController: FieldType.name,
bioController: FieldType.description,
},
),
],
);
}
}