multiline 3.0.0 copy "multiline: ^3.0.0" to clipboard
multiline: ^3.0.0 copied to clipboard

Provides convenient access to multiline String records with method extensions.

example/main.dart

// ignore_for_file: unused_local_variable, cascade_invocations, avoid_print

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

void main() {
  /// Return formatted with pipeline symbol "`|`" [String].
  final string =
    '''
    |/*
    | * List of books and the number of
    | * authors associated with each book
    | */
    |SELECT
    |      `books`.`title` AS `Title`,
    |       count(*)       AS `Authors`
    |FROM  `books`
    |JOIN  `authors`
    |  ON  `books`.`isbn` = `authors`.`isbn`
    |GROUP BY
    |      `books`.`title`
    |ORDER BY
    |      `books`.`title` ASC
    |;
    '''.multiline();
  print(string);

  /// Splits the string and returns a [Iterable] of substrings.
  final iterable =
    '''
    | * One
    | * Two
    | * Three
    '''.multilineSplit();
  iterable.forEach(print);
}
25
likes
130
pub points
59%
popularity

Publisher

verified publisherplugfox.dev

Provides convenient access to multiline String records with method extensions.

Homepage
Repository (GitHub)
View/report issues

Documentation

API reference

License

unknown (LICENSE)

More

Packages that depend on multiline