amapbus 0.0.1

  • Readme
  • Changelog
  • Example
  • Installing
  • 44

amapbus #

基于高德地图sdk的公交查询插件 仅实现Android原生相关,IOS尚未实现

Getting Started #

This project is a starting point for a Flutter plug-in package, a specialized package that includes platform-specific implementation code for Android and/or iOS.

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

公交站点查询 #

公交线路查询 #

公交换乘查询 #

0.0.1 #

  • TODO: Describe initial release.


import 'package:amapbus_example/ui/search_bus_line.dart';
import 'package:amapbus_example/ui/search_bus_station.dart';
import 'package:amapbus_example/ui/search_bus_transfer.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

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

class MyApp extends StatefulWidget {
  _MyAppState createState() => _MyAppState();

class _MyAppState extends State<MyApp> {
  int _currentPage;
  PageController _pageController;
  void initState() {
    _pageController = new PageController();
    _currentPage = 0;

  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        body: PageView(
          controller: _pageController,
          children: <Widget>[
          physics: NeverScrollableScrollPhysics(),
          onPageChanged: (index){

        bottomNavigationBar: BottomNavigationBar(
          currentIndex: _currentPage,
          type: BottomNavigationBarType.fixed,
          items: [
              icon: Icon(Icons.departure_board),
              title: Text("站点"),
                icon: Icon(Icons.directions_bus),
                title: Text("线路")
                icon: Icon(Icons.all_inclusive),
                title: Text("换乘")
          onTap: (index){
            _currentPage = index;
            setState(() {



Use this package as a library

1. Depend on it

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

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

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

Because of import path [package:amapbus/amapbus.dart] that declares support for platforms: android, ios

Package does not support Flutter platform macos

Because of import path [package:amapbus/amapbus.dart] that declares support for platforms: android, ios

Package does not support Flutter platform web

Because of import path [package:amapbus/amapbus.dart] that declares support for platforms: android, ios

Package does not support Flutter platform windows

Because of import path [package:amapbus/amapbus.dart] that declares support for platforms: android, ios

Package not compatible with SDK dart

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

Health suggestions

Format lib/amapbus.dart.

Run flutter format to format lib/amapbus.dart.

Format lib/model/bussearchparam/line_param.dart.

Run flutter format to format lib/model/bussearchparam/line_param.dart.

Format lib/model/bussearchparam/query_param.dart.

Run flutter format to format lib/model/bussearchparam/query_param.dart.

Fix additional 3 files with analysis or formatting issues.

Additional issues in the following files:

  • lib/model/bussearchparam/station_param.dart (Run flutter format to format lib/model/bussearchparam/station_param.dart.)
  • lib/model/bussearchparam/transfer_param.dart (Run flutter format to format lib/model/bussearchparam/transfer_param.dart.)
  • lib/model/core/latlonpoint.dart (Run flutter format to format lib/model/core/latlonpoint.dart.)

Maintenance suggestions

The package description is too short. (-20 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.

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.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.2.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