buck 0.1.4+1

  • Readme
  • Changelog
  • Example
  • Installing
  • 48

buck #

Pub

An assembled flutter application framework.

Old longings nomadic leap, Chafing at custom's chain; Again from its brumal sleep Wakens the ferine stain.

Getting Started #

dependencies:
 buck: ^0.1.4+1

Completed #

  • [x] 自定义功能点及分组
  • [x] 自定义个人中心通用功能点
  • [x] 快捷菜单
  • [x] 消息推送
  • [x] 点击消息跳转到对应功能点
  • [x] 远程强制登出
  • [x] 后台配置一个账户同一时间是否只允许一台设备在线
  • [x] 切换主题(lightdark
  • [x] 一系列自定义组件
  • [x] 配置服务器地址功能
  • [x] 系统升级提醒
  • [x] 加密请求(RSA)
  • [x] 解密响应数据(AES+RSA)

0.1.4+1 - 2020/05/18 #

0.1.3+21 - 2020/05/18 #

0.1.3+20 - 2020/05/18 #

0.1.3+19 - 2020/05/14 #

  • upgrade number field.

0.1.3+18 - 2020/05/09 #

  • Add properties of sync button —— enable and shape.

0.1.3+17 - 2020/05/08 #

  • Login with a device serial number.

0.1.3+16 - 2020/05/08 #

  • Add the sync button.

0.1.3+15 - 2020/04/29 #

  • DynamicList support for custom dividers.

0.1.3+14 - 2020/04/17. #

  • Fix LoginClient Bug.

0.1.3+13 - 2020/04/17. #

  • Fix DioClient Bug.

0.1.3+12 - 2020/04/17. #

  • upgrade dynamic list widget.

0.1.3+11 - 2020/04/03. #

0.1.3+10 - 2020/04/03. #

0.1.3+9 - 2020/04/03. #

0.1.3+8 - 2020/03/26. #

0.1.3+7 - 2020/03/26. #

0.1.3+6 - 2020/03/24. #

0.1.3+5 - 2020/03/24. #

0.1.3+4 - 2020/03/24. #

0.1.3+3 - 2020/03/24. #

0.1.3+2 - 2020/03/22. #

0.1.3+1 - 2020/03/18. #

0.1.3 - 2020/03/13. #

  • Prepare for 1.0.0 version of sensors and package_info. (dart_lsc)

0.1.2+3 - 2020/02/12. #

  • FORMAT

0.1.2+2 - 2020/02/12. #

  • FIX BUG
  • FORMAT

0.1.2+1 - 2020/02/12. #

  • FIX BUG
  • FORMAT

0.1.2 - 2020/02/12. #

0.0.2 - 2020/01/16. #

0.1.1 - 2020/01/16. #

0.1.0 - 2020/01/16. #

0.0.1 - 2020/01/16. #

example/lib/main.dart

import 'package:buck/buck.dart';
import 'package:buck/basic_app.dart';
import 'package:buck/utils/rsa_helper.dart';
import 'package:buck_example/menus/bundle_dialog.dart';
import 'package:buck_example/menus/bundle_form.dart';
import 'package:buck_example/menus/bundle_list.dart';
import 'package:buck_example/menus/bundle_loading.dart';
import 'package:buck_example/menus/bundle_scaffold.dart';
import 'package:buck_example/pianos/piano_album.dart';
import 'package:buck_example/pianos/piano_card.dart';
import 'package:buck_example/pianos/piano_collect.dart';
import 'package:buck_example/pianos/piano_earth.dart';
import 'package:buck_example/pianos/piano_expression.dart';
import 'package:buck_example/pianos/piano_setting.dart';
import 'package:flutter/material.dart';

const BASE_URL = 'http://172.0.66.104:80';
//const BASE_URL = 'http://10.1.10.177:8001';

const CONNECT_API = '/connect';
const LOGIN_API = '/auth/guest/app_login';
const LIST_MESSAGE_API = '/admin/app/list_own';
const READ_MESSAGE_API = '/admin/app/read';
const VERSION_PATH_API = '/admin/app_version/latest';

const LOGO_PATH = "assets/images/logo.png";
const HOME_TITLE = "BUCK";
const TITLE_LABEL = "BUCK";
const BACKGROUND_PATH = "assets/images/background.png";
const WELCOME_LABEL =
    "Albert Einstein: Logic will get you from A to B. Imagination will take you everywhere.";

Future<void> main() async {
  Buck buck = Buck.getInstance();
  await buck.init(
      baseUrl: BASE_URL,
      connectTimeout: 20000,
      requestTimeout: 40000,
      menuFree: true);
  buck.settingCommonPath(
      connectApi: CONNECT_API,
      loginApi: LOGIN_API,
      listMessageApi: LIST_MESSAGE_API,
      readMessageApi: READ_MESSAGE_API,
      versionApi: VERSION_PATH_API);

  buck.installMenus('Alpha', [
    BundleDialog(),
    BundleList(),
    BundleForm(key: Key('c-Deliver')),
    BundleLoading()
  ]);
  buck.installMenus('Bate', [BundleScaffold()]);
  buck.installPianos('Piano Group A', [PianoEarth()]);
  buck.installPianos('Piano Group B',
      [PianoCollect(), PianoAlbum(), PianoCard(), PianoExpression()]);
  buck.installPianos('Piano Group C', [PianoSetting()]);

  await RsaHelper.getInstance().init(
    clientPublicKeyPath: 'assets/rsa/public_key.pem',
    clientPrivateKeyPath: 'assets/rsa/private_key.pem',
  );
  runApp(BasicApp(homeTitle: HOME_TITLE));
}

Use this package as a library

1. Depend on it

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


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

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

  • Dart: 2.8.2
  • pana: 0.13.8-dev
  • Flutter: 1.17.1

Health suggestions

Fix lib/login/login_page.dart. (-1 points)

Analysis of lib/login/login_page.dart reported 2 hints:

line 126 col 32: 'subhead' is deprecated and shouldn't be used. This is the term used in the 2014 version of material design. The modern term is subtitle1. This feature was deprecated after v1.13.8..

line 156 col 34: 'subhead' is deprecated and shouldn't be used. This is the term used in the 2014 version of material design. The modern term is subtitle1. This feature was deprecated after v1.13.8..

Fix lib/widgets/dialogs/expound_dialog.dart. (-1 points)

Analysis of lib/widgets/dialogs/expound_dialog.dart reported 2 hints:

line 38 col 60: 'title' is deprecated and shouldn't be used. This is the term used in the 2014 version of material design. The modern term is headline6. This feature was deprecated after v1.13.8..

line 49 col 66: 'body1' is deprecated and shouldn't be used. This is the term used in the 2014 version of material design. The modern term is bodyText2. This feature was deprecated after v1.13.8..

Fix lib/widgets/dialogs/upgrade_dialog.dart. (-1 points)

Analysis of lib/widgets/dialogs/upgrade_dialog.dart reported 2 hints:

line 67 col 58: 'title' is deprecated and shouldn't be used. This is the term used in the 2014 version of material design. The modern term is headline6. This feature was deprecated after v1.13.8..

line 78 col 64: 'body1' is deprecated and shouldn't be used. This is the term used in the 2014 version of material design. The modern term is bodyText2. This feature was deprecated after v1.13.8..

Fix additional 4 files with analysis or formatting issues. (-2.50 points)

Additional issues in the following files:

  • lib/widgets/dialogs/whether_dialog.dart (2 hints)
  • lib/login/widgets/forward_button.dart (1 hint)
  • lib/login/widgets/header_text.dart (1 hint)
  • lib/widgets/dynamic_list.dart (1 hint)

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
cupertino_icons ^0.1.2 0.1.3
device_info ^0.4.1+4 0.4.2+4
device_sn ^0.1.1 0.1.1
dio ^3.0.9 3.0.9
encrypt ^4.0.0 4.0.2
flutter 0.0.0
flutter_local_notifications ^1.4.0 1.4.4 1.5.0-beta.1
flutter_spinkit ^4.1.2 4.1.2+1
fluttertoast ^4.0.1 4.0.1
http_parser ^3.1.3 3.1.4
open_file ^3.0.0 3.0.1
package_info >=0.4.0+13 <2.0.0 0.4.1
path_provider ^1.6.5 1.6.10
pda_scanner ^0.2.6 0.2.6
permission_handler ^5.0.0+hotfix.6 5.0.0+hotfix.8
pointycastle ^1.0.2 1.0.2
rxdart ^0.24.0 0.24.1
shared_preferences ^0.5.6 0.5.7+3
vibrate ^0.0.4 0.0.4
Transitive dependencies
args 1.6.0
asn1lib 0.6.4
charcode 1.1.3
clock 1.0.1
collection 1.14.12
convert 2.1.1
crypto 2.1.5
ffi 0.1.3
file 5.1.0
flutter_local_notifications_platform_interface 1.0.1 2.0.0-beta.1
flutter_web_plugins 0.0.0
intl 0.16.1
meta 1.1.8
path 1.7.0
path_provider_linux 0.0.1+1
path_provider_macos 0.0.4+3
path_provider_platform_interface 1.0.2
permission_handler_platform_interface 2.0.0
platform 2.2.1
plugin_platform_interface 1.0.2
process 3.0.13
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
vector_math 2.0.8
xdg_directories 0.1.0
Dev dependencies
flutter_test