multiline 1.0.1+1

Dart native js
Flutter Android iOS web

Provides convenient access to multiline String records with method extensions.

multiline #

chatroom icon MIT License Pub

About #

Provides convenient access to multiline String records with method extensions.
Useful for templates, mockups and SQL queries.

Just use the symbol "|" to indicate the beginning of a line.
Beautiful code formatting using some useful extensions to the String methods.

Available method extensions:

  • multiline() - for multiline string (don't be afraid to use, it's fast enough)

  • multilineSplit() - to get a listing of strings

  • multilineAsync() - for asynchronously getting a multiline string

  • multilineSplitAsync() - for asynchronously getting a stream with lines

For example: #

import 'package:multiline/multiline.dart';  // <= import package

void main() {
   // for multiline string (don't be afraid to use, it's fast enough)
   final String string = '''
   |Hello
   |  multiline!
   '''.multiline();

   // to get a listing of strings
   final Iterable<String> stringIterable = '''
   |Hello
   |  multiline!
   '''.multilineSplit();

   // for asynchronously getting a multiline string
   final Future<String> stringAsync = '''
   |Hello
   |  multiline!
   '''.multilineAsync();

   // for asynchronously getting a stream with lines
   final Stream<String> stringStream = '''
   |Hello
   |  multiline!
   '''.multilineSplitAsync();
}

Changelog #

Refer to the Changelog to get all release notes.

6
likes
100
pub points
44%
popularity

Publisher

plugfox.dev

Provides convenient access to multiline String records with method extensions.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

More

Packages that depend on multiline