FLUTTER ECOSYSTEM

NirmalScaria/label_marker

텍스트 레이블이 있는 지도 마커용 플러터 플러그인

label_marker 프로젝트 이미지
Stars
7
Forks
8
최근 푸시(UTC)
2025. 7. 1.
프로젝트 상태
활성
Nirmal Scaria GitHub avatar
GITHUB User

Nirmal Scaria ↗

SDE @ Amazon . Designer . Developer . Pentester

언어Dart

기술 주제

이 저장소가 배포한 패키지

사용 중인 의존성

의존성 목록 4 개

원본 README

아래는 영문 원문 스냅샷입니다. 최신 내용은 GitHub에서 확인하세요.

README 펼치기 / 접기

A package to create and use Google Maps marker with label text; the easiest and most efficient way.

Pub Package MIT License

Features

logo

Use this package in your Flutter app to:

  • Include map marker with text in flutter app
  • Customise the background colour of the label
  • Customise the font style of the label
  • Implement any other functionality that you could do with normal markers

Getting started

  1. Do the basic setup for having Google Maps
  2. Create a Set of normal markers ( Set < Marker > ) and set it as markers parameter of Google Maps widget
  3. Import this package; label_marker, and call addLabelMarker() function on the Set of markers when you want to add a label marker.
  4. Pass a LabelMarker widget, (created by giving required parameters, ie, label, position and markerId) to the above function. (See example.)
  5. Remember to call setState using 'then' keyword on the addLabelMarker() function.

Usage

markers.addLabelMarker(LabelMarker(
    label: "TextToShow",
    markerId: MarkerId("idString"),
    position: LatLng(10.0, 11.0),
    backgroundColor: Colors.green,
    )).then((value) {
    setState(() {});
    },
);

Additional information

This was done alone and contributions are absolutely welcome. Any idea or suggestion to remove the need of setState after the function manually called, would be most appreciated.

Enjoy the package. Develop something beautiful.