maze 1.0.0+1

  • Readme
  • Changelog
  • Example
  • Installing
  • 72

maze_game #

A simple maze game in Flutter. It also serves as a CustomPainter example.

┬┐Why? #

In another project, I needed to create a "simple" maze game that can be used in low-end devices, so game engine was not an option.

Suddenly, I found a way to do it in pure Android.

Maze

So, this is a "port" of that saviour example.

Maze package #

pub Project Status: Active License: MIT style: effective dart

You can use it in your project, you only need to add the dependency:

dependencies:
  flutter:
    sdk: flutter
  maze_game: 1.0.0

Now you can create your Maze:

Maze(
    player: MazeItem(
        'https://image.flaticon.com/icons/png/512/808/808433.png',
        ImageType.network),
    columns: 6,
    rows: 12,
    wallThickness: 4.0,
    wallColor: Theme.of(context).primaryColor,
    finish: MazeItem(
        'https://image.flaticon.com/icons/png/512/1506/1506339.png',
        ImageType.network),
    onFinish: () => print('Hi from finish line!'))

[1.0.0+1] #

  • Update dependencies and fixes for launch.

[1.0.0] #

  • Release: Simple maze game
  • Customize: wall color, wall thickness, player, finish and checkpoints.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:maze/maze.dart';

void main() => runApp(MazeApp());

class MazeApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
        title: 'Maze Demo',
        theme: ThemeData(
            primarySwatch: Colors.orange,
            scaffoldBackgroundColor: Colors.blueGrey),
        home: MazeScreen());
  }
}

class MazeScreen extends StatefulWidget {
  @override
  _MazeScreenState createState() => _MazeScreenState();
}

class _MazeScreenState extends State<MazeScreen> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
        body: SafeArea(
            child: Maze(
                player: MazeItem(
                    'https://image.flaticon.com/icons/png/512/808/808433.png',
                    ImageType.network),
                columns: 6,
                rows: 12,
                wallThickness: 4.0,
                wallColor: Theme.of(context).primaryColor,
                finish: MazeItem(
                    'https://image.flaticon.com/icons/png/512/1506/1506339.png',
                    ImageType.network),
                onFinish: () => print('Hi from finish line!'))));
  }
}

Use this package as a library

1. Depend on it

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


dependencies:
  maze: ^1.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:maze/maze.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
43
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
72
Learn more about scoring.

We analyzed this package on Jul 11, 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 not compatible with SDK dart

Because:

  • maze that is a package requiring null.

Package not compatible with runtime flutter-web on web

Because:

  • package:maze/maze.dart that imports:
  • package:maze/src/maze_widget.dart that imports:
  • dart:io

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.6.0 <3.0.0
equatable ^1.1.1 1.2.2
flutter 0.0.0
stack ^0.1.0 0.1.0
Transitive dependencies
collection 1.14.12 1.14.13
meta 1.1.8 1.2.2
sky_engine 0.0.99
typed_data 1.1.6 1.2.0
vector_math 2.0.8 2.1.0-nullsafety
Dev dependencies
effective_dart ^1.2.0
flutter_test