marker_crafter 1.1.3 copy "marker_crafter: ^1.1.3" to clipboard
marker_crafter: ^1.1.3 copied to clipboard

Marker Crafter özelleştirilmiş marker paketidir. (Marker Crafter is a customized marker pack.)

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:google_maps_flutter/google_maps_flutter.dart';
import 'package:marker_crafter/extension/marker_crafter_add_extension.dart';
import 'package:marker_crafter/marker_crafter.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
        useMaterial3: true,
      ),
      home: const MapScreen(),
    );
  }
}

class MapScreen extends StatefulWidget {
  const MapScreen({super.key});

  @override
  State<MapScreen> createState() => _MapScreenState();
}

class _MapScreenState extends State<MapScreen> {
  Set<Marker> markers = {};

  @override
  void initState() {
    super.initState();
    addMarkers();
  }

  void addMarkers() async {
    MarkerCrafter marker = MarkerCrafter(
      text: "1",
      markerId: const MarkerId("markerIdString"),
      position: const LatLng(41.087577, 28.809226),
      backgroundColor:  Colors.red,
    );

    bool success = await markers.addTextMarker2(marker);
    if (success) {
      setState(() {});
    }
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text("Marker Crafter Demo"),
      ),
      body: GoogleMap(
        initialCameraPosition: const CameraPosition(
          target: LatLng(41.087577, 28.809226),
          zoom: 10,
        ),
        markers: markers,
      ),
    );
  }
}
3
likes
150
pub points
70%
popularity

Publisher

unverified uploader

Marker Crafter özelleştirilmiş marker paketidir. (Marker Crafter is a customized marker pack.)

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter, font_awesome_flutter, google_maps_flutter

More

Packages that depend on marker_crafter