multiline
3.0.0, released 6 years ago by plugfox.dev
Provides convenient access to multiline String records with method extensions.
What it does
Provides method extensions on strings to easily handle multiline templates, mockups, and SQL queries using a pipeline symbol to indicate the beginning of a line. Allows formatting strings with multiline() or splitting them into iterables using multilineSplit().
AI-written summary of version 3.0.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to format large SQL queries or text templates inside Dart strings cleanly.
- You want to strip pipeline symbols and clean up multiline string indentation.
Skip it when
- You are working with standard raw strings where custom line-start symbols are not desired.
Strengths
- Simple method extensions for string manipulation.
- Useful for keeping templates and SQL queries readable in code.
Weaknesses
- Very niche utility that can often be achieved with standard Dart multiline string features.
- Unknown license terms listed on pubspec metadata.
Setup
- Kind
- Pure Dart
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 0
import 'package:multiline/multiline.dart';
void main() {
final string = '''
|SELECT
| `books`.`title` AS `Title`
|FROM `books`;
'''.multiline();
print(string);
}Alternatives
Packages that do the same job and could replace multiline.
- fast_immutable_collections
Fast immutable lists, sets, maps, and multimaps for Dart
91Compare - extension_utils
Dart and Flutter extension library for strings, collections, dates, numbers, and colors.
74Compare - validators2
String validation and sanitization for Dart.
83Compare - kartal
Collection of Dart and Flutter extensions for context, primitive variables, and common utilities.
71Compare