flex 0.5.1

  • Readme
  • Changelog
  • Example
  • Installing
  • new73

Flex #

Pub License GitHub code size in bytes GitHub stars

Flex is a collection of classes, extensions and utilities to aid faster development

Changelog #

0.5.1 #

  • Fix bug in string template logic not detecting \ properly
  • Fix bug in string template logic adding variable to beginning of substitution instead of the character immediately before, if present
  • Fix bug in string template logic caused by match group 1 being null if the variable is at the beginning of the string

0.5.0 - ISO Localization #

  • Add all ISO language codes
  • Add all ISO country codes
  • Add all ISO locale codes
  • Fix bug in string template regex not allowing variable at the beginning of a string

0.4.1 #

  • Change String.fillTemplate regex to support escaping $ with a \

0.4.0 - Add Plexus Localizations #

  • Add localization implementation from Plexus

0.3.0+2 #

  • Add comment explaining try/on block to bypass useless lint

0.3.0 - Vastly improve PatientStreamQueue

  • Fix logic in PatientStreamQueue._onCancel
  • Split PatientStreamQueue.dispose into PatientStreamQueue.close returning a Future<void>, which disposes of the PatientStreamQueue waiting for events to be processed depending on the value of named parameter wait, and PatientStreamQueue.dispose returning a void, which disposes of the PatientStreamQueue without waiting for events to be processed
  • Wrap stdin.echoMode calls in prompt and promptSync in try/catch to support platforms that don't support setting echo mode (ex. Dart-Code terminal output mode)
  • Split example into 3 files
  • Add example launch configuration

0.2.2 #

  • Fix logic in PatientStreamQueue.dispose

0.2.1 #

  • Add sendEncodedEvent() for sending Plexus encoded events

0.2.0 #

  • Add encodedEventHeader and encodedEventSeparator to constants.dart
  • Fix PatientStreamQueue.dispose, PatientStreamQueue._onListen and PatientStreamQueue._onCancel logic
  • Change typedefs to use generic function declaration syntax
  • Enable prefer_expression_function_bodies, prefer_generic_function_type_aliases and use_function_type_syntax_for_parameters in analysis_options.yaml
  • Switch expose/list.dart and expose/maps.dart to use generic typedefs instead of inline function declarations

0.1.0 #

Initial Development Release

example/README.md

Flex Example #

The following is a basic example of some features provided by Flex.

import 'package:flex/flex.dart';

Future<void> main(List<String> arguments) async {
  final name = await prompt<String>('What is your name?');
  print(r'Hello, $name'.fillTemplate({'name': name}));
}

Use this package as a library

1. Depend on it

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


dependencies:
  flex: ^0.5.1

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter pub get

Alternatively, your editor might support pub get or 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:flex/flex.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
46
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
73
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

Health suggestions

Format lib/src/expose/list.dart.

Run dartfmt to format lib/src/expose/list.dart.

Format lib/src/expose/maps.dart.

Run dartfmt to format lib/src/expose/maps.dart.

Format lib/src/extension/iterable.dart.

Run dartfmt to format lib/src/extension/iterable.dart.

Fix additional 7 files with analysis or formatting issues.

Additional issues in the following files:

  • lib/src/extension/string.dart (Run dartfmt to format lib/src/extension/string.dart.)
  • lib/src/lang.dart (Run dartfmt to format lib/src/lang.dart.)
  • lib/src/operator_wrapper.dart (Run dartfmt to format lib/src/operator_wrapper.dart.)
  • lib/src/patient_stream_queue.dart (Run dartfmt to format lib/src/patient_stream_queue.dart.)
  • lib/src/prompt.dart (Run dartfmt to format lib/src/prompt.dart.)
  • lib/src/typedef.dart (Run dartfmt to format lib/src/typedef.dart.)
  • lib/src/util.dart (Run dartfmt to format lib/src/util.dart.)

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.6.0 <3.0.0
intl ^0.16.0 0.16.1
io ^0.3.3 0.3.3
meta ^1.1.8 1.1.8
rxdart ^0.23.1 0.23.1
tuple ^1.0.3 1.0.3
Transitive dependencies
charcode 1.1.2
collection 1.14.12
matcher 0.12.6
path 1.6.4
quiver 2.1.2+1
source_span 1.6.0
stack_trace 1.9.3
string_scanner 1.0.5
term_glyph 1.1.0
Dev dependencies
test ^1.9.4