搜索插件、代码仓与 APP 分类

插件详情v0.2.0

bangladesh

‘Bangladesh’ Flutter 插件是一个强大的工具,可用于显示可自定义的孟加拉国地图。通过突出显示行政区边界和自定义触摸反馈,它可在多种应用中提供引人入胜的用户体验。

AndroidiOSWebmacOSWindowsLinux
近 30 天下载
55
喜欢数
26
Pub 分数
130

安装插件

flutter pub add bangladesh

插件介绍

基于插件公开信息、社区数据与项目使用情况整理的选型参考。

Bangladesh Flutter 插件提供了一个可自定义的孟加拉国地图,突出显示了各个行政区的边界。它支持交互式触摸反馈,非常适合需要在孟加拉国范围内进行地理可视化应用。该插件专为跨平台使用设计,支持 Android、iOS、Web、macOS、Windows 和 Linux。插件轻量且能无缝集成到 Flutter 项目中,通过直观的地图交互提升用户参与度。

适合场景

  • 互动式教育应用
  • 政府服务门户
  • 旅游和旅游平台
  • 地理数据可视化
  • 本地企业位置查找器

主要特点

  • 可自定义的分区边界
  • 地图区域的触控反馈
  • 跨平台兼容性
  • 轻量且易于集成
  • 高分辨率地图渲染

适合对象

  • 为孟加拉国开发基于位置的应用程序的开发者
  • 教育或公民科技项目
  • 需要区域地图交互的应用程序

使用建议

  • 仅限孟加拉国
  • 无动态数据加载
  • 需要手动更新以进行管理更改
  • 不适用于实时跟踪

原始 README

以下为关联源码仓库的 README 原文快照,最新内容请访问源码仓库。

Bangladesh

The 'Bangladesh' Flutter plugin is a versatile tool that allows developers to effortlessly render a detailed map of Bangladesh within their Flutter applications. With its seamless integration, this plugin provides a visually appealing display of the country's map, highlighting all division borders for enhanced clarity.

Features

  • Render a detailed map of Bangladesh within Flutter applications.
  • Highlight division borders for improved visual representation.
  • Provide custom touch feedback for interactive user experience.
  • Suitable for various applications such as educational apps, travel guides, and more.

Installation

To use the 'Bangladesh' Flutter plugin, follow these steps:

  1. Add the following line to the dependencies section in your project's pubspec.yaml file:
flutter pub add bangladesh
  1. Import the package in your Dart code:
import 'package:bangladesh/bangladesh.dart';

Usage

Render Bangladesh Map

To render the Bangladesh map, use the BangladeshMap widget:

import 'package:bangladesh/bangladesh.dart';

class MyHomePage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('Bangladesh Map'),
      ),
      body: Center(
        child: Bangladesh(),
      ),
    );
  }
}
Customize Map

The 'Bangladesh' Flutter plugin allows you to provide custom touch feedback when interacting with the map. Here's an example of how to achieve this:

import 'package:bangladesh/bangladesh.dart';

class OurMap extends StatelessWidget {

  @override
  Widget build(BuildContext context,  ) {
    return const BangladeshMap(
      width: 461,
      height: 600,
      rangpurColor: Colors.orange,
      rajshahiColor: Colors.red,
      dhakaColor: Colors.indigo,
      sylhetColor: Colors.blue,
      khulnaColor: Colors.teal,
      chittagongColor: Colors.grey,
      barisalColor: Colors.pink,
      mymensinghColor: Colors.brown,
      showBorder: true,
      showName: true,
      showDivisionBorder: true,
      showDistrictBorder: true,
    );

  }
}

Available Options

Also there are some other properties you can use to customize the map:

Field Type Description
width double Width of the map
height double Height of the map
animationScaleFactor double Scale factor for map animation
showName bool Whether to show division names on the map
showTooltip bool Whether to show tooltips when tapping on divisions
showDistrictBorder bool Whether to show borders around districts
isNameUpperCase bool Whether division names should be displayed in uppercase
showBorder bool Whether to show borders around divisions
showDivisionBorder bool Whether to show borders between divisions
tooltipFeedback bool? Whether to provide haptic feedback on tooltip display
tooltipPreferBelow bool? Whether tooltips should be displayed below divisions
tooltipExcludeFromSemantics bool? Whether tooltips should be excluded from semantics
borderStrokeSize double? Size of the border stroke
divisionStrokeSize double? Size of the division border stroke
districtStrokeSize double? Size of the district border stroke
tooltipHeight double? Height of the tooltip
tooltipVerticalOffset double? Vertical offset for tooltip display
borderColor Color? Color of the border
divisionBorderColor Color? Color of the division border
districtBorderColor Color? Color of the district border
tooltipDecoration Decoration? Decoration for the tooltip
tooltipDuration Duration? Duration for tooltip display
tooltipWaitDuration Duration? Duration to wait before displaying the tooltip
tooltipTriggerMode TooltipTriggerMode? Mode for triggering tooltips (long press or tap)
tooltipTextStyle TextStyle? Text style for the tooltip
nameTextStyle TextStyle? Text style for division names
tooltipPadding EdgeInsetsGeometry? Padding for the tooltip
tooltipMargin EdgeInsetsGeometry? Margin for the tooltip
dhakaColor Color? Color for Dhaka division
rangpurColor Color? Color for Rangpur division
rajshahiColor Color? Color for Rajshahi division
khulnaColor Color? Color for Khulna division
sylhetColor Color? Color for Sylhet division
barisalColor Color? Color for Barisal division
chittagongColor Color? Color for Chattogram division
mymensinghColor Color? Color for Mymensingh division
onTapRangpur VoidCallback? Callback function for tapping on Rangpur division
onTapRajshahi VoidCallback? Callback function for tapping on Rajshahi division
onTapMymensingh VoidCallback? Callback function for tapping on Mymensingh division
onTapSylhet VoidCallback? Callback function for tapping on Sylhet division
onTapKhulna VoidCallback? Callback function for tapping on Khulna division
onTapDhaka VoidCallback? Callback function for tapping on Dhaka division
onTapBarishal VoidCallback? Callback function for tapping on Barishal division
onTapChattogram VoidCallback? Callback function for tapping on Chattogram division
rangpurTitle String Title for Rangpur division
rajshahiTitle String Title for Rajshahi division
mymensinghTitle String Title for Mymensingh division
sylhetTitle String Title for Sylhet division
khulnaTitle String Title for Khulna division
dhakaTitle String Title for Dhaka division
barishalTitle String Title for Barishal division
chattogramTitle String Title for Chattogram division
tooltipMsgRangpur String? Tooltip message for Rangpur division
tooltipMsgRajshahi String? Tooltip message for Rajshahi division
tooltipMymensingh String? Tooltip message for Mymensingh division
tooltipSylhet String? Tooltip message for Sylhet division
tooltipKhulna String? Tooltip message for Khulna division
tooltipDhaka String? Tooltip message for Dhaka division
tooltipBarishal String? Tooltip message for Barishal division
tooltipChattogram String? Tooltip message for Chattogram division
tooltipRichMsgRangpur InlineSpan? Rich tooltip message for Rangpur division
tooltipRichMsgRajshahi InlineSpan? Rich tooltip message for Rajshahi division
tooltipRichMsgMymensingh InlineSpan? Rich tooltip message for Mymensingh division
tooltipRichMsgSylhet InlineSpan? Rich tooltip message for Sylhet division
tooltipRichMsgKhulna InlineSpan? Rich tooltip message for Khulna division
tooltipRichMsgDhaka InlineSpan? Rich tooltip message for Dhaka division
tooltipRichMsgBarishal InlineSpan? Rich tooltip message for Barishal division
tooltipRichMsgChattogram InlineSpan? Rich tooltip message for Chattogram division

Feel free to refer to this table when using the 'Bangladesh' Flutter plugin to understand the available options and their respective types.

Contributions

Contributions are welcome! If you encounter any issues or have suggestions for improvements, please feel free to open an issue or submit a pull request.

License

The 'Bangladesh' Flutter plugin is released under the MIT License.

所属分类

源码仓库

使用此插件的项目

暂无相关数据。