我有一个多行描述,如下所示:
List<Hymnal> _items = [
Hymnal(
id: '1',
indexNumber: '001',
title: 'O Worship the Lord',
hymns:
" 1
O worship the Lord in the beauty of holiness,
Bow down before Him, His glory proclaim;
With gold of obedience, and incense of lowliness,
Kneel and adore Him: the Lord is His name.")];
上面的代码行引起了一些问题,因为我猜到赞美诗的格式。这是硬编码的,我只是将其放在Hymns.dart中。有关如何解决此问题的任何建议?
hymns:
''' 1
O worship the Lord in the beauty of holiness,
Bow down before Him, His glory proclaim;
With gold of obedience, and incense of lowliness,
Kneel and adore Him: the Lord is His name.'''
This可以提供帮助。