flutter_breadcrumb_menu 1.0.0

  • Readme
  • Changelog
  • Example
  • Installing
  • 76

flutter breadcrumb menu #

Test

example

Install #

dependencies:
  flutter_breadcrumb_menu: ^0.1.2

Usage #

// defined routes
MaterialApp(
  routes: {
    Dev.routeName: (_) => Dev(),
    FrontEnd.routeName: (_) => FrontEnd(),
    ColdStone.routeName: (_) => ColdStone(),
    FlutterDev.routeName: (_) => FlutterDev(),
  },
);

// create breads
List<Bread> breads = [
  Bread(label: "冷石科技有限公司 ", route: ColdStone.routeName),
  Bread(label: "研发部", route: Dev.routeName),
  Bread(label: "大前端组", route: FrontEnd.routeName),
  Bread(label: "Flutter 开发", route: FlutterDev.routeName),
];

// render
Breadcrumb(breads: breads)

Config #

propertytypedefaultdescriptionrequired
breadsListnullbread crumbstrue
colorColorsColors.bluebread colorfalse
heightdouble40.0menu heightfalse
separatorWidgetIcon()bread separatorfalse

Contribute #

  1. Fork it (https://github.com/xrr2016/flutter-breadcrumb.git)
  2. Create your feature branch (git checkout -b feature/foo)
  3. Commit your changes (git commit -am 'Add some foo')
  4. Push to the branch (git push origin feature/foo)
  5. Create a new Pull Request

License #

MIT

[1.0.0] - 2020.06.16 #

  • Version v1.0.0 release! 🎉

[0.1.3] - 2020.04.27 #

  • Add OnValueChanged event

[0.1.2] - 2020.04.03 #

  • use grey color for last breadcrumb.

[0.1.1] - 2020.04.03 #

  • change package version.

[0.1.0] - 2020.04.03 #

  • first release of flutter breadcrumb menu. 🚀

example/main.dart

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

import 'cold_stone.dart';
import 'dev.dart';
import 'flutter_dev.dart';
import 'front_end.dart';

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

List<Bread> breads = [
  Bread(label: "冷石科技有限公司 ", route: ColdStone.routeName),
  Bread(label: "研发部", route: Dev.routeName),
  Bread(label: "大前端组", route: FrontEnd.routeName),
  Bread(label: "Flutter 开发", route: FlutterDev.routeName),
];

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Breadcrumb App',
      home: Scaffold(
        appBar: AppBar(
          title: Text('Breadcrumb Demo'),
        ),
        body: Center(
          child: Breadcrumb(breads: breads),
        ),
      ),
      routes: {
        ColdStone.routeName: (_) => ColdStone(),
        Dev.routeName: (_) => Dev(),
        FrontEnd.routeName: (_) => FrontEnd(),
        FlutterDev.routeName: (_) => FlutterDev(),
      },
    );
  }
}

Use this package as a library

1. Depend on it

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


dependencies:
  flutter_breadcrumb_menu: ^1.0.0

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:flutter_breadcrumb_menu/flutter_breadcrumb_menu.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
53
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]
76
Learn more about scoring.

We analyzed this package on Jul 2, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.8.4
  • pana: 0.13.13
  • Flutter: 1.17.5

Analysis suggestions

Package not compatible with SDK dart

because of import path [flutter_breadcrumb_menu] that is in a package requiring null.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.7.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.12 1.14.13
meta 1.1.8
sky_engine 0.0.99
typed_data 1.1.6 1.2.0
vector_math 2.0.8
Dev dependencies
flutter_test