base_utils 1.1.0

base_utils #

A new flutter package project.

Getting Started #

For help getting started with Flutter, view our online documentation.

For help on editing package code, view the documentation.

Use this package as a library

1. Depend on it

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


dependencies:
  base_utils: ^1.1.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:base_utils/base/base.dart';
import 'package:base_utils/base/dialog_manager.dart';
import 'package:base_utils/base/lifecycle.dart';
import 'package:base_utils/base/system_lifecycle_listener.dart';
import 'package:base_utils/bloc/base_bloc.dart';
import 'package:base_utils/bloc/bloc_providers.dart';
import 'package:base_utils/model/device.dart';
import 'package:base_utils/model/merchant.dart';
import 'package:base_utils/model/rest.dart';
import 'package:base_utils/native_methods.dart';
import 'package:base_utils/network/http_utils.dart';
import 'package:base_utils/network/service.dart';
import 'package:base_utils/network/user_service.dart';
import 'package:base_utils/notifications/notifications.dart';
import 'package:base_utils/router/router.dart';
import 'package:base_utils/share_preference/share_preference_manager.dart';
import 'package:base_utils/sound/sound_manager.dart';
import 'package:base_utils/ui/animation_widget.dart';
import 'package:base_utils/ui/base_list_widget.dart';
import 'package:base_utils/ui/dash.dart';
import 'package:base_utils/ui/error_loading.dart';
import 'package:base_utils/ui/network_aware_state.dart';
import 'package:base_utils/ui/res/colors.dart';
import 'package:base_utils/ui/res/dimens.dart';
import 'package:base_utils/ui/res/images.dart';
import 'package:base_utils/ui/res/strings.dart';
import 'package:base_utils/ui/restart_widget.dart';
import 'package:base_utils/ui/scaless_text.dart';
import 'package:base_utils/utils/color_utils.dart';
import 'package:base_utils/utils/currency_format.dart';
import 'package:base_utils/utils/date_utils.dart';
import 'package:base_utils/utils/encryption_utils.dart';
import 'package:base_utils/utils/logging_utils.dart';
import 'package:base_utils/utils/map_utils.dart';
import 'package:base_utils/utils/number_utils.dart';
import 'package:base_utils/utils/sendo_page_route.dart';
import 'package:base_utils/utils/string_utils.dart';
import 'package:base_utils/utils/system_utils.dart';
import 'package:base_utils/utils/theme_utils.dart';
import 'package:base_utils/utils/uri_utils.dart';
import 'package:base_utils/utils/widget_utils.dart';
import 'package:base_utils/video/chewie.dart';
import 'package:base_utils/video/chewie_player.dart';
import 'package:base_utils/video/chewie_progress_colors.dart';
import 'package:base_utils/video/cupertino_controls.dart';
import 'package:base_utils/video/cupertino_progress_bar.dart';
import 'package:base_utils/video/material_controls.dart';
import 'package:base_utils/video/material_progress_bar.dart';
import 'package:base_utils/video/player_with_controls.dart';
import 'package:base_utils/video/user_control_event.dart';
import 'package:base_utils/video/utils.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
24
Health:
Code health derived from static analysis. [more]
62
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
0
Overall:
Weighted score of the above. [more]
30
Learn more about scoring.

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

  • Dart: 2.7.0
  • pana: 0.13.4
  • Flutter: 1.12.13+hotfix.5

Health issues and suggestions

Fix lib/base/system_lifecycle_listener.dart. (-25.38 points)

Analysis of lib/base/system_lifecycle_listener.dart failed with 1 error, 1 hint:

line 35 col 54: The getter 'suspending' isn't defined for the class 'AppLifecycleState'.

line 28 col 48: This function has a return type of 'Future

Fix lib/bloc/bloc_providers.dart. (-2.48 points)

Analysis of lib/bloc/bloc_providers.dart reported 5 hints:

line 18 col 7: This class (or a class which this class inherits from) is marked as '@immutable', but one or more of its instance fields are not final: BlocProvider.bloc, BlocProvider.builder

line 31 col 12: This function has a return type of 'T', but doesn't end with a return statement.

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

line 39 col 19: 'ancestorStateOfType' is deprecated and shouldn't be used. Use findAncestorStateOfType instead. This feature was deprecated after v1.12.1..

line 39 col 39: 'TypeMatcher' is deprecated and shouldn't be used. TypeMatcher has been deprecated because it is no longer used in framework(only in deprecated methods). This feature was deprecated after v1.12.1..

Fix lib/ui/animation_widget.dart. (-2.48 points)

Analysis of lib/ui/animation_widget.dart reported 5 hints:

line 24 col 5: The class 'Future' wasn't exported from 'dart:core' until version 2.1, but this code is required to be able to run on earlier versions.

line 176 col 17: 'ancestorStateOfType' is deprecated and shouldn't be used. Use findAncestorStateOfType instead. This feature was deprecated after v1.12.1..

line 176 col 43: 'TypeMatcher' is deprecated and shouldn't be used. TypeMatcher has been deprecated because it is no longer used in framework(only in deprecated methods). This feature was deprecated after v1.12.1..

line 219 col 9: The class 'Future' wasn't exported from 'dart:core' until version 2.1, but this code is required to be able to run on earlier versions.

line 358 col 9: The class 'Future' wasn't exported from 'dart:core' until version 2.1, but this code is required to be able to run on earlier versions.

Fix additional 22 files with analysis or formatting issues. (-13.97 points)

Additional issues in the following files:

  • lib/router/router.dart (4 hints)
  • lib/share_preference/share_preference_manager.dart (4 hints)
  • lib/utils/widget_utils.dart (3 hints)
  • lib/model/merchant.dart (2 hints)
  • lib/ui/base_list_widget.dart (2 hints)
  • lib/ui/restart_widget.dart (2 hints)
  • lib/ui/scaless_text.dart (2 hints)
  • lib/utils/string_utils.dart (2 hints)
  • lib/native_methods.dart (1 hint)
  • lib/network/service.dart (1 hint)
  • lib/network/user_service.dart (1 hint)
  • lib/notifications/notifications.dart (1 hint)
  • lib/sound/sound_manager.dart (1 hint)
  • lib/ui/error_loading.dart (1 hint)
  • lib/utils/encryption_utils.dart (1 hint)
  • lib/base/base.dart (Run flutter format to format lib/base/base.dart.)
  • lib/bloc/base_bloc.dart (Run flutter format to format lib/bloc/base_bloc.dart.)
  • lib/utils/number_utils.dart (Run flutter format to format lib/utils/number_utils.dart.)
  • lib/utils/uri_utils.dart (Run flutter format to format lib/utils/uri_utils.dart.)
  • lib/video/cupertino_controls.dart (Run flutter format to format lib/video/cupertino_controls.dart.)
  • lib/video/material_controls.dart (Run flutter format to format lib/video/material_controls.dart.)
  • lib/video/user_control_event.dart (Run flutter format to format lib/video/user_control_event.dart.)

Maintenance issues and suggestions

Support latest dependencies. (-120 points)

The version constraint in pubspec.yaml does not support the latest published versions for 12 dependencies (audioplayers, cached_network_image, device_info, flutter_advanced_networkimage, flutter_staggered_grid_view, flutter_svg, http, intl, rxdart, shimmer, url_launcher, video_player).

Prefer published dependencies. (-100 points)

The source code in a git repository is mutable and could disappear.

Provide a file named CHANGELOG.md. (-20 points)

Changelog entries help developers follow the progress of your package. See the example generated by stagehand.

Use constrained dependencies. (-20 points)

The pubspec.yaml contains 1 dependency without version constraints. Specify version ranges for the following dependencies: flutter_add_calendar.

Homepage URL doesn't exist. (-20 points)

At the time of the analysis the homepage field https://www.flutter.io was unreachable.

The package description is too short. (-12 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.

Maintain an example. (-10 points)

Create a short demo in the example/ directory to show how to use this package.

Common filename patterns include main.dart, example.dart, and base_utils.dart. Packages with multiple examples should provide example/README.md.

For more information see the pub package layout conventions.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.68.0 <3.0.0
audioplayers ^0.7.8 0.7.8 0.13.7
cached_network_image ^0.4.2 0.4.2 2.0.0
clone_local_notifications ^0.0.3 0.0.4
connectivityswift ^0.0.4 0.0.4
core_plugin ^0.2.5 0.2.20
cupertino_icons ^0.1.2 0.1.3
device_info ^0.2.1 0.2.1 0.4.1+4
flutter 0.0.0
flutter_add_calendar 0.0.3
flutter_advanced_networkimage ^0.3.8 0.3.8 0.6.2
flutter_staggered_grid_view ^0.2.2 0.2.7 0.3.0
flutter_svg ^0.6.0 0.6.3 0.15.0
flutter_youtube_extractor ^0.0.8 0.0.8
http ^0.11.3 0.11.3+17 0.12.0+4
image ^2.0.7 2.1.12
intl ^0.15.7 0.15.8 0.16.1
open_iconic_flutter >=0.3.0 <0.4.0 0.3.0
rect_getter ^0.0.1 0.0.1
rxdart ^0.18.1 0.18.1 0.23.1
settings ^0.0.4 0.0.4
shimmer ^0.0.5 0.0.6 1.0.1
url_launcher ^4.0.0 4.2.0+3 5.4.1
video_player ^0.9.0 0.9.0 0.10.5+2
Transitive dependencies
archive 2.0.13
args 1.5.2
async 2.4.0
charcode 1.1.2
collection 1.14.11 1.14.12
convert 2.1.1
crypto 2.1.4
flutter_cache_manager 0.1.2 1.1.3
http_parser 3.1.3
meta 1.1.8
path 1.6.4
path_drawing 0.4.1
path_parsing 0.1.4
path_provider 0.4.1 1.5.1
petitparser 3.0.0
platform 2.2.1
shared_preferences 0.4.3 0.5.6
sky_engine 0.0.99
source_span 1.6.0
string_scanner 1.0.5
synchronized 1.5.3+2 2.1.1
term_glyph 1.1.0
typed_data 1.1.6
uuid 1.0.3 2.0.4
vector_math 2.0.8
xml 3.7.0