generic_form_field 0.1.3+0 copy "generic_form_field: ^0.1.3+0" to clipboard
generic_form_field: ^0.1.3+0 copied to clipboard

form fields for a real world plugin project, search and select, dropdown.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'pages/users.dart';

void main() => runApp(MyApp());

class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  int _selectedIndex = 0;

  Widget _body() {
    Widget w;
    switch (_selectedIndex) {
      case 0:
        w = Center(child: Text(''));
        break;
      default:
        w = Users();
    }
    return w;
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Generic form field example app'),
        ),
        body: _body(),
        bottomNavigationBar: BottomNavigationBar(
          items: [
            BottomNavigationBarItem(
              icon: Icon(Icons.home),
              title: Text('Home'),
            ),
            BottomNavigationBarItem(
              icon: Icon(Icons.group),
              title: Text('Users'),
            )
          ],
          currentIndex: _selectedIndex,
          onTap: (i) => setState(() => _selectedIndex = i),
        ),
      ),
    );
  }
}
0
likes
30
pub points
0%
popularity

Publisher

unverified uploader

form fields for a real world plugin project, search and select, dropdown.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on generic_form_field