form_builder_map_field 0.0.1

  • Readme
  • Changelog
  • Example
  • Installing
  • 76

form_builder_map_field #

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

Setup #

This package makes use of google_maps_flutter, for platform specific setup use the guidelines specified here

Usage #

FormBuilderMapField(
  attribute: 'Coordinates',
  decoration: InputDecoration(labelText: 'Select Location'),
  markerIconColor: Colors.red,
  markerIconSize: 50,
  onChanged: (val){
    print(val);
  },
),

[0.0.1] - TODO: Add release date. #

  • TODO: Describe initial release.

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);
                  },
                ),
              ),
            ],
          ),
        ),
      ),
    );
  }
}

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  form_builder_map_field: ^0.0.1

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:form_builder_map_field/form_builder_map_field.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
55
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
90
Overall:
Weighted score of the above. [more]
76
Learn more about scoring.

We analyzed this package on Jul 10, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.8.4
  • pana: 0.13.14
  • Flutter: 1.17.5

Analysis suggestions

Package does not support Flutter platform linux

Because:

  • package:form_builder_map_field/form_builder_map_field.dart that imports:
  • package:google_maps_flutter/google_maps_flutter.dart that declares support for platforms: android, ios

Package does not support Flutter platform macos

Because:

  • package:form_builder_map_field/form_builder_map_field.dart that imports:
  • package:google_maps_flutter/google_maps_flutter.dart that declares support for platforms: android, ios

Package does not support Flutter platform web

Because:

  • package:form_builder_map_field/form_builder_map_field.dart that imports:
  • package:google_maps_flutter/google_maps_flutter.dart that declares support for platforms: android, ios

Package does not support Flutter platform windows

Because:

  • package:form_builder_map_field/form_builder_map_field.dart that imports:
  • package:google_maps_flutter/google_maps_flutter.dart that declares support for platforms: android, ios

Package not compatible with SDK dart

Because:

  • form_builder_map_field that is a package requiring null.

Health issues and suggestions

Document public APIs. (-0.25 points)

38 out of 39 API elements have no dartdoc comment.Providing good documentation for libraries, classes, functions, and other API elements improves code readability and helps developers find and use your API.

Maintenance suggestions

Package is pre-v0.1 release. (-10 points)

While nothing is inherently wrong with versions of 0.0.*, it might mean that the author is still experimenting with the general direction of the API.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
flutter 0.0.0
flutter_form_builder ^3.8.1 3.11.4 4.0.0-alpha.5
google_maps_flutter ^0.5.25+1 0.5.28+1
Transitive dependencies
archive 2.0.13
args 1.6.0
asn1lib 0.6.5
basic_utils 2.5.5
charcode 1.1.3
collection 1.14.12 1.14.13
convert 2.1.1
country_pickers 1.3.0
crypto 2.1.5
date_range_picker 1.0.6
datetime_picker_formfield 1.0.0
flutter_chips_input 1.8.3 1.9.0-dev.3
flutter_colorpicker 0.3.4
flutter_keyboard_visibility 3.2.1
flutter_plugin_android_lifecycle 1.0.8
flutter_touch_spin 1.0.1
flutter_typeahead 1.8.5
google_maps_flutter_platform_interface 1.0.2
group_radio_button 1.0.1
http 0.12.1
http_parser 3.1.4
image 2.1.14
image_picker 0.6.7+4
image_picker_platform_interface 1.1.0
intl 0.16.1
json_annotation 3.0.1
logging 0.11.4
meta 1.1.8 1.2.2
path 1.7.0
pedantic 1.9.0 1.9.2
petitparser 3.0.4
phone_number 0.6.2+3
plugin_platform_interface 1.0.2
pointycastle 1.0.2
random_string 2.1.0
rating_bar 0.2.0
signature 3.2.0
sky_engine 0.0.99
source_span 1.7.0
stream_transform 1.2.0
string_scanner 1.0.5
term_glyph 1.1.0
typed_data 1.1.6 1.2.0
validators 2.0.1
vector_math 2.0.8 2.1.0-nullsafety
vin_decoder 0.1.2
xml 4.2.0
Dev dependencies
flutter_test