flutter_dynamic_forms 0.8.0 flutter_dynamic_forms: ^0.8.0 copied to clipboard
A flutter project providing infrastructure to render dynamic forms.
import 'package:example/simple_form_screen.dart';
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: WelcomeScreen(),
);
}
}
class WelcomeScreen extends StatefulWidget {
WelcomeScreen({Key key}) : super(key: key);
_WelcomeScreenState createState() => _WelcomeScreenState();
}
class _WelcomeScreenState extends State<WelcomeScreen> {
@override
void initState() {
super.initState();
}
@override
void dispose() {
super.dispose();
}
@override
Widget build(BuildContext context) {
return Scaffold(
body: Center(
child: Column(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
RaisedButton(
onPressed: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => SimpleFormScreen(),
),
);
},
child: Text("Simple Form"),
),
Padding(
padding: const EdgeInsets.all(8.0),
child: Text(
"For more complex example see flutter_dynamic_forms_components/example",
textAlign: TextAlign.center),
)
],
),
),
);
}
}