mburger 0.0.1+13

  • Readme
  • Changelog
  • Example
  • Installing
  • new58

MBurger-Flutter #

MBurger Flutter client.

You can use this library to interact with the MBurger platform.

MBurger Documentation #

You can find the documentation for MBurger here

[0.0.1+13] - 03/07/2020 #

  • Added Markdown element
  • Bugfix and enhancements

example/lib/main.dart

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

void main() {
  MBManager.shared.apiToken = 'YOUR_API_TOKEN';
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'MBurger Example',
      theme: ThemeData(
        primarySwatch: Colors.blue,
        visualDensity: VisualDensity.adaptivePlatformDensity,
      ),
      home: MBurgerExample(),
    );
  }
}

class MBurgerExample extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('MBurger Example'),
      ),
      body: Column(
        mainAxisSize: MainAxisSize.max,
        mainAxisAlignment: MainAxisAlignment.center,
        children: <Widget>[
          MaterialButton(
            child: Text('Get project'),
            onPressed: () => _getProject(),
          ),
          MaterialButton(
            child: Text('Get block'),
            onPressed: () => _getBlock(),
          ),
          MaterialButton(
            child: Text('Get section'),
            onPressed: () => _getSection(),
          )
        ],
      ),
    );
  }

  /// Retrieves the project connected to the token
  _getProject() async {
    MBProject project = await MBManager.shared.getProject().catchError(
          (error) => print(error),
        );
    print(project);
  }

  /// Retrieves all the sections of a block with the id passed
  _getBlock() async {
    MBBlock block = await MBManager.shared
        .getBlock(
          blockId: 1,
          includeElements: true,
        )
        .catchError((error) => print(error));
    print(block);
  }

  /// Retrieves a sections with the id passed
  _getSection() async {
    MBSection section = await MBManager.shared
        .getSection(
          sectionId: 1,
          includeElements: true,
        )
        .catchError((error) => print(error));
    print(section);
  }
}

Use this package as a library

1. Depend on it

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


dependencies:
  mburger: ^0.0.1+13

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

We analyzed this package on Jul 9, 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 does not support Flutter platform android

Because:

  • package:mburger/mburger.dart that imports:
  • package:mburger/mb_auth/mb_auth.dart that imports:
  • package:shared_preferences/shared_preferences.dart that imports:
  • package:shared_preferences_linux/shared_preferences_linux.dart that declares support for platforms: linux

Package does not support Flutter platform ios

Because:

  • package:mburger/mburger.dart that imports:
  • package:mburger/mb_auth/mb_auth.dart that imports:
  • package:shared_preferences/shared_preferences.dart that imports:
  • package:shared_preferences_linux/shared_preferences_linux.dart that declares support for platforms: linux

Package does not support Flutter platform linux

Because:

  • package:mburger/mburger.dart that imports:
  • package:mburger/mb_auth/mb_auth.dart that imports:
  • package:mburger/mb_manager.dart that imports:
  • package:device_info/device_info.dart that declares support for platforms: android, ios

Package does not support Flutter platform macos

Because:

  • package:mburger/mburger.dart that imports:
  • package:mburger/mb_auth/mb_auth.dart that imports:
  • package:mburger/mb_manager.dart that imports:
  • package:device_info/device_info.dart that declares support for platforms: android, ios

Package does not support Flutter platform web

Because:

  • package:mburger/mburger.dart that imports:
  • package:mburger/mb_auth/mb_auth.dart that imports:
  • package:mburger/mb_manager.dart that imports:
  • package:device_info/device_info.dart that declares support for platforms: android, ios

Package does not support Flutter platform windows

Because:

  • package:mburger/mburger.dart that imports:
  • package:mburger/mb_auth/mb_auth.dart that imports:
  • package:mburger/mb_manager.dart that imports:
  • package:device_info/device_info.dart that declares support for platforms: android, ios

Package not compatible with SDK dart

Because:

  • mburger that is a package requiring null.

Maintenance suggestions

Package is pre-v0.1 release. (-10 points)

While nothing is inherently wrong with versions of 0.0.*, it might mean that the author is still experimenting with the general direction of the API.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
device_info >=0.4.2+4 <2.0.0 0.4.2+4
flutter 0.0.0
flutter_secure_storage ^3.3.1+1 3.3.3
http ^0.12.0+4 0.12.1
http_parser ^3.1.4 3.1.4
intl ^0.16.1 0.16.1
shared_preferences ^0.5.6+1 0.5.8
Transitive dependencies
charcode 1.1.3
collection 1.14.12 1.14.13
file 5.2.1
flutter_web_plugins 0.0.0
meta 1.1.8 1.2.1
path 1.7.0
path_provider_linux 0.0.1+2
path_provider_platform_interface 1.0.2
platform 2.2.1
plugin_platform_interface 1.0.2
process 3.0.13
shared_preferences_linux 0.0.2+1
shared_preferences_macos 0.0.1+10
shared_preferences_platform_interface 1.0.4
shared_preferences_web 0.1.2+7
sky_engine 0.0.99
source_span 1.7.0
string_scanner 1.0.5
term_glyph 1.1.0
typed_data 1.1.6 1.2.0
vector_math 2.0.8 2.1.0-nullsafety
xdg_directories 0.1.0
Dev dependencies
flutter_test
pedantic ^1.0.0 1.9.0 1.9.1