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

Pagination with pageView and markers throw google map

Pagination markers and cards on map with page view

Features #

Pagination throw google map smoothly

Getting started #

no pre requirements required

Usage #

class MapItem implements MarkerItem {
  // TODO: implement all fields
}

final GoogleMapController mapController = GoogleMapController();
final String? selectedItemId = null;

PaginationMap<MapItem>(
    initialCameraPosition: CameraPosition(target: LatLng(33.4176386794544, 44.34958527530844)),
    currentUserLocation: LatLng(33.4176386794544, 44.34958527530844),
    height: 200,
    pageViewController: PageController(),
    mapController: mapController,
    setMapController: (value) {
        setState(() {
            mapController = value;
        });
    },
    onItemsChanged: (int skip, CameraPosition cameraPosition) async {
        return getItem(skip, cameraPosition)
    },
    pageViewItemBuilder: (BuildContext context, MapItem item) {
        return MapItemListTile(item: item);
    },
    selectedItemId: selectedItemId,
    onSelectedItemChanged: (value) {
        setState(() {
            selectedItemId = value;
        });
    },
    labelFormatter: (String label) {
        return "Hello, ${label}";
    },
),

Additional information #

Drag map will change camera position and click next or previous will change pagination

2
likes
70
pub points
0%
popularity

Publisher

verified publishermatheer.com

Pagination with pageView and markers throw google map

Homepage
Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

flutter, google_maps_flutter

More

Packages that depend on pagination_map