mini_widget 0.1.2

  • Readme
  • Changelog
  • Example
  • Installing
  • 58

mini_widget #

Flutter 常用组件封装

GitHub code size in bytes

安装: #

dependencies:
  flutter:
    sdk: flutter
  mini_widget: ^0.1.0

使用: #

import 'package:mini_widget/mini_widget.dart';

0.1.2 #

修复bug

0.1.1 #

更新插件版本

0.1.0 #

第一个可用版

0.0.3 #

移除无用代码

0.0.2 #

首次发版

example/lib/main.dart

import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:mini_widget/mini_widget.dart';

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

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) => MaterialApp(home: MyHomePage());
}

class MyHomePage extends StatefulWidget {
  @override
  _MyHomePageState createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  var _progress = 70.0;
  List<Widget> items = [];
  @override
  Widget build(BuildContext context) {
    items.clear();
    initClockWidget();
    return Scaffold(
        appBar: AppBar(title: Text("MiniWidget 测试页面")),
        backgroundColor: Colors.grey[300],
        body: SingleChildScrollView(
          child: Column(children: items),
        ));
  }



  void initClockWidget() {
//    items.add(_buildItem("时钟", TimeClockPage()));
  }





  Widget _buildItem(String title, Widget widget) =>
      ListTile(title: Text(title ?? ''), onTap: () => gotoPage(widget, title));

  void gotoPage(Widget widget, String title) => Navigator.push(
      context,
      MaterialPageRoute(
          builder: (ctx) => Scaffold(
              appBar: AppBar(
                title: Text(title ?? ''),
              ),
              body: widget)));
}

Use this package as a library

1. Depend on it

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


dependencies:
  mini_widget: ^0.1.2

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:mini_widget/mini_widget.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 Apr 3, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.1
  • pana: 0.13.6
  • Flutter: 1.12.13+hotfix.8

Health suggestions

Fix lib/bloc/bloc_provider.dart. (-0.50 points)

Analysis of lib/bloc/bloc_provider.dart reported 1 hint:

line 24 col 40: 'ancestorWidgetOfExactType' is deprecated and shouldn't be used. Use findAncestorWidgetOfExactType instead. This feature was deprecated after v1.12.1..

Format lib/cell/card_cell.dart.

Run flutter format to format lib/cell/card_cell.dart.

Format lib/cell/check_item_cell.dart.

Run flutter format to format lib/cell/check_item_cell.dart.

Fix additional 33 files with analysis or formatting issues.

Additional issues in the following files:

  • lib/cell/edit_cell.dart (Run flutter format to format lib/cell/edit_cell.dart.)
  • lib/cell/header_cell.dart (Run flutter format to format lib/cell/header_cell.dart.)
  • lib/cell/image_cell.dart (Run flutter format to format lib/cell/image_cell.dart.)
  • lib/cell/line_cell.dart (Run flutter format to format lib/cell/line_cell.dart.)
  • lib/cell/search_cell.dart (Run flutter format to format lib/cell/search_cell.dart.)
  • lib/cell/select_cell.dart (Run flutter format to format lib/cell/select_cell.dart.)
  • lib/cell/tab_cell.dart (Run flutter format to format lib/cell/tab_cell.dart.)
  • lib/cell/text_cell.dart (Run flutter format to format lib/cell/text_cell.dart.)
  • lib/delegate/a.dart (Run flutter format to format lib/delegate/a.dart.)
  • lib/delegate/custom_localization_delegate.dart (Run flutter format to format lib/delegate/custom_localization_delegate.dart.)
  • lib/delegate/sliver_appbar_delegate.dart (Run flutter format to format lib/delegate/sliver_appbar_delegate.dart.)
  • lib/dialog/a.dart (Run flutter format to format lib/dialog/a.dart.)
  • lib/dialog/bottom_dialog.dart (Run flutter format to format lib/dialog/bottom_dialog.dart.)
  • lib/dialog/input_dialog.dart (Run flutter format to format lib/dialog/input_dialog.dart.)
  • lib/dialog/massage_dialog.dart (Run flutter format to format lib/dialog/massage_dialog.dart.)
  • lib/dialog/select_dialog.dart (Run flutter format to format lib/dialog/select_dialog.dart.)
  • lib/enums/a.dart (Run flutter format to format lib/enums/a.dart.)
  • lib/page/a.dart (Run flutter format to format lib/page/a.dart.)
  • lib/page/base/mini_detail_page.dart (Run flutter format to format lib/page/base/mini_detail_page.dart.)
  • lib/page/base/mini_state.dart (Run flutter format to format lib/page/base/mini_state.dart.)
  • lib/page/images_view_page.dart (Run flutter format to format lib/page/images_view_page.dart.)
  • lib/page/scrawl_Location_page.dart (Run flutter format to format lib/page/scrawl_Location_page.dart.)
  • lib/page/select_page.dart (Run flutter format to format lib/page/select_page.dart.)
  • lib/res/a.dart (Run flutter format to format lib/res/a.dart.)
  • lib/res/colors.dart (Run flutter format to format lib/res/colors.dart.)
  • lib/res/styles.dart (Run flutter format to format lib/res/styles.dart.)
  • lib/tools.dart (Run flutter format to format lib/tools.dart.)
  • lib/util/a.dart (Run flutter format to format lib/util/a.dart.)
  • lib/util/navigator_util.dart (Run flutter format to format lib/util/navigator_util.dart.)
  • lib/widget/a.dart (Run flutter format to format lib/widget/a.dart.)
  • lib/widget/badge_widget.dart (Run flutter format to format lib/widget/badge_widget.dart.)
  • lib/widget/border_widget.dart (Run flutter format to format lib/widget/border_widget.dart.)
  • lib/widget/select_widget.dart (Run flutter format to format lib/widget/select_widget.dart.)

Maintenance issues and suggestions

Support latest dependencies. (-10 points)

The version constraint in pubspec.yaml does not support the latest published versions for 1 dependency (amap_location_fluttify).

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
amap_location_fluttify ^0.8.11+481e45c 0.8.11+481e45c 0.10.0+e74b91b
cached_network_image ^2.0.0-rc 2.0.0
flutter 0.0.0
flutter_spinkit ^4.1.2+1 4.1.2+1
flutter_svg ^0.17.3+1 0.17.3+1
flutter_widget_from_html ^0.3.1-rc 0.3.2+2 0.4.0-rc.2020021401
keyboard_actions ^3.2.1 3.2.1
material_design_icons_flutter ^4.0.5045 4.0.5045
mini_tools ^0.1.3 0.1.3
oktoast ^2.2.0 2.3.1+1
permission_handler ^5.0.0+hotfix.1 5.0.0+hotfix.3
qr_flutter ^3.2.0 3.2.0
url_launcher ^5.1.1 5.4.2
webview_flutter ^0.3.18+1 0.3.19+9
Transitive dependencies
amap_core_fluttify 0.5.6+3ebdbdc 0.6.0+b2681d9
async 2.4.1
charcode 1.1.3
chewie 0.9.10
collection 1.14.11 1.14.12
convert 2.1.1
cookie_jar 1.0.1
crypto 2.1.4
csslib 0.16.1
dio 2.2.2 3.0.9
flutter_cache_manager 1.1.3
flutter_image_compress 0.6.5+1
flutter_web_plugins 0.0.0
flutter_widget_from_html_core 0.3.2+2 0.4.0-rc.2020021401
foundation_fluttify 0.4.18 0.5.0
html 0.14.0+3
http 0.12.0+4
http_parser 3.1.4
meta 1.1.8
open_iconic_flutter 0.3.0
path 1.6.4
path_drawing 0.4.1
path_parsing 0.1.4
path_provider 1.6.5
path_provider_macos 0.0.4
path_provider_platform_interface 1.0.1
pedantic 1.9.0
permission_handler_platform_interface 2.0.0
petitparser 3.0.2
platform 2.2.1
plugin_platform_interface 1.0.2
qr 1.2.0
shared_preferences 0.5.6+3
shared_preferences_macos 0.0.1+6
shared_preferences_platform_interface 1.0.3
shared_preferences_web 0.1.2+4
sky_engine 0.0.99
source_span 1.7.0
sqflite 1.3.0
sqflite_common 1.0.0+1
string_scanner 1.0.5
synchronized 2.2.0
term_glyph 1.1.0
typed_data 1.1.6
url_launcher_macos 0.0.1+4
url_launcher_platform_interface 1.0.6
url_launcher_web 0.1.1+1
uuid 2.0.4
vector_math 2.0.8
video_player 0.10.8+1
video_player_platform_interface 1.0.5
video_player_web 0.1.2+1
wakelock 0.1.4+1
xml 3.7.0 4.1.0
Dev dependencies
flutter_test