Search packages, repositories and app categories

game_levels_scrolling_map cover
Package detailsv0.0.7

game_levels_scrolling_map

A package for making game levels map like candy crush or similar games using flutter with ability to be horizontal or vertical

AndroidiOSmacOSWindowsLinux
30-day downloads
182
Likes
83
Pub points
120

Install package

flutter pub add game_levels_scrolling_map

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

A Flutter package designed to create game level maps similar to Candy Crush, supporting both horizontal and vertical scrolling layouts. It enables developers to build interactive, swipeable level grids ideal for match-3 or puzzle games. The package is optimized for performance and integrates seamlessly into Flutter applications across multiple platforms. With customizable grid dimensions and smooth animations, it simplifies the implementation of engaging level navigation interfaces.

Use cases

  • Creating puzzle game level selectors
  • Building horizontal or vertical level navigation
  • Implementing swipe-based level exploration
  • Designing Candy Crush-style game maps
  • Developing mobile game progression interfaces

Key features

  • Supports horizontal and vertical scrolling
  • Customizable grid layout
  • Smooth animation transitions
  • Cross-platform compatibility
  • Easy integration with Flutter
  • Responsive design for different screen sizes

Suitable for

  • Puzzle game developers
  • Mobile game creators
  • Flutter beginners in game development
  • Apps requiring interactive level selection
  • Projects with grid-based navigation

Considerations

  • Requires understanding of Flutter layout principles
  • May need additional styling for custom visuals
  • Performance depends on grid size and complexity
  • Limited to grid-based level structures
  • Not suitable for non-scrolling or complex 2D maps

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

Game Levels Scrolling Map

A package for making game levels map like candy crush or similar games using flutter with ability to be horizontal or vertical

Getting Started

  • This package enables you to build a Game levels map like candy crush with the following features :
    • Option to make it horizontal map or vertical
    • Option to reverse the scrolling start direction
    • Option to add the x,y points positions
    • Option to extract the x,y points positions from asset SVG file or online SVG file

Platform Support

| Android ✔️ | IOS ✔️ | MacOS ✔️ ️| Web ✔️ | Linux ✔️ | Windows ✔ ️|

Usage


Step 1 Import package:game_levels_scrolling_map/game_levels_scrolling_map.dart which contain the main widget of the map GameLevelsScrollingMap then Import package:game_levels_scrolling_map/model/point_model.dart which contain the model of points

Step 2 Start adding your points widgets by creating a new List of points and adding widgets to it using the PointModel class

List<PointModel> points = [];
      
for(int i = 0; i<50 ; i++){
  PointModel point = PointModel(100,Container(width: 40, height: 40, color: Colors.red, child: Text("$i")));
  
  /* To make the map scroll to a specific point just make its parameter 'isCurrent' = true like the following which will make the map scroll to it once created*/
  if(i == 20) point.isCurrent = true;
  
  points.add(point);
}

Step 3 Use GameLevelScrollingMap.scrollable widget to build the map

- To make vertical map:
Vertical Map Example

Widget build(BuildContext context) {
  return Scaffold(
    body: Container(
      child: GameLevelsScrollingMap.scrollable(
              imageUrl: "assets/drawable/map_vertical.png",
              direction: Axis.vertical,
              reverseScrolling: true,
              svgUrl: 'assets/svg/map_vertical.svg',
              points: points,)
          ),
        );
}

- To make horizontal map:
Horizontal Map Example

Widget build(BuildContext context) {
  return Scaffold(
    body: Container(
      child: GameLevelsScrollingMap.scrollable(
            imageUrl: "assets/drawable/map_horizontal.png",
            direction: Axis.horizontal,
            svgUrl: 'assets/svg/map_horizontal.svg',
            points: points,)
          ),
        );
}

Categories

Dependencies

Dependency list 2 items

Source repository

Projects using this package

No data available yet.