multiline 1.0.1+1 copy "multiline: ^1.0.1+1" to clipboard
multiline: ^1.0.1+1 copied to clipboard

outdated

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.

27
likes
40
points
53
downloads

Publisher

verified publisherplugfox.dev

Weekly Downloads

Provides convenient access to multiline String records with method extensions.

Repository (GitHub)

License

MIT (license)

More

Packages that depend on multiline