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

discontinuedreplaced by: flutter_form_builder

Map Input Field for flutter_form_builder package. Used to select coodinates on a map.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:flutter_form_builder/flutter_form_builder.dart';
import 'package:form_builder_map_field/form_builder_map_field.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: 'FormBuilderMapField Example',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: MyHomePage(),
    );
  }
}

class MyHomePage extends StatefulWidget {
  @override
  _MyHomePageState createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  GlobalKey<FormBuilderState> _formKey = GlobalKey();

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('FormBuilderMapField Example'),
      ),
      body: FormBuilder(
        key: _formKey,
        child: Padding(
          padding: const EdgeInsets.all(8.0),
          child: Column(
            children: <Widget>[
              Container(
                child: FormBuilderMapField(
                  attribute: 'Coordinates',
                  decoration: InputDecoration(labelText: 'Select Location'),
                  markerIconColor: Colors.red,
                  markerIconSize: 50,
                  onChanged: (val) {
                    print(val);
                  },
                ),
              ),
            ],
          ),
        ),
      ),
    );
  }
}
12
likes
40
points
21
downloads

Publisher

verified publisherflutterformbuilderecosystem.com

Weekly Downloads

Map Input Field for flutter_form_builder package. Used to select coodinates on a map.

Repository (GitHub)
View/report issues

License

BSD-2-Clause (license)

Dependencies

flutter, flutter_form_builder, google_maps_flutter

More

Packages that depend on form_builder_map_field